Changeset 19101 in josm for trunk/src/org/openstreetmap/josm/tools/template_engine/Variable.java
- Timestamp:
- 2024-06-11T23:53:20+02:00 (4 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/tools/template_engine/Variable.java
r16488 r19101 62 62 @Override 63 63 public boolean isValid(TemplateEngineDataProvider dataProvider) { 64 if (special && SPECIAL_VALUE_EVERYTHING.equals(variableName)) 65 return true; 66 else 67 return dataProvider.getTemplateValue(variableName, special) != null; 64 return (special && SPECIAL_VALUE_EVERYTHING.equals(variableName)) 65 || dataProvider.getTemplateValue(variableName, special) != null; 68 66 } 69 67 … … 94 92 return false; 95 93 Variable other = (Variable) obj; 96 if (special != other.special) 97 return false; 98 if (variableName == null) { 99 if (other.variableName != null) 100 return false; 101 } else if (!variableName.equals(other.variableName)) 102 return false; 103 return true; 94 return this.special == other.special && Objects.equals(this.variableName, other.variableName); 104 95 } 105 96 }
Note:
See TracChangeset
for help on using the changeset viewer.