Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
1.7.2
-
None
-
Groovy 1.7.2
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(); }