The existing implementation doesn't parse empty template member array initializers in Java (for example "default {}") --- it expects at least one value inside the {}. This patch appears to get CodeCover to accept the empty array initializer. I patched the grammar definition for MemberValueArrayInitializer so it appears more like that for VariableInitializer (which does allow empty arrays) and regenerated the parser under trunk/misc. However the generated files are substantially different from those used to build CodeCover under trunk/code/instrumentation-java, and I'm not sure what the correct process for getting from one set to the other is. What I did was to make a patch reflecting the effects that the grammar fix has on sources under trunk misc/instrumentation/parsers/java_1.5_plain, and apply that patch to the somewhat different sources under trunk/code/instrumentation-java. It appears to work, so I attach it here. Works against revision 74.
It'd be pretty cool if the step from the .jj file to the actual source under trunk/code could be automated...
Patch to allow empty template member array initializers in Java.