Details
-
Type:
Bug
-
Status:
Closed
-
Priority:
Major
-
Resolution: Fixed
-
Affects Version/s: 1.7.2
-
Fix Version/s: 1.7.3, 1.8-beta-1
-
Component/s: parser-antlr
-
Labels:None
-
Environment:Groovy 1.7.2
-
Number of attachments :
Description
ImportNode has the following method:
public String getClassName() {
return type.getName();
}
When type is null, this throws an NPE. I think the following is preferable (i.e., the equivalent of Groovy's safe dereferencing operator):
public String getClassName() {
return type == null ? null : type.getName();
}
Done.