Changeset 15909 in josm for trunk/src/org/openstreetmap/josm/gui/mappaint/mapcss
- Timestamp:
- 2020-02-23T00:29:53+01:00 (4 years ago)
- Location:
- trunk/src/org/openstreetmap/josm/gui/mappaint/mapcss
- Files:
-
- 2 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 }
Note:
See TracChangeset
for help on using the changeset viewer.