Menu

#297 Incorrect result from getGenericParameterTypes() for method newInstance0 in Class

v1.0 (example)
closed-fixed
nobody
None
5
2015-03-25
2015-03-14
No

The following code:

Class.class.getDeclaredMethod("newInstance0", new java.lang.Class[0]).getGenericParameterTypes()[0]

returns ikvm.internal.CallerID, whereas getParameterTypes() and getParameterAnnotations() return empty arrays.

This causes an exception when trying to use Groovy (from version 2.1.8 and newer) with IKVM.

Discussion

  • Jeroen Frijters

    Jeroen Frijters - 2015-03-15
    • status: open --> closed-fixed
     
  • Jeroen Frijters

    Jeroen Frijters - 2015-03-15

    Thanks for reporting this. This bug is indeed in 7.2 and earlier but was fixed in 7.4.

     
  • Vojislav Stojkovic

    Sorry about that. The download page offers 7.2.4630.5 as the latest version, so that's the one I downloaded. I didn't realize there was a newer version.

    Is building from source the only way to get 7.4?

     

Log in to post a comment.