Index: src/org/openstreetmap/josm/actions/AlignInLineAction.java
===================================================================
--- src/org/openstreetmap/josm/actions/AlignInLineAction.java	(revision 6090)
+++ src/org/openstreetmap/josm/actions/AlignInLineAction.java	(working copy)
@@ -113,7 +113,7 @@
         //// Decide what to align based on selection:
 
         /// Only ways selected -> Align their nodes.
-        if ((selectedNodes.size() == 0) && (selectedWays.size() == 1)) { // TODO: handle multiple ways
+        if ((selectedNodes.isEmpty()) && (selectedWays.size() == 1)) { // TODO: handle multiple ways
             for (Way way : selectedWays) {
                 nodes.addAll(way.getNodes());
             }
Index: src/org/openstreetmap/josm/actions/CreateCircleAction.java
===================================================================
--- src/org/openstreetmap/josm/actions/CreateCircleAction.java	(revision 6090)
+++ src/org/openstreetmap/josm/actions/CreateCircleAction.java	(working copy)
@@ -97,7 +97,7 @@
 
         // special case if no single nodes are selected and exactly one way is:
         // then use the way's nodes
-        if ((nodes.size() == 0) && (sel.size() == 1)) {
+        if (nodes.isEmpty() && (sel.size() == 1)) {
             for (OsmPrimitive osm : sel)
                 if (osm instanceof Way) {
                     existingWay = ((Way)osm);
Index: src/org/openstreetmap/josm/actions/CreateMultipolygonAction.java
===================================================================
--- src/org/openstreetmap/josm/actions/CreateMultipolygonAction.java	(revision 6090)
+++ src/org/openstreetmap/josm/actions/CreateMultipolygonAction.java	(working copy)
@@ -265,7 +265,7 @@
                 }
             }
 
-            if( affectedWays.size() > 0 ) {
+            if(!affectedWays.isEmpty()) {
                 // reset key tag on affected ways
                 commands.add(new ChangePropertyCommand(affectedWays, key, null));
             }
Index: src/org/openstreetmap/josm/actions/DistributeAction.java
===================================================================
--- src/org/openstreetmap/josm/actions/DistributeAction.java	(revision 6090)
+++ src/org/openstreetmap/josm/actions/DistributeAction.java	(working copy)
@@ -59,7 +59,7 @@
             }
         // special case if no single nodes are selected and exactly one way is:
         // then use the way's nodes
-        if ((nodes.size() == 0) && (sel.size() == 1)) {
+        if (nodes.isEmpty() && (sel.size() == 1)) {
             for (OsmPrimitive osm : sel)
                 if (osm instanceof Way) {
                     nodes.addAll(((Way)osm).getNodes());
@@ -121,7 +121,7 @@
 
         // Current number of node
         int pos = 0;
-        while (nodes.size() > 0) {
+        while (!nodes.isEmpty()) {
             pos++;
             Node s = null;
 
Index: src/org/openstreetmap/josm/actions/FollowLineAction.java
===================================================================
--- src/org/openstreetmap/josm/actions/FollowLineAction.java	(revision 6090)
+++ src/org/openstreetmap/josm/actions/FollowLineAction.java	(working copy)
@@ -95,7 +95,7 @@
                 continue;
             }
             Set<Node> points = toFollow.getNeighbours(last);
-            if (!points.remove(prev) || (points.size() == 0))
+            if (!points.remove(prev) || points.isEmpty())
                 continue;
             if (points.size() > 1)    // Ambiguous junction?
                 return;
Index: src/org/openstreetmap/josm/actions/JoinAreasAction.java
===================================================================
--- src/org/openstreetmap/josm/actions/JoinAreasAction.java	(revision 6090)
+++ src/org/openstreetmap/josm/actions/JoinAreasAction.java	(working copy)
@@ -197,7 +197,7 @@
         }
 
         public boolean hasWays() {
-            return availableWays.size() > 0;
+            return !availableWays.isEmpty();
         }
 
         public WayInPolygon startNewWay(WayInPolygon way) {
@@ -403,7 +403,7 @@
 
         //find intersection points
         Set<Node> nodes = Geometry.addIntersections(allStartingWays, true, cmds);
-        return nodes.size() > 0;
+        return !nodes.isEmpty();
     }
 
     /**
@@ -453,7 +453,7 @@
         }
 
         // Don't warn now, because it will really look corrupted
-        boolean warnAboutRelations = relations.size() > 0 && allStartingWays.size() > 1;
+        boolean warnAboutRelations = !relations.isEmpty() && allStartingWays.size() > 1;
 
         ArrayList<WayInPolygon> preparedWays = new ArrayList<WayInPolygon>();
 
@@ -506,7 +506,7 @@
         commitCommands(marktr("Delete relations"));
 
         // Delete the discarded inner ways
-        if (discardedWays.size() > 0) {
+        if (!discardedWays.isEmpty()) {
             Command deleteCmd = DeleteCommand.delete(Main.map.mapView.getEditLayer(), discardedWays, true);
             if (deleteCmd != null) {
                 cmds.add(deleteCmd);
@@ -922,7 +922,7 @@
             PolygonLevel polLev = new PolygonLevel(pol, level);
 
             //process inner ways
-            if (innerCandidates.size() > 0) {
+            if (!innerCandidates.isEmpty()) {
                 List<PolygonLevel> innerList = findOuterWaysImpl(level + 1, innerCandidates);
                 result.addAll(innerList);
 
Index: src/org/openstreetmap/josm/actions/JoinNodeWayAction.java
===================================================================
--- src/org/openstreetmap/josm/actions/JoinNodeWayAction.java	(revision 6090)
+++ src/org/openstreetmap/josm/actions/JoinNodeWayAction.java	(working copy)
@@ -46,7 +46,7 @@
 
         // If the user has selected some ways, only join the node to these.
         boolean restrictToSelectedWays =
-            getCurrentDataSet().getSelectedWays().size() > 0;
+                !getCurrentDataSet().getSelectedWays().isEmpty();
 
             List<WaySegment> wss = Main.map.mapView.getNearestWaySegments(
                     Main.map.mapView.getPoint(node), OsmPrimitive.isSelectablePredicate);
@@ -73,7 +73,7 @@
 
             for (Map.Entry<Way, List<Integer>> insertPoint : insertPoints.entrySet()) {
                 List<Integer> is = insertPoint.getValue();
-                if (is.size() == 0) {
+                if (is.isEmpty()) {
                     continue;
                 }
 
@@ -87,7 +87,7 @@
                 wnew.setNodes(nodesToAdd);
                 cmds.add(new ChangeCommand(w, wnew));
             }
-            if (cmds.size() == 0) return;
+            if (cmds.isEmpty()) return;
             Main.main.undoRedo.add(new SequenceCommand(tr("Join Node and Line"), cmds));
             Main.map.repaint();
     }
Index: src/org/openstreetmap/josm/actions/MirrorAction.java
===================================================================
--- src/org/openstreetmap/josm/actions/MirrorAction.java	(revision 6090)
+++ src/org/openstreetmap/josm/actions/MirrorAction.java	(working copy)
@@ -50,7 +50,7 @@
             }
         }
 
-        if (nodes.size() == 0) {
+        if (nodes.isEmpty()) {
             JOptionPane.showMessageDialog(
                     Main.parent,
                     tr("Please select at least one node or way."),
Index: src/org/openstreetmap/josm/actions/OrthogonalizeAction.java
===================================================================
--- src/org/openstreetmap/josm/actions/OrthogonalizeAction.java	(revision 6090)
+++ src/org/openstreetmap/josm/actions/OrthogonalizeAction.java	(working copy)
@@ -107,7 +107,7 @@
                         rememberMovements.remove(n);
                     }
                 }
-                if (commands.size() > 0) {
+                if (!commands.isEmpty()) {
                     Main.main.undoRedo.add(new SequenceCommand(tr("Orthogonalize / Undo"), commands));
                     Main.map.repaint();
                 } else throw new InvalidUserInputException();
Index: src/org/openstreetmap/josm/actions/mapmode/DrawAction.java
===================================================================
--- src/org/openstreetmap/josm/actions/mapmode/DrawAction.java	(revision 6090)
+++ src/org/openstreetmap/josm/actions/mapmode/DrawAction.java	(working copy)
@@ -516,7 +516,7 @@
         wayIsFinished = false;
 
         // don't draw lines if shift is held
-        if (selection.size() > 0 && !shift) {
+        if (!selection.isEmpty() && !shift) {
             Node selectedNode = null;
             Way selectedWay = null;
 
@@ -1233,7 +1233,7 @@
         /*
          * Handle special case: Self-Overlapping or closing way
          */
-        if (getCurrentDataSet() != null && getCurrentDataSet().getSelectedWays().size() > 0 && !wayIsFinished && !alt) {
+        if (getCurrentDataSet() != null && !getCurrentDataSet().getSelectedWays().isEmpty() && !wayIsFinished && !alt) {
             Way w = getCurrentDataSet().getSelectedWays().iterator().next();
             for (Node m : w.getNodes()) {
                 if (m.equals(mouseOnExistingNode) || mouseOnExistingWays.contains(w)) {
Index: src/org/openstreetmap/josm/actions/relation/DuplicateRelationAction.java
===================================================================
--- src/org/openstreetmap/josm/actions/relation/DuplicateRelationAction.java	(revision 6090)
+++ src/org/openstreetmap/josm/actions/relation/DuplicateRelationAction.java	(working copy)
@@ -39,7 +39,7 @@
 
     @Override
     public void actionPerformed(ActionEvent e) {
-        if (!isEnabled() || relations.size()==0)
+        if (!isEnabled() || relations.isEmpty())
             return;
         Relation r = relations.iterator().next();
         duplicateRelationAndLaunchEditor(r);
Index: src/org/openstreetmap/josm/data/imagery/ImageryLayerInfo.java
===================================================================
--- src/org/openstreetmap/josm/data/imagery/ImageryLayerInfo.java	(revision 6090)
+++ src/org/openstreetmap/josm/data/imagery/ImageryLayerInfo.java	(working copy)
@@ -41,7 +41,7 @@
     }
 
     public void load() {
-        boolean addedDefault = layers.size() != 0;
+        boolean addedDefault = !layers.isEmpty();
         List<ImageryPreferenceEntry> entries = Main.pref.getListOfStructs("imagery.entries", null, ImageryPreferenceEntry.class);
         if (entries != null) {
             for (ImageryPreferenceEntry prefEntry : entries) {
@@ -120,8 +120,7 @@
         }
 
         Collections.sort(defaultLayers);
-        Main.pref.putCollection("imagery.layers.default", defaultsSave.size() > 0
-                ? defaultsSave : defaults);
+        Main.pref.putCollection("imagery.layers.default", defaultsSave.isEmpty() ? defaults : defaultsSave);
     }
 
     // some additional checks to respect extended URLs in preferences (legacy workaround)
Index: src/org/openstreetmap/josm/data/imagery/WmsCache.java
===================================================================
--- src/org/openstreetmap/josm/data/imagery/WmsCache.java	(revision 6090)
+++ src/org/openstreetmap/josm/data/imagery/WmsCache.java	(working copy)
@@ -268,7 +268,7 @@
         index.setTileSize(tileSize);
         index.setTotalFileSize(totalFileSize);
         for (ProjectionEntries projectionEntries: entries.values()) {
-            if (projectionEntries.entries.size() > 0) {
+            if (!projectionEntries.entries.isEmpty()) {
                 ProjectionType projectionType = new ProjectionType();
                 projectionType.setName(projectionEntries.projection);
                 projectionType.setCacheDirectory(projectionEntries.cacheDirectory);
Index: src/org/openstreetmap/josm/data/osm/MultipolygonCreate.java
===================================================================
--- src/org/openstreetmap/josm/data/osm/MultipolygonCreate.java	(revision 6090)
+++ src/org/openstreetmap/josm/data/osm/MultipolygonCreate.java	(working copy)
@@ -255,7 +255,7 @@
             PolygonLevel pol = new PolygonLevel(outerWay, level);
 
             //process inner ways
-            if (innerCandidates.size() > 0) {
+            if (!innerCandidates.isEmpty()) {
                 List<PolygonLevel> innerList = this.findOuterWaysRecursive(level + 1, innerCandidates);
                 if (innerList == null) {
                     return null; //intersection found
Index: src/org/openstreetmap/josm/data/osm/QuadBuckets.java
===================================================================
--- src/org/openstreetmap/josm/data/osm/QuadBuckets.java	(revision 6090)
+++ src/org/openstreetmap/josm/data/osm/QuadBuckets.java	(working copy)
@@ -174,7 +174,7 @@
             if (content == null)
                 return false;
             boolean ret = this.content.remove(o);
-            if (this.content.size() == 0) {
+            if (this.content.isEmpty()) {
                 this.content = null;
             }
             if (this.canRemove()) {
@@ -491,7 +491,7 @@
         }
         boolean canRemove()
         {
-            if (content != null && content.size() > 0)
+            if (content != null && !content.isEmpty())
                 return false;
             if (this.hasChildren())
                 return false;
Index: src/org/openstreetmap/josm/data/projection/datum/NTV2GridShiftFile.java
===================================================================
--- src/org/openstreetmap/josm/data/projection/datum/NTV2GridShiftFile.java	(revision 6090)
+++ src/org/openstreetmap/josm/data/projection/datum/NTV2GridShiftFile.java	(working copy)
@@ -183,7 +183,7 @@
         NTV2SubGrid[] nullArray = new NTV2SubGrid[0];
         for (int i = 0; i < subGrid.length; i++) {
             ArrayList<NTV2SubGrid> subSubGrids = subGridMap.get(subGrid[i].getSubGridName());
-            if (subSubGrids.size() > 0) {
+            if (!subSubGrids.isEmpty()) {
                 NTV2SubGrid[] subGridArray = subSubGrids.toArray(nullArray);
                 subGrid[i].setSubGridArray(subGridArray);
             }
Index: src/org/openstreetmap/josm/data/validation/tests/Coastlines.java
===================================================================
--- src/org/openstreetmap/josm/data/validation/tests/Coastlines.java	(revision 6090)
+++ src/org/openstreetmap/josm/data/validation/tests/Coastlines.java	(working copy)
@@ -156,7 +156,7 @@
                     highlight.add(tail);
                 }
 
-                if (highlight.size() > 0) {
+                if (!highlight.isEmpty()) {
                     errors.add(new TestError(this, Severity.ERROR, tr("Unconnected coastline"),
                             UNCONNECTED_COASTLINE, primitives, highlight));
                 }
Index: src/org/openstreetmap/josm/data/validation/tests/RelationChecker.java
===================================================================
--- src/org/openstreetmap/josm/data/validation/tests/RelationChecker.java	(revision 6090)
+++ src/org/openstreetmap/josm/data/validation/tests/RelationChecker.java	(working copy)
@@ -108,7 +108,7 @@
                 allroles.addAll(r.roles);
             }
         }
-        if (allroles.size() == 0) {
+        if (allroles.isEmpty()) {
             errors.add( new TestError(this, Severity.WARNING, tr("Relation type is unknown"),
                     RELATION_UNKNOWN, n) );
         } else {
Index: src/org/openstreetmap/josm/gui/MultiSplitLayout.java
===================================================================
--- src/org/openstreetmap/josm/gui/MultiSplitLayout.java	(revision 6090)
+++ src/org/openstreetmap/josm/gui/MultiSplitLayout.java	(working copy)
@@ -1192,7 +1192,7 @@
 
     private static void addSplitChild(Split parent, Node child) {
         List<Node> children = new ArrayList<Node>(parent.getChildren());
-        if (children.size() == 0) {
+        if (children.isEmpty()) {
             children.add(child);
         }
         else {
Index: src/org/openstreetmap/josm/gui/NavigatableComponent.java
===================================================================
--- src/org/openstreetmap/josm/gui/NavigatableComponent.java	(revision 6090)
+++ src/org/openstreetmap/josm/gui/NavigatableComponent.java	(working copy)
@@ -1538,7 +1538,7 @@
      * Set new cursor.
      */
     public void setNewCursor(Cursor cursor, Object reference) {
-        if(Cursors.size() > 0) {
+        if(!Cursors.isEmpty()) {
             CursorInfo l = Cursors.getLast();
             if(l != null && l.cursor == cursor && l.object == reference)
                 return;
@@ -1554,14 +1554,14 @@
      * Remove the new cursor and reset to previous
      */
     public void resetCursor(Object reference) {
-        if(Cursors.size() == 0) {
+        if(Cursors.isEmpty()) {
             setCursor(null);
             return;
         }
         CursorInfo l = Cursors.getLast();
         stripCursors(reference);
         if(l != null && l.object == reference) {
-            if(Cursors.size() == 0) {
+            if(Cursors.isEmpty()) {
                 setCursor(null);
             } else {
                 setCursor(Cursors.getLast().cursor);
Index: src/org/openstreetmap/josm/gui/conflict/tags/CombinePrimitiveResolverDialog.java
===================================================================
--- src/org/openstreetmap/josm/gui/conflict/tags/CombinePrimitiveResolverDialog.java	(revision 6090)
+++ src/org/openstreetmap/josm/gui/conflict/tags/CombinePrimitiveResolverDialog.java	(working copy)
@@ -258,7 +258,7 @@
         List<Command> cmds = new LinkedList<Command>();
 
         TagCollection allResolutions = getTagConflictResolverModel().getAllResolutions();
-        if (allResolutions.size() > 0) {
+        if (!allResolutions.isEmpty()) {
             cmds.addAll(buildTagChangeCommand(targetPrimitive, allResolutions));
         }
         for(String p : OsmPrimitive.getDiscardableKeys()) {
Index: src/org/openstreetmap/josm/gui/conflict/tags/TagConflictResolutionUtil.java
===================================================================
--- src/org/openstreetmap/josm/gui/conflict/tags/TagConflictResolutionUtil.java	(revision 6090)
+++ src/org/openstreetmap/josm/gui/conflict/tags/TagConflictResolutionUtil.java	(working copy)
@@ -38,7 +38,7 @@
 
         int numNodesWithTags = 0;
         for (OsmPrimitive p: merged) {
-            if (p.getKeys().size() >0) {
+            if (!p.getKeys().isEmpty()) {
                 numNodesWithTags++;
             }
         }
Index: src/org/openstreetmap/josm/gui/dialogs/LatLonDialog.java
===================================================================
--- src/org/openstreetmap/josm/gui/dialogs/LatLonDialog.java	(revision 6090)
+++ src/org/openstreetmap/josm/gui/dialogs/LatLonDialog.java	(working copy)
@@ -279,7 +279,7 @@
     }
 
     private void setOkEnabled(boolean b) {
-        if (buttons != null && buttons.size() > 0) {
+        if (buttons != null && !buttons.isEmpty()) {
             buttons.get(0).setEnabled(b);
         }
     }
Index: src/org/openstreetmap/josm/gui/dialogs/ToggleDialog.java
===================================================================
--- src/org/openstreetmap/josm/gui/dialogs/ToggleDialog.java	(revision 6090)
+++ src/org/openstreetmap/josm/gui/dialogs/ToggleDialog.java	(working copy)
@@ -840,7 +840,7 @@
             buttons.addAll(Arrays.asList(nextButtons));
         }
         add(data, BorderLayout.CENTER);
-        if (buttons.size() > 0 && buttons.get(0) != null && !buttons.get(0).isEmpty()) {
+        if (!buttons.isEmpty() && buttons.get(0) != null && !buttons.get(0).isEmpty()) {
             buttonsPanel = new JPanel(new GridLayout(buttons.size(), 1));
             for (Collection<SideButton> buttonRow : buttons) {
                 if (buttonRow == null) {
Index: src/org/openstreetmap/josm/gui/dialogs/relation/DownloadRelationMemberTask.java
===================================================================
--- src/org/openstreetmap/josm/gui/dialogs/relation/DownloadRelationMemberTask.java	(revision 6090)
+++ src/org/openstreetmap/josm/gui/dialogs/relation/DownloadRelationMemberTask.java	(working copy)
@@ -90,7 +90,7 @@
     }
 
     protected String buildDownloadFeedbackMessage() {
-        if (parents.size() == 0) {
+        if (parents.isEmpty()) {
             return trn("Downloading {0} incomplete object",
                     "Downloading {0} incomplete objects",
                     children.size(),
Index: src/org/openstreetmap/josm/gui/dialogs/relation/MemberTableModel.java
===================================================================
--- src/org/openstreetmap/josm/gui/dialogs/relation/MemberTableModel.java	(revision 6090)
+++ src/org/openstreetmap/josm/gui/dialogs/relation/MemberTableModel.java	(working copy)
@@ -550,7 +550,7 @@
         getSelectionModel().setValueIsAdjusting(false);
         // make the first selected member visible
         //
-        if (selectedIndices.size() > 0) {
+        if (!selectedIndices.isEmpty()) {
             fireMakeMemberVisible(Collections.min(selectedIndices));
         }
     }
@@ -629,7 +629,7 @@
             }
         }
         getSelectionModel().setValueIsAdjusting(false);
-        if (getSelectedIndices().size() > 0) {
+        if (!getSelectedIndices().isEmpty()) {
             fireMakeMemberVisible(getSelectedIndices().get(0));
         }
     }
Index: src/org/openstreetmap/josm/gui/layer/GpxLayer.java
===================================================================
--- src/org/openstreetmap/josm/gui/layer/GpxLayer.java	(revision 6090)
+++ src/org/openstreetmap/josm/gui/layer/GpxLayer.java	(working copy)
@@ -182,7 +182,7 @@
             info.append(tr("Description: {0}", data.attr.get(GpxConstants.META_DESC))).append("<br>");
         }
 
-        if (data.tracks.size() > 0) {
+        if (!data.tracks.isEmpty()) {
             info.append("<table><thead align='center'><tr><td colspan='5'>"
                     + trn("{0} track", "{0} tracks", data.tracks.size(), data.tracks.size())
                     + "</td></tr><tr align='center'><td>" + tr("Name") + "</td><td>"
Index: src/org/openstreetmap/josm/gui/layer/TMSLayer.java
===================================================================
--- src/org/openstreetmap/josm/gui/layer/TMSLayer.java	(revision 6090)
+++ src/org/openstreetmap/josm/gui/layer/TMSLayer.java	(working copy)
@@ -1386,7 +1386,7 @@
                 TileSet ts2 = new TileSet(topLeft2, botRight2, newzoom);
                 // Instantiating large TileSets is expensive.  If there
                 // are no loaded tiles, don't bother even trying.
-                if (ts2.allLoadedTiles().size() == 0) {
+                if (ts2.allLoadedTiles().isEmpty()) {
                     newlyMissedTiles.add(missed);
                     continue;
                 }
Index: src/org/openstreetmap/josm/gui/layer/geoimage/CorrelateGpxWithImages.java
===================================================================
--- src/org/openstreetmap/josm/gui/layer/geoimage/CorrelateGpxWithImages.java	(revision 6090)
+++ src/org/openstreetmap/josm/gui/layer/geoimage/CorrelateGpxWithImages.java	(working copy)
@@ -469,7 +469,7 @@
                     data.storageFile));
         }
 
-        if (gpxLst.size() == 0) {
+        if (gpxLst.isEmpty()) {
             gpxLst.add(new GpxDataWrapper(tr("<No GPX track loaded yet>"), null, null));
         }
 
Index: src/org/openstreetmap/josm/gui/layer/geoimage/GeoImageLayer.java
===================================================================
--- src/org/openstreetmap/josm/gui/layer/geoimage/GeoImageLayer.java	(revision 6090)
+++ src/org/openstreetmap/josm/gui/layer/geoimage/GeoImageLayer.java	(working copy)
@@ -238,7 +238,7 @@
             if (layer != null) {
                 Main.main.addLayer(layer);
 
-                if (! canceled && layer.data.size() > 0) {
+                if (!canceled && !layer.data.isEmpty()) {
                     boolean noGeotagFound = true;
                     for (ImageEntry e : layer.data) {
                         if (e.getPos() != null) {
@@ -632,7 +632,7 @@
     }
 
     public void showPreviousPhoto() {
-        if (data != null && data.size() > 0) {
+        if (data != null && !data.isEmpty()) {
             currentPhoto--;
             if (currentPhoto < 0) {
                 currentPhoto = 0;
Index: src/org/openstreetmap/josm/gui/layer/gpx/MarkersFromNamedPointsAction.java
===================================================================
--- src/org/openstreetmap/josm/gui/layer/gpx/MarkersFromNamedPointsAction.java	(revision 6090)
+++ src/org/openstreetmap/josm/gui/layer/gpx/MarkersFromNamedPointsAction.java	(working copy)
@@ -39,7 +39,7 @@
             }
         }
         MarkerLayer ml = new MarkerLayer(namedTrackPoints, tr("Named Trackpoints from {0}", layer.getName()), layer.getAssociatedFile(), layer);
-        if (ml.data.size() > 0) {
+        if (!ml.data.isEmpty()) {
             Main.main.addLayer(ml);
         }
     }
Index: src/org/openstreetmap/josm/gui/tagging/TaggingPreset.java
===================================================================
--- src/org/openstreetmap/josm/gui/tagging/TaggingPreset.java	(revision 6090)
+++ src/org/openstreetmap/josm/gui/tagging/TaggingPreset.java	(working copy)
@@ -214,7 +214,7 @@
             }
         }
         p.add(items, GBC.eol().fill());
-        if (selected.size() == 0 && !supportsRelation()) {
+        if (selected.isEmpty() && !supportsRelation()) {
             GuiHelper.setEnabledRec(items, false);
         }
 
@@ -330,7 +330,7 @@
                 }
             }
 
-            answer = new PresetDialog(p, title, (ImageIcon) getValue(Action.SMALL_ICON), (sel.size() == 0)).getValue();
+            answer = new PresetDialog(p, title, (ImageIcon) getValue(Action.SMALL_ICON), sel.isEmpty()).getValue();
         }
         if (!showNewRelation && answer == 2)
             return DIALOG_ANSWER_CANCEL;
@@ -349,7 +349,7 @@
      * @return Cleaned list with suitable OsmPrimitives only
      */
     public Collection<OsmPrimitive> createSelection(Collection<OsmPrimitive> participants) {
-        originalSelectionEmpty = participants.size() == 0;
+        originalSelectionEmpty = participants.isEmpty();
         Collection<OsmPrimitive> sel = new LinkedList<OsmPrimitive>();
         for (OsmPrimitive osm : participants)
         {
Index: src/org/openstreetmap/josm/gui/tagging/TaggingPresetItems.java
===================================================================
--- src/org/openstreetmap/josm/gui/tagging/TaggingPresetItems.java	(revision 6090)
+++ src/org/openstreetmap/josm/gui/tagging/TaggingPresetItems.java	(working copy)
@@ -357,7 +357,7 @@
         @Override
         public boolean addToPanel(JPanel p, Collection<OsmPrimitive> sel) {
             p.add(new JLabel(" "), GBC.eol()); // space
-            if (roles.size() > 0) {
+            if (!roles.isEmpty()) {
                 JPanel proles = new JPanel(new GridBagLayout());
                 proles.add(new JLabel(tr("Available roles")), GBC.std().insets(0, 0, 10, 0));
                 proles.add(new JLabel(tr("role")), GBC.std().insets(0, 0, 10, 0));
Index: src/org/openstreetmap/josm/gui/tagging/TaggingPresetReader.java
===================================================================
--- src/org/openstreetmap/josm/gui/tagging/TaggingPresetReader.java	(revision 6090)
+++ src/org/openstreetmap/josm/gui/tagging/TaggingPresetReader.java	(working copy)
@@ -100,7 +100,7 @@
                 all.add(tp);
                 lastrole = null;
             } else {
-                if (all.size() != 0) {
+                if (!all.isEmpty()) {
                     if (o instanceof TaggingPresetItems.Roles) {
                         all.getLast().data.add((TaggingPresetItem) o);
                         if (all.getLast().roles != null) {
Index: src/org/openstreetmap/josm/io/NMEAImporter.java
===================================================================
--- src/org/openstreetmap/josm/io/NMEAImporter.java	(revision 6090)
+++ src/org/openstreetmap/josm/io/NMEAImporter.java	(working copy)
@@ -40,7 +40,7 @@
                     Main.main.addLayer(gpxLayer);
                     if (Main.pref.getBoolean("marker.makeautomarkers", true)) {
                         MarkerLayer ml = new MarkerLayer(r.data, tr("Markers from {0}", fn), fileFinal, gpxLayer);
-                        if (ml.data.size() > 0) {
+                        if (!ml.data.isEmpty()) {
                             Main.main.addLayer(ml);
                         }
                     }
Index: src/org/openstreetmap/josm/io/OsmReader.java
===================================================================
--- src/org/openstreetmap/josm/io/OsmReader.java	(revision 6090)
+++ src/org/openstreetmap/josm/io/OsmReader.java	(working copy)
@@ -231,7 +231,7 @@
                 break;
             }
         }
-        if (w.isDeleted() && nodeIds.size() > 0) {
+        if (w.isDeleted() && !nodeIds.isEmpty()) {
             System.out.println(tr("Deleted way {0} contains nodes", w.getUniqueId()));
             nodeIds = new ArrayList<Long>();
         }
@@ -278,7 +278,7 @@
                 break;
             }
         }
-        if (r.isDeleted() && members.size() > 0) {
+        if (r.isDeleted() && !members.isEmpty()) {
             System.out.println(tr("Deleted relation {0} contains members", r.getUniqueId()));
             members = new ArrayList<RelationMemberData>();
         }
Index: src/org/openstreetmap/josm/io/session/GeoImageSessionImporter.java
===================================================================
--- src/org/openstreetmap/josm/io/session/GeoImageSessionImporter.java	(revision 6090)
+++ src/org/openstreetmap/josm/io/session/GeoImageSessionImporter.java	(working copy)
@@ -79,7 +79,7 @@
 
         GpxLayer gpxLayer = null;
         List<SessionReader.LayerDependency> deps = support.getLayerDependencies();
-        if (deps.size() > 0) {
+        if (!deps.isEmpty()) {
             Layer layer = deps.iterator().next().getLayer();
             if (layer instanceof GpxLayer) {
                 gpxLayer = (GpxLayer) layer;
Index: src/org/openstreetmap/josm/io/session/MarkerSessionImporter.java
===================================================================
--- src/org/openstreetmap/josm/io/session/MarkerSessionImporter.java	(revision 6090)
+++ src/org/openstreetmap/josm/io/session/MarkerSessionImporter.java	(working copy)
@@ -47,7 +47,7 @@
 
             GpxLayer gpxLayer = null;
             List<SessionReader.LayerDependency> deps = support.getLayerDependencies();
-            if (deps.size() > 0) {
+            if (!deps.isEmpty()) {
                 Layer layer = deps.iterator().next().getLayer();
                 if (layer instanceof GpxLayer) {
                     gpxLayer = (GpxLayer) layer;
Index: src/org/openstreetmap/josm/io/session/SessionWriter.java
===================================================================
--- src/org/openstreetmap/josm/io/session/SessionWriter.java	(revision 6090)
+++ src/org/openstreetmap/josm/io/session/SessionWriter.java	(working copy)
@@ -196,7 +196,7 @@
                 el.setAttribute("opacity", Double.toString(layer.getOpacity()));
             }
             Set<Layer> deps = dependencies.get(layer);
-            if (deps.size() > 0) {
+            if (!deps.isEmpty()) {
                 List<Integer> depsInt = new ArrayList<Integer>();
                 for (Layer depLayer : deps) {
                     int depIndex = layers.indexOf(depLayer);
Index: src/org/openstreetmap/josm/tools/Geometry.java
===================================================================
--- src/org/openstreetmap/josm/tools/Geometry.java	(revision 6090)
+++ src/org/openstreetmap/josm/tools/Geometry.java	(working copy)
@@ -172,7 +172,7 @@
                                 }
                             }
                         }
-                        else if (test && intersectionNodes.size() > 0)
+                        else if (test && !intersectionNodes.isEmpty())
                             return intersectionNodes;
                     }
                 }
Index: src/org/openstreetmap/josm/tools/ImageProvider.java
===================================================================
--- src/org/openstreetmap/josm/tools/ImageProvider.java	(revision 6090)
+++ src/org/openstreetmap/josm/tools/ImageProvider.java	(working copy)
@@ -424,7 +424,7 @@
                     String full_name = subdir + name + ext;
                     String cache_name = full_name;
                     /* cache separately */
-                    if (dirs != null && dirs.size() > 0) {
+                    if (dirs != null && !dirs.isEmpty()) {
                         cache_name = "id:" + id + ":" + full_name;
                         if(archive != null) {
                             cache_name += ":" + archive.getName();
Index: src/org/openstreetmap/josm/tools/Utils.java
===================================================================
--- src/org/openstreetmap/josm/tools/Utils.java	(revision 6090)
+++ src/org/openstreetmap/josm/tools/Utils.java	(working copy)
@@ -442,7 +442,7 @@
         for (int i=0; i<size; ++i) {
             T parentless = null;
             for (T key : deps.keySet()) {
-                if (deps.get(key).size() == 0) {
+                if (deps.get(key).isEmpty()) {
                     parentless = key;
                     break;
                 }
