Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
1.8.1
-
None
-
Windows XP (as it happens)
jdk1.6.0_17
Description
In my groovy class, I have a method that returns a List<Year>, where <Year> is a java class in another package. (Not sure whether the "java" part is relevant; it's what my code happened to do. I also haven't checked whether this problem happens only with method return types, though I think all the examples I saw had that property.)
import other_package.Year class YearRange { List<Year> getYears() { return null } }
When groovy creates the stub, however, it includes the full package name for List, but not for Year:
[groovyc] C:\DOCUME~1\cyrus\LOCALS~1\Temp\groovy-generated-1209606927705701441-java-source\one_package\YearRange.java:18: cannot find symbol [groovyc] symbol : class Year [groovyc] location: class one_package.YearRange [groovyc] public java.util.List<Year> getYears() { return (java.util.List<Year>)null;} [groovyc] ^ [groovyc] C:\DOCUME~1\cyrus\LOCALS~1\Temp\groovy-generated-1209606927705701441-java-source\one_package\YearRange.java:18: cannot find symbol [groovyc] symbol : class Year [groovyc] location: class one_package.YearRange [groovyc] public java.util.List<Year> getYears() { return (java.util.List<Year>)null;}
I have this problem with the following snapshot build:
groovy-all-1.8.1-SNAPSHOT.jar 20-Jul-2011 06:11 5.8M
I do not have this problem with groovy 1.8.0.