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
thanks for dealing with #4291 but sadly even after that fix in 2.27.0 our code base still hits a compile error in this check:
[ERROR] Please report this at https://github.com/google/error-prone/issues/new and include the following:
[ERROR]
[ERROR] error-prone version: 2.27.0
[ERROR] BugPattern: JUnitIncompatibleType
[ERROR] Stack Trace:
[ERROR] java.lang.ClassCastException: class com.sun.tools.javac.code.Type$TypeVar cannot be cast to class com.sun.tools.javac.code.Type$ArrayType (com.sun.tools.javac.code.Type$TypeVar and com.sun.tools.javac.code.Type$ArrayType are in module jdk.compiler of loader 'app')
[ERROR] at com.google.errorprone.bugpatterns.collectionincompatibletype.JUnitIncompatibleType.matchMethodInvocation(JUnitIncompatibleType.java:79)
[ERROR] at com.google.errorprone.scanner.ErrorProneScanner.processMatchers(ErrorProneScanner.java:449)
[ERROR] at com.google.errorprone.scanner.ErrorProneScanner.visitMethodInvocation(ErrorProneScanner.java:746)
[ERROR] at com.google.errorprone.scanner.ErrorProneScanner.visitMethodInvocation(ErrorProneScanner.java:150)
[ERROR] at jdk.compiler/com.sun.tools.javac.tree.JCTree$JCMethodInvocation.accept(JCTree.java:1666)
[ERROR] at jdk.compiler/com.sun.source.util.TreePathScanner.scan(TreePathScanner.java:82)
[ERROR] at com.google.errorprone.scanner.Scanner.scan(Scanner.java:74)
[ERROR] at com.google.errorprone.scanner.Scanner.scan(Scanner.java:48)
An unhandled exception was thrown by the Error Prone static analysis plugin.
[ERROR] Please report this at https://github.com/google/error-prone/issues/new and include the following:
[ERROR]
[ERROR] error-prone version: 2.27.0
[ERROR] BugPattern: JUnitIncompatibleType
[ERROR] Stack Trace:
[ERROR] java.lang.ClassCastException: class com.sun.tools.javac.code.Type$JCPrimitiveType$2 cannot be cast to class com.sun.tools.javac.code.Type$ArrayType (com.sun.tools.javac.code.Type$JCPrimitiveType$2 and com.sun.tools.javac.code.Type$ArrayType are in module jdk.compiler of loader 'app')
[ERROR] at com.google.errorprone.bugpatterns.collectionincompatibletype.JUnitIncompatibleType.matchMethodInvocation(JUnitIncompatibleType.java:80)
[ERROR] at com.google.errorprone.scanner.ErrorProneScanner.processMatchers(ErrorProneScanner.java:449)
[ERROR] at com.google.errorprone.scanner.ErrorProneScanner.visitMethodInvocation(ErrorProneScanner.java:746)
[ERROR] at com.google.errorprone.scanner.ErrorProneScanner.visitMethodInvocation(ErrorProneScanner.java:150)
code:
protected void assertArraysEquals(String message, Object expected, Object actual) {
(...)
} else if (expected instanceof float[] && actual instanceof float[]) {
assertArrayEquals(message, (float[]) expected, (float[]) actual, DELTA); // <-- error happens here
} else if (expected instanceof double[] && actual instanceof double[]) {
assertArrayEquals(message, (double[]) expected, (double[]) actual, DELTA);
}
(i am guessing it would also fail at the double[] assertion
thanks for dealing with #4291 but sadly even after that fix in 2.27.0 our code base still hits a compile error in this check:
problematic code snippet:
The text was updated successfully, but these errors were encountered: