-
Notifications
You must be signed in to change notification settings - Fork 299
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
java.lang.ClassCastException: class com.sun.tools.javac.tree.JCTree$JCLiteral cannot be cast to class com.sun.source.tree.IdentifierTree #831
Comments
Thanks for the report! This is likely due to updating Checker Dataflow to 3.38.0. Can you confirm that |
I can confirm it is indeed an enum. public enum GroupBy {
OWNER,
CHANNEL,
TOPIC,
TEAM
} |
Sorry, I forgot to mention that we use JDK 20 with Preview features enabled |
Thanks @bdeneuter these features are now stabilized with JDK 21. This issue is being investigated in typetools/checker-framework#6173 and typetools/checker-framework#6174 |
Added test for null case (covering uber#831) and changed JDK 17 to JDK 21 for unit testing
Added test for null case in switch statements (covering #831) and changed JDK 17 to JDK 21 for testing recent language features --------- Co-authored-by: Manu Sridharan <[email protected]>
Fixes #831 as Checker Framework dataflow now has support for JDK 21 constructs
@bdeneuter now that we got this crasher fixed is there any way you could try out a snapshot build again to see if there are further NullAway crashes on your codebase? Also, assuming there are no further crashes, would it be helpful to you if we cut a new release with this fix? |
@msridhar I tested it with the SNAPSHOT version and I don't have any crashes anymore with the service where we had this crash. |
Ok thanks for the testing @bdeneuter! We will work on cutting a bug-fix release soon. |
@bdeneuter version 0.10.15 is out with the fix. Please let us know if you have any issues with it. |
With version 0.10.14 we receive a ClassCastException on a switch statement. With the previous version 0.10.13 NullAway validated correctly.
The JDK that we are using is JDK 20 (Temurin).
This is the piece of code that gives a problem:
The error that we get:
The text was updated successfully, but these errors were encountered: