Index: src/org/openstreetmap/josm/data/osm/Node.java
===================================================================
--- src/org/openstreetmap/josm/data/osm/Node.java	(revision 6096)
+++ src/org/openstreetmap/josm/data/osm/Node.java	(working copy)
@@ -266,7 +266,7 @@
 
     @Override
     public boolean hasEqualSemanticAttributes(OsmPrimitive other) {
-        if (other == null || ! (other instanceof Node) )
+        if (!(other instanceof Node))
             return false;
         if (! super.hasEqualSemanticAttributes(other))
             return false;
Index: src/org/openstreetmap/josm/data/osm/Relation.java
===================================================================
--- src/org/openstreetmap/josm/data/osm/Relation.java	(revision 6096)
+++ src/org/openstreetmap/josm/data/osm/Relation.java	(working copy)
@@ -280,7 +280,7 @@
 
     @Override
     public boolean hasEqualSemanticAttributes(OsmPrimitive other) {
-        if (other == null || ! (other instanceof Relation) )
+        if (!(other instanceof Relation))
             return false;
         if (! super.hasEqualSemanticAttributes(other))
             return false;
Index: src/org/openstreetmap/josm/data/osm/Way.java
===================================================================
--- src/org/openstreetmap/josm/data/osm/Way.java	(revision 6096)
+++ src/org/openstreetmap/josm/data/osm/Way.java	(working copy)
@@ -326,7 +326,7 @@
 
     @Override
     public boolean hasEqualSemanticAttributes(OsmPrimitive other) {
-        if (other == null || ! (other instanceof Way) )
+        if (!(other instanceof Way))
             return false;
         if (! super.hasEqualSemanticAttributes(other))
             return false;
Index: src/org/openstreetmap/josm/gui/MapMover.java
===================================================================
--- src/org/openstreetmap/josm/gui/MapMover.java	(revision 6096)
+++ src/org/openstreetmap/josm/gui/MapMover.java	(working copy)
@@ -223,7 +223,7 @@
      * @return true if we are currently running on OSX
      */
     public static boolean isPlatformOsx() {
-        return Main.platform != null && Main.platform instanceof PlatformHookOsx;
+        return Main.platform instanceof PlatformHookOsx;
     }
 
     @Override
Index: src/org/openstreetmap/josm/gui/dialogs/RelationListDialog.java
===================================================================
--- src/org/openstreetmap/josm/gui/dialogs/RelationListDialog.java	(revision 6096)
+++ src/org/openstreetmap/josm/gui/dialogs/RelationListDialog.java	(working copy)
@@ -227,7 +227,7 @@
      * @param layer the layer. May be null.
      */
     protected void initFromLayer(Layer layer) {
-        if (layer == null || ! (layer instanceof OsmDataLayer)) {
+        if (!(layer instanceof OsmDataLayer)) {
             model.setRelations(null);
             return;
         }
@@ -676,7 +676,7 @@
     @Override
     public void tagsChanged(TagsChangedEvent event) {
         OsmPrimitive prim = event.getPrimitive();
-        if (prim == null || ! (prim instanceof Relation))
+        if (!(prim instanceof Relation))
             return;
         // trigger a sort of the relation list because the display name may
         // have changed
Index: src/org/openstreetmap/josm/gui/dialogs/relation/RelationDialogManager.java
===================================================================
--- src/org/openstreetmap/josm/gui/dialogs/relation/RelationDialogManager.java	(revision 6096)
+++ src/org/openstreetmap/josm/gui/dialogs/relation/RelationDialogManager.java	(working copy)
@@ -184,7 +184,7 @@
      */
     @Override
     public void layerRemoved(Layer oldLayer) {
-        if (oldLayer == null || ! (oldLayer instanceof OsmDataLayer))
+        if (!(oldLayer instanceof OsmDataLayer))
             return;
         OsmDataLayer dataLayer = (OsmDataLayer)oldLayer;
 
Index: src/org/openstreetmap/josm/gui/help/HelpBrowser.java
===================================================================
--- src/org/openstreetmap/josm/gui/help/HelpBrowser.java	(revision 6096)
+++ src/org/openstreetmap/josm/gui/help/HelpBrowser.java	(working copy)
@@ -580,7 +580,7 @@
         protected String getUrlFragment(HyperlinkEvent e) {
             AttributeSet set = e.getSourceElement().getAttributes();
             Object value = set.getAttribute(Tag.A);
-            if (value == null || ! (value instanceof SimpleAttributeSet)) return null;
+            if (!(value instanceof SimpleAttributeSet)) return null;
             SimpleAttributeSet atts = (SimpleAttributeSet)value;
             value = atts.getAttribute(javax.swing.text.html.HTML.Attribute.HREF);
             if (value == null) return null;
Index: src/org/openstreetmap/josm/gui/history/CoordinateInfoViewer.java
===================================================================
--- src/org/openstreetmap/josm/gui/history/CoordinateInfoViewer.java	(revision 6096)
+++ src/org/openstreetmap/josm/gui/history/CoordinateInfoViewer.java	(working copy)
@@ -251,8 +251,8 @@
         protected void refresh() {
             HistoryOsmPrimitive p = getPrimitive();
             HistoryOsmPrimitive  opposite = getOppositePrimitive();
-            if (p == null || ! ( p instanceof HistoryNode)) return;
-            if (opposite == null || ! (opposite instanceof HistoryNode)) return;
+            if (!(p instanceof HistoryNode)) return;
+            if (!(opposite instanceof HistoryNode)) return;
             HistoryNode node = (HistoryNode)p;
             HistoryNode oppositeNode = (HistoryNode) opposite;
 
@@ -324,8 +324,8 @@
         protected void refresh() {
             HistoryOsmPrimitive p = getPrimitive();
             HistoryOsmPrimitive opposite = getOppositePrimitive();
-            if (p == null || ! ( p instanceof HistoryNode)) return;
-            if (opposite == null || ! (opposite instanceof HistoryNode)) return;
+            if (!(p instanceof HistoryNode)) return;
+            if (!(opposite instanceof HistoryNode)) return;
             HistoryNode node = (HistoryNode) p;
             HistoryNode oppositeNode = (HistoryNode) opposite;
 
Index: src/org/openstreetmap/josm/gui/history/HistoryBrowserModel.java
===================================================================
--- src/org/openstreetmap/josm/gui/history/HistoryBrowserModel.java	(revision 6096)
+++ src/org/openstreetmap/josm/gui/history/HistoryBrowserModel.java	(working copy)
@@ -754,11 +754,11 @@
     /* ---------------------------------------------------------------------- */
     @Override
     public void activeLayerChange(Layer oldLayer, Layer newLayer) {
-        if (oldLayer != null && oldLayer instanceof OsmDataLayer) {
+        if (oldLayer instanceof OsmDataLayer) {
             OsmDataLayer l = (OsmDataLayer)oldLayer;
             l.data.removeDataSetListener(this);
         }
-        if (newLayer == null || ! (newLayer instanceof OsmDataLayer)) {
+        if (!(newLayer instanceof OsmDataLayer)) {
             latest = null;
             fireModelChange();
             return;
Index: src/org/openstreetmap/josm/gui/mappaint/BoxTextElemStyle.java
===================================================================
--- src/org/openstreetmap/josm/gui/mappaint/BoxTextElemStyle.java	(revision 6096)
+++ src/org/openstreetmap/josm/gui/mappaint/BoxTextElemStyle.java	(working copy)
@@ -68,7 +68,7 @@
 
         @Override
         public boolean equals(Object obj) {
-            if (obj == null || !(obj instanceof BoxProvider))
+            if (!(obj instanceof BoxProvider))
                 return false;
             final BoxProvider other = (BoxProvider) obj;
             BoxProviderResult resultOther = other.get();
Index: src/org/openstreetmap/josm/gui/mappaint/Environment.java
===================================================================
--- src/org/openstreetmap/josm/gui/mappaint/Environment.java	(revision 6096)
+++ src/org/openstreetmap/josm/gui/mappaint/Environment.java	(working copy)
@@ -106,7 +106,7 @@
     }
 
     public boolean hasParentRelation() {
-        return parent != null && parent instanceof Relation;
+        return parent instanceof Relation;
     }
 
     /**
@@ -122,7 +122,7 @@
         if (getContext().equals(Context.PRIMITIVE))
             return null;
 
-        if (parent != null && parent instanceof Relation)
+        if (parent instanceof Relation)
             return ((Relation) parent).getMember(index).getRole();
         if (child != null && osm instanceof Relation)
             return ((Relation) osm).getMember(index).getRole();
Index: src/org/openstreetmap/josm/gui/mappaint/MapImage.java
===================================================================
--- src/org/openstreetmap/josm/gui/mappaint/MapImage.java	(revision 6096)
+++ src/org/openstreetmap/josm/gui/mappaint/MapImage.java	(working copy)
@@ -129,7 +129,7 @@
 
         @Override
         public boolean equals(Object obj) {
-            if (obj == null || !(obj instanceof BoxProvider))
+            if (!(obj instanceof BoxProvider))
                 return false;
             if (obj instanceof MapImageBoxProvider) {
                 MapImageBoxProvider other = (MapImageBoxProvider) obj;
