Changeset 11130 in josm for trunk


Ignore:
Timestamp:
2016-10-15T20:56:20+02:00 (3 years ago)
Author:
simon04
Message:

fix #13800 see #13799 - Fix IAE in TestError

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/data/validation/TestError.java

    r11129 r11130  
    139139         */
    140140        public Builder primitives(Collection<? extends OsmPrimitive> primitives) {
    141             CheckParameterUtil.ensureThat(this.primitives != null, "primitives already set");
     141            CheckParameterUtil.ensureThat(this.primitives == null, "primitives already set");
    142142            this.primitives = primitives;
    143143            return this;
     
    163163         */
    164164        public Builder highlight(Collection<? extends OsmPrimitive> highlighted) {
    165             CheckParameterUtil.ensureThat(this.highlighted != null, "highlighted already set");
     165            CheckParameterUtil.ensureThat(this.highlighted == null, "highlighted already set");
    166166            this.highlighted = highlighted;
    167167            return this;
     
    176176         */
    177177        public Builder highlightWaySegments(Collection<WaySegment> highlighted) {
    178             CheckParameterUtil.ensureThat(this.highlighted != null, "highlighted already set");
     178            CheckParameterUtil.ensureThat(this.highlighted == null, "highlighted already set");
    179179            this.highlighted = highlighted;
    180180            return this;
     
    189189         */
    190190        public Builder highlightNodePairs(Collection<List<Node>> highlighted) {
    191             CheckParameterUtil.ensureThat(this.highlighted != null, "highlighted already set");
     191            CheckParameterUtil.ensureThat(this.highlighted == null, "highlighted already set");
    192192            this.highlighted = highlighted;
    193193            return this;
     
    201201         */
    202202        public Builder fix(Supplier<Command> fixingCommand) {
    203             CheckParameterUtil.ensureThat(this.fixingCommand != null, "fixingCommand already set");
     203            CheckParameterUtil.ensureThat(this.fixingCommand == null, "fixingCommand already set");
    204204            this.fixingCommand = fixingCommand;
    205205            return this;
Note: See TracChangeset for help on using the changeset viewer.