-
-
Notifications
You must be signed in to change notification settings - Fork 351
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
[Bug]: Not allowed javaletter or keyword in identifier found #5591
Comments
Hey, For a |
My coworker managed to reproduce the issue during my holidays, the solution we implemented is to use a variable to store the instance of the new HashMap Problem package com.demo;
import java.util.HashMap;
import java.util.Map;
public class TestClass {
private final Map<String, Object> testMap;
public TestClass() {
this.testMap = Map.of("TEST", true);
}
public Boolean myTest() {
var redirectView = Boolean.TRUE;
return test(redirectView, new HashMap<>(testMap));
}
private Boolean test(final Boolean redirectView, final Map<String, Object> params) {
params.put("TEST", "TEST");
return redirectView;
}
} Solution public Boolean myTest() {
var redirectView = Boolean.TRUE;
var solution = new HashMap<>(testMap);
return test(redirectView, solution);
} |
Do you mean that |
Yes, I've extracted the code of the launcher String path = "src/test/java";
String basedir = new File(path).getAbsolutePath();
Launcher launcher = new Launcher();
launcher.getEnvironment().setNoClasspath(true);
launcher.addInputResource(basedir);
launcher.buildModel(); And here is the complete stack
|
Does the Could you provide a minimal example that reproduces the problem? Please also try the approach that MartinWitt commented on. |
Describe the bug
Hello, I have this error, even with the latest version. Could you tell me how I can debug the execution to see which files cause the issue? Thanks.
Source code you are trying to analyze/transform
No response
Source code for your Spoon processing
No response
Actual output
No response
Expected output
No response
Spoon Version
10.4.2
JVM Version
openjdk 17.0.7 2023-04-18 LTS OpenJDK Runtime Environment Zulu17.42+19-CA (build 17.0.7+7-LTS) OpenJDK 64-Bit Server VM Zulu17.42+19-CA (build 17.0.7+7-LTS, mixed mode, sharing)
What operating system are you using?
macOS
The text was updated successfully, but these errors were encountered: