public class PolygonEditor {
public static void create(PropertyInspector inspector) {
PropertyInspector.PropertyRollup rollup = inspector.createRollup("PolygonEditor");
rollup.addButton("switch water on selected", () -> {
Logger.log("string");
});
}
}
It compiles and works.
But when I do this :
if (false) rollup.addButton("switch water on selected", () -> {
Logger.log("string");
});
I'm getting the following error, what can it be ?
[INFO] Caused by: java.lang.NullPointerException
[INFO] at com.google.gwt.dev.jjs.impl.Pruner.transformToNullMethodCall(Pruner.java:608)
[INFO] at com.google.gwt.dev.jjs.impl.Pruner$CleanupRefsVisitor.endVisit(Pruner.java:184)
[INFO] at com.google.gwt.dev.jjs.ast.JMethodCall.traverse(JMethodCall.java:268)
[INFO] at com.google.gwt.dev.jjs.ast.JModVisitor.traverse(JModVisitor.java:361)
[INFO] at com.google.gwt.dev.jjs.ast.JModVisitor.accept(JModVisitor.java:273)
[INFO] ... 32 more
[INFO] [ERROR] at PolygonEditor.java(53): PolygonEditor.lambda$3()
[INFO] com.google.gwt.dev.jjs.ast.JMethodCall
[INFO] [ERROR] at PolygonEditor.java(53): PolygonEditor.lambda$3()
[INFO] com.google.gwt.dev.jjs.ast.JExpressionStatement
[INFO] [ERROR] at PolygonEditor.java(53): {
[INFO] PolygonEditor.lambda$3();
[INFO] }
[INFO] com.google.gwt.dev.jjs.ast.JBlock
[INFO] [ERROR] at PolygonEditor.java(53): {
[INFO] PolygonEditor.lambda$3();
[INFO] }
[INFO] com.google.gwt.dev.jjs.ast.JMethodBody
[INFO] [ERROR] at PolygonEditor.java(53): delightex.client.editors.PolygonEditor$lambda$3$Type.run()V
[INFO] com.google.gwt.dev.jjs.ast.JMethod
[INFO] [ERROR] at PolygonEditor.java(53): delightex.client.editors.PolygonEditor$lambda$3$Type (final extends Object implements Runnable)
[INFO] com.google.gwt.dev.jjs.ast.JClassType
[INFO] [ERROR] Unrecoverable exception, shutting down