Community
Participate
Working Groups
Build ID: 200606281455 Steps To Reproduce: 1. test class (use UTF-8 encoding) /** * */ public class Test { /** * @param nDataCount:0 */ public static void main(String[] args) { } } 2. parse this class using eclipse AST parser 3. After parsing, "public" modifier can't be found in BodyDeclaration.modifiers() method (in both class and method) More information:
I could not reproduce with either 3.2.2 or 3.3. Might be because of the UTF-8 encoding. Could you please try to reproduce with 3.3 and if you get it, attach your project in a zip file? Thanks.
Created attachment 73682 [details] test class
I can you try test the class in comment #2 and change the encoding to UTF-8.
Reproduced using 3.3.0 and the attached source file. Thanks for the test case. I am investigating. Philippe, this might be a candidate for 3.3.1 depending on the risk involved in the fix.
Created attachment 73886 [details] Proposed fix This fix makes sure that the AbstractCommentParser cannot return without resetting the tokenizeWhitespaces field of the scanner to the previous value. The problem comes from that this parser sets this field to true and because of an invalid input exception (InvalidDigit), it was never setting it back to false. So when it was about setting the modifiers, a whitespace token was not expected to be returned and the loop was ended. This is a no risk fix and I propose to backport it to 3.3.1.
Created attachment 73887 [details] Regression test
Created attachment 73888 [details] Regression test Cleanup the previous attachment
Created attachment 73893 [details] Proposed fix
Released for 3.4M1. Added regression test in org.eclipse.jdt.core.tests.dom.ASTConverterTestAST3_2#test0680. Philippe, This is a candidate for 3.3.1. The fix is safe.
Verified for 3.4M1 using build I20070806-1800.