Juan Martín Sotuyo Dodero
committed by
Andreas Dangel
parent
926d1c3fbc
commit
c53e1790e1
@ -1,4 +1,9 @@
|
||||
/**
|
||||
* Allow local classes to carry more than one annotation.
|
||||
* Bug #208
|
||||
*
|
||||
* Juan Martin Sotuyo Dodero 01/2017
|
||||
*====================================================================
|
||||
* Change lookahead for AnnotationMethodDeclaration in AnnotationTypeMemberDeclaration.
|
||||
* Bug #206
|
||||
*
|
||||
@ -1978,7 +1983,7 @@ void BlockStatement():
|
||||
ClassOrInterfaceDeclaration, but that seems like a hack that
|
||||
could break other things...
|
||||
*/
|
||||
LOOKAHEAD( [Annotation()] ["final"|"abstract"] "class") [Annotation()] ClassOrInterfaceDeclaration(0)
|
||||
LOOKAHEAD( (Annotation())* ["final"|"abstract"] "class") (Annotation())* ClassOrInterfaceDeclaration(0)
|
||||
}
|
||||
|
||||
void LocalVariableDeclaration() :
|
||||
|
@ -152,6 +152,12 @@ public class ParserCornersTest extends ParserTst {
|
||||
parseJava18(code);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testGitHubBug208ParseError() throws Exception {
|
||||
String c = IOUtils.toString(this.getClass().getResourceAsStream("GitHubBug208.java"));
|
||||
parseJava15(c);
|
||||
}
|
||||
|
||||
/**
|
||||
* This triggered bug #1484 UnusedLocalVariable - false positive - parenthesis
|
||||
* @throws Exception
|
||||
|
@ -0,0 +1,11 @@
|
||||
public class GitHubBug208 {
|
||||
public void testMethod() {
|
||||
@Lazy
|
||||
@Configuration
|
||||
class LocalClass {
|
||||
@Bean Object foo() {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user