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
Errors occurs while model building. code like case (1/*org.apache.coyote.Constants.STAGE_PARSE*/) . spoon attemp to add comments onto literal node (maybe since the parentheses).
[ERROR] "/* org.apache.coyote.Constants.STAGE_PARSE */" cannot be added into the AST, with parent class spoon.support.reflect.code.CtLiteralImpl at (/home/ling/Sources/projects/tomcat/java/org/apache/catalina/manager/StatusTransformer.java:403)
To Reproduce
Input:
switch (stage) {
case (1/*org.apache.coyote.Constants.STAGE_PARSE*/): // issuestageStr = "P";
fullStatus = false;
break;
case (2/*org.apache.coyote.Constants.STAGE_PREPARE*/):
stageStr = "P";
fullStatus = false;
break;
case (3/*org.apache.coyote.Constants.STAGE_SERVICE*/):
stageStr = "S";
break;
}
Processing with Spoon:
/*Code calling spoon on the input and triggering the bug.*/
Output:
/*Output code or stacktrace if unexpected Exception is raised*/
Note that you can also open a pull request reproducing the issue and reference that, instead of writing additional information here.
Operating system, JDK and Spoon version used
OS: Unbuntu 20.04
JDK:Openjdk-11
Spoon version:10.0
The text was updated successfully, but these errors were encountered:
yijiangtian
changed the title
[Bug] Bug description
[Bug] Issue when falsely attempt to add comments onto CtLiteral nodes.
May 12, 2022
yijiangtian
changed the title
[Bug] Issue when falsely attempt to add comments onto CtLiteral nodes.
[Bug] Issue when badly attempt to add comments onto CtLiteral nodes.
May 12, 2022
Can you check if your issue is resolved now? You may use the latest SNAPSHOT version or 10.2.0-beta-15 in your project's POM. This might have been fixed by #4836 .
Describe the bug
Errors occurs while model building. code like
case (1/*org.apache.coyote.Constants.STAGE_PARSE*/)
. spoon attemp to add comments onto literal node (maybe since the parentheses).[ERROR] "/* org.apache.coyote.Constants.STAGE_PARSE */" cannot be added into the AST, with parent class spoon.support.reflect.code.CtLiteralImpl at (/home/ling/Sources/projects/tomcat/java/org/apache/catalina/manager/StatusTransformer.java:403)
To Reproduce
Input:
Processing with Spoon:
/*Code calling spoon on the input and triggering the bug.*/
Output:
/*Output code or stacktrace if unexpected Exception is raised*/
Note that you can also open a pull request reproducing the issue and reference that, instead of writing additional information here.
Operating system, JDK and Spoon version used
The text was updated successfully, but these errors were encountered: