Strange behavior while using Container::addChild method reference on Lemur element collection: ClassNotFoundException instead of compiler error. Probable java bug?

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

…what’s at that line?

this is one of my upper level window which calls interactive control containers dynamically. ControlGuiAutopilotAcceleration is the class wich I modified with the code shown above.
The constructor of the class ControlGuiAutopilotAcceleration is called here.

// The main constructor of ControlGui is called here passing the container for attachment
// and a spatial supplier for data read/write
private final ControlGuiAutopilotAcceleration accelerationAp
        = new ControlGuiAutopilotAcceleration(autopilotAccelerationContainer,
                () -> CharacterSelector.CurrentVessel.apply(this));

I already validated the code, it works.