-
Notifications
You must be signed in to change notification settings - Fork 21
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
Compiler fails to parse Java class files with missing annotations #7751
Comments
Imported From: https://issues.scala-lang.org/browse/SI-7751?orig=1 |
@retronym said: |
@retronym said:
|
Kris Nuttycombe (nuttycom) said (edited on Nov 13, 2013 8:53:41 PM UTC): "com.google.code.findbugs" % "jsr305" % "2.0.0", And reintroducing the dependency fixed the error, though I've not done any detailed experimentation to determine why. And, now actually reading to the top of the ticket, I realize that this was already know. Sorry for the noise. |
Stevo Slavic (sslavic) said:
|
Sean Owen (srowen) said:
We get: [WARNING] Class org.apache.commons.logging.Log not found - continuing with a stub.
[ERROR] error while loading FileInputFormat, class file '/Users/srowen/.m2/repository/org/apache/hadoop/hadoop-core/1.0.4/hadoop-core-1.0.4.jar(org/apache/hadoop/mapred/FileInputFormat.class)' is broken The class is available in jcl-over-slf4j, but is marked as "runtime" dependency since it is not used directly, and not needed -- by the likes of javac at least -- at compile time. Changing the scope to "compile" makes it work, presumably because then scalac sees it, and it seems that without seeing it, this error occurs. I don't know if it's realistic, but ideally the behavior would match that of javac, which does not need knowledge of a dependency like this. |
@retronym said: You can use |
Sean Owen (srowen) said: |
Sunghyouk Bae (debop) said (edited on May 10, 2014 10:01:25 AM UTC): I use spring 4 @scheduled that use @repeatable in JDK 8 |
Michael Ahlers (michaelahlers) said (edited on Aug 15, 2016 12:43:39 AM UTC): |
@retronym said: |
Michael Ahlers (michaelahlers) said: |
It's a bit hard to be fully certain, reading through the above history, but it appears this was probably fixed years ago. We can reopen if someone steps forward with a reproduction on current Scala 2. |
Attempting to use the Guava cache package without the JSR-305 and JSR-330 annotations in the classpath results in some rather strange error messages:
At a minimum, the compiler should explain that compilation against Java class files with missing annotations is not allowed, and not emit all of those other strange messages.
It would be preferable, however, for the compiler to proceed without the missing annotations, like the Java compiler does.
It seems that others have run into this problem as well, but I couldn't find any mention of it in the issue tracker.
The text was updated successfully, but these errors were encountered: