Details
-
Type:
Bug
-
Status:
Closed
-
Priority:
Major
-
Resolution: Fixed
-
Affects Version/s: None
-
Fix Version/s: 1.0-JSR-6
-
Component/s: groovy-jdk
-
Labels:None
-
Number of attachments :
Description
If you have multiple classes in a file like below:
file: FileController.groovy
-----------------------------
class UploadCommand {
@Property byte[] myFile
}
class FileController {
@Property upload = {}
}
calling
gcl.loadClass("FileController",true,false) loads the "UploadCommand" class. If you look at the loaded classes within the class loader the closures within the FileController class (like FileController$_closure1) are loaded but no the FileController. Is this a bug? Does loadClass not support multiple classes in a file?
I am sure the class is loaded but maybe it is not added to the list of loaded classes. So this is a bug.