Changeset 2181 in josm for trunk/src/org/openstreetmap/josm/data/osm/history
- Timestamp:
- 2009-09-22T15:34:19+02:00 (16 years ago)
- Location:
- trunk/src/org/openstreetmap/josm/data/osm/history
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/data/osm/history/History.java
r2017 r2181 152 152 return primitive; 153 153 } 154 throw new NoSuchElementException(tr("There's no primitive with version {0} in this history", version)); 154 throw new NoSuchElementException(tr("There's no primitive with version {0} in this history.", version)); 155 155 } 156 156 … … 159 159 160 160 if (versions.isEmpty()) 161 throw new NoSuchElementException(tr("There's no version valid at date ''{0}'' in this history", date)); 161 throw new NoSuchElementException(tr("There's no version valid at date ''{0}'' in this history.", date)); 162 162 if (get(0).getTimestamp().compareTo(date)> 0) 163 throw new NoSuchElementException(tr("There's no version valid at date ''{0}'' in this history", date)); 163 throw new NoSuchElementException(tr("There's no version valid at date ''{0}'' in this history.", date)); 164 164 for (int i = 1; i < versions.size();i++) { 165 165 if (get(i-1).getTimestamp().compareTo(date) <= 0 … … 172 172 public HistoryOsmPrimitive get(int idx) { 173 173 if (idx < 0 || idx >= versions.size()) 174 throw new IndexOutOfBoundsException(tr(" parameter ''{0}'' in range 0..{1} expected, got {2}", "idx", versions.size()-1, idx));174 throw new IndexOutOfBoundsException(tr("Parameter ''{0}'' in range 0..{1} expected. Got ''{2}''.", "idx", versions.size()-1, idx)); 175 175 return versions.get(idx); 176 176 } … … 178 178 public HistoryOsmPrimitive getEarliest() { 179 179 if (isEmpty()) 180 throw new NoSuchElementException(tr(" no earliest version found. History is empty."));180 throw new NoSuchElementException(tr("No earliest version found. History is empty.")); 181 181 return sortAscending().versions.get(0); 182 182 } … … 184 184 public HistoryOsmPrimitive getLatest() { 185 185 if (isEmpty()) 186 throw new NoSuchElementException(tr(" no latest version found. History is empty."));186 throw new NoSuchElementException(tr("No latest version found. History is empty.")); 187 187 return sortDescending().versions.get(0); 188 188 } -
trunk/src/org/openstreetmap/josm/data/osm/history/HistoryOsmPrimitive.java
r2017 r2181 29 29 protected void ensurePositiveLong(long value, String name) { 30 30 if (value <= 0) 31 throw new IllegalArgumentException(tr(" parameter ''{0}'' > 0 expected, got ''{1}''", name, value));31 throw new IllegalArgumentException(tr("Parameter ''{0}'' > 0 expected. Got ''{1}''.", name, value)); 32 32 } 33 33 34 34 protected void ensureNotNull(Object obj, String name) { 35 35 if (obj == null) 36 throw new IllegalArgumentException(tr(" parameter ''{0}'' must not be null", name));36 throw new IllegalArgumentException(tr("Parameter ''{0}'' must not be null.", name)); 37 37 } 38 38 … … 102 102 public int compareTo(HistoryOsmPrimitive o) { 103 103 if (this.id != o.id) 104 throw new ClassCastException(tr(" can't compare primitive withid''{0}'' to primitive withid''{1}''", o.id, this.id));104 throw new ClassCastException(tr("Can't compare primitive with ID ''{0}'' to primitive with ID ''{1}''.", o.id, this.id)); 105 105 return new Long(this.version).compareTo(o.version); 106 106 } -
trunk/src/org/openstreetmap/josm/data/osm/history/HistoryRelation.java
r1670 r2181 87 87 public RelationMember getRelationMember(int idx) throws IndexOutOfBoundsException { 88 88 if (idx < 0 || idx >= members.size()) 89 throw new IndexOutOfBoundsException(tr(" parameter {0} not in range 0..{1}, got {2}", "idx", members.size(),idx));89 throw new IndexOutOfBoundsException(tr("Parameter {0} not in range 0..{1}. Got ''{2}''.", "idx", members.size(),idx)); 90 90 return members.get(idx); 91 91 } … … 108 108 public void addMember(RelationMember member) throws IllegalArgumentException { 109 109 if (member == null) 110 throw new IllegalArgumentException(tr(" parameter ''{0}'' must not be null", "member"));110 throw new IllegalArgumentException(tr("Parameter ''{0}'' must not be null.", "member")); 111 111 members.add(member); 112 112 } -
trunk/src/org/openstreetmap/josm/data/osm/history/HistoryWay.java
r1670 r2181 46 46 public long getNodeId(int idx) throws IndexOutOfBoundsException { 47 47 if (idx < 0 || idx >= nodeIds.size()) 48 throw new IndexOutOfBoundsException(tr(" parameter {0} not in range 0..{1}, got {2}", "idx", nodeIds.size(),idx));48 throw new IndexOutOfBoundsException(tr("Parameter {0} not in range 0..{1}. Got ''{2}''.", "idx", nodeIds.size(),idx)); 49 49 return nodeIds.get(idx); 50 50 } -
trunk/src/org/openstreetmap/josm/data/osm/history/RelationMember.java
r2017 r2181 29 29 this.role = (role == null ? "" : role); 30 30 if (primitiveType == null) 31 throw new IllegalArgumentException(tr(" parameter ''{0}'' must not be null", "primitiveType"));31 throw new IllegalArgumentException(tr("Parameter ''{0}'' must not be null.", "primitiveType")); 32 32 this.primitiveType = primitiveType; 33 33 if (primitiveId <=0) 34 throw new IllegalArgumentException(tr(" parameter ''{0}'' > 0 expected, got ''{1}''", "primitiveId", primitiveId));34 throw new IllegalArgumentException(tr("Parameter ''{0}'' > 0 expected. Got ''{1}''.", "primitiveId", primitiveId)); 35 35 this.primitiveId = primitiveId; 36 36 }
Note:
See TracChangeset
for help on using the changeset viewer.