Changeset 9841 in josm for trunk/src/org/openstreetmap/josm/gui/io/UploadStrategySpecification.java
- Timestamp:
- 2016-02-20T01:34:07+01:00 (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/gui/io/UploadStrategySpecification.java
r9371 r9841 35 35 36 36 /** 37 * Clones another upload strategy. If other is null,assumes default 38 * values. 37 * Clones another upload strategy. If other is null, assumes default values. 39 38 * 40 39 * @param other the other upload strategy 41 40 */ 42 41 public UploadStrategySpecification(UploadStrategySpecification other) { 43 if (other == null) return; 44 this.strategy = other.strategy; 45 this.chunkSize = other.chunkSize; 46 this.policy = other.policy; 47 this.closeChangesetAfterUpload = other.closeChangesetAfterUpload; 42 if (other != null) { 43 this.strategy = other.strategy; 44 this.chunkSize = other.chunkSize; 45 this.policy = other.policy; 46 this.closeChangesetAfterUpload = other.closeChangesetAfterUpload; 47 } 48 48 } 49 49 … … 93 93 94 94 public int getNumRequests(int numObjects) { 95 if (numObjects <= 0) return 0; 95 if (numObjects <= 0) 96 return 0; 96 97 switch(strategy) { 97 98 case INDIVIDUAL_OBJECTS_STRATEGY: return numObjects; … … 114 115 @Override 115 116 public boolean equals(Object obj) { 116 if (this == obj) return true; 117 if (obj == null || getClass() != obj.getClass()) return false; 117 if (this == obj) 118 return true; 119 if (obj == null || getClass() != obj.getClass()) 120 return false; 118 121 UploadStrategySpecification that = (UploadStrategySpecification) obj; 119 122 return chunkSize == that.chunkSize &&
Note:
See TracChangeset
for help on using the changeset viewer.