- Timestamp:
- 2010-01-13T19:55:07+01:00 (15 years ago)
- Location:
- trunk/src/org/openstreetmap/josm/data
- Files:
-
- 18 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/data/Bounds.java
r2805 r2845 6 6 import java.awt.geom.Rectangle2D; 7 7 import java.text.DecimalFormat; 8 import java.text.MessageFormat; 8 9 9 10 import org.openstreetmap.josm.data.coor.LatLon; 11 import org.openstreetmap.josm.tools.CheckParameterUtil; 10 12 11 13 /** … … 48 50 49 51 public Bounds(double [] coords) { 50 if (coords == null) 51 throw new IllegalArgumentException(tr("Parameter ''{0}'' must not be null", "coords")); 52 CheckParameterUtil.ensureParameterNotNull(coords, "coords"); 52 53 if (coords.length != 4) 53 throw new IllegalArgumentException( tr("Expected array of length 4, got {0}", coords.length));54 throw new IllegalArgumentException(MessageFormat.format("Expected array of length 4, got {0}", coords.length)); 54 55 this.minLat = coords[0]; 55 56 this.minLon = coords[1]; … … 59 60 60 61 public Bounds(String asString, String separator) throws IllegalArgumentException { 61 if (asString == null) 62 throw new IllegalArgumentException(tr("Parameter ''{0}'' must not be null", "asString")); 62 CheckParameterUtil.ensureParameterNotNull(asString, "asString"); 63 63 String[] components = asString.split(separator); 64 64 if (components.length != 4) 65 throw new IllegalArgumentException( tr("Exactly four doubles excpected in string, got {0}", components.length));65 throw new IllegalArgumentException(MessageFormat.format("Exactly four doubles excpected in string, got {0}", components.length)); 66 66 double[] values = new double[4]; 67 67 for (int i=0; i<4; i++) { … … 69 69 values[i] = Double.parseDouble(components[i]); 70 70 } catch(NumberFormatException e) { 71 throw new IllegalArgumentException( tr("Illegal double value ''{0}''", components[i]));71 throw new IllegalArgumentException(MessageFormat.format("Illegal double value ''{0}''", components[i])); 72 72 } 73 73 } … … 108 108 */ 109 109 public Bounds(LatLon center, double latExtent, double lonExtent) { 110 if (center == null) 111 throw new IllegalArgumentException(tr("Parameter ''{0}'' must not be null", "center")); 110 CheckParameterUtil.ensureParameterNotNull(center, "center"); 112 111 if (latExtent <= 0.0) 113 throw new IllegalArgumentException( tr("Parameter ''{0}'' > 0.0 exptected, got {1}", "latExtent", latExtent));112 throw new IllegalArgumentException(MessageFormat.format("Parameter ''{0}'' > 0.0 exptected, got {1}", "latExtent", latExtent)); 114 113 if (lonExtent <= 0.0) 115 throw new IllegalArgumentException( tr("Parameter ''{0}'' > 0.0 exptected, got {1}", "lonExtent", lonExtent));114 throw new IllegalArgumentException(MessageFormat.format("Parameter ''{0}'' > 0.0 exptected, got {1}", "lonExtent", lonExtent)); 116 115 117 116 this.minLat = center.lat() - latExtent / 2; -
trunk/src/org/openstreetmap/josm/data/Preferences.java
r2817 r2845 447 447 if (prefDir.exists()) { 448 448 if(!prefDir.isDirectory()) { 449 System.err.println(tr("Warning: Failed to initialize preferences. Preference directory ''{0}'' is n't a directory.", prefDir.getAbsoluteFile()));449 System.err.println(tr("Warning: Failed to initialize preferences. Preference directory ''{0}'' is not a directory.", prefDir.getAbsoluteFile())); 450 450 JOptionPane.showMessageDialog( 451 451 Main.parent, 452 tr("<html>Failed to initialize preferences.<br>Preference directory ''{0}'' is n't a directory.</html>", prefDir.getAbsoluteFile()),452 tr("<html>Failed to initialize preferences.<br>Preference directory ''{0}'' is not a directory.</html>", prefDir.getAbsoluteFile()), 453 453 tr("Error"), 454 454 JOptionPane.ERROR_MESSAGE -
trunk/src/org/openstreetmap/josm/data/Version.java
r2822 r2845 138 138 URL u = Main.class.getResource("/REVISION"); 139 139 if (u == null) { 140 System.err.println(tr("Warning: the revision file ' /REVISION' is missing."));140 System.err.println(tr("Warning: the revision file ''/REVISION'' is missing.")); 141 141 version = 0; 142 142 revision = ""; -
trunk/src/org/openstreetmap/josm/data/conflict/ConflictCollection.java
r2655 r2845 13 13 14 14 import org.openstreetmap.josm.data.osm.OsmPrimitive; 15 import org.openstreetmap.josm.tools.CheckParameterUtil; 15 16 16 17 /** … … 87 88 * 88 89 */ 89 public void add(Conflict<?> conflict) throws IllegalStateException, IllegalArgumentException { 90 if (conflict == null) 91 throw new IllegalArgumentException(tr("Parameter ''{0}'' must not be null.", "conflict")); 90 public void add(Conflict<?> conflict) throws IllegalStateException { 91 CheckParameterUtil.ensureParameterNotNull(conflict, "conflict"); 92 92 addConflict(conflict); 93 93 fireConflictAdded(); -
trunk/src/org/openstreetmap/josm/data/coor/LatLon.java
r2711 r2845 9 9 import static java.lang.Math.toRadians; 10 10 import static org.openstreetmap.josm.tools.I18n.tr; 11 import static org.openstreetmap.josm.tools.I18n.trc; 11 12 12 13 import java.text.DecimalFormat; … … 83 84 case DECIMAL_DEGREES: return cDdFormatter.format(y); 84 85 case DEGREES_MINUTES_SECONDS: return dms(y) + ((y < 0) ? 85 /* short symbol for South */ tr ("S") :86 /* short symbol for North */ tr ("N"));86 /* short symbol for South */ trc("compass", "S") : 87 /* short symbol for North */ trc("compass", "N")); 87 88 default: return "ERR"; 88 89 } … … 97 98 case DECIMAL_DEGREES: return cDdFormatter.format(x); 98 99 case DEGREES_MINUTES_SECONDS: return dms(x) + ((x < 0) ? 99 /* short symbol for West */ tr ("W") :100 /* short symbol for East */ tr ("E"));100 /* short symbol for West */ trc("compass", "W") : 101 /* short symbol for East */ trc("compass", "E")); 101 102 default: return "ERR"; 102 103 } -
trunk/src/org/openstreetmap/josm/data/osm/DataSet.java
r2711 r2845 205 205 if (getPrimitiveById(primitive) != null) 206 206 throw new DataIntegrityProblemException( 207 tr("Unable to add primitive {0} to the dataset because it 's already included", primitive.toString()));207 tr("Unable to add primitive {0} to the dataset because it is already included", primitive.toString())); 208 208 209 209 if (primitive instanceof Node) { … … 647 647 OsmPrimitive result = getPrimitiveById(primitiveId); 648 648 if (result == null) { 649 System.out.println(tr("JOSM expected to find primitive [{0} {1}] in dataset but it 's not there. Please report this "649 System.out.println(tr("JOSM expected to find primitive [{0} {1}] in dataset but it is not there. Please report this " 650 650 + " at http://josm.openstreetmap.de . This is not a critical error, it should be safe to continue in your work.", 651 651 primitiveId.getType(), Long.toString(primitiveId.getUniqueId()))); -
trunk/src/org/openstreetmap/josm/data/osm/DataSetMerger.java
r2753 r2845 13 13 14 14 import org.openstreetmap.josm.data.conflict.ConflictCollection; 15 import org.openstreetmap.josm.tools.CheckParameterUtil; 15 16 16 17 /** … … 51 52 */ 52 53 public DataSetMerger(DataSet targetDataSet, DataSet sourceDataSet) throws IllegalArgumentException { 53 if (targetDataSet == null) 54 throw new IllegalArgumentException(tr("Parameter ''{0}'' must not be null", "targetDataSet")); 54 CheckParameterUtil.ensureParameterNotNull(targetDataSet, "targetDataSet"); 55 55 this.targetDataSet = targetDataSet; 56 56 this.sourceDataSet = sourceDataSet; … … 278 278 logger.warning(tr("Target object with id {0} and version {1} is visible although " 279 279 + "source object with lower version {2} is not visible. " 280 + "Can ''t deal with this inconsistency. Keeping target object. ",280 + "Cannot deal with this inconsistency. Keeping target object. ", 281 281 Long.toString(target.getId()),Long.toString(target.getVersion()), Long.toString(source.getVersion()) 282 282 )); -
trunk/src/org/openstreetmap/josm/data/osm/Filters.java
r2620 r2845 140 140 public String getColumnName(int column){ 141 141 String[] names = { /* translators notes must be in front */ 142 /* column header: enable filter */ trc(" filter","E"),143 /* column header: hide filter */ tr ("H"),144 /* column header: filter text */ tr ("Text"),145 /* column header: apply filter for children */ tr ("C"),146 /* column header: inverted filter */ tr ("I"),147 /* column header: filter mode */ tr ("M")142 /* column header: enable filter */ trc("enable filter","E"), 143 /* column header: hide filter */ trc("hide filter", "H"), 144 /* column header: filter text */ trc("filter", "Text"), 145 /* column header: apply filter for children */ trc("filter children", "C"), 146 /* column header: inverted filter */ trc("invert filter", "I"), 147 /* column header: filter mode */ trc("filter mode", "M") 148 148 }; 149 149 return names[column]; … … 208 208 case 5: 209 209 switch(f.mode){ /* translators notes must be in front */ 210 case replace: /* filter mode: replace */ return tr ("R");211 case add: /* filter mode: add */ return tr ("A");212 case remove: /* filter mode: remove */ return tr ("D");213 case in_selection: /* filter mode: in selection */ return tr ("F");210 case replace: /* filter mode: replace */ return trc("filter mode replace", "R"); 211 case add: /* filter mode: add */ return trc("filter mode add", "A"); 212 case remove: /* filter mode: remove */ return trc("filter mode remove", "D"); 213 case in_selection: /* filter mode: in selection */ return trc("filter mode in selection", "F"); 214 214 } 215 215 } -
trunk/src/org/openstreetmap/josm/data/osm/OsmPrimitive.java
r2822 r2845 4 4 import static org.openstreetmap.josm.tools.I18n.tr; 5 5 6 import java.text.MessageFormat; 6 7 import java.util.ArrayList; 7 8 import java.util.Arrays; … … 26 27 import org.openstreetmap.josm.data.osm.visitor.Visitor; 27 28 import org.openstreetmap.josm.gui.mappaint.ElemStyle; 29 import org.openstreetmap.josm.tools.CheckParameterUtil; 28 30 29 31 /** … … 262 264 } else { 263 265 if (id < 0) 264 throw new IllegalArgumentException( tr("Expected ID >= 0. Got {0}.", id));266 throw new IllegalArgumentException(MessageFormat.format("Expected ID >= 0. Got {0}.", id)); 265 267 else if (id == 0) { 266 268 this.id = generateUniqueId(); … … 399 401 public void setVisible(boolean visible) throws IllegalStateException{ 400 402 if (isNew() && visible == false) 401 throw new IllegalStateException(tr("A primitive with ID = 0 can 't be invisible."));403 throw new IllegalStateException(tr("A primitive with ID = 0 cannot be invisible.")); 402 404 if (visible) { 403 405 flags |= FLAG_VISIBLE; … … 650 652 return; 651 653 if (changesetId < 0) 652 throw new IllegalArgumentException( tr("Parameter ''{0}'' >= 0 expected, got {1}", "changesetId", changesetId));654 throw new IllegalArgumentException(MessageFormat.format("Parameter ''{0}'' >= 0 expected, got {1}", "changesetId", changesetId)); 653 655 if (isNew() && changesetId > 0) 654 throw new IllegalStateException(tr("Can ''t assign a changesetId > 0 to a new primitive. Value of changesetId is {0}", changesetId));656 throw new IllegalStateException(tr("Cannot assign a changesetId > 0 to a new primitive. Value of changesetId is {0}", changesetId)); 655 657 int old = this.changesetId; 656 658 this.changesetId = changesetId; … … 1035 1037 */ 1036 1038 public void mergeFrom(OsmPrimitive other) { 1037 if (other == null) 1038 throw new IllegalArgumentException(tr("Parameter ''{0}'' must not be null", "other")); 1039 CheckParameterUtil.ensureParameterNotNull(other, "other"); 1039 1040 if (other.isNew() ^ isNew()) 1040 throw new DataIntegrityProblemException(tr("Can 't merge because either of the participating primitives is new and the other is not"));1041 throw new DataIntegrityProblemException(tr("Cannot merge because either of the participating primitives is new and the other is not")); 1041 1042 if (! other.isNew() && other.getId() != id) 1042 throw new DataIntegrityProblemException(tr("Can ''t merge primitives with different ids. This id is {0}, the other is {1}", id, other.getId()));1043 throw new DataIntegrityProblemException(tr("Cannot merge primitives with different ids. This id is {0}, the other is {1}", id, other.getId())); 1043 1044 1044 1045 setKeys(other.getKeys()); -
trunk/src/org/openstreetmap/josm/data/osm/OsmPrimitiveType.java
r2512 r2845 2 2 package org.openstreetmap.josm.data.osm; 3 3 import static org.openstreetmap.josm.tools.I18n.tr; 4 5 import java.text.MessageFormat; 4 6 5 7 public enum OsmPrimitiveType { … … 35 37 if (type.getAPIName().equals(typeName)) return type; 36 38 } 37 throw new IllegalArgumentException( tr("Parameter ''{0}'' is not a valid type name. Got ''{1}''.", "typeName", typeName));39 throw new IllegalArgumentException(MessageFormat.format("Parameter ''{0}'' is not a valid type name. Got ''{1}''.", "typeName", typeName)); 38 40 } 39 41 … … 46 48 if (cls.equals(Way.class)) return WAY; 47 49 if (cls.equals(Relation.class)) return RELATION; 48 throw new IllegalArgumentException( tr("Parameter ''{0}'' is not an acceptable class. Got ''{1}''.", "cls", cls.toString()));50 throw new IllegalArgumentException(MessageFormat.format("Parameter ''{0}'' is not an acceptable class. Got ''{1}''.", "cls", cls.toString())); 49 51 } 50 52 … … 53 55 if (cls.equals(WayData.class)) return WAY; 54 56 if (cls.equals(RelationData.class)) return RELATION; 55 throw new IllegalArgumentException( tr("Parameter ''{0}'' is not an acceptable class. Got ''{1}''.", "cls", cls.toString()));57 throw new IllegalArgumentException(MessageFormat.format("Parameter ''{0}'' is not an acceptable class. Got ''{1}''.", "cls", cls.toString())); 56 58 } 57 59 -
trunk/src/org/openstreetmap/josm/data/osm/TagCollection.java
r2512 r2845 570 570 if (primitive == null) return; 571 571 if (! isApplicableToPrimitive()) 572 throw new IllegalStateException(tr("Tag collection can 't be applied to a primitive because there are keys with multiple values."));572 throw new IllegalStateException(tr("Tag collection cannot be applied to a primitive because there are keys with multiple values.")); 573 573 for (Tag tag: tags) { 574 574 if (tag.getValue() == null || tag.getValue().equals("")) { … … 591 591 if (primitives == null) return; 592 592 if (! isApplicableToPrimitive()) 593 throw new IllegalStateException(tr("Tag collection can 't be applied to a primitive because there are keys with multiple values."));593 throw new IllegalStateException(tr("Tag collection cannot be applied to a primitive because there are keys with multiple values.")); 594 594 for (Tagged primitive: primitives) { 595 595 applyTo(primitive); … … 608 608 if (primitive == null) return; 609 609 if (! isApplicableToPrimitive()) 610 throw new IllegalStateException(tr("Tag collection can 't be applied to a primitive because there are keys with multiple values."));610 throw new IllegalStateException(tr("Tag collection cannot be applied to a primitive because there are keys with multiple values.")); 611 611 primitive.removeAll(); 612 612 for (Tag tag: tags) { … … 626 626 if (primitives == null) return; 627 627 if (! isApplicableToPrimitive()) 628 throw new IllegalStateException(tr("Tag collection can 't be applied to a primitive because there are keys with multiple values."));628 throw new IllegalStateException(tr("Tag collection cannot be applied to a primitive because there are keys with multiple values.")); 629 629 for (Tagged primitive: primitives) { 630 630 replaceTagsOf(primitive); -
trunk/src/org/openstreetmap/josm/data/osm/history/History.java
r2512 r2845 4 4 import static org.openstreetmap.josm.tools.I18n.tr; 5 5 6 import java.text.MessageFormat; 6 7 import java.util.ArrayList; 7 8 import java.util.Collections; … … 13 14 import org.openstreetmap.josm.data.osm.PrimitiveId; 14 15 import org.openstreetmap.josm.data.osm.SimplePrimitiveId; 16 import org.openstreetmap.josm.tools.CheckParameterUtil; 15 17 16 18 /** … … 52 54 protected History(long id, OsmPrimitiveType type, List<HistoryOsmPrimitive> versions) { 53 55 if (id <= 0) 54 throw new IllegalArgumentException(tr("Parameter ''{0}'' > 0 expected, got {1}", "id", id)); 55 if (type == null) 56 throw new IllegalArgumentException(tr("Parameter ''{0}'' must not be null", "type")); 56 throw new IllegalArgumentException(MessageFormat.format("Parameter ''{0}'' > 0 expected, got {1}", "id", id)); 57 CheckParameterUtil.ensureParameterNotNull(type, "type"); 57 58 this.id = id; 58 59 this.type = type; … … 216 217 public HistoryOsmPrimitive get(int idx) { 217 218 if (idx < 0 || idx >= versions.size()) 218 throw new IndexOutOfBoundsException( tr("Parameter ''{0}'' in range 0..{1} expected. Got ''{2}''.", "idx", versions.size()-1, idx));219 throw new IndexOutOfBoundsException(MessageFormat.format("Parameter ''{0}'' in range 0..{1} expected. Got ''{2}''.", "idx", versions.size()-1, idx)); 219 220 return versions.get(idx); 220 221 } -
trunk/src/org/openstreetmap/josm/data/osm/history/HistoryDataSet.java
r2655 r2845 4 4 import static org.openstreetmap.josm.tools.I18n.tr; 5 5 6 import java.text.MessageFormat; 6 7 import java.util.ArrayList; 7 8 import java.util.HashMap; … … 11 12 import org.openstreetmap.josm.data.osm.PrimitiveId; 12 13 import org.openstreetmap.josm.data.osm.SimplePrimitiveId; 14 import org.openstreetmap.josm.tools.CheckParameterUtil; 13 15 14 16 /** … … 72 74 public HistoryOsmPrimitive get(long id, OsmPrimitiveType type, long version){ 73 75 if (id <= 0) 74 throw new IllegalArgumentException(tr("Parameter ''{0}'' > 0 expected, got {1}", "id", id)); 75 if (type == null) 76 throw new IllegalArgumentException(tr("Parameter ''{0}'' must not be null", "type")); 76 throw new IllegalArgumentException(MessageFormat.format("Parameter ''{0}'' > 0 expected, got {1}", "id", id)); 77 CheckParameterUtil.ensureParameterNotNull(type, "type"); 77 78 if (version <= 0) 78 throw new IllegalArgumentException( tr("Parameter ''{0}'' > 0 expected, got {1}", "version", version));79 throw new IllegalArgumentException(MessageFormat.format("Parameter ''{0}'' > 0 expected, got {1}", "version", version)); 79 80 80 81 SimplePrimitiveId pid = new SimplePrimitiveId(id, type); … … 116 117 public History getHistory(long id, OsmPrimitiveType type) throws IllegalArgumentException{ 117 118 if (id <= 0) 118 throw new IllegalArgumentException(tr("Parameter ''{0}'' > 0 expected, got {1}", "id", id)); 119 if (type == null) 120 throw new IllegalArgumentException(tr("Parameter ''{0}'' must not be null", "type")); 119 throw new IllegalArgumentException(MessageFormat.format("Parameter ''{0}'' > 0 expected, got {1}", "id", id)); 120 CheckParameterUtil.ensureParameterNotNull(type, "type"); 121 121 SimplePrimitiveId pid = new SimplePrimitiveId(id, type); 122 122 return getHistory(pid); … … 133 133 */ 134 134 public History getHistory(PrimitiveId pid) throws IllegalArgumentException{ 135 if (pid == null) 136 throw new IllegalArgumentException(tr("Parameter ''{0}'' must not be null", "pid")); 135 CheckParameterUtil.ensureParameterNotNull(pid, "pid"); 137 136 ArrayList<HistoryOsmPrimitive> versions = data.get(pid); 138 137 if (versions == null) -
trunk/src/org/openstreetmap/josm/data/osm/history/HistoryOsmPrimitive.java
r2711 r2845 4 4 import static org.openstreetmap.josm.tools.I18n.tr; 5 5 6 import java.text.MessageFormat; 6 7 import java.util.Collections; 7 8 import java.util.Date; … … 13 14 import org.openstreetmap.josm.data.osm.PrimitiveId; 14 15 import org.openstreetmap.josm.data.osm.SimplePrimitiveId; 16 import org.openstreetmap.josm.tools.CheckParameterUtil; 15 17 16 18 /** … … 32 34 protected void ensurePositiveLong(long value, String name) { 33 35 if (value <= 0) 34 throw new IllegalArgumentException(tr("Parameter ''{0}'' > 0 expected. Got ''{1}''.", name, value)); 35 } 36 37 protected void ensureNotNull(Object obj, String name) { 38 if (obj == null) 39 throw new IllegalArgumentException(tr("Parameter ''{0}'' must not be null.", name)); 36 throw new IllegalArgumentException(MessageFormat.format("Parameter ''{0}'' > 0 expected. Got ''{1}''.", name, value)); 40 37 } 41 38 … … 59 56 ensurePositiveLong(uid, "uid"); 60 57 } 61 ensureNotNull(user, "user");62 ensureNotNull(timestamp, "timestamp");58 CheckParameterUtil.ensureParameterNotNull(user, "user"); 59 CheckParameterUtil.ensureParameterNotNull(timestamp, "timestamp"); 63 60 this.id = id; 64 61 this.version = version; … … 113 110 public int compareTo(HistoryOsmPrimitive o) { 114 111 if (this.id != o.id) 115 throw new ClassCastException(tr("Can ''t compare primitive with ID ''{0}'' to primitive with ID ''{1}''.", o.id, this.id));112 throw new ClassCastException(tr("Cannot compare primitive with ID ''{0}'' to primitive with ID ''{1}''.", o.id, this.id)); 116 113 return Long.valueOf(this.version).compareTo(o.version); 117 114 } -
trunk/src/org/openstreetmap/josm/data/osm/history/HistoryRelation.java
r2686 r2845 4 4 import static org.openstreetmap.josm.tools.I18n.tr; 5 5 6 import java.text.MessageFormat; 6 7 import java.util.ArrayList; 7 8 import java.util.Collections; … … 10 11 11 12 import org.openstreetmap.josm.data.osm.OsmPrimitiveType; 13 import org.openstreetmap.josm.tools.CheckParameterUtil; 12 14 13 15 /** … … 87 89 public RelationMember getRelationMember(int idx) throws IndexOutOfBoundsException { 88 90 if (idx < 0 || idx >= members.size()) 89 throw new IndexOutOfBoundsException( tr("Parameter {0} not in range 0..{1}. Got ''{2}''.", "idx", members.size(),idx));91 throw new IndexOutOfBoundsException(MessageFormat.format("Parameter {0} not in range 0..{1}. Got ''{2}''.", "idx", members.size(),idx)); 90 92 return members.get(idx); 91 93 } … … 107 109 */ 108 110 public void addMember(RelationMember member) throws IllegalArgumentException { 109 if (member == null) 110 throw new IllegalArgumentException(tr("Parameter ''{0}'' must not be null.", "member")); 111 CheckParameterUtil.ensureParameterNotNull(member, "member"); 111 112 members.add(member); 112 113 } -
trunk/src/org/openstreetmap/josm/data/osm/history/RelationMember.java
r2711 r2845 2 2 package org.openstreetmap.josm.data.osm.history; 3 3 4 import static org.openstreetmap.josm.tools.I18n.tr;5 6 4 import org.openstreetmap.josm.data.osm.OsmPrimitiveType; 5 import org.openstreetmap.josm.tools.CheckParameterUtil; 7 6 8 7 /** … … 27 26 public RelationMember(String role, OsmPrimitiveType primitiveType, long primitiveId) { 28 27 this.role = (role == null ? "" : role); 29 if (primitiveType == null) 30 throw new IllegalArgumentException(tr("Parameter ''{0}'' must not be null.", "primitiveType")); 28 CheckParameterUtil.ensureParameterNotNull(primitiveType, "primitiveType"); 31 29 this.primitiveType = primitiveType; 32 30 this.primitiveId = primitiveId; -
trunk/src/org/openstreetmap/josm/data/osm/visitor/MergeSourceBuildingVisitor.java
r2620 r2845 14 14 import org.openstreetmap.josm.data.osm.RelationMember; 15 15 import org.openstreetmap.josm.data.osm.Way; 16 import org.openstreetmap.josm.tools.CheckParameterUtil; 16 17 17 18 /** … … 41 42 */ 42 43 public MergeSourceBuildingVisitor(DataSet selectionBase) throws IllegalArgumentException { 43 if (selectionBase == null) 44 throw new IllegalArgumentException(tr("Parameter ''{0}'' must not be null.", "selectionBase")); 44 CheckParameterUtil.ensureParameterNotNull(selectionBase, "selectionBase"); 45 45 this.selectionBase = selectionBase; 46 46 this.hull = new DataSet(); -
trunk/src/org/openstreetmap/josm/data/osm/visitor/paint/MapPaintVisitor.java
r2788 r2845 321 321 viaNode = (Node) via; 322 322 if(!fromWay.isFirstLastNode(viaNode)) { 323 putError(r, tr("The \"from\" way does n't start or end at a \"via\" node."), true);323 putError(r, tr("The \"from\" way does not start or end at a \"via\" node."), true); 324 324 return; 325 325 } 326 326 if(!toWay.isFirstLastNode(viaNode)) { 327 putError(r, tr("The \"to\" way does n't start or end at a \"via\" node."), true);327 putError(r, tr("The \"to\" way does not start or end at a \"via\" node."), true); 328 328 } 329 329 } … … 353 353 viaNode = lastNode; 354 354 } else { 355 putError(r, tr("The \"from\" way does n't start or end at the \"via\" way."), true);355 putError(r, tr("The \"from\" way does not start or end at the \"via\" way."), true); 356 356 return; 357 357 } 358 358 if(!toWay.isFirstLastNode(viaNode == firstNode ? lastNode : firstNode)) { 359 putError(r, tr("The \"to\" way does n't start or end at the \"via\" way."), true);359 putError(r, tr("The \"to\" way does not start or end at the \"via\" way."), true); 360 360 } 361 361 }
Note:
See TracChangeset
for help on using the changeset viewer.