Hey guys,
I have an interface with a few constants (static final String)
<#assign Constants = staticUtil["myinterface.Constants"] />
When Freemarker is populating the class map with the BeanInfo it executes the following line
MethodDescriptor[] mda = beanInfo.getMethodDescriptors();
When using the IBM JVM
Java(TM) SE Runtime Environment (build pxa6460_26sr3-20120810_01(SR3))
IBM J9 VM (build 2.6, JRE 1.6.0 Linux amd64-64 20120809_118944 (JIT enabled, AOT enabled)
J9VM - R26_Java626_SR3_20120809_1152_B118944
JIT - r11.b01_20120808_24925
GC - R26_Java626_SR3_20120809_1152_B118944
J9CL - 20120809_118944)
JCL - 20120713_01
the beanInfo.getMethodDescriptors() returns null instead of an empty array for the method descriptors (the javadoc says it can return null).
A quick solution could be:
MethodDescriptor[] mda = beanInfo.getMethodDescriptors() != null? beanInfo.getMethodDescriptors() : new MethodDescriptor[]{};
Cheers,
Migue
OK, thanks. I will fix it in the next release.
Diff:
Fixed in 2.3.20.