Changeset 8465 in josm
- Timestamp:
- 2015-06-04T01:52:36+02:00 (10 years ago)
- Location:
- trunk/src/org/openstreetmap/josm
- Files:
-
- 23 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/actions/ShowStatusReportAction.java
r8449 r8465 107 107 // Build a new list of VM parameters to modify it below if needed (default implementation returns an UnmodifiableList instance) 108 108 List<String> vmArguments = new ArrayList<>(ManagementFactory.getRuntimeMXBean().getInputArguments()); 109 for (ListIterator<String> it = vmArguments.listIterator(); it.hasNext(); 109 for (ListIterator<String> it = vmArguments.listIterator(); it.hasNext();) { 110 110 String value = it.next(); 111 111 if (value.contains("=")) { -
trunk/src/org/openstreetmap/josm/actions/SplitWayAction.java
r8443 r8465 228 228 for (int i=1; i<selectedNodes.size(); i++) { 229 229 List<OsmPrimitive> ref = selectedNodes.get(i).getReferrers(); 230 for (Iterator<Way> it = result.iterator(); it.hasNext(); 230 for (Iterator<Way> it = result.iterator(); it.hasNext();) { 231 231 if (!ref.contains(it.next())) { 232 232 it.remove(); … … 236 236 237 237 // Remove broken ways 238 for (Iterator<Way> it = result.iterator(); it.hasNext(); 238 for (Iterator<Way> it = result.iterator(); it.hasNext();) { 239 239 if (it.next().getNodesCount() <= 2) { 240 240 it.remove(); … … 246 246 else { 247 247 // Return only selected ways 248 for (Iterator<Way> it = result.iterator(); it.hasNext(); 248 for (Iterator<Way> it = result.iterator(); it.hasNext();) { 249 249 if (!selectedWays.contains(it.next())) { 250 250 it.remove(); -
trunk/src/org/openstreetmap/josm/actions/UnJoinNodeWayAction.java
r8378 r8465 157 157 for (int i=1; i<selectedNodes.size(); i++) { 158 158 List<OsmPrimitive> ref = selectedNodes.get(i).getReferrers(); 159 for (Iterator<Way> it = result.iterator(); it.hasNext(); 159 for (Iterator<Way> it = result.iterator(); it.hasNext();) { 160 160 if (!ref.contains(it.next())) { 161 161 it.remove(); … … 165 165 166 166 // Remove broken ways 167 for (Iterator<Way> it = result.iterator(); it.hasNext(); 167 for (Iterator<Way> it = result.iterator(); it.hasNext();) { 168 168 if (it.next().getNodesCount() <= 2) { 169 169 it.remove(); … … 175 175 else { 176 176 // Return only selected ways 177 for (Iterator<Way> it = result.iterator(); it.hasNext(); 177 for (Iterator<Way> it = result.iterator(); it.hasNext();) { 178 178 if (!selectedWays.contains(it.next())) { 179 179 it.remove(); -
trunk/src/org/openstreetmap/josm/actions/mapmode/DrawAction.java
r8444 r8465 1545 1545 if (selectedWays.size()==1) { 1546 1546 Way w = selectedWays.iterator().next(); 1547 Collection 1547 Collection<EastNorth> pointsToProject = new ArrayList<>(); 1548 1548 if (w.getNodesCount()<1000) { 1549 1549 for (Node n: w.getNodes()) { -
trunk/src/org/openstreetmap/josm/actions/mapmode/ExtrudeAction.java
r8449 r8465 340 340 Main.map.mapView.setNewCursor(ctrl ? cursorTranslate : alt ? cursorCreateNew : shift ? cursorCreateNodes : cursor, this); 341 341 } 342 } ;342 } 343 343 344 344 @Override -
trunk/src/org/openstreetmap/josm/data/Preferences.java
r8443 r8465 1387 1387 } else if (f.getType().isAssignableFrom(Map.class)) { 1388 1388 value = mapFromJson(key_value.getValue()); 1389 } 1390 else 1389 } else 1391 1390 throw new RuntimeException("unsupported preference primitive type"); 1392 1391 -
trunk/src/org/openstreetmap/josm/data/conflict/ConflictCollection.java
r8456 r8465 38 38 * </ul> 39 39 */ 40 public class ConflictCollection implements Iterable<Conflict<? extends OsmPrimitive>> {40 public class ConflictCollection implements Iterable<Conflict<? extends OsmPrimitive>> { 41 41 private final List<Conflict<? extends OsmPrimitive>> conflicts; 42 42 private CopyOnWriteArrayList<IConflictListener> listeners; -
trunk/src/org/openstreetmap/josm/data/imagery/ImageryLayerInfo.java
r8444 r8465 109 109 } 110 110 } 111 while (defaultLayers.remove(null)); 111 while (defaultLayers.remove(null)) { 112 // Do nothing 113 } 112 114 Collections.sort(defaultLayers); 113 115 buildIdMap(defaultLayers, defaultLayerIds); -
trunk/src/org/openstreetmap/josm/data/osm/visitor/paint/relations/Multipolygon.java
r8237 r8465 296 296 DataSet ds = dataSet; 297 297 // Find DataSet (can be null for several nodes when undoing nodes creation, see #7162) 298 for (Iterator<Node> it = nodes.iterator(); it.hasNext() && ds == null; 298 for (Iterator<Node> it = nodes.iterator(); it.hasNext() && ds == null;) { 299 299 ds = it.next().getDataSet(); 300 300 } -
trunk/src/org/openstreetmap/josm/data/validation/tests/MapCSSTagChecker.java
r8448 r8465 355 355 356 356 private static void removeMetaRules(MapCSSStyleSource source) { 357 for (Iterator<MapCSSRule> it = source.rules.iterator(); it.hasNext(); 357 for (Iterator<MapCSSRule> it = source.rules.iterator(); it.hasNext();) { 358 358 MapCSSRule x = it.next(); 359 359 if (x.selector instanceof GeneralSelector) { -
trunk/src/org/openstreetmap/josm/gui/FileDrop.java
r8459 r8465 131 131 @Override 132 132 public void dragEnter(DropTargetDragEvent evt) { 133 Main.trace("FileDrop: dragEnter event." 133 Main.trace("FileDrop: dragEnter event."); 134 134 135 135 // Is this an acceptable drag event? 136 if (isDragOk(evt) 136 if (isDragOk(evt)) { 137 137 // If it's a Swing component, set its border 138 138 if (c instanceof JComponent) { … … 145 145 146 146 // Acknowledge that it's okay to enter 147 evt.acceptDrag( 147 evt.acceptDrag(DnDConstants.ACTION_COPY); 148 148 Main.trace("FileDrop: event accepted."); 149 149 } else { … … 254 254 Main.debug("FileDrop: dropActionChanged event."); 255 255 // Is this an acceptable drag event? 256 if (isDragOk(evt) 257 evt.acceptDrag( 256 if (isDragOk(evt)) { 257 evt.acceptDrag(DnDConstants.ACTION_COPY); 258 258 Main.debug("FileDrop: event accepted."); 259 259 } else { … … 369 369 // Is the flavor a file list? 370 370 final DataFlavor curFlavor = flavors[i]; 371 if (curFlavor.equals( DataFlavor.javaFileListFlavor) ||372 curFlavor.isRepresentationClassReader()) {371 if (curFlavor.equals(DataFlavor.javaFileListFlavor) || 372 curFlavor.isRepresentationClassReader()) { 373 373 ok = true; 374 374 } … … 637 637 638 638 // String 639 if (flavor.equals( 639 if (flavor.equals(DataFlavor.stringFlavor)) 640 640 return true; 641 641 -
trunk/src/org/openstreetmap/josm/gui/ImageryMenu.java
r8443 r8465 169 169 // For layers containing complex shapes, check that center is in one 170 170 // of its shapes (fix #7910) 171 for (Iterator<ImageryInfo> iti = inViewLayers.iterator(); iti.hasNext(); 171 for (Iterator<ImageryInfo> iti = inViewLayers.iterator(); iti.hasNext();) { 172 172 List<Shape> shapes = iti.next().getBounds().getShapes(); 173 173 if (shapes != null && !shapes.isEmpty()) { 174 174 boolean found = false; 175 for (Iterator<Shape> its = shapes.iterator(); its.hasNext() && !found; 175 for (Iterator<Shape> its = shapes.iterator(); its.hasNext() && !found;) { 176 176 found = its.next().contains(pos); 177 177 } -
trunk/src/org/openstreetmap/josm/gui/conflict/pair/nodes/NodeListMergeModel.java
r8444 r8465 18 18 import org.openstreetmap.josm.gui.conflict.pair.ListRole; 19 19 20 public class NodeListMergeModel extends ListMergeModel<Node> {20 public class NodeListMergeModel extends ListMergeModel<Node> { 21 21 22 22 /** -
trunk/src/org/openstreetmap/josm/gui/conflict/pair/relation/RelationMemberListMergeModel.java
r8444 r8465 21 21 * 22 22 */ 23 public class RelationMemberListMergeModel extends ListMergeModel<RelationMember> {23 public class RelationMemberListMergeModel extends ListMergeModel<RelationMember> { 24 24 25 25 @Override -
trunk/src/org/openstreetmap/josm/gui/dialogs/relation/RelationDialogManager.java
r8332 r8465 217 217 public void windowClosed(WindowEvent e) { 218 218 RelationEditor editor = (RelationEditor)e.getWindow(); 219 for (Iterator<Entry<DialogContext, RelationEditor>> it = openDialogs.entrySet().iterator(); it.hasNext(); 219 for (Iterator<Entry<DialogContext, RelationEditor>> it = openDialogs.entrySet().iterator(); it.hasNext();) { 220 220 if (editor.equals(it.next().getValue())) { 221 221 it.remove(); -
trunk/src/org/openstreetmap/josm/gui/dialogs/validator/ValidatorTreePanel.java
r8444 r8465 338 338 */ 339 339 public List<TestError> getErrors() { 340 return errors != null ? errors : Collections.<TestError> 340 return errors != null ? errors : Collections.<TestError>emptyList(); 341 341 } 342 342 -
trunk/src/org/openstreetmap/josm/gui/history/HistoryBrowserDialogManager.java
r8346 r8465 108 108 */ 109 109 public void hide(HistoryBrowserDialog dialog) { 110 for (Iterator<Entry<Long, HistoryBrowserDialog>> it = dialogs.entrySet().iterator(); it.hasNext(); 110 for (Iterator<Entry<Long, HistoryBrowserDialog>> it = dialogs.entrySet().iterator(); it.hasNext();) { 111 111 if (Objects.equals(it.next().getValue(), dialog)) { 112 112 it.remove(); -
trunk/src/org/openstreetmap/josm/gui/tagging/ac/AutoCompletionListItem.java
r8390 r8465 17 17 * 18 18 */ 19 public class AutoCompletionListItem implements Comparable<AutoCompletionListItem> {19 public class AutoCompletionListItem implements Comparable<AutoCompletionListItem> { 20 20 21 21 /** the pritority of this item */ -
trunk/src/org/openstreetmap/josm/gui/util/HighlightHelper.java
r8444 r8465 24 24 * @param prims - primitives to highlight/unhighlight 25 25 */ 26 public boolean highlight(Collection 26 public boolean highlight(Collection<? extends OsmPrimitive> prims) { 27 27 return highlight(prims, false); 28 28 } … … 33 33 * @param only - remove previous highlighting 34 34 */ 35 public boolean highlight(Collection 35 public boolean highlight(Collection<? extends OsmPrimitive> prims, boolean only) { 36 36 boolean needsRepaint = false; 37 37 if (only) { … … 57 57 * @param prims - primitives to highlight/unhighlight 58 58 */ 59 public boolean highlightOnly(Collection 59 public boolean highlightOnly(Collection<? extends OsmPrimitive> prims) { 60 60 return highlight(prims, true); 61 61 } -
trunk/src/org/openstreetmap/josm/gui/widgets/MultiSplitLayout.java
r8419 r8465 532 532 Rectangle newSplitChildBounds = boundsWithYandHeight(bounds, y, newHeight); 533 533 layout2(splitChild, newSplitChildBounds); 534 } 535 else if ((availableHeight > 0.0) && (splitChildWeight > 0.0)) { 534 } else if ((availableHeight > 0.0) && (splitChildWeight > 0.0)) { 536 535 double allocatedHeight = (splitChild.equals(lastWeightedChild)) 537 536 ? availableHeight … … 541 540 layout2(splitChild, newSplitChildBounds); 542 541 availableHeight -= allocatedHeight; 543 } 544 else { 542 } else { 545 543 double existingHeight = splitChildBounds.getHeight(); 546 544 Rectangle newSplitChildBounds = boundsWithYandHeight(bounds, y, existingHeight); … … 619 617 if (getFloatingDividers()) { 620 618 childWidth = preferredNodeSize(splitChild).getWidth(); 621 } 622 else { 619 } else { 623 620 if (dividerChild != null) { 624 621 childWidth = dividerChild.getBounds().getX() - x; 625 } 626 else { 622 } else { 627 623 childWidth = split.getBounds().getMaxX() - x; 628 624 } -
trunk/src/org/openstreetmap/josm/io/remotecontrol/RemoteControl.java
r8339 r8465 3 3 4 4 import java.io.File; 5 import java.net.InetAddress;6 5 import java.net.Inet4Address; 7 6 import java.net.Inet6Address; 7 import java.net.InetAddress; 8 8 import java.net.UnknownHostException; 9 9 … … 90 90 return a; 91 91 } 92 } ;92 } 93 93 throw new UnknownHostException(); 94 94 } … … 106 106 return a; 107 107 } 108 } ;108 } 109 109 throw new UnknownHostException(); 110 110 } -
trunk/src/org/openstreetmap/josm/io/remotecontrol/RequestProcessor.java
r8390 r8465 176 176 String command = questionPos < 0 ? url : url.substring(0, questionPos); 177 177 178 Map 178 Map<String,String> headers = new HashMap<>(); 179 179 int k=0, MAX_HEADERS=20; 180 180 while (k<MAX_HEADERS) { -
trunk/src/org/openstreetmap/josm/plugins/PluginHandler.java
r8453 r8465 1283 1283 1284 1284 Set<String> plugins = new HashSet<>( 1285 Main.pref.getCollection("plugins",Collections.<String> 1285 Main.pref.getCollection("plugins",Collections.<String>emptySet()) 1286 1286 ); 1287 1287 final PluginInformation pluginInfo = plugin.getPluginInformation(); … … 1324 1324 public static String getBugReportText() { 1325 1325 StringBuilder text = new StringBuilder(); 1326 List 1326 List<String> pl = new LinkedList<>(Main.pref.getCollection("plugins", new LinkedList<String>())); 1327 1327 for (final PluginProxy pp : pluginList) { 1328 1328 PluginInformation pi = pp.getPluginInformation();
Note:
See TracChangeset
for help on using the changeset viewer.