[java] Remove unneccessary annotation parsing

This commit is contained in:
Andreas Dangel
2020-02-28 19:07:03 +01:00
parent 2ace55f635
commit ee211d42b1
2 changed files with 1 additions and 1 deletions

View File

@ -1172,7 +1172,6 @@ void RecordConstructorDeclaration():
int modifiers;
}
{
(TypeAnnotation())*
modifiers = Modifiers() { jjtThis.setModifiers(modifiers); }
[TypeParameters()]
<IDENTIFIER> { jjtThis.setImage(token.image); }

View File

@ -134,6 +134,7 @@ public class Java14PreviewTest {
List<ASTRecordConstructorDeclaration> rangeConstructors = range.findDescendantsOfType(ASTRecordConstructorDeclaration.class);
Assert.assertEquals(1, rangeConstructors.size());
Assert.assertEquals("Range", rangeConstructors.get(0).getImage());
Assert.assertTrue(rangeConstructors.get(0).getChild(0) instanceof ASTAnnotation);
Assert.assertEquals(2, range.getDeclarations().size());
ASTRecordDeclaration varRec = recordDecls.get(3);