Sorry for the cheap bug report, but on GWT master, the innocent looking:

    final List<String> f = newArrayList();
    f.sort((a, b) -> a.compareTo(b));

Will result in a compiler NPE:

Caused by: java.lang.NullPointerException
    at com.google.gwt.dev.jjs.ast.JMethod.getJsniSignature(JMethod.java:518)
    at 
com.google.gwt.dev.jjs.impl.ControlFlowRecorder.computeName(ControlFlowRecorder.java:49)
    at 
com.google.gwt.dev.jjs.impl.ControlFlowRecorder.processMethodCall(ControlFlowRecorder.java:197)
    at 
com.google.gwt.dev.jjs.impl.ControlFlowRecorder.visit(ControlFlowRecorder.java:151)
    at com.google.gwt.dev.jjs.ast.JMethodCall.traverse(JMethodCall.java:248)
    at com.google.gwt.dev.jjs.ast.JVisitor.accept(JVisitor.java:127)

I get the root cause is that List.sort is a new JDK8 method that is not
implemented, which is fine, I’ll use Collections.sort and everything is
fine, but I was just surprised to see the compiler actually stack trace vs.
fail with a nicer compiler error.

Feel free to ignore this if this really is expected/unavoidable; admittedly
I don’t know what the previous behavior was in this situation of a
super-sourced class missing a method.

- Stephen
​

-- 
You received this message because you are subscribed to the Google Groups "GWT 
Contributors" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/google-web-toolkit-contributors/CANnRKuV2_m9%3DVap4oHHJuo5jtsA5_20exya0yHx%3DvAvtePFtrg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to