-
Notifications
You must be signed in to change notification settings - Fork 37
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
The BytecodeReadingParanamer throws an Exception in Java8 when the class contains lambda expressions #17
Comments
This bug also affects JBehave, see http://jira.codehaus.org/browse/JBEHAVE-1069 |
Any plans to fix this? |
If you are running your code under Java 8, you don't need paranamer. You need just to compile your code with |
There are libraries using paranamer that run on older JDKs but read classes from Java 8. Also, the fact that Java 8 made the flag a non-default option means you still need a fallback :( |
Hmm, now I see. I fixed the code today, but I need to write more tests to check if the change works with codes compiled with JDK prior Java 8. Soon I will send a pull request. |
This bug also affects Orika-mapper, see orika-mapper/orika#60 |
I fixed the code at pull request #20, waiting for @paul-hammant review. |
Closes #17. Added constant pool tags to work with Java 8 Lambdas.
The PR is in. There's a failure with QDoxParanamerTestCase though. I need to work though that. I deeply suspect I messed up the merging of Robert Scholte's QDox 2 change. Aside from that I need to change the POM to no longer refer to Codehaus - though I have to copy - https://github.com/SeleniumHQ/fluent-selenium/blob/master/java/pom.xml I'll explain more if you hit me up in email. |
IIRC the root cause of the failing test has to do with the change in QDox2 where a constructor is now a Constructor (like in java.lang.reflect) instead of a special kind of Method. The order of parsing methods+constructors has changed due to this. Hopefully this a good clue to get it fixed in Paranamer. |
Before on paranamer 2.6, there was an incompatibility with certain JDK 8 features as mentioned in paul-hammant/paranamer#17. This seemed to happen in particular because of the use of a particular Spark version (2.4.4 on scala 2.12).
Before on paranamer 2.6, there was an incompatibility with certain JDK 8 features as mentioned in paul-hammant/paranamer#17. This seemed to happen in particular because of the use of a particular Spark version (2.4.4 on scala 2.12).
Hello,
I just came across this issue where the BytecodeReadingParanamer throws an ArrayIndexOutOfBoundsException in Java8 when the class contains lambda expressions.
Here is an excerpt of the stack trace:
java.lang.ArrayIndexOutOfBoundsException: 28263
at com.thoughtworks.paranamer.BytecodeReadingParanamer$ClassReader.accept(BytecodeReadingParanamer.java:563)
at com.thoughtworks.paranamer.BytecodeReadingParanamer$ClassReader.access$200(BytecodeReadingParanamer.java:338)
at com.thoughtworks.paranamer.BytecodeReadingParanamer.lookupParameterNames(BytecodeReadingParanamer.java:103)
The text was updated successfully, but these errors were encountered: