Open Luro02 opened 5 months ago
This seems to be related to the specification of org.eclipse.jdt.internal.compiler.parser.Scanner
.
If there is a whitespace at the beginning of the target file, it is consumed before proceeding to Javadoc comment, and Javadoc comment is interpreted as the start of the class definition, so to speak. However, if there are no spaces at the beginning, Javadoc comment is processed alonely.
Describe the bug
The javadoc of the class vanishes when it is the first thing in the file. Adding a single space in front of the
/**
solves the issue.Source code you are trying to analyze/transform
Source code for your Spoon processing
Actual output
Expected output
Spoon Version
11.0.0
JVM Version
openjdk version "21.0.2" 2024-01-16 LTS OpenJDK Runtime Environment Zulu21.32+17-CA (build 21.0.2+13-LTS) OpenJDK 64-Bit Server VM Zulu21.32+17-CA (build 21.0.2+13-LTS, mixed mode, sharing)
What operating system are you using?
Windows