Changeset 11135 in josm for trunk


Ignore:
Timestamp:
2016-10-16T20:21:27+02:00 (3 years ago)
Author:
simon04
Message:

see #13799 - NPE in MultipolygonTest

Location:
trunk/src/org/openstreetmap/josm/data/validation
Files:
2 edited

Legend:

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

    r11134 r11135  
    140140        public Builder primitives(Collection<? extends OsmPrimitive> primitives) {
    141141            CheckParameterUtil.ensureThat(this.primitives == null, "primitives already set");
     142            CheckParameterUtil.ensureParameterNotNull(primitives, "primitives");
    142143            this.primitives = primitives;
    143144            if (this.highlighted == null) {
     
    166167         */
    167168        public Builder highlight(Collection<? extends OsmPrimitive> highlighted) {
     169            CheckParameterUtil.ensureParameterNotNull(highlighted, "highlighted");
    168170            this.highlighted = highlighted;
    169171            return this;
     
    178180         */
    179181        public Builder highlightWaySegments(Collection<WaySegment> highlighted) {
     182            CheckParameterUtil.ensureParameterNotNull(highlighted, "highlighted");
    180183            this.highlighted = highlighted;
    181184            return this;
     
    190193         */
    191194        public Builder highlightNodePairs(Collection<List<Node>> highlighted) {
     195            CheckParameterUtil.ensureParameterNotNull(highlighted, "highlighted");
    192196            this.highlighted = highlighted;
    193197            return this;
  • trunk/src/org/openstreetmap/josm/data/validation/tests/MultipolygonTest.java

    r11129 r11135  
    400400            for (OsmPrimitive p : primitives) {
    401401                if (!p.isIncomplete()) {
    402                     return null;
     402                    return primitives;
    403403                }
    404404            }
Note: See TracChangeset for help on using the changeset viewer.