diff --git a/src/main/org/apache/tools/ant/types/Resource.java b/src/main/org/apache/tools/ant/types/Resource.java index 345d53055..eccbdc22c 100644 --- a/src/main/org/apache/tools/ant/types/Resource.java +++ b/src/main/org/apache/tools/ant/types/Resource.java @@ -294,7 +294,7 @@ public class Resource extends DataType return getCheckedRef().hashCode(); } String name = getName(); - return MAGIC * (name == null ? name.hashCode() : NULL_NAME); + return MAGIC * (name == null ? NULL_NAME : name.hashCode()); } /**