You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Using Error-Prone according to instruction on Command-Line using JDK 8, 9, 10, 11 terminated with Exception. The complete stack-trace is included in error.log.
Some-lines:
ShortSet.java:7: error: An unhandled exception was thrown by the Error Prone static analysis plugin.
s.add(i);
^
Please report this at https://github.com/google/error-prone/issues/new and include the following:
error-prone version: 2.3.3
BugPattern: CollectionIncompatibleType
Stack Trace:
java.lang.NoClassDefFoundError: com/google/common/util/concurrent/internal/InternalFutureFailureAccess
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:763)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:468)
at java.net.URLClassLoader.access$100(URLClassLoader.java:74)
at java.net.URLClassLoader$1.run(URLClassLoader.java:369)
at java.net.URLClassLoader$1.run(URLClassLoader.java:363)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:362)
at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:763)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:468)
at java.net.URLClassLoader.access$100(URLClassLoader.java:74)
at java.net.URLClassLoader$1.run(URLClassLoader.java:369)
at java.net.URLClassLoader$1.run(URLClassLoader.java:363)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:362)
at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:763)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:468)
at java.net.URLClassLoader.access$100(URLClassLoader.java:74)
at java.net.URLClassLoader$1.run(URLClassLoader.java:369)
at java.net.URLClassLoader$1.run(URLClassLoader.java:363)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:362)
at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
at com.google.common.cache.LocalCache$LoadingValueReference.<init>(LocalCache.java:3471)
at com.google.common.cache.LocalCache$LoadingValueReference.<init>(LocalCache.java:3475)
at com.google.common.cache.LocalCache$Segment.lockedGetOrLoad(LocalCache.java:2133)
at com.google.common.cache.LocalCache$Segment.get(LocalCache.java:2044)
at com.google.common.cache.LocalCache.get(LocalCache.java:3952)
at com.google.common.cache.LocalCache.getOrLoad(LocalCache.java:3974)
at com.google.common.cache.LocalCache$LocalLoadingCache.get(LocalCache.java:4958)
at com.google.errorprone.VisitorState.getTypeFromString(VisitorState.java:335)
at com.google.errorprone.suppliers.Suppliers$5.get(Suppliers.java:121)
at com.google.errorprone.suppliers.Suppliers$5.get(Suppliers.java:118)
at com.google.errorprone.predicates.type.DescendantOf.apply(DescendantOf.java:36)
at com.google.errorprone.matchers.method.MethodClassMatcherImpl.matchResult(MethodClassMatcherImpl.java:44)
at com.google.errorprone.matchers.method.MethodClassMatcherImpl.matchResult(MethodClassMatcherImpl.java:31)
at com.google.errorprone.matchers.method.AbstractChainedMatcher.matchResult(AbstractChainedMatcher.java:39)
at com.google.errorprone.matchers.method.AbstractChainedMatcher.matchResult(AbstractChainedMatcher.java:37)
at com.google.errorprone.matchers.method.AbstractSimpleMatcher.matches(AbstractSimpleMatcher.java:30)
at com.google.errorprone.matchers.method.AbstractSimpleMatcher.matches(AbstractSimpleMatcher.java:25)
at com.google.errorprone.bugpatterns.collectionincompatibletype.AbstractCollectionIncompatibleTypeMatcher.matches(AbstractCollectionIncompatibleTypeMatcher.java:113)
at com.google.errorprone.bugpatterns.collectionincompatibletype.CollectionIncompatibleType.firstNonNullMatchResult(CollectionIncompatibleType.java:229)
at com.google.errorprone.bugpatterns.collectionincompatibletype.CollectionIncompatibleType.matchMethodInvocation(CollectionIncompatibleType.java:139)
Bugs: what's the simplest, easiest way to reproduce this bug? Please provide a minimal example if possible.
ShortSet.java
importjava.util.*;
publicclassShortSet {
publicstaticvoidmain (String[] args) {
Set<Short> s = newHashSet<>();
for (shorti = 0; i < 100; i++) {
s.add(i);
s.remove(i - 1);
}
System.out.println(s.size());
}
}
Expected Result
ShortSet.java:8: error: [CollectionIncompatibleType] Argument 'i - 1' should not be passed to this method; its type int is not compatible with its collection's type argument Short
s.remove(i - 1);
^
(see http://errorprone.info/bugpattern/CollectionIncompatibleType)
1 error
Description of the problem / feature request:
Using Error-Prone according to instruction on Command-Line using JDK 8, 9, 10, 11 terminated with Exception. The complete stack-trace is included in error.log.
Some-lines:
Bugs: what's the simplest, easiest way to reproduce this bug? Please provide a minimal example if possible.
ShortSet.java
Expected Result
Commands Used
JDK 8
wget https://repo1.maven.org/maven2/com/google/errorprone/error_prone_core/2.3.3/error_prone_core-2.3.3-with-dependencies.jar wget https://repo1.maven.org/maven2/org/checkerframework/dataflow/2.5.7/dataflow-2.5.7.jar wget https://repo1.maven.org/maven2/org/checkerframework/javacutil/2.5.7/javacutil-2.5.7.jar wget https://repo1.maven.org/maven2/com/google/code/findbugs/jFormatString/3.0.0/jFormatString-3.0.0.jar wget https://repo1.maven.org/maven2/com/google/errorprone/javac/9+181-r4173-1/javac-9+181-r4173-1.jar javac \ -J-Xbootclasspath/p:javac-9+181-r4173-1.jar \ -XDcompilePolicy=simple \ -processorpath error_prone_core-2.3.3-with-dependencies.jar:dataflow-2.5.7.jar:javacutil-2.5.7.jar:jFormatString-3.0.0.jar \ '-Xplugin:ErrorProne -XepDisableAllChecks -Xep:CollectionIncompatibleType:ERROR' \ ShortSet.java
JDK 9, 10, 11
wget https://repo1.maven.org/maven2/com/google/errorprone/error_prone_core/2.3.3/error_prone_core-2.3.3-with-dependencies.jar wget https://repo1.maven.org/maven2/org/checkerframework/dataflow/2.5.7/dataflow-2.5.7.jar wget https://repo1.maven.org/maven2/org/checkerframework/javacutil/2.5.7/javacutil-2.5.7.jar wget https://repo1.maven.org/maven2/com/google/code/findbugs/jFormatString/3.0.0/jFormatString-3.0.0.jar javac \ -XDcompilePolicy=simple \ -processorpath error_prone_core-2.3.3-with-dependencies.jar:dataflow-2.5.7.jar:javacutil-2.5.7.jar:jFormatString-3.0.0.jar \ '-Xplugin:ErrorProne -XepDisableAllChecks -Xep:CollectionIncompatibleType:ERROR' \ ShortSet.java
What version of Error-Prone are you using?
error_prone_core_2.3.3-with_dependencies
Have you found anything relevant by searching the web?
Is similar/same as #1238 which is due to the absence of some dependencies.
The text was updated successfully, but these errors were encountered: