From 92ccf1b0ea00e06ae98e044c24c3743c8e21e3d7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9ment=20Fournier?= Date: Sat, 5 Nov 2022 16:31:17 +0100 Subject: [PATCH] Support array init with just a comma Refs #3643 --- pmd-java/etc/grammar/Java.jjt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pmd-java/etc/grammar/Java.jjt b/pmd-java/etc/grammar/Java.jjt index 689c5ed766..2072359aad 100644 --- a/pmd-java/etc/grammar/Java.jjt +++ b/pmd-java/etc/grammar/Java.jjt @@ -2595,7 +2595,7 @@ void MemberValue(): void MemberValueArrayInitializer(): {} { - "{" (MemberValue() ( LOOKAHEAD(2) "," MemberValue() )* [ "," ])? "}" + "{" (MemberValue() ( LOOKAHEAD(2) "," MemberValue() )*)? [ "," ] "}" } /*