Community
Participate
Working Groups
Using latest, I got an ArrayIndexOutOfBoundsException trying to sort members on the attached test case.
Created attachment 5586 [details] Test case Run sort member on this test case renaming it as a compilation unit
Change milestone.
The modifiers needs to be reset when parsing a anonymous class declaration. Small test case: package p; public class X { X bar() { // comment return new X() { void bar6() {} void bar4() {} void bar5() {} }; } } The declaration source start for bar6() was the beginning of the comment because the modifier source start has not been reset. I added a reset of modifiers when the 'new' keyword is processed. It needs to be done before the creation of method declarations inside the anonymous class. Fixed and released in HEAD. Regression test added.
Verified.