We were trying to build this Maven project in Travis CI and got a weird compilation error. After modifying the codes to explicitly declare the Exception types.
[wp_ad_camp_5]
Compiler Error
1 2 3 4 5 6 7 8 9 10 11 12 13 | Downloaded: https://repo.maven.apache.org/maven2/com/google/collections/google-collections/1.0/google-collections-1.0.jar (625 KB at 867.5 KB/sec) [INFO] Changes detected - recompiling the module! [INFO] Compiling 3 source files to /home/travis/build/Turreta/Using-Spring-Retry-API/target/classes An exception has occurred in the compiler (1.8.0_31). Please file a bug at the Java Developer Connection (http://java.sun.com/webapps/bugreport) after checking the Bug Parade for duplicates. Include your program and the following diagnostic in your report. Thank you. java.lang.NullPointerException at com.sun.tools.javac.code.Scope.includes(Scope.java:296) at com.sun.tools.javac.comp.Flow$1.trackable(Flow.java:247) at com.sun.tools.javac.comp.Flow$AbstractAssignAnalyzer.visitVarDef(Flow.java:1832) at com.sun.tools.javac.comp.Flow$AssignAnalyzer.visitVarDef(Flow.java:2569) at com.sun.tools.javac.tree.JCTree$JCVariableDecl.accept(JCTree.java:852) at com.sun.tools.javac.tree.TreeScanner.scan(TreeScanner.java:49) at com.sun.tools.javac.comp.Flow$BaseAnalyzer.scan(Flow.java:398) at com.sun.tools.javac.comp.Flow$AbstractAssignAnalyzer.scan(Flow.java:1376) |
Resolution
[wp_ad_camp_4]
To fix this issue, modify the codes to explicitly declare the types. See link below for the actual changes.
https://github.com/Turreta/Using-Spring-Retry-API/commit/b25a03d338dd03eb94323b756ada2b5637a9cf3f