Closed agentgt closed 1 month ago
@msridhar hello,excuse me. When I run 0.11.1,get a similary erro: error-prone version: 2.23.0 ButPattern: NullAway: Stack Trace:
java.lang.RuntimeException: Did not find supertype of java.lang.String matching java.lang.Object&java.io.Serializable&java.lang.Comparable<? extends java.lang.Object&java.io.Serializable&java.lang.Comparable<?>>
Looks at NullAway here:
Type rhsTypeAsSuper = types.asSuper(rhsType, lhsType.tsym);
// This is impossible, considering the fact that standard Java subtyping succeeds before
// running NullAway
if (rhsTypeAsSuper == null) {
throw new RuntimeException("Did not find supertype of " + rhsType + " matching " + lhsType);
}
@SolomonSun2010 Do you have an example input program that causes the error? Without that it'll be hard to track down the problem.
@SolomonSun2010 Do you have an example input program that causes the error? Without that it'll be hard to track down the problem.
@msridhar OK,when running NullAway, normally display : warning: [NullAway] xxxxxx
Suddenly, error message is:
An unhandled exception was thrown by Error Prone static analysis pluging. ", relativeServices=" + (relativeServices == null ? "relativeServices == null" : relativeServices.size())
@Override
public String toString() {
return "ServiceExtraInfo{" +
"appInfoData=" + (appInfoData == null ? "null" : appInfoData.toString()) +
", relativeServices=" + (relativeServices == null ? "relativeServices == null" : relativeServices.size())
+ getRelativeServicesToString() + '}';
}
@msridhar I too still get a similar error w/ 0.11.1 (but in a different place) if that helps.
/Users/agent/projects/rainbowgum/core/src/main/java/io/jstach/rainbowgum/LogProperty.java:[1660,6] error: An unhandled exception was thrown by the Error Prone static analysis plugin.
Please report this at https://github.com/google/error-prone/issues/new and include the following:
error-prone version: 2.28.0
BugPattern: NullAway
Stack Trace:
java.lang.RuntimeException: Did not find supertype of ? super java.lang.Exception matching java.lang.Exception
at com.uber.nullaway.generics.CheckIdenticalNullabilityVisitor.visitClassType(CheckIdenticalNullabilityVisitor.java:33)
at com.uber.nullaway.generics.CheckIdenticalNullabilityVisitor.visitClassType(CheckIdenticalNullabilityVisitor.java:14)
at jdk.compiler/com.sun.tools.javac.code.Type$ClassType.accept(Type.java:1050)
at com.uber.nullaway.generics.CheckIdenticalNullabilityVisitor.visitClassType(CheckIdenticalNullabilityVisitor.java:52)
(n.b. that is a fork and branch from the main repository albeit it exists in the main repo its line might change as I continue to add/improve javadoc)
Should I file a separate bug for the above?
If you do happen to clone the repository (and branch nullaway) linked you can kick off nullaway (and errorprone) with:
bin/analyze.sh errorpone
Thanks @SolomonSun2010 @agentgt I went ahead and opened two new issues based on your comments. Will look when I get time.
NullAway 0.11.0 with JSpecifyMode turned on crashes for the following class:
https://github.com/jstachio/rainbowgum/blob/31c71243eef1661513516938005a064663930bf2/core/src/test/java/io/jstach/rainbowgum/EnumCombinations.java#L26
Happy to provide more information.