java.lang.AssertionError: assertion failed: javax.annotation.CheckReturnValue

Scala JIRA | Richard Bradley | 2 years ago
tip
Your exception is missing from the Samebug knowledge base.
Here are the best solutions we found on the Internet.
Click on the to mark the helpful solution and get rewards for you help.
  1. 0

    I have isolated a compiler crash. I haven't been able to find a pre-existing issue; sorry if I missed one. It is triggered by a particular method in Google Guava (a Java lib). Perhaps there is something unusual about that method? Please let me know if I can provide any further information. h2. Source code to reproduce Available at [https://github.com/RichardBradley/scala-compiler-crash] **project/Build.scala** {code} import sbt._ import sbt.Keys._ object TestProject extends Build { lazy val project = Project("Test", file(".")) .settings(libraryDependencies ++= Seq( "com.google.guava" % "guava" % "17.0")) } {code} **src/main/scala/Test.scala** {code} import com.google.common.io.BaseEncoding import Test._ class Test { def encode(s: String): String = { myEncoding.encode(s.getBytes()) } } object Test { val myEncoding: BaseEncoding = BaseEncoding.base64Url().omitPadding() } {code} Then run "{{sbt compile}}" h2. Compiler crash output {code} [info] Loading project definition from E:\Work\compiler-error\project [info] Set current project to Test (in build file:/E:/Work/compiler-error/) [info] Compiling 1 Scala source to E:\Work\compiler-error\target\scala-2.10\classes... [warn] Class javax.annotation.CheckReturnValue not found - continuing with a stub. [warn] Class javax.annotation.CheckReturnValue not found - continuing with a stub. [warn] Class javax.annotation.CheckReturnValue not found - continuing with a stub. [warn] Class javax.annotation.CheckReturnValue not found - continuing with a stub. [warn] Class javax.annotation.CheckReturnValue not found - continuing with a stub. [error] [error] while compiling: E:\Work\compiler-error\src\main\scala\Test.scala [error] during phase: refchecks [error] library version: version 2.10.4 [error] compiler version: version 2.10.4 [error] reconstructed args: -bootclasspath C:\Program Files (x86)\Java\jre7\lib\resources.jar;C:\Program Files (x86)\Java\jre7\lib\rt.jar;C:\Program Files (x86)\Java\jre7\lib\sunrsasign.jar;C:\Program Files (x86)\Java\jre7\lib\jsse.jar;C:\Program Files (x86)\Java\jre7\lib\jce.jar;C:\Program Files (x86)\Java\jre7\lib\charsets.jar;C:\Program Files (x86)\Java\jre7\lib\jfr.jar;C:\Program Files (x86)\Java\jre7\classes;C:\Users\rtb\.sbt\boot\scala-2.10.4\lib\scala-library.jar -classpath E:\Work\compiler-error\target\scala-2.10\classes;C:\Users\rtb\.ivy2\cache\com.google.guava\guava\bundles\guava-17.0.jar [error] [error] last tree to typer: This(object Test) [error] symbol: object Test (flags: <module>) [error] symbol definition: class Test extends AnyRef [error] tpe: Test.type [error] symbol owners: object Test -> package <empty> [error] context owners: object Test -> package <empty> [error] [error] == Enclosing template or block == [error] [error] Template( // val <local Test>: <notype> in object Test, tree.tpe=Test.type [error] "java.lang.Object" // parents [error] ValDef( [error] private [error] "_" [error] <tpt> [error] <empty> [error] ) [error] // 3 statements [error] DefDef( // def <init>(): Test.type in object Test [error] <method> [error] "<init>" [error] [] [error] List(Nil) [error] <tpt> // tree.tpe=Test.type [error] Block( // tree.tpe=Unit [error] Apply( // def <init>(): Object in class Object, tree.tpe=Object [error] Test.super."<init>" // def <init>(): Object in class Object, tree.tpe=()Object [error] Nil [error] ) [error] () [error] ) [error] ) [error] ValDef( // private[this] val myEncoding: com.google.common.io.BaseEncoding in object Test [error] private <local> <triedcooking> [error] "myEncoding " [error] <tpt> // tree.tpe=com.google.common.io.BaseEncoding [error] Apply( // def omitPadding(): com.google.common.io.BaseEncoding in class BaseEncoding, tree.tpe=com.google.common.io.BaseEncoding [error] com.google.common.io.BaseEncoding.base64Url()."omitPadding" // def omitPadding(): com.google.common.io.BaseEncoding in class BaseEncoding, tree.tpe=()com.google.common.io.BaseEncoding [error] Nil [error] ) [error] ) [error] DefDef( // val myEncoding: com.google.common.io.BaseEncoding in object Test [error] <method> <stable> <accessor> <triedcooking> [error] "myEncoding" [error] [] [error] Nil [error] <tpt> // tree.tpe=com.google.common.io.BaseEncoding [error] Test.this."myEncoding " // private[this] val myEncoding: com.google.common.io.BaseEncoding in object Test, tree.tpe=com.google.common.io.BaseEncoding [error] ) [error] ) [error] [error] == Expanded type of tree == [error] [error] ThisType(object Test) [error] [error] uncaught exception during compilation: java.lang.AssertionError java.lang.AssertionError: assertion failed: javax.annotation.CheckReturnValue at scala.reflect.internal.Symbols$Symbol.info(Symbols.scala:1212) at scala.reflect.internal.Symbols$TypeSymbol.isNonBottomSubClass(Symbols.scala:2821) at scala.reflect.internal.AnnotationInfos$AnnotationInfo.matches(AnnotationInfos.scala:295) at scala.reflect.internal.AnnotationInfos$Annotatable$class.dropOtherAnnotations(AnnotationInfos.scala:65) at scala.reflect.internal.AnnotationInfos$Annotatable$class.hasAnnotation(AnnotationInfos.scala:50) at scala.reflect.internal.Symbols$Symbol.hasAnnotation(Symbols.scala:112) at scala.reflect.internal.Symbols$Symbol.isDeprecated(Symbols.scala:723) at scala.tools.nsc.typechecker.RefChecks$RefCheckTransformer.checkDeprecated(RefChecks.scala:1385) at scala.tools.nsc.typechecker.RefChecks$RefCheckTransformer.transformSelect(RefChecks.scala:1648) at scala.tools.nsc.typechecker.RefChecks$RefCheckTransformer.transform(RefChecks.scala:1814) at scala.tools.nsc.typechecker.RefChecks$RefCheckTransformer.transform(RefChecks.scala:96) at scala.reflect.internal.Trees$class.itransform(Trees.scala:1219) at scala.reflect.internal.SymbolTable.itransform(SymbolTable.scala:13) at scala.reflect.internal.SymbolTable.itransform(SymbolTable.scala:13) at scala.reflect.api.Trees$Transformer.transform(Trees.scala:2897) at scala.tools.nsc.typechecker.RefChecks$RefCheckTransformer.transform(RefChecks.scala:1841) at scala.tools.nsc.typechecker.RefChecks$RefCheckTransformer.transform(RefChecks.scala:96) at scala.reflect.internal.Trees$$anonfun$itransform$1.apply(Trees.scala:1229) at scala.reflect.internal.Trees$$anonfun$itransform$1.apply(Trees.scala:1228) at scala.reflect.api.Trees$Transformer.atOwner(Trees.scala:2936) at scala.reflect.internal.Trees$class.itransform(Trees.scala:1227) at scala.reflect.internal.SymbolTable.itransform(SymbolTable.scala:13) at scala.reflect.internal.SymbolTable.itransform(SymbolTable.scala:13) at scala.reflect.api.Trees$Transformer.transform(Trees.scala:2897) at scala.tools.nsc.typechecker.RefChecks$RefCheckTransformer.transform(RefChecks.scala:1841) at scala.tools.nsc.typechecker.RefChecks$RefCheckTransformer.transformStat(RefChecks.scala:1337) at scala.tools.nsc.typechecker.RefChecks$RefCheckTransformer$$anonfun$transformStats$1.apply(RefChecks.scala:1268) at scala.tools.nsc.typechecker.RefChecks$RefCheckTransformer$$anonfun$transformStats$1.apply(RefChecks.scala:1268) at scala.collection.TraversableLike$$anonfun$flatMap$1.apply(TraversableLike.scala:251) at scala.collection.TraversableLike$$anonfun$flatMap$1.apply(TraversableLike.scala:251) at scala.collection.immutable.List.foreach(List.scala:318) at scala.collection.TraversableLike$class.flatMap(TraversableLike.scala:251) at scala.collection.AbstractTraversable.flatMap(Traversable.scala:105) at scala.tools.nsc.typechecker.RefChecks$RefCheckTransformer.transformStats(RefChecks.scala:1268) at scala.tools.nsc.typechecker.RefChecks$RefCheckTransformer.transformStats(RefChecks.scala:96) at scala.reflect.internal.Trees$class.itransform(Trees.scala:1276) at scala.reflect.internal.SymbolTable.itransform(SymbolTable.scala:13) at scala.reflect.internal.SymbolTable.itransform(SymbolTable.scala:13) at scala.reflect.api.Trees$Transformer.transform(Trees.scala:2897) at scala.tools.nsc.typechecker.RefChecks$RefCheckTransformer.transform(RefChecks.scala:1841) at scala.tools.nsc.typechecker.RefChecks$RefCheckTransformer.transform(RefChecks.scala:96) at scala.reflect.api.Trees$Transformer.transformTemplate(Trees.scala:2904) at scala.reflect.internal.Trees$$anonfun$itransform$4.apply(Trees.scala:1280) at scala.reflect.internal.Trees$$anonfun$itransform$4.apply(Trees.scala:1279) at scala.reflect.api.Trees$Transformer.atOwner(Trees.scala:2936) at scala.reflect.internal.Trees$class.itransform(Trees.scala:1278) at scala.reflect.internal.SymbolTable.itransform(SymbolTable.scala:13) at scala.reflect.internal.SymbolTable.itransform(SymbolTable.scala:13) at scala.reflect.api.Trees$Transformer.transform(Trees.scala:2897) at scala.tools.nsc.typechecker.RefChecks$RefCheckTransformer.transform(RefChecks.scala:1841) at scala.tools.nsc.typechecker.RefChecks$RefCheckTransformer.transform(RefChecks.scala:96) at scala.reflect.api.Trees$Transformer$$anonfun$transformTrees$1.apply(Trees.scala:2900) at scala.reflect.api.Trees$Transformer$$anonfun$transformTrees$1.apply(Trees.scala:2900) at scala.collection.immutable.List.loop$1(List.scala:170) at scala.collection.immutable.List.mapConserve(List.scala:186) at scala.reflect.api.Trees$Transformer.transformTrees(Trees.scala:2900) at scala.tools.nsc.typechecker.RefChecks$RefCheckTransformer.eliminateModuleDefs(RefChecks.scala:1316) at scala.tools.nsc.typechecker.RefChecks$RefCheckTransformer.transformStat(RefChecks.scala:1335) at scala.tools.nsc.typechecker.RefChecks$RefCheckTransformer$$anonfun$transformStats$1.apply(RefChecks.scala:1268) at scala.tools.nsc.typechecker.RefChecks$RefCheckTransformer$$anonfun$transformStats$1.apply(RefChecks.scala:1268) at scala.collection.TraversableLike$$anonfun$flatMap$1.apply(TraversableLike.scala:251) at scala.collection.TraversableLike$$anonfun$flatMap$1.apply(TraversableLike.scala:251) at scala.collection.immutable.List.foreach(List.scala:318) at scala.collection.TraversableLike$class.flatMap(TraversableLike.scala:251) at scala.collection.AbstractTraversable.flatMap(Traversable.scala:105) at scala.tools.nsc.typechecker.RefChecks$RefCheckTransformer.transformStats(RefChecks.scala:1268) at scala.tools.nsc.typechecker.RefChecks$RefCheckTransformer.transformStats(RefChecks.scala:96) at scala.reflect.internal.Trees$$anonfun$itransform$7.apply(Trees.scala:1298) at scala.reflect.internal.Trees$$anonfun$itransform$7.apply(Trees.scala:1298) at scala.reflect.api.Trees$Transformer.atOwner(Trees.scala:2936) at scala.reflect.internal.Trees$class.itransform(Trees.scala:1297) at scala.reflect.internal.SymbolTable.itransform(SymbolTable.scala:13) at scala.reflect.internal.SymbolTable.itransform(SymbolTable.scala:13) at scala.reflect.api.Trees$Transformer.transform(Trees.scala:2897) at scala.tools.nsc.typechecker.RefChecks$RefCheckTransformer.transform(RefChecks.scala:1841) at scala.tools.nsc.typechecker.RefChecks$RefCheckTransformer.transform(RefChecks.scala:96) at scala.tools.nsc.ast.Trees$Transformer.transformUnit(Trees.scala:227) at scala.tools.nsc.transform.Transform$Phase.apply(Transform.scala:30) at scala.tools.nsc.Global$GlobalPhase.applyPhase(Global.scala:464) at scala.tools.nsc.Global$GlobalPhase$$anonfun$run$1.apply(Global.scala:431) at scala.tools.nsc.Global$GlobalPhase$$anonfun$run$1.apply(Global.scala:431) at scala.collection.Iterator$class.foreach(Iterator.scala:727) at scala.collection.AbstractIterator.foreach(Iterator.scala:1157) at scala.tools.nsc.Global$GlobalPhase.run(Global.scala:431) at scala.tools.nsc.Global$Run.compileUnitsInternal(Global.scala:1583) at scala.tools.nsc.Global$Run.compileUnits(Global.scala:1557) at scala.tools.nsc.Global$Run.compileSources(Global.scala:1553) at scala.tools.nsc.Global$Run.compile(Global.scala:1662) at xsbt.CachedCompiler0.run(CompilerInterface.scala:123) at xsbt.CachedCompiler0.run(CompilerInterface.scala:99) at xsbt.CompilerInterface.run(CompilerInterface.scala:27) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at sbt.compiler.AnalyzingCompiler.call(AnalyzingCompiler.scala:102) at sbt.compiler.AnalyzingCompiler.compile(AnalyzingCompiler.scala:48) at sbt.compiler.AnalyzingCompiler.compile(AnalyzingCompiler.scala:41) at sbt.compiler.AggressiveCompile$$anonfun$3$$anonfun$compileScala$1$1.apply$mcV$sp(AggressiveCompile.scala:99) at sbt.compiler.AggressiveCompile$$anonfun$3$$anonfun$compileScala$1$1.apply(AggressiveCompile.scala:99) at sbt.compiler.AggressiveCompile$$anonfun$3$$anonfun$compileScala$1$1.apply(AggressiveCompile.scala:99) at sbt.compiler.AggressiveCompile.sbt$compiler$AggressiveCompile$$timed(AggressiveCompile.scala:166) at sbt.compiler.AggressiveCompile$$anonfun$3.compileScala$1(AggressiveCompile.scala:98) at sbt.compiler.AggressiveCompile$$anonfun$3.apply(AggressiveCompile.scala:143) at sbt.compiler.AggressiveCompile$$anonfun$3.apply(AggressiveCompile.scala:87) at sbt.inc.IncrementalCompile$$anonfun$doCompile$1.apply(Compile.scala:39) at sbt.inc.IncrementalCompile$$anonfun$doCompile$1.apply(Compile.scala:37) at sbt.inc.IncrementalCommon.cycle(Incremental.scala:99) at sbt.inc.Incremental$$anonfun$1.apply(Incremental.scala:38) at sbt.inc.Incremental$$anonfun$1.apply(Incremental.scala:37) at sbt.inc.Incremental$.manageClassfiles(Incremental.scala:65) at sbt.inc.Incremental$.compile(Incremental.scala:37) at sbt.inc.IncrementalCompile$.apply(Compile.scala:27) at sbt.compiler.AggressiveCompile.compile2(AggressiveCompile.scala:157) at sbt.compiler.AggressiveCompile.compile1(AggressiveCompile.scala:71) at sbt.compiler.AggressiveCompile.apply(AggressiveCompile.scala:46) at sbt.Compiler$.apply(Compiler.scala:75) at sbt.Compiler$.apply(Compiler.scala:66) at sbt.Defaults$.sbt$Defaults$$compileTaskImpl(Defaults.scala:770) at sbt.Defaults$$anonfun$compileTask$1.apply(Defaults.scala:762) at sbt.Defaults$$anonfun$compileTask$1.apply(Defaults.scala:762) at scala.Function1$$anonfun$compose$1.apply(Function1.scala:47) at sbt.$tilde$greater$$anonfun$$u2219$1.apply(TypeFunctions.scala:42) at sbt.std.Transform$$anon$4.work(System.scala:64) at sbt.Execute$$anonfun$submit$1$$anonfun$apply$1.apply(Execute.scala:237) at sbt.Execute$$anonfun$submit$1$$anonfun$apply$1.apply(Execute.scala:237) at sbt.ErrorHandling$.wideConvert(ErrorHandling.scala:18) at sbt.Execute.work(Execute.scala:244) at sbt.Execute$$anonfun$submit$1.apply(Execute.scala:237) at sbt.Execute$$anonfun$submit$1.apply(Execute.scala:237) at sbt.ConcurrentRestrictions$$anon$4$$anonfun$1.apply(ConcurrentRestrictions.scala:160) at sbt.CompletionService$$anon$2.call(CompletionService.scala:30) at java.util.concurrent.FutureTask.run(Unknown Source) at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source) at java.util.concurrent.FutureTask.run(Unknown Source) at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) at java.lang.Thread.run(Unknown Source) [error] (compile:compile) java.lang.AssertionError: assertion failed: javax.annotation.CheckReturnValue [error] Total time: 2 s, completed 12-Nov-2014 14:07:58 {code} h2. Environment details Scala version 2.10.4 Windows 7 64bit {code} $ java -version java version "1.7.0_67" Java(TM) SE Runtime Environment (build 1.7.0_67-b01) Java HotSpot(TM) Client VM (build 24.65-b04, mixed mode, sharing) $ sbt --version sbt launcher version 0.13.5 {code} h2. Other notes The code compiles fine if you delete the call to "{{omitPadding()}}" on line 13 of {{Test.scala}} -- there must be something about that method which upsets scalac.

    Scala JIRA | 2 years ago | Richard Bradley
    java.lang.AssertionError: assertion failed: javax.annotation.CheckReturnValue
  2. 0

    Uncaught exception during compilation: java.lang.AssertionError

    Stack Overflow | 2 years ago | Jofsey
    java.lang.AssertionError: assertion failed: org.joda.convert.FromString
  3. 0

    [SI-8442] StubSymbol for annotations absent from the classpath became crasier in 2.10.4 - Scala

    scala-lang.org | 1 year ago
    java.lang.AssertionError: assertion failed: javax.annotation.Nullable
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    {noformat} scala-hash v2.10.4 -deprecation -nc -classpath /Users/jason/.ivy2/cache/org.reflections/reflections/jars/reflections-0.9.8.jar:action/jta/jars/jta-1.1.jar:/Users/jason/.ivy2/cache/com.jolbox/bonecp/bundles/bonecp-0.7.1.RELEASE.jar:/Users/jason/.ivy2/cache/com.google.guava/guava/bundles/guava-14.0.1.jar Welcome to Scala version 2.10.4-20140209-180020-b66a39653b (Java HotSpot(TM) 64-Bit Server VM, Java 1.6.0_65). Type in expressions to have them evaluated. Type :help for more information. scala> new org.reflections.Store().get(null) ... uncaught exception during compilation: java.lang.AssertionError java.lang.AssertionError: assertion failed: javax.annotation.Nullable at scala.reflect.internal.Symbols$Symbol.info(Symbols.scala:1212) at scala.reflect.internal.Symbols$TypeSymbol.isNonBottomSubClass(Symbols.scala:2821) at scala.reflect.internal.AnnotationInfos$AnnotationInfo.matches(AnnotationInfos.scala:295) at scala.reflect.internal.AnnotationInfos$Annotatable$class.dropOtherAnnotations(AnnotationInfos.scala:65) at scala.reflect.internal.AnnotationInfos$Annotatable$class.hasAnnotation(AnnotationInfos.scala:50) at scala.reflect.internal.Symbols$Symbol.hasAnnotation(Symbols.scala:112) at scala.reflect.internal.Symbols$Symbol.isDeprecated(Symbols.scala:723) {noformat} {noformat} % scala-hash v2.11.0-RC3 -deprecation -nc -classpath /Users/jason/.ivy2/cache/org.reflections/reflections/jars/reflections-0.9.8.jar:action/jta/jars/jta-1.1.jar:/Users/jason/.ivy2/cache/com.jolbox/bonecp/bundles/bonecp-0.7.1.RELEASE.jar:/Users/jason/.ivy2/cache/com.google.guava/guava/bundles/guava-14.0.1.jar Welcome to Scala version 2.11.0-20140318-174310-bcf24ec9ba (Java HotSpot(TM) 64-Bit Server VM, Java 1.6.0_65). Type in expressions to have them evaluated. Type :help for more information. scala> (s: org.reflections.Store) => s.get(null) warning: Class javax.annotation.Nullable not found - continuing with a stub. java.lang.AssertionError: assertion failed: javax.annotation.Nullable at scala.reflect.internal.Symbols$Symbol.info(Symbols.scala:1410) at scala.reflect.internal.Symbols$TypeSymbol.isNonBottomSubClass(Symbols.scala:3040) at scala.reflect.internal.AnnotationInfos$AnnotationInfo.matches(AnnotationInfos.scala:305) at scala.reflect.internal.AnnotationInfos$Annotatable$class.dropOtherAnnotations(AnnotationInfos.scala:68) at scala.reflect.internal.AnnotationInfos$Annotatable$class.hasAnnotation(AnnotationInfos.scala:53) at scala.reflect.internal.Symbols$Symbol.hasAnnotation(Symbols.scala:174) at scala.tools.nsc.typechecker.Infer$class.improves$1(Infer.scala:61) {noformat} Adding the {{Nullable}} annotation to the compiler's classpath works around the crash: {noformat} scala-hash v2.11.0-RC3 -deprecation -nc -classpath /Users/jason/.ivy2/cache/org.reflections/reflections/jars/reflections-0.9.8.jar:action/jta/jars/jta-1.1.jar:/Users/jason/.ivy2/cache/com.jolbox/bonecp/bundles/bonecp-0.7.1.RELEASE.jar:/Users/jason/.ivy2/cache/com.google.guava/guava/bundles/guava-14.0.1.jar:/Users/jason/.ivy2/cache/com.google.code.findbugs/jsr305/jars/jsr305-2.0.1.jar Welcome to Scala version 2.11.0-20140318-174310-bcf24ec9ba (Java HotSpot(TM) 64-Bit Server VM, Java 1.6.0_65). Type in expressions to have them evaluated. Type :help for more information. scala> (s: org.reflections.Store) => s.get(null) res0: org.reflections.Store => com.google.common.collect.Multimap[String,String] = <function1> {noformat} Where {{Store.get}} is defined as: {noformat} /** return the multimap store of the given scanner class. not immutable */ @Nullable public Multimap<String, String> get(Class<? extends Scanner> scannerClass) { return storeMap.get(scannerClass.getSimpleName()); } {noformat} Regressed in 2.10.4, specifically in https://github.com/scala/scala/commit/8d74fa024262

    Scala JIRA | 3 years ago | Jason Zaugg
    java.lang.AssertionError: assertion failed: javax.annotation.Nullable
  6. 0

    {noformat} scala-hash v2.10.4 -deprecation -nc -classpath /Users/jason/.ivy2/cache/org.reflections/reflections/jars/reflections-0.9.8.jar:action/jta/jars/jta-1.1.jar:/Users/jason/.ivy2/cache/com.jolbox/bonecp/bundles/bonecp-0.7.1.RELEASE.jar:/Users/jason/.ivy2/cache/com.google.guava/guava/bundles/guava-14.0.1.jar Welcome to Scala version 2.10.4-20140209-180020-b66a39653b (Java HotSpot(TM) 64-Bit Server VM, Java 1.6.0_65). Type in expressions to have them evaluated. Type :help for more information. scala> new org.reflections.Store().get(null) ... uncaught exception during compilation: java.lang.AssertionError java.lang.AssertionError: assertion failed: javax.annotation.Nullable at scala.reflect.internal.Symbols$Symbol.info(Symbols.scala:1212) at scala.reflect.internal.Symbols$TypeSymbol.isNonBottomSubClass(Symbols.scala:2821) at scala.reflect.internal.AnnotationInfos$AnnotationInfo.matches(AnnotationInfos.scala:295) at scala.reflect.internal.AnnotationInfos$Annotatable$class.dropOtherAnnotations(AnnotationInfos.scala:65) at scala.reflect.internal.AnnotationInfos$Annotatable$class.hasAnnotation(AnnotationInfos.scala:50) at scala.reflect.internal.Symbols$Symbol.hasAnnotation(Symbols.scala:112) at scala.reflect.internal.Symbols$Symbol.isDeprecated(Symbols.scala:723) {noformat} {noformat} % scala-hash v2.11.0-RC3 -deprecation -nc -classpath /Users/jason/.ivy2/cache/org.reflections/reflections/jars/reflections-0.9.8.jar:action/jta/jars/jta-1.1.jar:/Users/jason/.ivy2/cache/com.jolbox/bonecp/bundles/bonecp-0.7.1.RELEASE.jar:/Users/jason/.ivy2/cache/com.google.guava/guava/bundles/guava-14.0.1.jar Welcome to Scala version 2.11.0-20140318-174310-bcf24ec9ba (Java HotSpot(TM) 64-Bit Server VM, Java 1.6.0_65). Type in expressions to have them evaluated. Type :help for more information. scala> (s: org.reflections.Store) => s.get(null) warning: Class javax.annotation.Nullable not found - continuing with a stub. java.lang.AssertionError: assertion failed: javax.annotation.Nullable at scala.reflect.internal.Symbols$Symbol.info(Symbols.scala:1410) at scala.reflect.internal.Symbols$TypeSymbol.isNonBottomSubClass(Symbols.scala:3040) at scala.reflect.internal.AnnotationInfos$AnnotationInfo.matches(AnnotationInfos.scala:305) at scala.reflect.internal.AnnotationInfos$Annotatable$class.dropOtherAnnotations(AnnotationInfos.scala:68) at scala.reflect.internal.AnnotationInfos$Annotatable$class.hasAnnotation(AnnotationInfos.scala:53) at scala.reflect.internal.Symbols$Symbol.hasAnnotation(Symbols.scala:174) at scala.tools.nsc.typechecker.Infer$class.improves$1(Infer.scala:61) {noformat} Adding the {{Nullable}} annotation to the compiler's classpath works around the crash: {noformat} scala-hash v2.11.0-RC3 -deprecation -nc -classpath /Users/jason/.ivy2/cache/org.reflections/reflections/jars/reflections-0.9.8.jar:action/jta/jars/jta-1.1.jar:/Users/jason/.ivy2/cache/com.jolbox/bonecp/bundles/bonecp-0.7.1.RELEASE.jar:/Users/jason/.ivy2/cache/com.google.guava/guava/bundles/guava-14.0.1.jar:/Users/jason/.ivy2/cache/com.google.code.findbugs/jsr305/jars/jsr305-2.0.1.jar Welcome to Scala version 2.11.0-20140318-174310-bcf24ec9ba (Java HotSpot(TM) 64-Bit Server VM, Java 1.6.0_65). Type in expressions to have them evaluated. Type :help for more information. scala> (s: org.reflections.Store) => s.get(null) res0: org.reflections.Store => com.google.common.collect.Multimap[String,String] = <function1> {noformat} Where {{Store.get}} is defined as: {noformat} /** return the multimap store of the given scanner class. not immutable */ @Nullable public Multimap<String, String> get(Class<? extends Scanner> scannerClass) { return storeMap.get(scannerClass.getSimpleName()); } {noformat} Regressed in 2.10.4, specifically in https://github.com/scala/scala/commit/8d74fa024262

    Scala JIRA | 3 years ago | Jason Zaugg
    java.lang.AssertionError: assertion failed: javax.annotation.Nullable

    1 unregistered visitors

    Root Cause Analysis

    1. java.lang.AssertionError

      assertion failed: javax.annotation.CheckReturnValue

      at scala.reflect.internal.Symbols$Symbol.info()
    2. Scala
      Symbols$Symbol.isDeprecated
      1. scala.reflect.internal.Symbols$Symbol.info(Symbols.scala:1212)
      2. scala.reflect.internal.Symbols$TypeSymbol.isNonBottomSubClass(Symbols.scala:2821)
      3. scala.reflect.internal.AnnotationInfos$AnnotationInfo.matches(AnnotationInfos.scala:295)
      4. scala.reflect.internal.AnnotationInfos$Annotatable$class.dropOtherAnnotations(AnnotationInfos.scala:65)
      5. scala.reflect.internal.AnnotationInfos$Annotatable$class.hasAnnotation(AnnotationInfos.scala:50)
      6. scala.reflect.internal.Symbols$Symbol.hasAnnotation(Symbols.scala:112)
      7. scala.reflect.internal.Symbols$Symbol.isDeprecated(Symbols.scala:723)
      7 frames
    3. Scala Compiler
      RefChecks$RefCheckTransformer.transform
      1. scala.tools.nsc.typechecker.RefChecks$RefCheckTransformer.checkDeprecated(RefChecks.scala:1385)
      2. scala.tools.nsc.typechecker.RefChecks$RefCheckTransformer.transformSelect(RefChecks.scala:1648)
      3. scala.tools.nsc.typechecker.RefChecks$RefCheckTransformer.transform(RefChecks.scala:1814)
      4. scala.tools.nsc.typechecker.RefChecks$RefCheckTransformer.transform(RefChecks.scala:96)
      4 frames
    4. Scala
      Trees$Transformer.transform
      1. scala.reflect.internal.Trees$class.itransform(Trees.scala:1219)
      2. scala.reflect.internal.SymbolTable.itransform(SymbolTable.scala:13)
      3. scala.reflect.internal.SymbolTable.itransform(SymbolTable.scala:13)
      4. scala.reflect.api.Trees$Transformer.transform(Trees.scala:2897)
      4 frames
    5. Scala Compiler
      RefChecks$RefCheckTransformer.transform
      1. scala.tools.nsc.typechecker.RefChecks$RefCheckTransformer.transform(RefChecks.scala:1841)
      2. scala.tools.nsc.typechecker.RefChecks$RefCheckTransformer.transform(RefChecks.scala:96)
      2 frames
    6. Scala
      Trees$Transformer.transform
      1. scala.reflect.internal.Trees$$anonfun$itransform$1.apply(Trees.scala:1229)
      2. scala.reflect.internal.Trees$$anonfun$itransform$1.apply(Trees.scala:1228)
      3. scala.reflect.api.Trees$Transformer.atOwner(Trees.scala:2936)
      4. scala.reflect.internal.Trees$class.itransform(Trees.scala:1227)
      5. scala.reflect.internal.SymbolTable.itransform(SymbolTable.scala:13)
      6. scala.reflect.internal.SymbolTable.itransform(SymbolTable.scala:13)
      7. scala.reflect.api.Trees$Transformer.transform(Trees.scala:2897)
      7 frames
    7. Scala Compiler
      RefChecks$RefCheckTransformer$$anonfun$transformStats$1.apply
      1. scala.tools.nsc.typechecker.RefChecks$RefCheckTransformer.transform(RefChecks.scala:1841)
      2. scala.tools.nsc.typechecker.RefChecks$RefCheckTransformer.transformStat(RefChecks.scala:1337)
      3. scala.tools.nsc.typechecker.RefChecks$RefCheckTransformer$$anonfun$transformStats$1.apply(RefChecks.scala:1268)
      4. scala.tools.nsc.typechecker.RefChecks$RefCheckTransformer$$anonfun$transformStats$1.apply(RefChecks.scala:1268)
      4 frames
    8. Scala
      AbstractTraversable.flatMap
      1. scala.collection.TraversableLike$$anonfun$flatMap$1.apply(TraversableLike.scala:251)
      2. scala.collection.TraversableLike$$anonfun$flatMap$1.apply(TraversableLike.scala:251)
      3. scala.collection.immutable.List.foreach(List.scala:318)
      4. scala.collection.TraversableLike$class.flatMap(TraversableLike.scala:251)
      5. scala.collection.AbstractTraversable.flatMap(Traversable.scala:105)
      5 frames
    9. Scala Compiler
      RefChecks$RefCheckTransformer.transformStats
      1. scala.tools.nsc.typechecker.RefChecks$RefCheckTransformer.transformStats(RefChecks.scala:1268)
      2. scala.tools.nsc.typechecker.RefChecks$RefCheckTransformer.transformStats(RefChecks.scala:96)
      2 frames
    10. Scala
      Trees$Transformer.transform
      1. scala.reflect.internal.Trees$class.itransform(Trees.scala:1276)
      2. scala.reflect.internal.SymbolTable.itransform(SymbolTable.scala:13)
      3. scala.reflect.internal.SymbolTable.itransform(SymbolTable.scala:13)
      4. scala.reflect.api.Trees$Transformer.transform(Trees.scala:2897)
      4 frames
    11. Scala Compiler
      RefChecks$RefCheckTransformer.transform
      1. scala.tools.nsc.typechecker.RefChecks$RefCheckTransformer.transform(RefChecks.scala:1841)
      2. scala.tools.nsc.typechecker.RefChecks$RefCheckTransformer.transform(RefChecks.scala:96)
      2 frames
    12. Scala
      Trees$Transformer.transform
      1. scala.reflect.api.Trees$Transformer.transformTemplate(Trees.scala:2904)
      2. scala.reflect.internal.Trees$$anonfun$itransform$4.apply(Trees.scala:1280)
      3. scala.reflect.internal.Trees$$anonfun$itransform$4.apply(Trees.scala:1279)
      4. scala.reflect.api.Trees$Transformer.atOwner(Trees.scala:2936)
      5. scala.reflect.internal.Trees$class.itransform(Trees.scala:1278)
      6. scala.reflect.internal.SymbolTable.itransform(SymbolTable.scala:13)
      7. scala.reflect.internal.SymbolTable.itransform(SymbolTable.scala:13)
      8. scala.reflect.api.Trees$Transformer.transform(Trees.scala:2897)
      8 frames
    13. Scala Compiler
      RefChecks$RefCheckTransformer.transform
      1. scala.tools.nsc.typechecker.RefChecks$RefCheckTransformer.transform(RefChecks.scala:1841)
      2. scala.tools.nsc.typechecker.RefChecks$RefCheckTransformer.transform(RefChecks.scala:96)
      2 frames
    14. Scala
      Trees$Transformer$$anonfun$transformTrees$1.apply
      1. scala.reflect.api.Trees$Transformer$$anonfun$transformTrees$1.apply(Trees.scala:2900)
      2. scala.reflect.api.Trees$Transformer$$anonfun$transformTrees$1.apply(Trees.scala:2900)
      2 frames
    15. Scala
      List.mapConserve
      1. scala.collection.immutable.List.loop$1(List.scala:170)
      2. scala.collection.immutable.List.mapConserve(List.scala:186)
      2 frames
    16. Scala
      Trees$Transformer.transformTrees
      1. scala.reflect.api.Trees$Transformer.transformTrees(Trees.scala:2900)
      1 frame
    17. Scala Compiler
      RefChecks$RefCheckTransformer$$anonfun$transformStats$1.apply
      1. scala.tools.nsc.typechecker.RefChecks$RefCheckTransformer.eliminateModuleDefs(RefChecks.scala:1316)
      2. scala.tools.nsc.typechecker.RefChecks$RefCheckTransformer.transformStat(RefChecks.scala:1335)
      3. scala.tools.nsc.typechecker.RefChecks$RefCheckTransformer$$anonfun$transformStats$1.apply(RefChecks.scala:1268)
      4. scala.tools.nsc.typechecker.RefChecks$RefCheckTransformer$$anonfun$transformStats$1.apply(RefChecks.scala:1268)
      4 frames
    18. Scala
      AbstractTraversable.flatMap
      1. scala.collection.TraversableLike$$anonfun$flatMap$1.apply(TraversableLike.scala:251)
      2. scala.collection.TraversableLike$$anonfun$flatMap$1.apply(TraversableLike.scala:251)
      3. scala.collection.immutable.List.foreach(List.scala:318)
      4. scala.collection.TraversableLike$class.flatMap(TraversableLike.scala:251)
      5. scala.collection.AbstractTraversable.flatMap(Traversable.scala:105)
      5 frames
    19. Scala Compiler
      RefChecks$RefCheckTransformer.transformStats
      1. scala.tools.nsc.typechecker.RefChecks$RefCheckTransformer.transformStats(RefChecks.scala:1268)
      2. scala.tools.nsc.typechecker.RefChecks$RefCheckTransformer.transformStats(RefChecks.scala:96)
      2 frames
    20. Scala
      Trees$Transformer.transform
      1. scala.reflect.internal.Trees$$anonfun$itransform$7.apply(Trees.scala:1298)
      2. scala.reflect.internal.Trees$$anonfun$itransform$7.apply(Trees.scala:1298)
      3. scala.reflect.api.Trees$Transformer.atOwner(Trees.scala:2936)
      4. scala.reflect.internal.Trees$class.itransform(Trees.scala:1297)
      5. scala.reflect.internal.SymbolTable.itransform(SymbolTable.scala:13)
      6. scala.reflect.internal.SymbolTable.itransform(SymbolTable.scala:13)
      7. scala.reflect.api.Trees$Transformer.transform(Trees.scala:2897)
      7 frames
    21. Scala Compiler
      Global$GlobalPhase$$anonfun$run$1.apply
      1. scala.tools.nsc.typechecker.RefChecks$RefCheckTransformer.transform(RefChecks.scala:1841)
      2. scala.tools.nsc.typechecker.RefChecks$RefCheckTransformer.transform(RefChecks.scala:96)
      3. scala.tools.nsc.ast.Trees$Transformer.transformUnit(Trees.scala:227)
      4. scala.tools.nsc.transform.Transform$Phase.apply(Transform.scala:30)
      5. scala.tools.nsc.Global$GlobalPhase.applyPhase(Global.scala:464)
      6. scala.tools.nsc.Global$GlobalPhase$$anonfun$run$1.apply(Global.scala:431)
      7. scala.tools.nsc.Global$GlobalPhase$$anonfun$run$1.apply(Global.scala:431)
      7 frames
    22. Scala
      AbstractIterator.foreach
      1. scala.collection.Iterator$class.foreach(Iterator.scala:727)
      2. scala.collection.AbstractIterator.foreach(Iterator.scala:1157)
      2 frames
    23. Scala Compiler
      Global$Run.compile
      1. scala.tools.nsc.Global$GlobalPhase.run(Global.scala:431)
      2. scala.tools.nsc.Global$Run.compileUnitsInternal(Global.scala:1583)
      3. scala.tools.nsc.Global$Run.compileUnits(Global.scala:1557)
      4. scala.tools.nsc.Global$Run.compileSources(Global.scala:1553)
      5. scala.tools.nsc.Global$Run.compile(Global.scala:1662)
      5 frames
    24. SBT
      CompilerInterface.run
      1. xsbt.CachedCompiler0.run(CompilerInterface.scala:123)
      2. xsbt.CachedCompiler0.run(CompilerInterface.scala:99)
      3. xsbt.CompilerInterface.run(CompilerInterface.scala:27)
      3 frames
    25. Java RT
      Method.invoke
      1. sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      2. sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
      3. sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
      4. java.lang.reflect.Method.invoke(Unknown Source)
      4 frames
    26. SBT
      Defaults$$anonfun$compileTask$1.apply
      1. sbt.compiler.AnalyzingCompiler.call(AnalyzingCompiler.scala:102)
      2. sbt.compiler.AnalyzingCompiler.compile(AnalyzingCompiler.scala:48)
      3. sbt.compiler.AnalyzingCompiler.compile(AnalyzingCompiler.scala:41)
      4. sbt.compiler.AggressiveCompile$$anonfun$3$$anonfun$compileScala$1$1.apply$mcV$sp(AggressiveCompile.scala:99)
      5. sbt.compiler.AggressiveCompile$$anonfun$3$$anonfun$compileScala$1$1.apply(AggressiveCompile.scala:99)
      6. sbt.compiler.AggressiveCompile$$anonfun$3$$anonfun$compileScala$1$1.apply(AggressiveCompile.scala:99)
      7. sbt.compiler.AggressiveCompile.sbt$compiler$AggressiveCompile$$timed(AggressiveCompile.scala:166)
      8. sbt.compiler.AggressiveCompile$$anonfun$3.compileScala$1(AggressiveCompile.scala:98)
      9. sbt.compiler.AggressiveCompile$$anonfun$3.apply(AggressiveCompile.scala:143)
      10. sbt.compiler.AggressiveCompile$$anonfun$3.apply(AggressiveCompile.scala:87)
      11. sbt.inc.IncrementalCompile$$anonfun$doCompile$1.apply(Compile.scala:39)
      12. sbt.inc.IncrementalCompile$$anonfun$doCompile$1.apply(Compile.scala:37)
      13. sbt.inc.IncrementalCommon.cycle(Incremental.scala:99)
      14. sbt.inc.Incremental$$anonfun$1.apply(Incremental.scala:38)
      15. sbt.inc.Incremental$$anonfun$1.apply(Incremental.scala:37)
      16. sbt.inc.Incremental$.manageClassfiles(Incremental.scala:65)
      17. sbt.inc.Incremental$.compile(Incremental.scala:37)
      18. sbt.inc.IncrementalCompile$.apply(Compile.scala:27)
      19. sbt.compiler.AggressiveCompile.compile2(AggressiveCompile.scala:157)
      20. sbt.compiler.AggressiveCompile.compile1(AggressiveCompile.scala:71)
      21. sbt.compiler.AggressiveCompile.apply(AggressiveCompile.scala:46)
      22. sbt.Compiler$.apply(Compiler.scala:75)
      23. sbt.Compiler$.apply(Compiler.scala:66)
      24. sbt.Defaults$.sbt$Defaults$$compileTaskImpl(Defaults.scala:770)
      25. sbt.Defaults$$anonfun$compileTask$1.apply(Defaults.scala:762)
      26. sbt.Defaults$$anonfun$compileTask$1.apply(Defaults.scala:762)
      26 frames
    27. Scala
      Function1$$anonfun$compose$1.apply
      1. scala.Function1$$anonfun$compose$1.apply(Function1.scala:47)
      1 frame
    28. SBT
      $tilde$greater$$anonfun$$u2219$1.apply
      1. sbt.$tilde$greater$$anonfun$$u2219$1.apply(TypeFunctions.scala:42)
      1 frame
    29. sbt Task system
      Transform$$anon$4.work
      1. sbt.std.Transform$$anon$4.work(System.scala:64)
      1 frame
    30. SBT
      CompletionService$$anon$2.call
      1. sbt.Execute$$anonfun$submit$1$$anonfun$apply$1.apply(Execute.scala:237)
      2. sbt.Execute$$anonfun$submit$1$$anonfun$apply$1.apply(Execute.scala:237)
      3. sbt.ErrorHandling$.wideConvert(ErrorHandling.scala:18)
      4. sbt.Execute.work(Execute.scala:244)
      5. sbt.Execute$$anonfun$submit$1.apply(Execute.scala:237)
      6. sbt.Execute$$anonfun$submit$1.apply(Execute.scala:237)
      7. sbt.ConcurrentRestrictions$$anon$4$$anonfun$1.apply(ConcurrentRestrictions.scala:160)
      8. sbt.CompletionService$$anon$2.call(CompletionService.scala:30)
      8 frames
    31. Java RT
      Thread.run
      1. java.util.concurrent.FutureTask.run(Unknown Source)
      2. java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
      3. java.util.concurrent.FutureTask.run(Unknown Source)
      4. java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
      5. java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
      6. java.lang.Thread.run(Unknown Source)
      6 frames