Menu

#375 Object wrapping is failing when using IBM J9 VM

None
closed-fixed
5
2013-06-28
2012-11-19
Anonymous
No

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

Discussion

  • Dániel Dékány

    OK, thanks. I will fix it in the next release.

     
  • Dániel Dékány

    • assigned_to: nobody --> ddekany
     
  • Dániel Dékány

    • status: open --> open-accepted
     
  • Dániel Dékány

    • Description has changed:

    Diff:

    --- old
    +++ new
    @@ -1,4 +1,3 @@
    -
     Hey guys,
    
     I have an interface with a few constants \(static final String\)
    
    • status: open-accepted --> closed-fixed
    • Group: -->
     
  • Dániel Dékány

    Fixed in 2.3.20.

     

Log in to post a comment.

MongoDB Logo MongoDB