-
Notifications
You must be signed in to change notification settings - Fork 132
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
JDepend can't read Java 8 code (patch included) #7
Comments
Would love to see this. |
As mentioned here http://forums.gradle.org/gradle/topics/fyi-jdepend-does-support-java-8 and here clarkware/jdepend#7 `JDepend` does not support Java 8 and leads to messages like "Unknown constant: 18" in Maven build. Thus removing the report.
The patch works for me, I created this pull request |
Is this project dead @clarkware ? Under the menu "settings" there is the "Archive this repository" button for this situation. Best regards, |
Thanks very much for the patch, @jcestibariz! I merged it in 2015, but for some reason I can't quite recall, I didn't push out an official release. My fault! Version 2.10 released today includes the patch supporting Java 8. |
Hi @clarkware, I tried updating the jar version to 2.10 and noticed that the classes were compiled with major version 57, Java 13. Is that necessary? My environment is on Java 8 and it can't load the classes. I could compile the source myself and target Java 8, Wouldn't you want to keep the major version down to 46, Java 1.2 just like 2.9 or Java 8 which was the reason why you needed the update. |
Hi,
thnaks for the great tool!
I'm the author of JDepend4Eclipse plugin (which uses JDepend), and just found out that JDepend 2.9.1 can't read Java 8 code (there are 3 new class pool constants added, see [1]).
After a small check in debugger it looks like I have a fix for the ClassFileParser, see [2]. Please sorry for the different formatting of the code, it was never intended to be used as patch source.
Check occurencies of CONSTANT_METHOD_HANDLE, CONSTANT_METHOD_TYPE and CONSTANT_INVOKEDYNAMIC. Tha patch is pretty straightforward and at least fixes class reading errors for me. Might be something is still not working as expected, but I hope that this small change helps to fix JDepend for Java 8.
Regards,
Andrey Loskutov.
[1] http://docs.oracle.com/javase/specs/jvms/se8/html/jvms-4.html#jvms-4.4
[2] https://code.google.com/a/eclipselabs.org/p/jdepend4eclipse/source/detail?r=8ad3369866f7e3e2c45f07b708f75570d79a0be0
The text was updated successfully, but these errors were encountered: