Changeset 5791 in josm for trunk/src/org
- Timestamp:
- 2013-03-22T01:17:06+01:00 (12 years ago)
- Location:
- trunk/src/org/openstreetmap/josm
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/data/validation/tests/TagChecker.java
r5475 r5791 304 304 if (i instanceof TaggingPreset.KeyedItem) { 305 305 TaggingPreset.KeyedItem ky = (TaggingPreset.KeyedItem) i; 306 presetsValueData.putAll(ky.key, ky.getValues()); 306 if (ky.key != null && ky.getValues() != null) { 307 try { 308 presetsValueData.putAll(ky.key, ky.getValues()); 309 } catch (NullPointerException e) { 310 System.err.println(p+": Unable to initialize "+ky); 311 } 312 } 307 313 } 308 314 } -
trunk/src/org/openstreetmap/josm/gui/io/DownloadPrimitivesTask.java
r5452 r5791 32 32 private boolean canceled; 33 33 private Exception lastException; 34 private List<PrimitiveId> ids;34 private final List<PrimitiveId> ids; 35 35 36 36 private Set<PrimitiveId> missingPrimitives; 37 37 38 private OsmDataLayer layer;39 private boolean fullRelation;38 private final OsmDataLayer layer; 39 private final boolean fullRelation; 40 40 private MultiFetchServerObjectReader multiObjectReader; 41 41 private OsmServerObjectReader objectReader; … … 45 45 * 46 46 * @param layer the layer in which primitives are updated. Must not be null. 47 * @param toUpdatea collection of primitives to update from the server. Set to47 * @param ids a collection of primitives to update from the server. Set to 48 48 * the empty collection if null. 49 49 * @param fullRelation true if a full download is required, i.e., … … 51 51 * @throws IllegalArgumentException thrown if layer is null. 52 52 */ 53 public DownloadPrimitivesTask(OsmDataLayer layer, List<PrimitiveId> 53 public DownloadPrimitivesTask(OsmDataLayer layer, List<PrimitiveId> ids, boolean fullRelation) throws IllegalArgumentException { 54 54 super(tr("Download objects"), false /* don't ignore exception */); 55 55 ensureParameterNotNull(layer, "layer"); -
trunk/src/org/openstreetmap/josm/gui/tagging/TaggingPreset.java
r5675 r5791 261 261 } 262 262 } 263 263 264 @Override 265 public String toString() { 266 return "KeyedItem [key=" + key + ", text=" + text 267 + ", text_context=" + text_context + ", match=" + match 268 + "]"; 269 } 264 270 } 265 271 … … 669 675 670 676 protected JComponent component; 671 protected Map<String, PresetListEntry> lhm = new LinkedHashMap<String, PresetListEntry>();677 protected final Map<String, PresetListEntry> lhm = new LinkedHashMap<String, PresetListEntry>(); 672 678 private boolean initialized = false; 673 679 protected Usage usage; -
trunk/src/org/openstreetmap/josm/gui/tagging/ac/AutoCompletionManager.java
r5266 r5791 151 151 if (item instanceof TaggingPreset.KeyedItem) { 152 152 TaggingPreset.KeyedItem ki = (TaggingPreset.KeyedItem) item; 153 if (ki.key == null) { 154 continue; 153 if (ki.key != null && ki.getValues() != null) { 154 try { 155 presetTagCache.putAll(ki.key, ki.getValues()); 156 } catch (NullPointerException e) { 157 System.err.println(p+": Unable to cache "+ki); 158 } 155 159 } 156 presetTagCache.putAll(ki.key, ki.getValues());157 160 } else if (item instanceof TaggingPreset.Roles) { 158 161 TaggingPreset.Roles r = (TaggingPreset.Roles) item; -
trunk/src/org/openstreetmap/josm/tools/Utils.java
r5772 r5791 591 591 while (leadingWhite && start < end) { 592 592 char c = str.charAt(start); 593 if (leadingWhite = (Character.isWhitespace(c) || Character.isSpaceChar(c))) { 593 leadingWhite = (Character.isWhitespace(c) || Character.isSpaceChar(c)); 594 if (leadingWhite) { 594 595 start++; 595 596 } … … 598 599 while (trailingWhite && end > start+1) { 599 600 char c = str.charAt(end-1); 600 if (trailingWhite = (Character.isWhitespace(c) || Character.isSpaceChar(c))) { 601 trailingWhite = (Character.isWhitespace(c) || Character.isSpaceChar(c)); 602 if (trailingWhite) { 601 603 end--; 602 604 }
Note:
See TracChangeset
for help on using the changeset viewer.