From 7997297e0bebe66692b60a3bf5cb2ca1cfde8022 Mon Sep 17 00:00:00 2001 From: snap252 Date: Tue, 30 May 2017 14:13:38 +0200 Subject: [PATCH] test case for public void createNonNullArray() { return new MetaColumn @NonNull [value]; } --- 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 0030797848..4a6cfbfda7 100644 --- a/pmd-java/etc/grammar/Java.jjt +++ b/pmd-java/etc/grammar/Java.jjt @@ -1921,7 +1921,7 @@ void AllocationExpression(): (LOOKAHEAD(2) PrimitiveType() ArrayDimsAndInits() | - ClassOrInterfaceType() [ TypeArguments() ] + ClassOrInterfaceType() ((Annotation() {checkForBadTypeAnnotations();})*) [ TypeArguments() ] ( ArrayDimsAndInits() | 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 70e4fd4c92..8aa76a713a 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 @@ -180,6 +180,10 @@ public class ParserCornerCases18 { public static > getEnum() { return null; } + + public void createNonNullArray() { + return new MetaColumn @NonNull [value]; + } /**