NullPointerException in Infer.java
    Liam Miller-Cushon 
    cushon at google.com
       
    Wed Nov  5 16:16:36 UTC 2014
    
    
  
Is this a known issue? It affects 8u20, and reproduces at head in 9-dev (I
tested @03dc012a11a5).
The crash bisects down to:
http://hg.openjdk.java.net/jdk9/dev/langtools/rev/cf78452cdb3b
https://bugs.openjdk.java.net/browse/JDK-8029002
Here's the repro:
===
import java.util.List;
class Test {
  interface TypeToken<B> {}
  interface TypeMap<B> {
    <T extends B> T getInstance(TypeToken<T> type);
  }
  void m(TypeMap<Iterable<?>[]> map, TypeToken<List<Integer>[]> type) {
    List<Integer>[] result = map.getInstance(type);
  }
}
===
$ javac Test.java
...
java.lang.NullPointerException
at com.sun.tools.javac.comp.Infer$IncorporationStep$7.apply(Infer.java:874)
at com.sun.tools.javac.comp.Infer.checkWithinBounds(Infer.java:596)
at com.sun.tools.javac.comp.Infer$GraphSolver.solve(Infer.java:1681)
at com.sun.tools.javac.comp.Infer$InferenceContext.solve(Infer.java:2315)
at com.sun.tools.javac.comp.Infer$InferenceContext.solve(Infer.java:2307)
at com.sun.tools.javac.comp.Infer$InferenceContext.solve(Infer.java:2322)
at com.sun.tools.javac.comp.Infer.instantiateMethod(Infer.java:201)
at com.sun.tools.javac.comp.Resolve.rawInstantiate(Resolve.java:568)
at com.sun.tools.javac.comp.Resolve.checkMethod(Resolve.java:606)
...
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.openjdk.java.net/pipermail/compiler-dev/attachments/20141105/0345196a/attachment.html>
    
    
More information about the compiler-dev
mailing list