Details
-
Type:
Bug
-
Status:
Closed
-
Priority:
Major
-
Resolution: Fixed
-
Affects Version/s: 1.7.8, 1.7.10
-
Component/s: Stub generator / Joint compiler
-
Labels:None
-
Environment:Windows XP
-
Testcase included:yes
-
Number of attachments :
Description
My groovy method has an annotation that some hibernate users will recognize:
@JoinTable(name = "join_table", inverseJoinColumns = @JoinColumn(name = "otherEntity_id"), joinColumns = @JoinColumn(name = "myEntity_id")) Set<OtherEntity> getOthers() { others }
When I compile with just groovy, no problem. But in joint compilation mode, the java compiler gets confused by the appearance of a String instead of an annotation in the stub:
[groovyc] C:\DOCUME~1\cyrus\LOCALS~1\Temp\groovy-generated-5778051423738941844-java-source\MyEntity.java:18: annotation value must be an annotation [groovyc] @javax.persistence.OneToMany(targetEntity=OtherEntity.class) @javax.persistence.JoinTable(inverseJoinColumns="org.codehaus.groovy.ast.AnnotationNode@d4d66b", name="join_table", joinColumns="org.codehaus.groovy.ast.AnnotationNode@149105b") public java.util.Set<OtherEntity> getOthers() { return (java.util.Set<OtherEntity>)null;} [groovyc]
I've attached a simple ant project to reproduce this problem. (To save space, I excluded the groovy jar.)