FULL PRODUCT VERSION :
java version "1.8.0_25"
Java(TM) SE Runtime Environment (build 1.8.0_25-b18)
Java HotSpot(TM) 64-Bit Server VM (build 25.25-b02, mixed mode)
ADDITIONAL OS VERSION INFORMATION :
Windows 7 SP1 64x Corporate Edition
A DESCRIPTION OF THE PROBLEM :
Information:java: An exception has occurred in the compiler (1.8.0_25). 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.
Information:java: java.lang.NullPointerException
Information:java: at com.sun.tools.javac.code.Scope.includes(Scope.java:296)
Information:java: at com.sun.tools.javac.comp.Flow$1.trackable(Flow.java:247)
Information:java: at com.sun.tools.javac.comp.Flow$AbstractAssignAnalyzer.visitVarDef(Flow.java:1832)
Information:java: at com.sun.tools.javac.comp.Flow$AssignAnalyzer.visitVarDef(Flow.java:2569)
Information:java: at com.sun.tools.javac.tree.JCTree$JCVariableDecl.accept(JCTree.java:852)
Information:java: at com.sun.tools.javac.tree.TreeScanner.scan(TreeScanner.java:49)
Information:java: at com.sun.tools.javac.comp.Flow$BaseAnalyzer.scan(Flow.java:398)
Information:java: at com.sun.tools.javac.comp.Flow$AbstractAssignAnalyzer.scan(Flow.java:1376)
Information:java: at com.sun.tools.javac.comp.Flow$AbstractAssignAnalyzer.visitLambda(Flow.java:2256)
Information:java: at com.sun.tools.javac.tree.JCTree$JCLambda.accept(JCTree.java:1624)
Information:java: at com.sun.tools.javac.comp.Flow$AbstractAssignAnalyzer.scanExpr(Flow.java:1627)
Information:java: at com.sun.tools.javac.comp.Flow$AbstractAssignAnalyzer.scanExprs(Flow.java:1639)
Information:java: at com.sun.tools.javac.comp.Flow$AbstractAssignAnalyzer.visitApply(Flow.java:2236)
Information:java: at com.sun.tools.javac.tree.JCTree$JCMethodInvocation.accept(JCTree.java:1465)
Information:java: at com.sun.tools.javac.comp.Flow$AbstractAssignAnalyzer.analyzeTree(Flow.java:2423)
Information:java: at com.sun.tools.javac.comp.Flow$AbstractAssignAnalyzer.analyzeTree(Flow.java:2406)
Information:java: at com.sun.tools.javac.comp.Flow.analyzeLambdaThrownTypes(Flow.java:250)
Information:java: at com.sun.tools.javac.comp.Attr.visitLambda(Attr.java:2423)
Information:java: at com.sun.tools.javac.comp.Attr.attribTree(Attr.java:607)
Information:java: at com.sun.tools.javac.comp.DeferredAttr$2.complete(DeferredAttr.java:284)
Information:java: at com.sun.tools.javac.comp.DeferredAttr$DeferredType.check(DeferredAttr.java:245)
Information:java: at com.sun.tools.javac.comp.DeferredAttr$DeferredType.check(DeferredAttr.java:232)
Information:java: at com.sun.tools.javac.comp.Resolve$MethodResultInfo.check(Resolve.java:993)
Information:java: at com.sun.tools.javac.comp.Resolve$4.checkArg(Resolve.java:826)
Information:java: at com.sun.tools.javac.comp.Resolve$AbstractMethodCheck.argumentsAcceptable(Resolve.java:731)
Information:java: at com.sun.tools.javac.comp.Resolve$4.argumentsAcceptable(Resolve.java:835)
Information:java: at com.sun.tools.javac.comp.Infer.instantiateMethod(Infer.java:162)
Information:java: at com.sun.tools.javac.comp.Resolve.rawInstantiate(Resolve.java:564)
Information:java: at com.sun.tools.javac.comp.Resolve.checkMethod(Resolve.java:601)
Information:java: at com.sun.tools.javac.comp.Attr.checkMethod(Attr.java:3809)
Information:java: at com.sun.tools.javac.comp.Attr.checkIdInternal(Attr.java:3615)
Information:java: at com.sun.tools.javac.comp.Attr.checkMethodIdInternal(Attr.java:3522)
Information:java: at com.sun.tools.javac.comp.Attr.checkMethodId(Attr.java:3501)
Information:java: at com.sun.tools.javac.comp.Attr.checkId(Attr.java:3488)
Information:java: at com.sun.tools.javac.comp.Attr.visitSelect(Attr.java:3370)
Information:java: at com.sun.tools.javac.tree.JCTree$JCFieldAccess.accept(JCTree.java:1897)
Information:java: at com.sun.tools.javac.comp.Attr.visitApply(Attr.java:1843)
Information:java: at com.sun.tools.javac.comp.Attr.attribExpr(Attr.java:656)
Information:java: at com.sun.tools.javac.comp.Attr.visitExec(Attr.java:1611)
Information:java: at com.sun.tools.javac.tree.JCTree$JCExpressionStatement.accept(JCTree.java:1296)
Information:java: at com.sun.tools.javac.comp.Attr.attribStat(Attr.java:676)
Information:java: at com.sun.tools.javac.comp.Attr.attribStats(Attr.java:692)
Information:java: at com.sun.tools.javac.comp.Attr.visitBlock(Attr.java:1142)
Information:java: at com.sun.tools.javac.tree.JCTree$JCBlock.accept(JCTree.java:909)
Information:java: at com.sun.tools.javac.comp.Attr.visitIf(Attr.java:1600)
Information:java: at com.sun.tools.javac.tree.JCTree$JCIf.accept(JCTree.java:1269)
Information:java: at com.sun.tools.javac.comp.Attr.visitLambda(Attr.java:2407)
Information:java: at com.sun.tools.javac.comp.DeferredAttr.attribSpeculative(DeferredAttr.java:386)
Information:java: at com.sun.tools.javac.comp.DeferredAttr$2.complete(DeferredAttr.java:279)
Information:java: at com.sun.tools.javac.comp.Resolve.rawInstantiate(Resolve.java:576)
Information:java: at com.sun.tools.javac.comp.Resolve.selectBest(Resolve.java:1431)
Information:java: at com.sun.tools.javac.comp.Resolve.findMethodInScope(Resolve.java:1618)
Information:java: at com.sun.tools.javac.comp.Resolve.findMethod(Resolve.java:1689)
Information:java: at com.sun.tools.javac.comp.Resolve.findMethod(Resolve.java:1662)
Information:java: at com.sun.tools.javac.comp.Resolve.findConstructor(Resolve.java:2545)
Information:java: at com.sun.tools.javac.comp.Resolve$11.doLookup(Resolve.java:2514)
Information:java: at com.sun.tools.javac.comp.Resolve$BasicLookupHelper.lookup(Resolve.java:3074)
Information:java: at com.sun.tools.javac.comp.Resolve.lookupMethod(Resolve.java:3325)
Information:java: at com.sun.tools.javac.comp.Resolve.resolveConstructor(Resolve.java:2511)
Information:java: at com.sun.tools.javac.comp.Resolve.resolveConstructor(Resolve.java:2502)
Information:java: at com.sun.tools.javac.comp.Attr.visitNewClass(Attr.java:2097)
Information:java: at com.sun.tools.javac.tree.JCTree$JCNewClass.accept(JCTree.java:1516)
Information:java: at com.sun.tools.javac.comp.Attr.visitSelect(Attr.java:3254)
Information:java: at com.sun.tools.javac.comp.Attr.visitForLoop(Attr.java:1170)
Information:java: at com.sun.tools.javac.tree.JCTree$JCForLoop.accept(JCTree.java:1000)
Information:java: at com.sun.tools.javac.comp.Attr.visitMethodDef(Attr.java:1035)
Information:java: at com.sun.tools.javac.tree.JCTree$JCMethodDecl.accept(JCTree.java:778)
Information:java: at com.sun.tools.javac.comp.Attr.attribClassBody(Attr.java:4342)
Information:java: at com.sun.tools.javac.comp.Attr.attribClass(Attr.java:4252)
Information:java: at com.sun.tools.javac.comp.Attr.attribClass(Attr.java:4181)
Information:java: at com.sun.tools.javac.comp.Attr.attrib(Attr.java:4156)
Information:java: at com.sun.tools.javac.main.JavaCompiler.attribute(JavaCompiler.java:1248)
Information:java: at com.sun.tools.javac.main.JavaCompiler.compile2(JavaCompiler.java:901)
Information:java: at com.sun.tools.javac.main.JavaCompiler.compile(JavaCompiler.java:860)
Information:java: at com.sun.tools.javac.main.Main.compile(Main.java:523)
Information:java: at com.sun.tools.javac.api.JavacTaskImpl.doCall(JavacTaskImpl.java:129)
Information:java: at com.sun.tools.javac.api.JavacTaskImpl.call(JavacTaskImpl.java:138)
Information:java: at org.jetbrains.jps.javac.JavacMain.compile(JavacMain.java:165)
Information:java: at org.jetbrains.jps.incremental.java.JavaBuilder.compileJava(JavaBuilder.java:407)
Information:java: at org.jetbrains.jps.incremental.java.JavaBuilder.compile(JavaBuilder.java:304)
Information:java: at org.jetbrains.jps.incremental.java.JavaBuilder.doBuild(JavaBuilder.java:210)
Information:java: at org.jetbrains.jps.incremental.java.JavaBuilder.build(JavaBuilder.java:182)
Information:java: at org.jetbrains.jps.incremental.IncProjectBuilder.runModuleLevelBuilders(IncProjectBuilder.java:1106)
Information:java: at org.jetbrains.jps.incremental.IncProjectBuilder.runBuildersForChunk(IncProjectBuilder.java:814)
Information:java: at org.jetbrains.jps.incremental.IncProjectBuilder.buildTargetsChunk(IncProjectBuilder.java:862)
Information:java: at org.jetbrains.jps.incremental.IncProjectBuilder.buildChunkIfAffected(IncProjectBuilder.java:777)
Information:java: at org.jetbrains.jps.incremental.IncProjectBuilder.buildChunks(IncProjectBuilder.java:600)
Information:java: at org.jetbrains.jps.incremental.IncProjectBuilder.runBuild(IncProjectBuilder.java:352)
Information:java: at org.jetbrains.jps.incremental.IncProjectBuilder.build(IncProjectBuilder.java:184)
Information:java: at org.jetbrains.jps.cmdline.BuildRunner.runBuild(BuildRunner.java:129)
Information:java: at org.jetbrains.jps.cmdline.BuildSession.runBuild(BuildSession.java:224)
Information:java: at org.jetbrains.jps.cmdline.BuildSession.run(BuildSession.java:113)
Information:java: at org.jetbrains.jps.cmdline.BuildMain$MyMessageHandler$1.run(BuildMain.java:133)
Information:java: at org.jetbrains.jps.service.impl.SharedThreadPoolImpl$1.run(SharedThreadPoolImpl.java:41)
Information:java: at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
Information:java: at java.util.concurrent.FutureTask.run(FutureTask.java:266)
Information:java: at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
Information:java: at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
Information:java: at java.lang.Thread.run(Thread.java:745)
Information:java: Errors occurred while compiling module 'java-8'
Information:Compilation completed with 1 error and 0 warnings in 1 sec
Information:1 error
Information:0 warnings
Error:java: Compilation failed: internal java compiler error
REPRODUCIBILITY :
This bug can be reproduced always.
---------- BEGIN SOURCE ----------
package springretry;
import org.springframework.retry.backoff.ExponentialRandomBackOffPolicy;
import org.springframework.retry.policy.SimpleRetryPolicy;
import org.springframework.retry.support.RetryTemplate;
import javax.xml.ws.WebServiceException;
import java.time.LocalDateTime;
import java.util.HashMap;
import java.util.Map;
public class Test {
public static void main(String[] args) throws Throwable {
ExponentialRandomBackOffPolicy backOffPolicy = new ExponentialRandomBackOffPolicy();
backOffPolicy.setInitialInterval(1000);
backOffPolicy.setMultiplier(4.0);
long fiveMinutesInMs = 10000 * 60 * 5;
backOffPolicy.setMaxInterval(fiveMinutesInMs);
Map<Class<? extends Throwable>, Boolean> retryableExceptions = new HashMap<>();
retryableExceptions.put(WebServiceException.class, true);
RetryTemplate retryTemplate = new RetryTemplate();
retryTemplate.setBackOffPolicy(backOffPolicy);
retryTemplate.setRetryPolicy(new SimpleRetryPolicy(3, retryableExceptions));
for (int i = 0; i < 100; i++) {
new Thread(() -> {
if (stopTime <= System.currentTimeMillis()) {
retryTemplate.execute((context) -> {
System.out.println("Got request, threadName: " + Thread.currentThread().getName() + ", date: " + LocalDateTime.now());
throw new WebServiceException("my message");
}, (context) -> {
long currentTime = System.currentTimeMillis();
if (stopTime < currentTime) stopTime = currentTime + 1000 * 50;
System.out.println("RecoverCount: " + context.getRetryCount() + ", threadName: " + Thread.currentThread().getName());
throw new RuntimeException("");
});
}
}, "name" + i).start();
}
}
private static volatile long stopTime;
}
<dependency>
<groupId>org.springframework.retry</groupId>
<artifactId>spring-retry</artifactId>
<version>1.1.0.RELEASE</version>
</dependency>
---------- END SOURCE ----------