Changeset 15909 in josm for trunk/src/org/openstreetmap/josm/gui
- Timestamp:
- 2020-02-23T00:29:53+01:00 (5 years ago)
- Location:
- trunk/src/org/openstreetmap/josm/gui
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/gui/mappaint/mapcss/MapCSSRule.java
r15717 r15909 8 8 import org.openstreetmap.josm.gui.mappaint.Environment; 9 9 import org.openstreetmap.josm.gui.mappaint.StyleSource; 10 import org.openstreetmap.josm.tools.Utils; 10 11 11 12 /** … … 48 49 */ 49 50 public Declaration(List<Instruction> instructions, int idx) { 50 this.instructions = instructions; 51 this.instructions = Utils.toUnmodifiableList(instructions); 51 52 this.idx = idx; 52 53 } -
trunk/src/org/openstreetmap/josm/gui/mappaint/mapcss/Selector.java
r15730 r15909 537 537 538 538 protected AbstractSelector(List<Condition> conditions) { 539 if (conditions == null || conditions.isEmpty()) { 540 this.conds = null; 541 } else { 542 this.conds = conditions; 543 } 539 this.conds = Utils.toUnmodifiableList(conditions); 544 540 } 545 541 … … 552 548 public boolean matches(Environment env) { 553 549 CheckParameterUtil.ensureParameterNotNull(env, "env"); 554 if (conds == null) return true;555 550 for (Condition c : conds) { 556 551 try { … … 569 564 */ 570 565 public List<Condition> getConditions() { 571 if (conds == null) { 572 return Collections.emptyList(); 573 } 574 return Collections.unmodifiableList(conds); 566 return conds; 575 567 } 576 568 } -
trunk/src/org/openstreetmap/josm/gui/tagging/presets/TaggingPresetSelector.java
r15583 r15909 89 89 public int classification; 90 90 public int favoriteIndex; 91 private final Collection<String> groups = new HashSet<>();92 private final Collection<String> names = new HashSet<>();93 private final Collection<String> tags = new HashSet<>();91 private final Collection<String> groups; 92 private final Collection<String> names; 93 private final Collection<String> tags; 94 94 95 95 PresetClassification(TaggingPreset preset) { 96 96 this.preset = preset; 97 Set<String> groups = new HashSet<>(); 98 Set<String> names = new HashSet<>(); 99 Set<String> tags = new HashSet<>(); 97 100 TaggingPreset group = preset.group; 98 101 while (group != null) { … … 119 122 } 120 123 } 124 this.groups = Utils.toUnmodifiableList(groups); 125 this.names = Utils.toUnmodifiableList(names); 126 this.tags = Utils.toUnmodifiableList(tags); 121 127 } 122 128
Note:
See TracChangeset
for help on using the changeset viewer.