Comments (2)
@nimakarimipour I think they already have an issue for that so probably no need to open a new one.
As for my case - I'll try to rewrite this code to not use Java 21 features (I don't have that many cases) and then revert it once NullAwayAnnotator
has done its job.
from nullawayannotator.
Hi @boris-petrov Thank you very much for reporting this issue. The code you provided is written with features specifically introduced in java 21 and it seems that Java parser has support for java up to 18
language levels. Unfortunately we cannot resolve this issue at this moment, unless javaparser adds the support for java 21. Let's keep this issue open so we can think more on this and find a solution for this in near future.
That would be great if you report the issue on their GitHub.
If it helps you can provide the code snippet below as a unit test that the code compiles successfully with java 21 and fails with java parser
public static void main(String[] args){
StaticJavaParser.parse("public class Main {" +
" boolean run(Object object, ImmutableEntry<?, ?> entry) {" +
" return object instanceof ImmutableEntry<?, ?>(var entry1) && entry1.equals(entry);" +
" }" +
" record ImmutableEntry<K, V>(K key) {}" +
"}");
}
from nullawayannotator.
Related Issues (20)
- Modify injector architecture
- Wrong uri in MethodDeclarationTree nodes
- Add informative comment on @NullUnmarked injections
- Update distribution for all CI jobs
- Remove redundant conflicts from Lombok generated code.
- Injector misses enums constants while other anonymous classes exists HOT 2
- Parallel processing mode misses impacted region for initialization error. HOT 1
- Redesign test architecture HOT 3
- Update Scanner serialization control flags.
- Use @NullUnmarked in JSpecify in released version 0.3.0 for unit tests
- NPE crash on auto-annotator v1.3.6 in the presence of Lombok generated constructor HOT 5
- Annotator is unaware of annotations copied by Lombok in Strict Mode
- Use `@Contract` instead of `@NullUnmarked` HOT 3
- Collect and print stdout output from command that builds downstream dependencies HOT 1
- Crash by Precondition - Missing triggered fixes from downstream HOT 1
- Wrong serialization of @NotNull formal parameters with type use annotation
- Add Upper bound for type variable in Factory used in Library Model Loader
- Record declaration not recognized by Injector
- `Could not find class of type: Top-Level` for a record HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from nullawayannotator.