Community
Participate
Working Groups
Usage of an array instead of an expected boolean for an annotation value results in duplicate error message: "Type mismatch: cannot convert from Object[] to boolean" Repro: Open the following two files in a java project, then observe the Problems view. It is not necessary to have an annotation processor. package pkg; public @interface Anno { boolean b() default false; } package pkg; @Anno(b = {}) public class Test { } Notes: This bug was first found after integrating an APT test from 3.1.1. The test org.eclipse.jdt.apt.tests.ExceptionHandlingTests.testArrayForBooleanValue() fails in 3.2 but now has a workaround. I haven't seen this bug with any other flavor of type mismatch.
Reproduced. Added AnnotationTest#test198
Tuned error reporting to not issue 2 complaints in presence of faulty array initializer. Change located on MemberPairValue. Fixed
Verified for 3.2 RC1 using build I20060413-0010.