Skip to content
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

Exception when analyzing class with type annotations #68

Open
schauder opened this issue Aug 31, 2016 · 3 comments
Open

Exception when analyzing class with type annotations #68

schauder opened this issue Aug 31, 2016 · 3 comments

Comments

@schauder
Copy link
Collaborator

When analyzing a class with type annotations an exception is thrown like shown below.
This is due to problems that ASM has with the behavior of certain javac versions.

See the following for more details:

If you encounter the problem, you have the following options:

  • Use an older JDK Version for compiling your classes. 1.8.0_31-b13 is the latest one known to work.
  • Don't analyze such files. Note: an exclusing filter will not work
at org.objectweb.asm.ClassReader.readLabel(Unknown Source)
    at org.objectweb.asm.ClassReader.a(Unknown Source)
    at org.objectweb.asm.ClassReader.a(Unknown Source)
    at org.objectweb.asm.ClassReader.b(Unknown Source)
    at org.objectweb.asm.ClassReader.accept(Unknown Source)
    at org.objectweb.asm.ClassReader.accept(Unknown Source)
    at de.schauderhaft.degraph.analysis.asm.Analyzer$.readStream$1(Analyzer.scala:17)
    at de.schauderhaft.degraph.analysis.asm.Analyzer$.de$schauderhaft$degraph$analysis$asm$Analyzer$$analyze$1(Analyzer.scala:32)
    at de.schauderhaft.degraph.analysis.asm.Analyzer$$anonfun$analyze$1$$anonfun$apply$1.apply(Analyzer.scala:50)
    at de.schauderhaft.degraph.analysis.asm.Analyzer$$anonfun$analyze$1$$anonfun$apply$1.apply(Analyzer.scala:49)
    at scala.collection.immutable.HashSet$HashSet1.foreach(HashSet.scala:322)
    at scala.collection.immutable.HashSet$HashTrieSet.foreach(HashSet.scala:978)
    at de.schauderhaft.degraph.analysis.asm.Analyzer$$anonfun$analyze$1.apply(Analyzer.scala:49)
    at de.schauderhaft.degraph.analysis.asm.Analyzer$$anonfun$analyze$1.apply(Analyzer.scala:46)
    at scala.collection.IndexedSeqOptimized$class.foreach(IndexedSeqOptimized.scala:33)
    at scala.collection.mutable.ArrayOps$ofRef.foreach(ArrayOps.scala:186)
    at de.schauderhaft.degraph.analysis.asm.Analyzer$.analyze(Analyzer.scala:46)
schauder added a commit that referenced this issue Aug 31, 2016
When analysis failes an explanation is printed to console, with stacktrace and a link to the github issue  #68

The Tests that triggered the failure are included on JDK versions with the problem.
@cal101
Copy link

cal101 commented Aug 31, 2016

I don't oversee the implications but did you notice that the spring folks seem to have made asm ignore illegal offsets and so that version should be usable on those files? (The spring issue link you provided.)

@schauder
Copy link
Collaborator Author

schauder commented Sep 1, 2016

I noticed that, but they are actually forking ASM, and I am not interested in doing that.

@schauder
Copy link
Collaborator Author

The ASM issues referes to https://bugs.openjdk.java.net/browse/JDK-8144185

Looks like the JDK guys agree that it is a JDK issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants