As the title says, importing javax.javaeeapi inside imported module causes late value to return null. From the follwing case you can actually see the anonymous method isn't even called and if you remove the javax.javaeeapi import it works again printing the value.
shared final class LateValue<Type>(Type construct()) {
shared late Type val = (() {
print("about to retrieve value from generator");
value result = construct();
print("returning value = '``result else "null"``' from generator");
return result;
})();
}
Test2 project:
module.ceylon:
native("jvm")
module test2 "1.0.0" {
shared import test "1.0.0";
}
about to retrieve value from generator
returning value = 'javax.swing.JFrame[frame0,0,0,0x0,invalid,hidden,layout=java.awt.BorderLayout,title=,resizable,normal,defaultCloseOperation=HIDE_ON_CLOSE,rootPane=javax.swing.JRootPane[,0,0,0x0,invalid,layout=javax.swing.JRootPane$RootLayout,alignmentX=0.0,alignmentY=0.0,border=,flags=16777673,maximumSize=,minimumSize=,preferredSize=],rootPaneCheckingEnabled=true]' from generator
value = 'javax.swing.JFrame[frame0,0,0,0x0,invalid,hidden,layout=java.awt.BorderLayout,title=,resizable,normal,defaultCloseOperation=HIDE_ON_CLOSE,rootPane=javax.swing.JRootPane[,0,0,0x0,invalid,layout=javax.swing.JRootPane$RootLayout,alignmentX=0.0,alignmentY=0.0,border=,flags=16777673,maximumSize=,minimumSize=,preferredSize=],rootPaneCheckingEnabled=true]'
As the title says, importing javax.javaeeapi inside imported module causes late value to return null. From the follwing case you can actually see the anonymous method isn't even called and if you remove the javax.javaeeapi import it works again printing the value.
Test project:
Test2 project:
This is what get printed:
and removing the javax.javaeeapi import: