Index: trunk/src/org/openstreetmap/josm/actions/AlignInCircleAction.java
===================================================================
--- trunk/src/org/openstreetmap/josm/actions/AlignInCircleAction.java	(revision 10658)
+++ trunk/src/org/openstreetmap/josm/actions/AlignInCircleAction.java	(revision 10659)
@@ -13,4 +13,5 @@
 import java.util.LinkedList;
 import java.util.List;
+import java.util.Objects;
 import java.util.Set;
 
@@ -313,9 +314,9 @@
         Node lastNode = null;
         Way lastWay = null;
-        while (firstNode != lastNode) {
+        while (!Objects.equals(firstNode, lastNode)) {
             if (lastNode == null) lastNode = firstNode;
             for (Way way: ways) {
-                if (way == lastWay) continue;
-                if (way.firstNode() == lastNode) {
+                if (Objects.equals(way, lastWay)) continue;
+                if (Objects.equals(way.firstNode(), lastNode)) {
                     List<Node> wayNodes = way.getNodes();
                     for (int i = 0; i < wayNodes.size() - 1; i++) {
@@ -326,5 +327,5 @@
                     break;
                 }
-                if (way.lastNode() == lastNode) {
+                if (Objects.equals(way.lastNode(), lastNode)) {
                     List<Node> wayNodes = way.getNodes();
                     for (int i = wayNodes.size() - 1; i > 0; i--) {
@@ -394,5 +395,5 @@
                 if (way.isFirstLastNode(node)) continue;
                 for (Way wayOther: ways) {
-                    if (way == wayOther) continue;
+                    if (Objects.equals(way, wayOther)) continue;
                     if (node.getReferrers().contains(wayOther)) return false;
                 }
@@ -407,5 +408,5 @@
             for (Way w: ways) {
                 if (w.isClosed()) return ways.size() == 1;
-                if (w == currentWay) continue;
+                if (Objects.equals(w, currentWay)) continue;
                 if (currentWay == null) {
                     nextWay = w;
@@ -414,10 +415,10 @@
                     break;
                 }
-                if (w.firstNode() == endNode) {
+                if (Objects.equals(w.firstNode(), endNode)) {
                     nextWay = w;
                     endNode = w.lastNode();
                     break;
                 }
-                if (w.lastNode() == endNode) {
+                if (Objects.equals(w.lastNode(), endNode)) {
                     nextWay = w;
                     endNode = w.firstNode();
@@ -428,5 +429,5 @@
             used += 1;
             currentWay = nextWay;
-            if (endNode == startNode) return used == ways.size();
+            if (Objects.equals(endNode, startNode)) return used == ways.size();
         }
     }
Index: trunk/src/org/openstreetmap/josm/actions/CombineWayAction.java
===================================================================
--- trunk/src/org/openstreetmap/josm/actions/CombineWayAction.java	(revision 10658)
+++ trunk/src/org/openstreetmap/josm/actions/CombineWayAction.java	(revision 10659)
@@ -295,9 +295,9 @@
 
         public boolean isSuccessorOf(NodePair other) {
-            return other.getB() == a;
+            return Objects.equals(other.getB(), a);
         }
 
         public boolean isPredecessorOf(NodePair other) {
-            return b == other.getA();
+            return Objects.equals(b, other.getA());
         }
 
@@ -323,5 +323,5 @@
          */
         public boolean contains(Node n) {
-            return a == n || b == n;
+            return Objects.equals(a, n) || Objects.equals(b, n);
         }
 
@@ -337,5 +337,5 @@
             NodePair nodePair = (NodePair) obj;
             return Objects.equals(a, nodePair.a) &&
-                    Objects.equals(b, nodePair.b);
+                   Objects.equals(b, nodePair.b);
         }
     }
Index: trunk/src/org/openstreetmap/josm/actions/SimplifyWayAction.java
===================================================================
--- trunk/src/org/openstreetmap/josm/actions/SimplifyWayAction.java	(revision 10658)
+++ trunk/src/org/openstreetmap/josm/actions/SimplifyWayAction.java	(revision 10659)
@@ -14,4 +14,5 @@
 import java.util.LinkedList;
 import java.util.List;
+import java.util.Objects;
 import java.util.Set;
 
@@ -243,8 +244,8 @@
         } else {
             // Simplify segment
-            if (simplifiedNodes.isEmpty() || simplifiedNodes.get(simplifiedNodes.size()-1) != fromN) {
+            if (simplifiedNodes.isEmpty() || !Objects.equals(simplifiedNodes.get(simplifiedNodes.size()-1), fromN)) {
                 simplifiedNodes.add(fromN);
             }
-            if (fromN != toN) {
+            if (!Objects.equals(fromN, toN)) {
                 simplifiedNodes.add(toN);
             }
Index: trunk/src/org/openstreetmap/josm/actions/SplitWayAction.java
===================================================================
--- trunk/src/org/openstreetmap/josm/actions/SplitWayAction.java	(revision 10658)
+++ trunk/src/org/openstreetmap/josm/actions/SplitWayAction.java	(revision 10659)
@@ -18,4 +18,5 @@
 import java.util.LinkedList;
 import java.util.List;
+import java.util.Objects;
 import java.util.Set;
 import java.util.concurrent.atomic.AtomicInteger;
@@ -444,5 +445,5 @@
 
         if (wayChunks.size() < 2) {
-            if (wayChunks.get(0).get(0) == wayChunks.get(0).get(wayChunks.get(0).size() - 1)) {
+            if (Objects.equals(wayChunks.get(0).get(0), wayChunks.get(0).get(wayChunks.get(0).size() - 1))) {
                 new Notification(
                         tr("You must select two or more nodes to split a circular way."))
@@ -569,5 +570,5 @@
             List<RelationMember> relationMembers = r.getMembers();
             for (RelationMember rm: relationMembers) {
-                if (rm.isWay() && rm.getMember() == way) {
+                if (rm.isWay() && Objects.equals(rm.getMember(), way)) {
                     boolean insert = true;
                     if ("restriction".equals(type) || "destination_sign".equals(type)) {
@@ -630,7 +631,7 @@
                             if ((ir - k >= 0) && relationMembers.get(ir - k).isWay()) {
                                 Way w = relationMembers.get(ir - k).getWay();
-                                if ((w.lastNode() == way.firstNode()) || w.firstNode() == way.firstNode()) {
+                                if (Objects.equals(w.lastNode(), way.firstNode()) || Objects.equals(w.firstNode(), way.firstNode())) {
                                     backwards = Boolean.FALSE;
-                                } else if ((w.firstNode() == way.lastNode()) || w.lastNode() == way.lastNode()) {
+                                } else if (Objects.equals(w.firstNode(), way.lastNode()) || Objects.equals(w.lastNode(), way.lastNode())) {
                                     backwards = Boolean.TRUE;
                                 }
@@ -639,7 +640,7 @@
                             if ((ir + k < relationMembers.size()) && relationMembers.get(ir + k).isWay()) {
                                 Way w = relationMembers.get(ir + k).getWay();
-                                if ((w.lastNode() == way.firstNode()) || w.firstNode() == way.firstNode()) {
+                                if (Objects.equals(w.lastNode(), way.firstNode()) || Objects.equals(w.firstNode(), way.firstNode())) {
                                     backwards = Boolean.TRUE;
-                                } else if ((w.firstNode() == way.lastNode()) || w.lastNode() == way.lastNode()) {
+                                } else if (Objects.equals(w.firstNode(), way.lastNode()) || Objects.equals(w.lastNode(), way.lastNode())) {
                                     backwards = Boolean.FALSE;
                                 }
Index: trunk/src/org/openstreetmap/josm/actions/mapmode/DrawAction.java
===================================================================
--- trunk/src/org/openstreetmap/josm/actions/mapmode/DrawAction.java	(revision 10658)
+++ trunk/src/org/openstreetmap/josm/actions/mapmode/DrawAction.java	(revision 10659)
@@ -28,4 +28,5 @@
 import java.util.List;
 import java.util.Map;
+import java.util.Objects;
 import java.util.Set;
 
@@ -526,5 +527,5 @@
 
                 // User clicked last node again, finish way
-                if (n0 == n) {
+                if (Objects.equals(n0, n)) {
                     finishDrawing();
                     return;
@@ -575,5 +576,5 @@
 
                 // Add new node to way
-                if (way.getNode(way.getNodesCount() - 1) == n0) {
+                if (Objects.equals(way.getNode(way.getNodesCount() - 1), n0)) {
                     way.addNode(n);
                 } else {
@@ -817,7 +818,6 @@
         }
 
-        if (getCurrentBaseNode() == null || getCurrentBaseNode() == currentMouseNode)
+        if (getCurrentBaseNode() == null || getCurrentBaseNode().equals(currentMouseNode))
             return; // Don't create zero length way segments.
-
 
         double curHdg = Math.toDegrees(getCurrentBaseNode().getEastNorth()
@@ -904,8 +904,8 @@
     private void continueWayFromNode(Way way, Node node) {
         int n = way.getNodesCount();
-        if (node == way.firstNode()) {
+        if (Objects.equals(node, way.firstNode())) {
             currentBaseNode = node;
             if (n > 1) previousNode = way.getNode(1);
-        } else if (node == way.lastNode()) {
+        } else if (Objects.equals(node, way.lastNode())) {
             currentBaseNode = node;
             if (n > 1) previousNode = way.getNode(n-2);
@@ -944,5 +944,5 @@
             Node firstNode = w.getNode(0);
             Node lastNode = w.getNode(w.getNodesCount() - 1);
-            if ((firstNode == n || lastNode == n) && (firstNode != lastNode)) {
+            if ((Objects.equals(firstNode, n) || Objects.equals(lastNode, n)) && !Objects.equals(firstNode, lastNode)) {
                 if (way != null)
                     return null;
