Index: trunk/src/org/openstreetmap/josm/data/osm/visitor/paint/MapPainter.java
===================================================================
--- trunk/src/org/openstreetmap/josm/data/osm/visitor/paint/MapPainter.java	(revision 3840)
+++ trunk/src/org/openstreetmap/josm/data/osm/visitor/paint/MapPainter.java	(revision 3841)
@@ -68,7 +68,7 @@
     private static final double sinPHI = Math.sin(PHI);
 
-    public MapPainter(MapPaintSettings settings, Graphics2D g, 
-        boolean inactive, NavigatableComponent nc, boolean virtual, 
-        double circum, boolean leftHandTraffic)
+    public MapPainter(MapPaintSettings settings, Graphics2D g,
+            boolean inactive, NavigatableComponent nc, boolean virtual,
+            double circum, boolean leftHandTraffic)
     {
         this.g = g;
@@ -162,5 +162,5 @@
         g.setColor(inactive ? inactiveColor : color);
         if (useStrokes) {
-            if (dashed == null || dashed.length > 0) {
+            if (dashed != null && dashed.length > 0) {
                 g.setStroke(new BasicStroke(width,BasicStroke.CAP_BUTT,BasicStroke.JOIN_ROUND,0, dashed,0));
             } else {
@@ -173,5 +173,5 @@
         if(!inactive && useStrokes && dashedColor != null) {
             g.setColor(dashedColor);
-            if (dashed == null || dashed.length > 0) {
+            if (dashed != null && dashed.length > 0) {
                 float[] dashedOffset = new float[dashed.length];
                 System.arraycopy(dashed, 1, dashedOffset, 0, dashed.length - 1);
@@ -285,5 +285,5 @@
             g.fillPolygon(polygon);
         }
-            
+
 
         if (name != null) {
@@ -384,12 +384,15 @@
 
                     if("from".equals(m.getRole())) {
-                        if(fromWay == null)
+                        if(fromWay == null) {
                             fromWay = w;
+                        }
                     } else if("to".equals(m.getRole())) {
-                        if(toWay == null)
+                        if(toWay == null) {
                             toWay = w;
+                        }
                     } else if("via".equals(m.getRole())) {
-                        if(via == null)
+                        if(via == null) {
                             via = w;
+                        }
                     }
                 }
@@ -397,6 +400,7 @@
                 {
                     Node n = m.getNode();
-                    if("via".equals(m.getRole()) && via == null)
+                    if("via".equals(m.getRole()) && via == null) {
                         via = n;
+                    }
                 }
             }
@@ -410,7 +414,6 @@
         {
             viaNode = (Node) via;
-            if(!fromWay.isFirstLastNode(viaNode)) {
+            if(!fromWay.isFirstLastNode(viaNode))
                 return;
-            }
         }
         else
@@ -441,7 +444,6 @@
             } else if (!onewayvia && fromWay.isFirstLastNode(lastNode)) {
                 viaNode = lastNode;
-            } else {
+            } else
                 return;
-            }
         }
 
