Hi,
 
After I switched to GWT 2.3 I suddenly have a custom annotation that fails 
to compile with the Oracle javac.... 
 
I'm totally puzzled on how this can happen but maybe the GWT team have some 
insight on what might me happening in GWT 
that could cause this ? could this be caused by a misbehaving annotation 
processors in GWT ?
 
The annotation in question is this one:
@Retention(RetentionPolicy.RUNTIME)
@Target(ElementType.METHOD)
public @interface BuildEditorModelWith {
    public String value();
    public String datadir() default "test/data/editormodelbuilder";
    *Class<? extends PresenterFactory> presentations() default 
StructuralPresentationFactory.class;
*}
 
The bold line fails with an error that indicates that the 
PresentationFactoryImpl.class is not compatible (but it is!)
jar.pretest:
    [mkdir] Created dir: 
/scm/vobs/srcSAG/mek/modules/editorweb/build/test-classes
    [javac] Compiling 61 source files to 
/scm/vobs/srcSAG/mek/modules/editorweb/build/test-classes
    [javac] 
/scm/vobs/srcSAG/mek/modules/editorweb/test/java/com/swift/editor/shared/model/test/BuildEditorModelWith.java:38:
 
incompatible types
    [javac] found   : 
java.lang.Class<com.swift.editor.shared.model.test.StructuralPresentationFactory>
    [javac] required: java.lang.Class<? extends 
com.swift.editor.shared.presenter.PresenterFactory>
    [javac]     abstract Class<? extends PresenterFactory> presentations() 
default StructuralPresentationFactory.class;
    
[javac]                                                                         
                            
^
    [javac] 1 error
 
When I change the line to use <?> to accept all classes everything is fine 
(but I have to typecast in my tests where I use this annotation).
 
I really don't see how GWT 2.4 could cause this problem in my unit test 
code, but the fact is: with GWT 2.3 in the classpath it works fine, with GWT 
2.4 it no longer compiles.
 
I'm running JDK 1.6.0_22 (I can not upgrade it, enterprise bs) and it 
happens on both SUN and Windows XP.
 
David
 

-- 
http://groups.google.com/group/Google-Web-Toolkit-Contributors

Reply via email to