Changeset 15902 in josm
- Timestamp:
- 2020-02-22T19:40:25+01:00 (4 years ago)
- Location:
- trunk/src/org/openstreetmap/josm
- Files:
-
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/data/imagery/ImageryInfo.java
r15739 r15902 397 397 min_zoom = i.defaultMinZoom; 398 398 cookies = i.cookies; 399 icon = i.icon ;399 icon = i.icon == null ? null : i.icon.intern(); 400 400 description = i.description; 401 401 category = i.category != null ? i.category.getCategoryString() : null; … … 568 568 termsOfUseURL = e.terms_of_use_url; 569 569 countryCode = e.country_code; 570 icon = e.icon ;570 icon = e.icon == null ? null : e.icon.intern(); 571 571 if (e.noTileHeaders != null) { 572 572 noTileHeaders = e.noTileHeaders.toMap(); … … 633 633 this.overlay = i.overlay; 634 634 // do not copy field {@code mirrors} 635 this.icon = i.icon ;635 this.icon = i.icon == null ? null : i.icon.intern(); 636 636 this.isGeoreferenceValid = i.isGeoreferenceValid; 637 637 this.defaultLayers = i.defaultLayers; … … 1190 1190 */ 1191 1191 public void setIcon(String icon) { 1192 this.icon = icon ;1192 this.icon = icon == null ? null : icon.intern(); 1193 1193 } 1194 1194 -
trunk/src/org/openstreetmap/josm/data/projection/Projections.java
r15717 r15902 77 77 */ 78 78 public ProjectionDefinition(String code, String name, String definition) { 79 this.code = code ;80 this.name = name ;81 this.definition = definition ;79 this.code = code.intern(); 80 this.name = name.intern(); 81 this.definition = definition.intern(); 82 82 } 83 83 } -
trunk/src/org/openstreetmap/josm/data/validation/tests/MapCSSTagChecker.java
r15900 r15902 331 331 try { 332 332 final String val = ai.val instanceof Expression 333 ? Optional.ofNullable(((Expression) ai.val).evaluate(new Environment())).map(Object::toString).orElse(null) 333 ? Optional.ofNullable(((Expression) ai.val).evaluate(new Environment())) 334 .map(Object::toString).map(String::intern).orElse(null) 334 335 : ai.val instanceof String 335 336 ? (String) ai.val -
trunk/src/org/openstreetmap/josm/gui/mappaint/Keyword.java
r12378 r15902 24 24 */ 25 25 public Keyword(String val) { 26 this.val = val.toLowerCase(Locale.ENGLISH) ;26 this.val = val.toLowerCase(Locale.ENGLISH).intern(); 27 27 } 28 28 -
trunk/src/org/openstreetmap/josm/gui/mappaint/MapPaintStyles.java
r15889 r15902 96 96 */ 97 97 public TagKeyReference(String key) { 98 this.key = key ;98 this.key = key.intern(); 99 99 } 100 100 -
trunk/src/org/openstreetmap/josm/gui/mappaint/mapcss/Instruction.java
r12379 r15902 52 52 53 53 public AssignmentInstruction(String key, Object val, boolean isSetInstruction) { 54 this.key = key ;54 this.key = key.intern(); 55 55 this.isSetInstruction = isSetInstruction; 56 56 if (val instanceof LiteralExpression) { -
trunk/src/org/openstreetmap/josm/gui/tagging/presets/items/ComboMultiSelect.java
r13597 r15902 485 485 for (int i = 0; i < valueArray.length; i++) { 486 486 final PresetListEntry e = new PresetListEntry(valueArray[i]); 487 e.locale_display_value = locale_display_values != null || values_no_i18n487 final String value = locale_display_values != null || values_no_i18n 488 488 ? displayArray[i] 489 489 : trc(values_context, fixPresetString(displayArray[i])); 490 e.locale_display_value = value == null ? null : value.intern(); 490 491 if (shortDescriptionsArray != null) { 491 e.locale_short_description = locale_short_descriptions != null492 final String description = locale_short_descriptions != null 492 493 ? shortDescriptionsArray[i] 493 494 : tr(fixPresetString(shortDescriptionsArray[i])); 495 e.locale_short_description = description == null ? null : description.intern(); 494 496 } 495 497 -
trunk/src/org/openstreetmap/josm/tools/XmlObjectParser.java
r15710 r15902 138 138 139 139 private void setValue(Entry entry, String fieldName, String value) throws SAXException { 140 if (value != null) { 141 value = value.intern(); 142 } 140 143 CheckParameterUtil.ensureParameterNotNull(entry, "entry"); 141 144 if ("class".equals(fieldName) || "default".equals(fieldName) || "throw".equals(fieldName) ||
Note:
See TracChangeset
for help on using the changeset viewer.