martint / jmxutils

Exporting JMX mbeans made easy
Apache License 2.0
173 stars 47 forks source link

Add support for Java8 ByteCode #27

Open dain opened 9 years ago

dain commented 9 years ago

@Managed operations with arguments throw an exception during parameter name extraction.

This code should used more generic paranamer code. See Swift for an example https://github.com/facebook/swift/blob/master/swift-codec/src/main/java/com/facebook/swift/codec/metadata/ReflectionHelper.java#L241

Caused by: java.lang.ArrayIndexOutOfBoundsException: 74340
    at org.weakref.jmx.internal.paranamer.BytecodeReadingParanamer$ClassReader.readUnsignedShort(BytecodeReadingParanamer.java:687) ~[jmxutils-1.18.jar:na]
    at org.weakref.jmx.internal.paranamer.BytecodeReadingParanamer$ClassReader.accept(BytecodeReadingParanamer.java:536) ~[jmxutils-1.18.jar:na]
    at org.weakref.jmx.internal.paranamer.BytecodeReadingParanamer$ClassReader.access$200(BytecodeReadingParanamer.java:311) ~[jmxutils-1.18.jar:na]
    at org.weakref.jmx.internal.paranamer.BytecodeReadingParanamer.lookupParameterNames(BytecodeReadingParanamer.java:102) ~[jmxutils-1.18.jar:na]
    at org.weakref.jmx.internal.paranamer.BytecodeReadingParanamer.lookupParameterNames(BytecodeReadingParanamer.java:68) ~[jmxutils-1.18.jar:na]
    at org.weakref.jmx.MBeanOperationBuilder.build(MBeanOperationBuilder.java:86) ~[jmxutils-1.18.jar:na]
electrum commented 7 years ago

This should be fixed now.