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
Describe the bug
In JDK v22, a feature was added to the Java language that allows unused variables to be named _. When the java parser encounters such a variable, it fails
To Reproduce
Run the annotator under JDK v22 on a codebase that contains an unused variable named _. The following sections show the relevant dependency versions, configuration, etc.
Expected behavior
Annotator should run successfully
Stack trace
Exception in thread "main" com.github.javaparser.ParseProblemException: (line 51,col 38) '_' is a reserved keyword.
at com.github.javaparser.JavaParserAdapter.handleResult(JavaParserAdapter.java:83)
at com.github.javaparser.JavaParserAdapter.parse(JavaParserAdapter.java:99)
at com.github.javaparser.StaticJavaParser.parse(StaticJavaParser.java:173)
at edu.ucr.cs.riple.injector.Injector.parse(Injector.java:173)
at edu.ucr.cs.riple.core.registries.field.FieldRegistry$1.build(FieldRegistry.java:115)
at edu.ucr.cs.riple.core.registries.field.FieldRegistry$1.build(FieldRegistry.java:97)
at edu.ucr.cs.riple.core.registries.Registry.populateContent(Registry.java:122)
at edu.ucr.cs.riple.core.registries.Registry.lambda$new$0(Registry.java:91)
at java.base/java.lang.Iterable.forEach(Iterable.java:75)
at edu.ucr.cs.riple.core.registries.Registry.<init>(Registry.java:88)
at edu.ucr.cs.riple.core.registries.field.FieldRegistry.<init>(FieldRegistry.java:82)
at edu.ucr.cs.riple.core.module.ModuleInfo.<init>(ModuleInfo.java:91)
at edu.ucr.cs.riple.core.module.ModuleInfo.<init>(ModuleInfo.java:73)
at edu.ucr.cs.riple.core.Context.<init>(Context.java:78)
at edu.ucr.cs.riple.core.Annotator.<init>(Annotator.java:63)
at edu.ucr.cs.riple.core.Main.main(Main.java:45)
OS (please complete the following information):
OS: MacOS X
Version: openjdk version "22.0.1" 2024-04-16
Annotator Version: 1.3.14 (latest)
The text was updated successfully, but these errors were encountered:
@donalmurtagh Thanks for reporting the issue! I wanted to let you know that I’m actively monitoring for a new javaparser release. Once a release supporting Java 22 features is available, I’ll update the Annotator accordingly and inform you.
Describe the bug
In JDK v22, a feature was added to the Java language that allows unused variables to be named
_
. When the java parser encounters such a variable, it failsTo Reproduce
Run the annotator under JDK v22 on a codebase that contains an unused variable named
_
. The following sections show the relevant dependency versions, configuration, etc.build.gradle
Relevant sections of the build file are
paths.tsv
A tab character separates the two paths.
Annotator Command
Expected behavior
Annotator should run successfully
Stack trace
OS (please complete the following information):
The text was updated successfully, but these errors were encountered: