Its a JDK bug (should have been fixed)
http://bugs.sun.com/view_bug.do?bug_id=6558580
When you have an enum as the default value for an element of an annotation,
thats where this specific bug pops up. So in our case we have a KeyType enum
and its used as a default value in the type() element of @Key. Looks like it
thinks that KeyType.FAILURE is different than KeyType
//SNIP
public @interface Key {
String value();
int count() default 1;
KeyType type() default KeyType.FAILURE;
}
public enum KeyType {
FAILURE,WARNING,ERROR
}
//SNIP
On Tue, Aug 31, 2010 at 11:52 PM, David Blevins <[email protected]>wrote:
> Running into this strange error and wondering if anyone has ever seen
> anything like it.
>
> [INFO]
> ------------------------------------------------------------------------
> [ERROR] BUILD FAILURE
> [INFO]
> ------------------------------------------------------------------------
> [INFO] Compilation failure
> /Users/dblevins/work/openejb-trunk/container/openejb-core/src/test/java/org/apache/openejb/config/rules/Key.java:[30,34]
> incompatible types
> found : org.apache.openejb.config.rules.KeyType
> required: org.apache.openejb.config.rules.KeyType
>
> Note I'm getting this on the merge, so it doesn't affect trunk.
>
> Don't have any related changes -- not that I can imagine what would break
> this anyway.
>
>
> -David
>
>
--
Karan Singh Malhi