From b5474cdcf84f090c8dccc8ddeb45d4d62cc4d966 Mon Sep 17 00:00:00 2001 From: snap252 Date: Tue, 30 May 2017 14:05:29 +0200 Subject: [PATCH] test case and fix for public static > getEnum() { return null; } --- pmd-java/etc/grammar/Java.jjt | 2 +- .../net/sourceforge/pmd/ast/ParserCornerCases18.java | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/pmd-java/etc/grammar/Java.jjt b/pmd-java/etc/grammar/Java.jjt index 9affcbfaa5..0030797848 100644 --- a/pmd-java/etc/grammar/Java.jjt +++ b/pmd-java/etc/grammar/Java.jjt @@ -1416,7 +1416,7 @@ void TypeParameter(): void TypeBound(): {} { - "extends" ClassOrInterfaceType() ( "&" ClassOrInterfaceType() )* + "extends" ((Annotation() {checkForBadTypeAnnotations();})*) ClassOrInterfaceType() ( "&" ((Annotation() {checkForBadTypeAnnotations();})*) ClassOrInterfaceType() )* } void ClassOrInterfaceBody(): diff --git a/pmd-java/src/test/resources/net/sourceforge/pmd/ast/ParserCornerCases18.java b/pmd-java/src/test/resources/net/sourceforge/pmd/ast/ParserCornerCases18.java index ad7ea6f0a1..70e4fd4c92 100644 --- a/pmd-java/src/test/resources/net/sourceforge/pmd/ast/ParserCornerCases18.java +++ b/pmd-java/src/test/resources/net/sourceforge/pmd/ast/ParserCornerCases18.java @@ -176,6 +176,10 @@ public class ParserCornerCases18 { private byte @Nullable [] getBytes(){ return null; } + + public static > getEnum() { + return null; + } /**