Hello all,
today I encountered a strange behavior when using lambdas on lemur elements (actually it seems to me that this is not a Lemur bug):
For generating a radio button array I collected a couple of check boxes inside a list. I am using something like this for generating checkboxes:
List<Checkbox> checkboxList = Stream.of("1","2","3")
.map(strKey -> new Checkbox(strKey))
.collect(Collectors.toList());
this actually works fine. But whenever I call the following method:
checkboxList.forEach(container::addChild);
Compiler runs smoothly but during runtime I receive an strange error which I do not really understand:
java.lang.NoClassDefFoundError: spacecraft/gui/inflight/elements/ControlGuiAutopilotAcceleration
at spacecraft.gui.inflight.InflightGuiAutopilots.<init>(InflightGuiAutopilots.java:51)
at spacecraft.gui.inflight.InflightGui.<init>(InflightGui.java:81)
at spacecraft.Main.simpleInitApp(Main.java:85)
But: When I call the method using a plain lambda
checkboxList.forEach(checkbox -> container.addChild(checkbox));
everything works fine.
I do not understand where this error comes from and why a NoClassDefFoundError is thrown. It seems to me that it has something to do with the Container::addChild vararg method. Whenever I use the method references on the verarg method compilation seems to be interrupted silently without an error.
I am using 3.1.0 stable FINAL on macOS Sierra 10.12.6 (MacBook Pro (Retina 13 Zoll))
Regards,
Harry