Index: trunk/src/org/openstreetmap/josm/tools/AudioPlayer.java
===================================================================
--- trunk/src/org/openstreetmap/josm/tools/AudioPlayer.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/tools/AudioPlayer.java	(revision 8510)
@@ -29,7 +29,10 @@
 
     private enum State { INITIALIZING, NOTPLAYING, PLAYING, PAUSED, INTERRUPTED }
+
+    private enum Command { PLAY, PAUSE }
+
+    private enum Result { WAITING, OK, FAILED }
+
     private State state;
-    private enum Command { PLAY, PAUSE }
-    private enum Result { WAITING, OK, FAILED }
     private URL playingUrl;
     private double leadIn; // seconds
@@ -62,8 +65,10 @@
             send();
         }
+
         protected void pause() throws Exception {
             command = Command.PAUSE;
             send();
         }
+
         private void send() throws Exception {
             result = Result.WAITING;
@@ -75,8 +80,10 @@
                 throw exception;
         }
+
         private void possiblyInterrupt() throws InterruptedException {
             if (interrupted() || result == Result.WAITING)
                 throw new InterruptedException();
         }
+
         protected void failed(Exception e) {
             exception = e;
@@ -84,17 +91,22 @@
             state = State.NOTPLAYING;
         }
+
         protected void ok(State newState) {
             result = Result.OK;
             state = newState;
         }
+
         protected double offset() {
             return offset;
         }
+
         protected double speed() {
             return speed;
         }
+
         protected URL url() {
             return url;
         }
+
         protected Command command() {
             return command;
@@ -202,8 +214,8 @@
      */
     public static void reset() {
-        if(audioPlayer != null) {
+        if (audioPlayer != null) {
             try {
                 pause();
-            } catch(Exception e) {
+            } catch (Exception e) {
                 Main.warn(e);
             }
@@ -235,5 +247,5 @@
         SourceDataLine audioOutputLine = null;
         AudioFormat audioFormat = null;
-        byte[] abData = new byte[(int)chunk];
+        byte[] abData = new byte[(int) chunk];
 
         for (;;) {
@@ -250,5 +262,5 @@
                     case PLAYING:
                         command.possiblyInterrupt();
-                        for(;;) {
+                        for (;;) {
                             int nBytesRead = 0;
                             nBytesRead = audioInputStream.read(abData, 0, abData.length);
@@ -301,9 +313,6 @@
                                 }
                                 if (calibratedOffset > 0.0) {
-                                    long bytesToSkip = (long)(
-                                            calibratedOffset /* seconds (double) */ * bytesPerSecond);
-                                    /* skip doesn't seem to want to skip big chunks, so
-                                     * reduce it to smaller ones
-                                     */
+                                    long bytesToSkip = (long) (calibratedOffset /* seconds (double) */ * bytesPerSecond);
+                                    // skip doesn't seem to want to skip big chunks, so reduce it to smaller ones
                                     // audioInputStream.skip(bytesToSkip);
                                     while (bytesToSkip > chunk) {
@@ -361,5 +370,5 @@
     public static void audioMalfunction(Exception ex) {
         String msg = ex.getMessage();
-        if(msg == null)
+        if (msg == null)
             msg = tr("unspecified reason");
         else
Index: trunk/src/org/openstreetmap/josm/tools/Base64.java
===================================================================
--- trunk/src/org/openstreetmap/josm/tools/Base64.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/tools/Base64.java	(revision 8510)
@@ -45,12 +45,10 @@
             int l = Math.min(3, s.length()-i*3);
             String buf = s.substring(i*3, i*3+l);
-            out.append(enc.charAt(buf.charAt(0)>>2));
+            out.append(enc.charAt(buf.charAt(0) >> 2));
             out.append(enc.charAt(
                                   (buf.charAt(0) & 0x03) << 4 |
-                                  (l==1?
-                                   0:
-                                   (buf.charAt(1) & 0xf0) >> 4)));
-            out.append(l>1?enc.charAt((buf.charAt(1) & 0x0f) << 2 | (l==2?0:(buf.charAt(2) & 0xc0) >> 6)):'=');
-            out.append(l>2?enc.charAt(buf.charAt(2) & 0x3f):'=');
+                                  (l == 1 ? 0 : (buf.charAt(1) & 0xf0) >> 4)));
+            out.append(l > 1 ? enc.charAt((buf.charAt(1) & 0x0f) << 2 | (l == 2 ? 0 : (buf.charAt(2) & 0xc0) >> 6)) : '=');
+            out.append(l > 2 ? enc.charAt(buf.charAt(2) & 0x3f) : '=');
         }
         return out.toString();
@@ -82,15 +80,13 @@
             int l = Math.min(3, s.limit()-i*3);
             int byte0 = s.get() & 0xff;
-            int byte1 = l>1? s.get() & 0xff : 0;
-            int byte2 = l>2? s.get() & 0xff : 0;
+            int byte1 = l > 1 ? s.get() & 0xff : 0;
+            int byte2 = l > 2 ? s.get() & 0xff : 0;
 
-            out.append(enc.charAt(byte0>>2));
+            out.append(enc.charAt(byte0 >> 2));
             out.append(enc.charAt(
                                   (byte0 & 0x03) << 4 |
-                                  (l==1?
-                                   0:
-                                   (byte1 & 0xf0) >> 4)));
-            out.append(l>1?enc.charAt((byte1 & 0x0f) << 2 | (l==2?0:(byte2 & 0xc0) >> 6)):'=');
-            out.append(l>2?enc.charAt(byte2 & 0x3f):'=');
+                                  (l == 1 ? 0 : (byte1 & 0xf0) >> 4)));
+            out.append(l > 1 ? enc.charAt((byte1 & 0x0f) << 2 | (l == 2 ? 0 : (byte2 & 0xc0) >> 6)) : '=');
+            out.append(l > 2 ? enc.charAt(byte2 & 0x3f) : '=');
         }
         return out.toString();
Index: trunk/src/org/openstreetmap/josm/tools/BugReportExceptionHandler.java
===================================================================
--- trunk/src/org/openstreetmap/josm/tools/BugReportExceptionHandler.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/tools/BugReportExceptionHandler.java	(revision 8510)
@@ -199,11 +199,11 @@
 
             String text = ShowStatusReportAction.getReportHeader() + stack.getBuffer().toString();
-            String urltext = text.replaceAll("\r","");
+            String urltext = text.replaceAll("\r", "");
             if (urltext.length() > maxlen) {
-                urltext = urltext.substring(0,maxlen);
+                urltext = urltext.substring(0, maxlen);
                 int idx = urltext.lastIndexOf('\n');
                 // cut whole line when not loosing too much
                 if (maxlen-idx < 200) {
-                    urltext = urltext.substring(0,idx+1);
+                    urltext = urltext.substring(0, idx+1);
                 }
                 urltext += "...<snip>...\n";
@@ -215,10 +215,10 @@
                             "make sure you have updated to the latest version of JOSM here:")),
                             GBC.eol().fill(GridBagConstraints.HORIZONTAL));
-            p.add(new UrlLabel(Main.getJOSMWebsite(),2), GBC.eop().insets(8,0,0,0));
+            p.add(new UrlLabel(Main.getJOSMWebsite(), 2), GBC.eop().insets(8, 0, 0, 0));
             p.add(new JMultilineLabel(
                     tr("You should also update your plugins. If neither of those help please " +
                             "file a bug report in our bugtracker using this link:")),
                             GBC.eol().fill(GridBagConstraints.HORIZONTAL));
-            p.add(getBugReportUrlLabel(urltext), GBC.eop().insets(8,0,0,0));
+            p.add(getBugReportUrlLabel(urltext), GBC.eop().insets(8, 0, 0, 0));
             p.add(new JMultilineLabel(
                     tr("There the error information provided below should already be " +
@@ -229,5 +229,5 @@
                     tr("Alternatively, if that does not work you can manually fill in the information " +
                             "below at this URL:")), GBC.eol().fill(GridBagConstraints.HORIZONTAL));
-            p.add(new UrlLabel(Main.getJOSMWebsite()+"/newticket",2), GBC.eop().insets(8,0,0,0));
+            p.add(new UrlLabel(Main.getJOSMWebsite()+"/newticket", 2), GBC.eop().insets(8, 0, 0, 0));
 
             // Wiki formatting for manual copy-paste
@@ -246,5 +246,5 @@
             for (Component c: p.getComponents()) {
                 if (c instanceof JMultilineLabel) {
-                    ((JMultilineLabel)c).setMaxWidth(400);
+                    ((JMultilineLabel) c).setMaxWidth(400);
                 }
             }
Index: trunk/src/org/openstreetmap/josm/tools/ColorHelper.java
===================================================================
--- trunk/src/org/openstreetmap/josm/tools/ColorHelper.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/tools/ColorHelper.java	(revision 8510)
@@ -30,8 +30,8 @@
         try {
             return new Color(
-                    Integer.parseInt(html.substring(0,2),16),
-                    Integer.parseInt(html.substring(2,4),16),
-                    Integer.parseInt(html.substring(4,6),16),
-                    html.length() == 8 ? Integer.parseInt(html.substring(6,8),16) : 255);
+                    Integer.parseInt(html.substring(0, 2), 16),
+                    Integer.parseInt(html.substring(2, 4), 16),
+                    Integer.parseInt(html.substring(4, 6), 16),
+                    html.length() == 8 ? Integer.parseInt(html.substring(6, 8), 16) : 255);
         } catch (NumberFormatException e) {
             return null;
Index: trunk/src/org/openstreetmap/josm/tools/ColorScale.java
===================================================================
--- trunk/src/org/openstreetmap/josm/tools/ColorScale.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/tools/ColorScale.java	(revision 8510)
@@ -88,10 +88,10 @@
 
     public final Color getColor(double value) {
-        if (value<min) return belowMinColor;
-        if (value>max) return aboveMaxColor;
+        if (value < min) return belowMinColor;
+        if (value > max) return aboveMaxColor;
         if (Double.isNaN(value)) return noDataColor;
         final int n = colors.length;
         int idx = (int) ((value-min)*colors.length / (max-min));
-        if (idx<colors.length) {
+        if (idx < colors.length) {
             return colors[idx];
         } else {
@@ -101,5 +101,5 @@
 
     public final Color getColor(Number value) {
-        return (value==null)? noDataColor : getColor(value.doubleValue());
+        return (value == null) ? noDataColor : getColor(value.doubleValue());
     }
 
@@ -132,5 +132,5 @@
         int n = colors.length;
         Color tmp;
-        for (int i=0; i<n/2; i++) {
+        for (int i = 0; i < n/2; i++) {
             tmp = colors[i];
             colors[i] = colors[n-1-i];
@@ -144,9 +144,9 @@
 
     public void drawColorBar(Graphics2D g, int x, int y, int w, int h, double valueScale) {
-        int n=colors.length;
+        int n = colors.length;
 
-        for (int i=0; i<n; i++) {
+        for (int i = 0; i < n; i++) {
             g.setColor(colors[i]);
-            if (w<h) {
+            if (w < h) {
                 g.fillRect(x, y+i*h/n, w, h/n+1);
             } else {
@@ -158,14 +158,15 @@
         FontMetrics fm = g.getFontMetrics();
         fh = fm.getHeight()/2;
-        fw = fm.stringWidth(String.valueOf(Math.max((int)Math.abs(max*valueScale), (int)Math.abs(min*valueScale)))) + fm.stringWidth("0.123");
+        fw = fm.stringWidth(String.valueOf(Math.max((int) Math.abs(max*valueScale),
+                (int) Math.abs(min*valueScale)))) + fm.stringWidth("0.123");
         g.setColor(noDataColor);
         if (title != null) {
             g.drawString(title, x-fw-3, y-fh*3/2);
         }
-        for (int i=0; i<=intervalCount; i++) {
-            g.setColor(colors[(int)(1.0*i*n/intervalCount-1e-10)]);
+        for (int i = 0; i <= intervalCount; i++) {
+            g.setColor(colors[(int) (1.0*i*n/intervalCount-1e-10)]);
             final double val =  min+i*(max-min)/intervalCount;
             final String txt = String.format("%.3f", val*valueScale);
-            if (w<h) {
+            if (w < h) {
                 g.drawString(txt, x-fw-3, y+i*h/intervalCount+fh/2);
             } else {
Index: trunk/src/org/openstreetmap/josm/tools/CompositeList.java
===================================================================
--- trunk/src/org/openstreetmap/josm/tools/CompositeList.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/tools/CompositeList.java	(revision 8510)
@@ -13,5 +13,5 @@
  */
 public class CompositeList<T> extends AbstractList<T> {
-    private List<? extends T> a,b;
+    private List<? extends T> a, b;
 
     /**
Index: trunk/src/org/openstreetmap/josm/tools/Diff.java
===================================================================
--- trunk/src/org/openstreetmap/josm/tools/Diff.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/tools/Diff.java	(revision 8510)
@@ -96,6 +96,6 @@
      */
     public Diff(Object[] a, Object[] b) {
-        Map<Object,Integer> h = new HashMap<>(a.length + b.length);
-        filevec = new FileData[] {new FileData(a,h), new FileData(b,h)};
+        Map<Object, Integer> h = new HashMap<>(a.length + b.length);
+        filevec = new FileData[] {new FileData(a, h), new FileData(b, h)};
     }
 
@@ -396,6 +396,6 @@
          */
         public Change build_script(
-                boolean[] changed0,int len0,
-                boolean[] changed1,int len1
+                boolean[] changed0, int len0,
+                boolean[] changed1, int len1
         );
     }
@@ -407,6 +407,6 @@
         @Override
         public  Change build_script(
-                final boolean[] changed0,int len0,
-                final boolean[] changed1,int len1) {
+                final boolean[] changed0, int len0,
+                final boolean[] changed1, int len1) {
             Change script = null;
             int i0 = 0, i1 = 0;
@@ -440,6 +440,6 @@
         @Override
         public Change build_script(
-                final boolean[] changed0,int len0,
-                final boolean[] changed1,int len1) {
+                final boolean[] changed0, int len0,
+                final boolean[] changed1, int len1) {
             Change script = null;
             int i0 = len0, i1 = len1;
@@ -570,5 +570,5 @@
         @Override
         public String toString() {
-            String s = String.format("%d -%d +%d %d",line0,deleted,inserted,line1);
+            String s = String.format("%d -%d +%d %d", line0, deleted, inserted, line1);
             return (link != null) ? s = s + '\n' + link : s;
         }
@@ -577,5 +577,4 @@
     /** Data on one input file being compared.
      */
-
     class FileData {
 
@@ -801,5 +800,5 @@
         }
 
-        FileData(Object[] data, Map<Object,Integer> h) {
+        FileData(Object[] data, Map<Object, Integer> h) {
             this(data.length);
             // FIXME: diff 2.7 removes common prefix and common suffix
@@ -807,5 +806,5 @@
                 Integer ir = h.get(data[i]);
                 if (ir == null) {
-                    h.put(data[i],equivs[i] = equivMax++);
+                    h.put(data[i], equivs[i] = equivMax++);
                 } else {
                     equivs[i] = ir.intValue();
Index: trunk/src/org/openstreetmap/josm/tools/ExceptionUtil.java
===================================================================
--- trunk/src/org/openstreetmap/josm/tools/ExceptionUtil.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/tools/ExceptionUtil.java	(revision 8510)
@@ -56,5 +56,4 @@
     }
 
-
     public static String explainMissingOAuthAccessTokenException(MissingOAuthAccessTokenException e) {
         Main.error(e);
@@ -129,5 +128,5 @@
             OsmPrimitive firstRefs = conflict.b.iterator().next();
             String objId = Long.toString(conflict.a.getId());
-            Collection<Long> refIds= Utils.transform(conflict.b, new Utils.Function<OsmPrimitive, Long>() {
+            Collection<Long> refIds = Utils.transform(conflict.b, new Utils.Function<OsmPrimitive, Long>() {
 
                 @Override
@@ -653,5 +652,5 @@
 
         if (e instanceof ChangesetClosedException)
-            return explainChangesetClosedException((ChangesetClosedException)e);
+            return explainChangesetClosedException((ChangesetClosedException) e);
 
         if (e instanceof OsmApiException) {
Index: trunk/src/org/openstreetmap/josm/tools/GBC.java
===================================================================
--- trunk/src/org/openstreetmap/josm/tools/GBC.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/tools/GBC.java	(revision 8510)
@@ -48,5 +48,5 @@
      */
     public static GBC eop() {
-        return eol().insets(0,0,0,10);
+        return eol().insets(0, 0, 0, 10);
     }
 
@@ -119,5 +119,5 @@
         short maxx = x > 0 ? Short.MAX_VALUE : 0;
         short maxy = y > 0 ? Short.MAX_VALUE : 0;
-        return new Box.Filler(new Dimension(x,y), new Dimension(x,y), new Dimension(maxx,maxy));
+        return new Box.Filler(new Dimension(x, y), new Dimension(x, y), new Dimension(maxx, maxy));
     }
 
Index: trunk/src/org/openstreetmap/josm/tools/GeoPropertyIndex.java
===================================================================
--- trunk/src/org/openstreetmap/josm/tools/GeoPropertyIndex.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/tools/GeoPropertyIndex.java	(revision 8510)
@@ -73,6 +73,6 @@
     public static int index(LatLon ll, int level) {
         long noParts = 1 << level;
-        long x = ((long)((ll.lon() + 180.0) * noParts / 360.0)) & 1;
-        long y = ((long)((ll.lat() + 90.0) * noParts / 180.0)) & 1;
+        long x = ((long) ((ll.lon() + 180.0) * noParts / 360.0)) & 1;
+        long y = ((long) ((ll.lat() + 90.0) * noParts / 180.0)) & 1;
         return (int) (2 * x + y);
     }
@@ -149,5 +149,5 @@
                 if (DEBUG) System.err.println(" - new with idx "+idx);
                 LatLon center = bbox.getCenter();
-                BBox b = new BBox(lon1,lat1, center.lon(), center.lat());
+                BBox b = new BBox(lon1, lat1, center.lon(), center.lat());
                 children[idx] = new GPLevel<>(level + 1, b, this, owner);
             }
Index: trunk/src/org/openstreetmap/josm/tools/Geometry.java
===================================================================
--- trunk/src/org/openstreetmap/josm/tools/Geometry.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/tools/Geometry.java	(revision 8510)
@@ -93,7 +93,7 @@
 
                     //iterate over secondary segment
-                    int seg2Start = seg1Way != seg2Way ? 0: seg1Pos + 2;//skip the adjacent segment
-
-                    for (int seg2Pos = seg2Start; seg2Pos + 1< way2Nodes.size(); seg2Pos++) {
+                    int seg2Start = seg1Way != seg2Way ? 0 : seg1Pos + 2; //skip the adjacent segment
+
+                    for (int seg2Pos = seg2Start; seg2Pos + 1 < way2Nodes.size(); seg2Pos++) {
 
                         //need to get them again every time, because other segments may be changed
@@ -298,7 +298,7 @@
         if (Math.abs(det) > 1e-12 * mag) {
             double u = uu/det, v = vv/det;
-            if (u>-1e-8 && u < 1+1e-8 && v>-1e-8 && v < 1+1e-8) {
-                if (u<0) u=0;
-                if (u>1) u=1.0;
+            if (u > -1e-8 && u < 1+1e-8 && v > -1e-8 && v < 1+1e-8) {
+                if (u < 0) u = 0;
+                if (u > 1) u = 1.0;
                 return new EastNorth(x1+a1*u, y1+a2*u);
             } else {
@@ -654,5 +654,5 @@
     }
 
-    protected static double calcY(Node p1){
+    protected static double calcY(Node p1) {
         double lat1, lon1, lat2, lon2;
         double dlon, dlat;
@@ -813,5 +813,5 @@
     public static EastNorth getCenter(List<Node> nodes) {
         int nc = nodes.size();
-        if(nc < 3) return null;
+        if (nc < 3) return null;
         /**
          * Equation of each bisector ax + by + c = 0
@@ -821,5 +821,5 @@
         double[] c = new double[nc];
         // Compute equation of bisector
-        for(int i = 0; i < nc; i++) {
+        for (int i = 0; i < nc; i++) {
             EastNorth pt1 = nodes.get(i).getEastNorth();
             EastNorth pt2 = nodes.get((i+1) % nc).getEastNorth();
@@ -827,5 +827,5 @@
             b[i] = pt1.north() - pt2.north();
             double d = Math.sqrt(a[i]*a[i] + b[i]*b[i]);
-            if(d == 0) return null;
+            if (d == 0) return null;
             a[i] /= d;
             b[i] /= d;
@@ -838,5 +838,5 @@
         // At.Y = [bi]
         double b1 = 0, b2 = 0;
-        for(int i = 0; i < nc; i++) {
+        for (int i = 0; i < nc; i++) {
             a11 += a[i]*a[i];
             a12 += a[i]*b[i];
@@ -847,5 +847,5 @@
         // (At.A)^-1 = [invij]
         double det = a11*a22 - a12*a12;
-        if(Math.abs(det) < 1e-5) return null;
+        if (Math.abs(det) < 1e-5) return null;
         double inv11 = a22/det;
         double inv12 = -a12/det;
Index: trunk/src/org/openstreetmap/josm/tools/I18n.java
===================================================================
--- trunk/src/org/openstreetmap/josm/tools/I18n.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/tools/I18n.java	(revision 8510)
@@ -219,5 +219,5 @@
         if (text == null)
             return null;
-        return MessageFormat.format(gettext(text, context), (Object)null);
+        return MessageFormat.format(gettext(text, context), (Object) null);
     }
 
@@ -227,5 +227,5 @@
         if (text == null)
             return null;
-        return MessageFormat.format(gettext_lazy(text, context), (Object)null);
+        return MessageFormat.format(gettext_lazy(text, context), (Object) null);
     }
 
@@ -304,17 +304,17 @@
     private static String gettext(String text, String ctx, boolean lazy) {
         int i;
-        if(ctx == null && text.startsWith("_:") && (i = text.indexOf('\n')) >= 0) {
-            ctx = text.substring(2,i-1);
+        if (ctx == null && text.startsWith("_:") && (i = text.indexOf('\n')) >= 0) {
+            ctx = text.substring(2, i-1);
             text = text.substring(i+1);
         }
-        if(strings != null) {
+        if (strings != null) {
             String trans = strings.get(ctx == null ? text : "_:"+ctx+"\n"+text);
-            if(trans != null)
+            if (trans != null)
                 return trans;
         }
-        if(pstrings != null) {
+        if (pstrings != null) {
             i = pluralEval(1);
             String[] trans = pstrings.get(ctx == null ? text : "_:"+ctx+"\n"+text);
-            if(trans != null && trans.length > i)
+            if (trans != null && trans.length > i)
                 return trans[i];
         }
@@ -333,12 +333,12 @@
     private static String gettextn(String text, String plural, String ctx, long num) {
         int i;
-        if(ctx == null && text.startsWith("_:") && (i = text.indexOf('\n')) >= 0) {
-            ctx = text.substring(2,i-1);
+        if (ctx == null && text.startsWith("_:") && (i = text.indexOf('\n')) >= 0) {
+            ctx = text.substring(2, i-1);
             text = text.substring(i+1);
         }
-        if(pstrings != null) {
+        if (pstrings != null) {
             i = pluralEval(num);
             String[] trans = pstrings.get(ctx == null ? text : "_:"+ctx+"\n"+text);
-            if(trans != null && trans.length > i)
+            if (trans != null && trans.length > i)
                 return trans[i];
         }
@@ -353,5 +353,5 @@
 
     private static URL getTranslationFile(String lang) {
-        return Main.class.getResource("/data/"+lang.replace("@","-")+".lang");
+        return Main.class.getResource("/data/"+lang.replace("@", "-")+".lang");
     }
 
@@ -362,7 +362,7 @@
     public static Locale[] getAvailableTranslations() {
         Collection<Locale> v = new ArrayList<>(languages.size());
-        if(getTranslationFile("en") != null) {
+        if (getTranslationFile("en") != null) {
             for (String loc : languages.keySet()) {
-                if(getTranslationFile(loc) != null) {
+                if (getTranslationFile(loc) != null) {
                     v.add(LanguageInfo.getLocale(loc));
                 }
@@ -444,5 +444,5 @@
 
         /* try initial language settings, may be changed later again */
-        if(!load(LanguageInfo.getJOSMLocaleCode())) {
+        if (!load(LanguageInfo.getJOSMLocaleCode())) {
             Locale.setDefault(Locale.ENGLISH);
         }
@@ -471,5 +471,5 @@
                 ) {
                     found = false;
-                    while(!found && (e = jarTrans.getNextEntry()) != null) {
+                    while (!found && (e = jarTrans.getNextEntry()) != null) {
                         String name = e.getName();
                         if (name.equals(langfile))
@@ -553,44 +553,44 @@
             boolean multimode = false;
             byte[] str = new byte[4096];
-            for(;;) {
-                if(multimode) {
+            for (;;) {
+                if (multimode) {
                     int ennum = ens.read();
                     int trnum = trs.read();
-                    if(trnum == 0xFE) /* marks identical string, handle equally to non-translated */
+                    if (trnum == 0xFE) /* marks identical string, handle equally to non-translated */
                         trnum = 0;
-                    if((ennum == -1 && trnum != -1) || (ennum != -1 && trnum == -1)) /* files do not match */
+                    if ((ennum == -1 && trnum != -1) || (ennum != -1 && trnum == -1)) /* files do not match */
                         return false;
-                    if(ennum == -1) {
+                    if (ennum == -1) {
                         break;
                     }
                     String[] enstrings = new String[ennum];
                     String[] trstrings = new String[trnum];
-                    for(int i = 0; i < ennum; ++i) {
+                    for (int i = 0; i < ennum; ++i) {
                         int val = ens.read(enlen);
-                        if(val != 2) /* file corrupt */
+                        if (val != 2) /* file corrupt */
                             return false;
-                        val = (enlen[0] < 0 ? 256+enlen[0]:enlen[0])*256+(enlen[1] < 0 ? 256+enlen[1]:enlen[1]);
-                        if(val > str.length) {
+                        val = (enlen[0] < 0 ? 256+enlen[0] : enlen[0])*256+(enlen[1] < 0 ? 256+enlen[1] : enlen[1]);
+                        if (val > str.length) {
                             str = new byte[val];
                         }
                         int rval = ens.read(str, 0, val);
-                        if(rval != val) /* file corrupt */
+                        if (rval != val) /* file corrupt */
                             return false;
                         enstrings[i] = new String(str, 0, val, StandardCharsets.UTF_8);
                     }
-                    for(int i = 0; i < trnum; ++i) {
+                    for (int i = 0; i < trnum; ++i) {
                         int val = trs.read(trlen);
-                        if(val != 2) /* file corrupt */
+                        if (val != 2) /* file corrupt */
                             return false;
-                        val = (trlen[0] < 0 ? 256+trlen[0]:trlen[0])*256+(trlen[1] < 0 ? 256+trlen[1]:trlen[1]);
-                        if(val > str.length) {
+                        val = (trlen[0] < 0 ? 256+trlen[0] : trlen[0])*256+(trlen[1] < 0 ? 256+trlen[1] : trlen[1]);
+                        if (val > str.length) {
                             str = new byte[val];
                         }
                         int rval = trs.read(str, 0, val);
-                        if(rval != val) /* file corrupt */
+                        if (rval != val) /* file corrupt */
                             return false;
                         trstrings[i] = new String(str, 0, val, StandardCharsets.UTF_8);
                     }
-                    if(trnum > 0 && !p.containsKey(enstrings[0])) {
+                    if (trnum > 0 && !p.containsKey(enstrings[0])) {
                         p.put(enstrings[0], trstrings);
                     }
@@ -598,18 +598,18 @@
                     int enval = ens.read(enlen);
                     int trval = trs.read(trlen);
-                    if(enval != trval) /* files do not match */
+                    if (enval != trval) /* files do not match */
                         return false;
-                    if(enval == -1) {
+                    if (enval == -1) {
                         break;
                     }
-                    if(enval != 2) /* files corrupt */
+                    if (enval != 2) /* files corrupt */
                         return false;
-                    enval = (enlen[0] < 0 ? 256+enlen[0]:enlen[0])*256+(enlen[1] < 0 ? 256+enlen[1]:enlen[1]);
-                    trval = (trlen[0] < 0 ? 256+trlen[0]:trlen[0])*256+(trlen[1] < 0 ? 256+trlen[1]:trlen[1]);
-                    if(trval == 0xFFFE) /* marks identical string, handle equally to non-translated */
+                    enval = (enlen[0] < 0 ? 256+enlen[0] : enlen[0])*256+(enlen[1] < 0 ? 256+enlen[1] : enlen[1]);
+                    trval = (trlen[0] < 0 ? 256+trlen[0] : trlen[0])*256+(trlen[1] < 0 ? 256+trlen[1] : trlen[1]);
+                    if (trval == 0xFFFE) /* marks identical string, handle equally to non-translated */
                         trval = 0;
-                    if(enval == 0xFFFF) {
+                    if (enval == 0xFFFF) {
                         multimode = true;
-                        if(trval != 0xFFFF) /* files do not match */
+                        if (trval != 0xFFFF) /* files do not match */
                             return false;
                     } else {
@@ -621,13 +621,13 @@
                         }
                         int val = ens.read(str, 0, enval);
-                        if(val != enval) /* file corrupt */
+                        if (val != enval) /* file corrupt */
                             return false;
                         String enstr = new String(str, 0, enval, StandardCharsets.UTF_8);
                         if (trval != 0) {
                             val = trs.read(str, 0, trval);
-                            if(val != trval) /* file corrupt */
+                            if (val != trval) /* file corrupt */
                                 return false;
                             String trstr = new String(str, 0, trval, StandardCharsets.UTF_8);
-                            if(!s.containsKey(enstr))
+                            if (!s.containsKey(enstr))
                                 s.put(enstr, trstr);
                         }
@@ -655,5 +655,5 @@
      * @param localeName the locale name. Ignored if null.
      */
-    public static void set(String localeName){
+    public static void set(String localeName) {
         if (localeName != null) {
             Locale l = LanguageInfo.getLocale(localeName);
Index: trunk/src/org/openstreetmap/josm/tools/ImageOverlay.java
===================================================================
--- trunk/src/org/openstreetmap/josm/tools/ImageOverlay.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/tools/ImageOverlay.java	(revision 8510)
@@ -78,5 +78,5 @@
         }
         ImageIcon overlay;
-        if(width != -1 || height != -1) {
+        if (width != -1 || height != -1) {
             image = new ImageProvider(image).resetMaxSize(new Dimension(width, height));
         }
@@ -84,12 +84,12 @@
         int x, y;
         if (width == -1 && offsetLeft < 0) {
-            x = (int)(w*offsetRight) - overlay.getIconWidth();
+            x = (int) (w*offsetRight) - overlay.getIconWidth();
         } else {
-            x = (int)(w*offsetLeft);
+            x = (int) (w*offsetLeft);
         }
         if (height == -1 && offsetTop < 0) {
-            y = (int)(h*offsetBottom) - overlay.getIconHeight();
+            y = (int) (h*offsetBottom) - overlay.getIconHeight();
         } else {
-            y = (int)(h*offsetTop);
+            y = (int) (h*offsetTop);
         }
         overlay.paintIcon(null, ground.getGraphics(), x, y);
Index: trunk/src/org/openstreetmap/josm/tools/ImageProvider.java
===================================================================
--- trunk/src/org/openstreetmap/josm/tools/ImageProvider.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/tools/ImageProvider.java	(revision 8510)
@@ -742,5 +742,5 @@
                     if (dirs != null && !dirs.isEmpty()) {
                         cacheName = "id:" + id + ":" + fullName;
-                        if(archive != null) {
+                        if (archive != null) {
                             cacheName += ":" + archive.getName();
                         }
@@ -895,5 +895,5 @@
             } else {
                 final String fn_md5 = Utils.md5Hex(fn);
-                url = b + fn_md5.substring(0,1) + "/" + fn_md5.substring(0,2) + "/" + fn;
+                url = b + fn_md5.substring(0, 1) + "/" + fn_md5.substring(0, 2) + "/" + fn;
             }
             result = getIfAvailableHttp(url, type);
@@ -924,5 +924,5 @@
             ZipEntry entry = zipFile.getEntry(entryName);
             if (entry != null) {
-                int size = (int)entry.getSize();
+                int size = (int) entry.getSize();
                 int offs = 0;
                 byte[] buf = new byte[size];
@@ -937,5 +937,5 @@
                         return svg == null ? null : new ImageResource(svg);
                     case OTHER:
-                        while(size > 0) {
+                        while (size > 0) {
                             int l = is.read(buf, offs, size);
                             offs += l;
@@ -1560,10 +1560,10 @@
                             Node root = metadata.getAsTree(f);
                             if (root instanceof Element) {
-                                NodeList list = ((Element)root).getElementsByTagName("TransparentColor");
+                                NodeList list = ((Element) root).getElementsByTagName("TransparentColor");
                                 if (list.getLength() > 0) {
                                     Node item = list.item(0);
                                     if (item instanceof Element) {
                                         // Handle different color spaces (tested with RGB and grayscale)
-                                        String value = ((Element)item).getAttribute("value");
+                                        String value = ((Element) item).getAttribute("value");
                                         if (!value.isEmpty()) {
                                             String[] s = value.split(" ");
@@ -1575,5 +1575,5 @@
                                                 int g = model.getGreen(pixel);
                                                 int b = model.getBlue(pixel);
-                                                return new Color(r,g,b);
+                                                return new Color(r, g, b);
                                             } else {
                                                 Main.warn("Unable to translate TransparentColor '"+value+"' with color model "+model);
@@ -1598,5 +1598,5 @@
         int[] rgb = new int[3];
         try {
-            for (int i = 0; i<3; i++) {
+            for (int i = 0; i < 3; i++) {
                 rgb[i] = Integer.parseInt(s[i]);
             }
Index: trunk/src/org/openstreetmap/josm/tools/InputMapUtils.java
===================================================================
--- trunk/src/org/openstreetmap/josm/tools/InputMapUtils.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/tools/InputMapUtils.java	(revision 8510)
@@ -34,10 +34,10 @@
      */
     public static void unassignCtrlShiftUpDown(JComponent cmp, int condition) {
-        InputMap inputMap=SwingUtilities.getUIInputMap(cmp, condition);
-        inputMap.remove(KeyStroke.getKeyStroke(KeyEvent.VK_UP,InputEvent.CTRL_MASK|InputEvent.SHIFT_MASK));
-        inputMap.remove(KeyStroke.getKeyStroke(KeyEvent.VK_DOWN,InputEvent.CTRL_MASK|InputEvent.SHIFT_MASK));
-        inputMap.remove(KeyStroke.getKeyStroke(KeyEvent.VK_UP,InputEvent.ALT_MASK|InputEvent.SHIFT_MASK));
-        inputMap.remove(KeyStroke.getKeyStroke(KeyEvent.VK_DOWN,InputEvent.ALT_MASK|InputEvent.SHIFT_MASK));
-        SwingUtilities.replaceUIInputMap(cmp,JComponent.WHEN_ANCESTOR_OF_FOCUSED_COMPONENT,inputMap);
+        InputMap inputMap = SwingUtilities.getUIInputMap(cmp, condition);
+        inputMap.remove(KeyStroke.getKeyStroke(KeyEvent.VK_UP, InputEvent.CTRL_MASK | InputEvent.SHIFT_MASK));
+        inputMap.remove(KeyStroke.getKeyStroke(KeyEvent.VK_DOWN, InputEvent.CTRL_MASK | InputEvent.SHIFT_MASK));
+        inputMap.remove(KeyStroke.getKeyStroke(KeyEvent.VK_UP, InputEvent.ALT_MASK | InputEvent.SHIFT_MASK));
+        inputMap.remove(KeyStroke.getKeyStroke(KeyEvent.VK_DOWN, InputEvent.ALT_MASK | InputEvent.SHIFT_MASK));
+        SwingUtilities.replaceUIInputMap(cmp, JComponent.WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, inputMap);
     }
 
Index: trunk/src/org/openstreetmap/josm/tools/LanguageInfo.java
===================================================================
--- trunk/src/org/openstreetmap/josm/tools/LanguageInfo.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/tools/LanguageInfo.java	(revision 8510)
@@ -38,11 +38,11 @@
      */
     public static String getWikiLanguagePrefix(LocaleType type) {
-        if(type == LocaleType.ENGLISH)
+        if (type == LocaleType.ENGLISH)
           return "";
 
         String code = getJOSMLocaleCode();
-        if(type == LocaleType.BASELANGUAGE) {
-            if(code.matches("[^_]+_[^_]+")) {
-                code = code.substring(0,2);
+        if (type == LocaleType.BASELANGUAGE) {
+            if (code.matches("[^_]+_[^_]+")) {
+                code = code.substring(0, 2);
                 if ("en".equals(code))
                     return null;
@@ -50,11 +50,11 @@
                 return null;
             }
-        } else if(type == LocaleType.DEFAULTNOTENGLISH && "en".equals(code)) {
+        } else if (type == LocaleType.DEFAULTNOTENGLISH && "en".equals(code)) {
             return null;
-        } else if(code.matches(".+@.+")) {
-          return code.substring(0,1).toUpperCase(Locale.ENGLISH) + code.substring(1,2)
-          + "-" + code.substring(3,4).toUpperCase(Locale.ENGLISH) + code.substring(4) + ":";
-        }
-        return code.substring(0,1).toUpperCase(Locale.ENGLISH) + code.substring(1) + ":";
+        } else if (code.matches(".+@.+")) {
+          return code.substring(0, 1).toUpperCase(Locale.ENGLISH) + code.substring(1, 2)
+          + "-" + code.substring(3, 4).toUpperCase(Locale.ENGLISH) + code.substring(4) + ":";
+        }
+        return code.substring(0, 1).toUpperCase(Locale.ENGLISH) + code.substring(1) + ":";
     }
 
@@ -95,5 +95,5 @@
     public static String getJOSMLocaleCode(Locale locale) {
         if (locale == null) return "en";
-        for(String full : getLanguageCodes(locale)) {
+        for (String full : getLanguageCodes(locale)) {
             if ("iw_IL".equals(full))
                 return "he";
@@ -230,17 +230,17 @@
     public static Collection<String> getLanguageCodes(Locale l) {
         Collection<String> list = new LinkedList<String>();
-        if(l == null)
+        if (l == null)
             l = Locale.getDefault();
         String lang = l.getLanguage();
         String c = l.getCountry();
         String v = l.getVariant();
-        if(c.isEmpty())
+        if (c.isEmpty())
             c = null;
-        if(v != null && !v.isEmpty()) {
-            if(c != null)
+        if (v != null && !v.isEmpty()) {
+            if (c != null)
                 list.add(lang+"_"+c+"@"+v);
             list.add(lang+"@"+v);
         }
-        if(c != null)
+        if (c != null)
             list.add(lang+"_"+c);
         list.add(lang);
Index: trunk/src/org/openstreetmap/josm/tools/MultiMap.java
===================================================================
--- trunk/src/org/openstreetmap/josm/tools/MultiMap.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/tools/MultiMap.java	(revision 8510)
@@ -225,5 +225,5 @@
         if (!(obj instanceof MultiMap))
             return false;
-        return map.equals(((MultiMap<?,?>) obj).map);
+        return map.equals(((MultiMap<?, ?>) obj).map);
     }
 
Index: trunk/src/org/openstreetmap/josm/tools/MultikeyActionsHandler.java
===================================================================
--- trunk/src/org/openstreetmap/josm/tools/MultikeyActionsHandler.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/tools/MultikeyActionsHandler.java	(revision 8510)
@@ -233,5 +233,5 @@
     public void removeAction(MultikeyShortcutAction action) {
         MyAction a = myActions.get(action);
-        if (a!=null) {
+        if (a != null) {
             Main.unregisterActionShortcut(a, a.shortcut);
             myActions.remove(action);
Index: trunk/src/org/openstreetmap/josm/tools/MultikeyShortcutAction.java
===================================================================
--- trunk/src/org/openstreetmap/josm/tools/MultikeyShortcutAction.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/tools/MultikeyShortcutAction.java	(revision 8510)
@@ -23,9 +23,9 @@
         public char getShortcut() {
             if (index < 9)
-                return (char)('1' + index);
+                return (char) ('1' + index);
             else if (index == 9)
                 return '0';
             else
-                return (char)('A' +  index - 10);
+                return (char) ('A' +  index - 10);
         }
 
@@ -38,5 +38,7 @@
 
     void executeMultikeyAction(int index, boolean repeatLastAction);
+
     List<MultikeyInfo> getMultikeyCombinations();
+
     MultikeyInfo getLastMultikeyAction();
 
Index: trunk/src/org/openstreetmap/josm/tools/OsmUrlToBounds.java
===================================================================
--- trunk/src/org/openstreetmap/josm/tools/OsmUrlToBounds.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/tools/OsmUrlToBounds.java	(revision 8510)
@@ -146,5 +146,5 @@
         final Map<Character, Integer> array = new HashMap<>();
 
-        for (int i=0; i<SHORTLINK_CHARS.length; ++i) {
+        for (int i = 0; i < SHORTLINK_CHARS.length; ++i) {
             array.put(SHORTLINK_CHARS[i], i);
         }
@@ -159,5 +159,5 @@
             if (array.containsKey(ch)) {
                 int val = array.get(ch);
-                for (int i=0; i<3; ++i) {
+                for (int i = 0; i < 3; ++i) {
                     x <<= 1;
                     if ((val & 32) != 0) {
Index: trunk/src/org/openstreetmap/josm/tools/Pair.java
===================================================================
--- trunk/src/org/openstreetmap/josm/tools/Pair.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/tools/Pair.java	(revision 8510)
@@ -10,5 +10,5 @@
  * @since 429
  */
-public final class Pair<A,B> {
+public final class Pair<A, B> {
 
     /**
@@ -40,5 +40,5 @@
     public boolean equals(Object other) {
         if (other instanceof Pair<?, ?>) {
-            Pair<?, ?> o = (Pair<?, ?>)other;
+            Pair<?, ?> o = (Pair<?, ?>) other;
             return a.equals(o.a) && b.equals(o.b);
         } else
@@ -53,5 +53,5 @@
     }
 
-    public static <T> Pair<T,T> sort(Pair<T,T> p) {
+    public static <T> Pair<T, T> sort(Pair<T, T> p) {
         if (p.b.hashCode() < p.a.hashCode()) {
             T tmp = p.a;
@@ -73,6 +73,6 @@
      * @return The newly created Pair(u,v)
      */
-    public static <U,V> Pair<U,V> create(U u, V v) {
-        return new Pair<>(u,v);
+    public static <U, V> Pair<U, V> create(U u, V v) {
+        return new Pair<>(u, v);
     }
 }
Index: trunk/src/org/openstreetmap/josm/tools/PlatformHookOsx.java
===================================================================
--- trunk/src/org/openstreetmap/josm/tools/PlatformHookOsx.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/tools/PlatformHookOsx.java	(revision 8510)
@@ -49,5 +49,5 @@
             Class<?> eawtOpenFilesHandler = Class.forName("com.apple.eawt.OpenFilesHandler");
             Class<?> eawtPreferencesHandler = Class.forName("com.apple.eawt.PreferencesHandler");
-            Object appli = eawtApplication.getConstructor((Class[])null).newInstance((Object[])null);
+            Object appli = eawtApplication.getConstructor((Class[]) null).newInstance((Object[]) null);
             Object proxy = Proxy.newProxyInstance(PlatformHookOsx.class.getClassLoader(), new Class<?>[] {
                 eawtQuitHandler, eawtAboutHandler, eawtOpenFilesHandler, eawtPreferencesHandler}, ivhandler);
@@ -98,5 +98,5 @@
                     Object oFiles = args[0].getClass().getMethod("getFiles").invoke(args[0]);
                     if (oFiles instanceof List) {
-                        Main.worker.submit(new OpenFileTask((List<File>)oFiles, null) {
+                        Main.worker.submit(new OpenFileTask((List<File>) oFiles, null) {
                             @Override
                             protected void realRun() throws SAXException, IOException, OsmTransferException {
@@ -143,4 +143,5 @@
     @Override
     public void initSystemShortcuts() {
+        // CHECKSTYLE.OFF: LineLength
         Shortcut.registerSystemShortcut("apple-reserved-01", tr("reserved"), KeyEvent.VK_SPACE, KeyEvent.META_DOWN_MASK).setAutomatic(); // Show or hide the Spotlight search field (when multiple languages are installed, may rotate through enabled script systems).
         Shortcut.registerSystemShortcut("apple-reserved-02", tr("reserved"), KeyEvent.VK_SPACE, KeyEvent.META_DOWN_MASK | KeyEvent.SHIFT_DOWN_MASK).setAutomatic(); // Apple reserved.
@@ -277,4 +278,5 @@
         Shortcut.registerSystemShortcut("view:zoomin", tr("reserved"), KeyEvent.VK_ADD, KeyEvent.META_DOWN_MASK); // Zoom in
         Shortcut.registerSystemShortcut("view:zoomout", tr("reserved"), KeyEvent.VK_SUBTRACT, KeyEvent.META_DOWN_MASK); // Zoom out
+        // CHECKSTYLE.ON: LineLength
     }
 
Index: trunk/src/org/openstreetmap/josm/tools/PlatformHookUnixoid.java
===================================================================
--- trunk/src/org/openstreetmap/josm/tools/PlatformHookUnixoid.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/tools/PlatformHookUnixoid.java	(revision 8510)
@@ -131,5 +131,5 @@
     public void initSystemShortcuts() {
         // TODO: Insert system shortcuts here. See Windows and especially OSX to see how to.
-        for(int i = KeyEvent.VK_F1; i <= KeyEvent.VK_F12; ++i)
+        for (int i = KeyEvent.VK_F1; i <= KeyEvent.VK_F12; ++i)
             Shortcut.registerSystemShortcut("screen:toogle"+i, tr("reserved"),
                     i, KeyEvent.CTRL_DOWN_MASK | KeyEvent.ALT_DOWN_MASK).setAutomatic();
@@ -265,9 +265,9 @@
                     String line = Utils.strip(input.readLine());
                     if (line != null && !line.isEmpty()) {
-                        line = line.replaceAll("\"+","");
-                        line = line.replaceAll("NAME=",""); // strange code for some Gentoo's
-                        if(line.startsWith("Linux ")) // e.g. Linux Mint
+                        line = line.replaceAll("\"+", "");
+                        line = line.replaceAll("NAME=", ""); // strange code for some Gentoo's
+                        if (line.startsWith("Linux ")) // e.g. Linux Mint
                             return line;
-                        else if(!line.isEmpty())
+                        else if (!line.isEmpty())
                             return "Linux " + line;
                     }
@@ -381,6 +381,6 @@
                 result = prefix + result;
             }
-            if(result != null)
-                result = result.replaceAll("\"+","");
+            if (result != null)
+                result = result.replaceAll("\"+", "");
             return result;
         }
Index: trunk/src/org/openstreetmap/josm/tools/PlatformHookWindows.java
===================================================================
--- trunk/src/org/openstreetmap/josm/tools/PlatformHookWindows.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/tools/PlatformHookWindows.java	(revision 8510)
@@ -103,4 +103,5 @@
     @Override
     public void initSystemShortcuts() {
+        // CHECKSTYLE.OFF: LineLength
         //Shortcut.registerSystemCut("system:menuexit", tr("reserved"), VK_Q, CTRL_DOWN_MASK);
         Shortcut.registerSystemShortcut("system:duplicate", tr("reserved"), VK_D, CTRL_DOWN_MASK); // not really system, but to avoid odd results
@@ -169,4 +170,5 @@
         Shortcut.registerSystemShortcut("microsoft-reserved-52", tr("reserved"), VK_SHIFT, CTRL_DOWN_MASK).setAutomatic();  // Switch the keyboard layout when multiple keyboard layouts are enabled
         //Shortcut.registerSystemCut("microsoft-reserved-53", tr("reserved"), ); // Change the reading direction of text in right-to-left reading languages (TODO: unclear)
+        // CHECKSTYLE.ON: LineLength
     }
 
Index: trunk/src/org/openstreetmap/josm/tools/Shortcut.java
===================================================================
--- trunk/src/org/openstreetmap/josm/tools/Shortcut.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/tools/Shortcut.java	(revision 8510)
@@ -35,14 +35,26 @@
  */
 public final class Shortcut {
-    private String shortText;        // the unique ID of the shortcut
-    private String longText;         // a human readable description that will be shown in the preferences
-    private final int requestedKey;  // the key, the caller requested
-    private final int requestedGroup;// the group, the caller requested
-    private int assignedKey;         // the key that actually is used
-    private int assignedModifier;    // the modifiers that are used
-    private boolean assignedDefault; // true if it got assigned what was requested. (Note: modifiers will be ignored in favour of group when loading it from the preferences then.)
-    private boolean assignedUser;    // true if the user changed this shortcut
-    private boolean automatic;       // true if the user cannot change this shortcut (Note: it also will not be saved into the preferences)
-    private boolean reset;           // true if the user requested this shortcut to be set to its default value (will happen on next restart, as this shortcut will not be saved to the preferences)
+    /** the unique ID of the shortcut */
+    private final String shortText;
+    /** a human readable description that will be shown in the preferences */
+    private String longText;
+    /** the key, the caller requested */
+    private final int requestedKey;
+    /** the group, the caller requested */
+    private final int requestedGroup;
+    /** the key that actually is used */
+    private int assignedKey;
+    /** the modifiers that are used */
+    private int assignedModifier;
+    /** true if it got assigned what was requested.
+     * (Note: modifiers will be ignored in favour of group when loading it from the preferences then.) */
+    private boolean assignedDefault;
+    /** true if the user changed this shortcut */
+    private boolean assignedUser;
+    /** true if the user cannot change this shortcut (Note: it also will not be saved into the preferences) */
+    private boolean automatic;
+    /** true if the user requested this shortcut to be set to its default value
+     * (will happen on next restart, as this shortcut will not be saved to the preferences) */
+    private boolean reset;
 
     // simple constructor
@@ -218,5 +230,5 @@
         if (keyStroke == null) return "";
         String modifText = KeyEvent.getKeyModifiersText(keyStroke.getModifiers());
-        if ("".equals (modifText)) return KeyEvent.getKeyText(keyStroke.getKeyCode());
+        if ("".equals(modifText)) return KeyEvent.getKeyText(keyStroke.getKeyCode());
         return modifText + "+" + KeyEvent.getKeyText(keyStroke.getKeyCode());
     }
@@ -235,5 +247,5 @@
 
     // and here our modifier groups
-    private static Map<Integer, Integer> groups= new HashMap<>();
+    private static Map<Integer, Integer> groups = new HashMap<>();
 
     // check if something collides with an existing shortcut
@@ -301,8 +313,8 @@
         groups.put(SHIFT, KeyEvent.SHIFT_DOWN_MASK);
         groups.put(CTRL, commandDownMask);
-        groups.put(ALT_SHIFT, KeyEvent.ALT_DOWN_MASK|KeyEvent.SHIFT_DOWN_MASK);
-        groups.put(ALT_CTRL, KeyEvent.ALT_DOWN_MASK|commandDownMask);
-        groups.put(CTRL_SHIFT, commandDownMask|KeyEvent.SHIFT_DOWN_MASK);
-        groups.put(ALT_CTRL_SHIFT, KeyEvent.ALT_DOWN_MASK|commandDownMask|KeyEvent.SHIFT_DOWN_MASK);
+        groups.put(ALT_SHIFT, KeyEvent.ALT_DOWN_MASK | KeyEvent.SHIFT_DOWN_MASK);
+        groups.put(ALT_CTRL, KeyEvent.ALT_DOWN_MASK | commandDownMask);
+        groups.put(CTRL_SHIFT, commandDownMask | KeyEvent.SHIFT_DOWN_MASK);
+        groups.put(ALT_CTRL_SHIFT, KeyEvent.ALT_DOWN_MASK | commandDownMask | KeyEvent.SHIFT_DOWN_MASK);
 
         // (1) System reserved shortcuts
@@ -310,9 +322,9 @@
         // (2) User defined shortcuts
         List<Shortcut> newshortcuts = new LinkedList<>();
-        for(String s : Main.pref.getAllPrefixCollectionKeys("shortcut.entry.")) {
+        for (String s : Main.pref.getAllPrefixCollectionKeys("shortcut.entry.")) {
             newshortcuts.add(new Shortcut(s));
         }
 
-        for(Shortcut sc : newshortcuts) {
+        for (Shortcut sc : newshortcuts) {
             if (sc.isAssignedUser()
             && findShortcut(sc.getAssignedKey(), sc.getAssignedModifier()) == null) {
@@ -321,5 +333,5 @@
         }
         // Shortcuts at their default values
-        for(Shortcut sc : newshortcuts) {
+        for (Shortcut sc : newshortcuts) {
             if (!sc.isAssignedUser() && sc.isAssignedDefault()
             && findShortcut(sc.getAssignedKey(), sc.getAssignedModifier()) == null) {
@@ -328,5 +340,5 @@
         }
         // Shortcuts that were automatically moved
-        for(Shortcut sc : newshortcuts) {
+        for (Shortcut sc : newshortcuts) {
             if (!sc.isAssignedUser() && !sc.isAssignedDefault()
             && findShortcut(sc.getAssignedKey(), sc.getAssignedModifier()) == null) {
@@ -338,5 +350,5 @@
     private static int getGroupModifier(int group) {
         Integer m = groups.get(group);
-        if(m == null)
+        if (m == null)
             m = -1;
         return m;
@@ -344,5 +356,5 @@
 
     private static int findModifier(int group, Integer modifier) {
-        if(modifier == null) {
+        if (modifier == null) {
             modifier = getGroupModifier(group);
             if (modifier == null) { // garbage in, no shortcut out
@@ -440,7 +452,7 @@
         switch (requestedGroup) {
             case CTRL: return KeyEvent.CTRL_DOWN_MASK;
-            case ALT_CTRL: return KeyEvent.ALT_DOWN_MASK|KeyEvent.CTRL_DOWN_MASK;
-            case CTRL_SHIFT: return KeyEvent.CTRL_DOWN_MASK|KeyEvent.SHIFT_DOWN_MASK;
-            case ALT_CTRL_SHIFT: return KeyEvent.ALT_DOWN_MASK|KeyEvent.CTRL_DOWN_MASK|KeyEvent.SHIFT_DOWN_MASK;
+            case ALT_CTRL: return KeyEvent.ALT_DOWN_MASK | KeyEvent.CTRL_DOWN_MASK;
+            case CTRL_SHIFT: return KeyEvent.CTRL_DOWN_MASK | KeyEvent.SHIFT_DOWN_MASK;
+            case ALT_CTRL_SHIFT: return KeyEvent.ALT_DOWN_MASK | KeyEvent.CTRL_DOWN_MASK | KeyEvent.SHIFT_DOWN_MASK;
             default: return 0;
         }
Index: trunk/src/org/openstreetmap/josm/tools/TextTagParser.java
===================================================================
--- trunk/src/org/openstreetmap/josm/tools/TextTagParser.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/tools/TextTagParser.java	(revision 8510)
@@ -95,5 +95,5 @@
                     pos++;
                     break;
-                } else if (!quotesStarted && (Arrays.binarySearch(stop, c)>=0)) {
+                } else if (!quotesStarted && (Arrays.binarySearch(stop, c) >= 0)) {
                     // stop-symbol found
                     pos++;
@@ -101,5 +101,5 @@
                 } else {
                     // skip non-printable characters
-                    if(c>=32) s.append(c);
+                    if (c >= 32) s.append(c);
                 }
                 pos++;
@@ -118,5 +118,5 @@
                 if (c == '\t' || c == '\n'  || c == ' ') {
                     pos++;
-                } else if (c== '=') {
+                } else if (c == '=') {
                     if (signFound) break; // a  =  =qwerty means "a"="=qwerty"
                     signFound = true;
@@ -150,5 +150,5 @@
             }
         }
-        String text = k.substring(1,k.length()-1);
+        String text = k.substring(1, k.length()-1);
         return (new TextAnalyzer(text)).parseString("\r\t\n");
     }
@@ -165,16 +165,17 @@
          Pattern p = Pattern.compile(tagRegex);
          Map<String, String> tags = new HashMap<>();
-         String k=null, v=null;
+         String k = null, v = null;
          for (String  line: lines) {
             if (line.trim().isEmpty()) continue; // skip empty lines
             Matcher m = p.matcher(line);
             if (m.matches()) {
-                 k=m.group(1).trim(); v=m.group(2).trim();
+                 k = m.group(1).trim();
+                 v = m.group(2).trim();
                  if (unescapeTextInQuotes) {
                      k = unescape(k);
                      v = unescape(v);
-                     if (k==null || v==null) return null;
+                     if (k == null || v == null) return null;
                  }
-                 tags.put(k,v);
+                 tags.put(k, v);
             } else {
                 return null;
@@ -188,6 +189,6 @@
     }
 
-    public static Map<String,String> getValidatedTagsFromText(String buf) {
-        Map<String,String> tags = readTagsFromText(buf);
+    public static Map<String, String> getValidatedTagsFromText(String buf) {
+        Map<String, String> tags = readTagsFromText(buf);
         return validateTags(tags) ? tags : null;
     }
@@ -198,6 +199,6 @@
      * @return null if no format is suitable
      */
-    public static Map<String,String> readTagsFromText(String buf) {
-        Map<String,String> tags;
+    public static Map<String, String> readTagsFromText(String buf) {
+        Map<String, String> tags;
 
         // Format
@@ -205,5 +206,5 @@
         tags = readTagsByRegexp(buf, "[\\r\\n]+", ".*?([a-zA-Z0-9:_]+).*\\t(.*?)", false);
                 // try "tag\tvalue\n" format
-        if (tags!=null) return tags;
+        if (tags != null) return tags;
 
         // Format
@@ -214,5 +215,5 @@
         tags = readTagsByRegexp(buf, "[\\n\\t\\r]+", "(.*?)=(.*?)", true);
                 // try format  t1=v1\n t2=v2\n ...
-        if (tags!=null) return tags;
+        if (tags != null) return tags;
 
         // JSON-format
@@ -223,5 +224,5 @@
         tags = readTagsByRegexp(bufJson, "[\\s]*,[\\s]*",
                 "[\\s]*(\\\".*?[^\\\\]\\\")"+"[\\s]*:[\\s]*"+"(\\\".*?[^\\\\]\\\")[\\s]*", true);
-        if (tags!=null) return tags;
+        if (tags != null) return tags;
 
         // Free format
@@ -240,8 +241,8 @@
         if (s > MAX_KEY_COUNT) {
             // Use trn() even if for english it makes no sense, as s > 30
-            r=warning(trn("There was {0} tag found in the buffer, it is suspicious!",
+            r = warning(trn("There was {0} tag found in the buffer, it is suspicious!",
             "There were {0} tags found in the buffer, it is suspicious!", s,
             s), "", "tags.paste.toomanytags");
-            if (r==2 || r==3) return false; if (r==4) return true;
+            if (r == 2 || r == 3) return false; if (r == 4) return true;
         }
         for (Entry<String, String> entry : tags.entrySet()) {
@@ -250,13 +251,13 @@
             if (key.length() > MAX_KEY_LENGTH) {
                 r = warning(tr("Key is too long (max {0} characters):", MAX_KEY_LENGTH), key+"="+value, "tags.paste.keytoolong");
-                if (r==2 || r==3) return false; if (r==4) return true;
+                if (r == 2 || r == 3) return false; if (r == 4) return true;
             }
             if (!key.matches(KEY_PATTERN)) {
                 r = warning(tr("Suspicious characters in key:"), key, "tags.paste.keydoesnotmatch");
-                if (r==2 || r==3) return false; if (r==4) return true;
+                if (r == 2 || r == 3) return false; if (r == 4) return true;
             }
             if (value.length() > MAX_VALUE_LENGTH) {
                 r = warning(tr("Value is too long (max {0} characters):", MAX_VALUE_LENGTH), value, "tags.paste.valuetoolong");
-                if (r==2 || r==3) return false; if (r==4) return true;
+                if (r == 2 || r == 3) return false; if (r == 4) return true;
             }
         }
@@ -270,5 +271,5 @@
                     new String[]{tr("Ok"), tr("Cancel"), tr("Clear buffer"), tr("Ignore warnings")});
         ed.setButtonIcons(new String[]{"ok", "cancel", "dialogs/delete", "pastetags"});
-        ed.setContent("<html><b>"+text + "</b><br/><br/><div width=\"300px\">"+XmlWriter.encode(data,true)+"</html>");
+        ed.setContent("<html><b>"+text + "</b><br/><br/><div width=\"300px\">"+XmlWriter.encode(data, true)+"</html>");
         ed.setDefaultButton(2);
         ed.setCancelButton(2);
@@ -277,7 +278,7 @@
         ed.showDialog();
         int r = ed.getValue();
-        if (r==0) r = 2;
+        if (r == 0) r = 2;
         // clean clipboard if user asked
-        if (r==3) Utils.copyToClipboard("");
+        if (r == 3) Utils.copyToClipboard("");
         return r;
     }
@@ -292,5 +293,5 @@
             + " or suitable text. </p></html>");
         JPanel p = new JPanel(new GridBagLayout());
-        p.add(new JLabel(msg),GBC.eop());
+        p.add(new JLabel(msg), GBC.eop());
         String helpUrl = HelpUtil.getHelpTopicUrl(HelpUtil.buildAbsoluteHelpTopic(helpTopic, LocaleType.DEFAULT));
         if (helpUrl != null) {
@@ -314,5 +315,5 @@
         int r = ed.getValue();
         // clean clipboard if user asked
-        if (r==2) Utils.copyToClipboard("");
+        if (r == 2) Utils.copyToClipboard("");
     }
 }
Index: trunk/src/org/openstreetmap/josm/tools/Utils.java
===================================================================
--- trunk/src/org/openstreetmap/josm/tools/Utils.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/tools/Utils.java	(revision 8510)
@@ -214,5 +214,5 @@
         if (!condition)
             throw new AssertionError(
-                    MessageFormat.format(message,data)
+                    MessageFormat.format(message, data)
             );
     }
@@ -574,5 +574,5 @@
     }
 
-    private static final char[] HEX_ARRAY = {'0','1','2','3','4','5','6','7','8','9','a','b','c','d','e','f'};
+    private static final char[] HEX_ARRAY = {'0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'a', 'b', 'c', 'd', 'e', 'f'};
 
     /**
@@ -611,6 +611,6 @@
      * @return the list of sorted objects
      */
-    public static <T> List<T> topologicalSort(final MultiMap<T,T> dependencies) {
-        MultiMap<T,T> deps = new MultiMap<>();
+    public static <T> List<T> topologicalSort(final MultiMap<T, T> dependencies) {
+        MultiMap<T, T> deps = new MultiMap<>();
         for (T key : dependencies.keySet()) {
             deps.putVoid(key);
@@ -623,5 +623,5 @@
         int size = deps.size();
         List<T> sorted = new ArrayList<>();
-        for (int i=0; i<size; ++i) {
+        for (int i = 0; i < size; ++i) {
             T parentless = null;
             for (T key : deps.keySet()) {
@@ -839,6 +839,6 @@
         if (connection != null) {
             connection.setRequestProperty("User-Agent", Version.getInstance().getFullAgentString());
-            connection.setConnectTimeout(Main.pref.getInteger("socket.timeout.connect",15)*1000);
-            connection.setReadTimeout(Main.pref.getInteger("socket.timeout.read",30)*1000);
+            connection.setConnectTimeout(Main.pref.getInteger("socket.timeout.connect", 15)*1000);
+            connection.setReadTimeout(Main.pref.getInteger("socket.timeout.read", 30)*1000);
         }
         return connection;
@@ -1158,5 +1158,5 @@
         StringBuilder sb = new StringBuilder(url.substring(0, url.indexOf('?') + 1));
 
-        for (int i=0; i<query.length(); i++) {
+        for (int i = 0; i < query.length(); i++) {
             String c = query.substring(i, i+1);
             if (URL_CHARS.contains(c)) {
Index: trunk/src/org/openstreetmap/josm/tools/WikiReader.java
===================================================================
--- trunk/src/org/openstreetmap/josm/tools/WikiReader.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/tools/WikiReader.java	(revision 8510)
@@ -72,23 +72,23 @@
 
         languageCode = LanguageInfo.getWikiLanguagePrefix(LocaleType.DEFAULTNOTENGLISH);
-        if(languageCode != null) {
+        if (languageCode != null) {
             res = readLang(new URL(getBaseUrlWiki() + languageCode + text));
         }
 
-        if(res.isEmpty()) {
+        if (res.isEmpty()) {
             languageCode = LanguageInfo.getWikiLanguagePrefix(LocaleType.BASELANGUAGE);
-            if(languageCode != null) {
+            if (languageCode != null) {
                 res = readLang(new URL(getBaseUrlWiki() + languageCode + text));
             }
         }
 
-        if(res.isEmpty()) {
+        if (res.isEmpty()) {
             languageCode = LanguageInfo.getWikiLanguagePrefix(LocaleType.ENGLISH);
-            if(languageCode != null) {
+            if (languageCode != null) {
                 res = readLang(new URL(getBaseUrlWiki() + languageCode + text));
             }
         }
 
-        if(res.isEmpty()) {
+        if (res.isEmpty()) {
             throw new IOException(text + " does not exist");
         } else {
@@ -157,5 +157,5 @@
         || b.indexOf(" does not exist. You can create it here.</p>") >= 0)
             return "";
-        if(b.isEmpty())
+        if (b.isEmpty())
             b = full;
         return "<html><base href=\""+url.toExternalForm() +"\"> " + b + "</html>";
Index: trunk/src/org/openstreetmap/josm/tools/WindowGeometry.java
===================================================================
--- trunk/src/org/openstreetmap/josm/tools/WindowGeometry.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/tools/WindowGeometry.java	(revision 8510)
@@ -72,6 +72,6 @@
         }
         if (reference == null)
-            return new WindowGeometry(new Point(0,0), extent);
-        parentWindow = (Window)reference;
+            return new WindowGeometry(new Point(0, 0), extent);
+        parentWindow = (Window) reference;
         Point topLeft = new Point(
                 Math.max(0, (parentWindow.getSize().width - extent.width) /2),
@@ -139,8 +139,8 @@
         Rectangle oldScreen = getScreenInfo(getRectangle());
         Rectangle newScreen = getScreenInfo(new Rectangle(window.getLocationOnScreen(), window.getSize()));
-        if(oldScreen.x != newScreen.x) {
+        if (oldScreen.x != newScreen.x) {
             this.topLeft.x += newScreen.x - oldScreen.x;
         }
-        if(oldScreen.y != newScreen.y) {
+        if (oldScreen.y != newScreen.y) {
             this.topLeft.y += newScreen.y - oldScreen.y;
         }
@@ -150,5 +150,5 @@
         String v = "";
         try {
-            Pattern p = Pattern.compile(field + "=(-?\\d+)",Pattern.CASE_INSENSITIVE);
+            Pattern p = Pattern.compile(field + "=(-?\\d+)", Pattern.CASE_INSENSITIVE);
             Matcher m = p.matcher(preferenceValue);
             if (!m.find())
@@ -158,13 +158,15 @@
             v = m.group(1);
             return Integer.parseInt(v);
-        } catch(WindowGeometryException e) {
+        } catch (WindowGeometryException e) {
             throw e;
-        } catch(NumberFormatException e) {
+        } catch (NumberFormatException e) {
             throw new WindowGeometryException(
-                    tr("Preference with key ''{0}'' does not provide an int value for ''{1}''. Got {2}. Cannot restore window geometry from preferences.",
+                    tr("Preference with key ''{0}'' does not provide an int value for ''{1}''. Got {2}. " +
+                       "Cannot restore window geometry from preferences.",
                             preferenceKey, field, v), e);
-        } catch(Exception e) {
+        } catch (Exception e) {
             throw new WindowGeometryException(
-                    tr("Failed to parse field ''{1}'' in preference with key ''{0}''. Exception was: {2}. Cannot restore window geometry from preferences.",
+                    tr("Failed to parse field ''{1}'' in preference with key ''{0}''. Exception was: {2}. " +
+                       "Cannot restore window geometry from preferences.",
                             preferenceKey, field, e.toString()), e);
         }
@@ -207,5 +209,5 @@
                     }
                 }
-                return new WindowGeometry(new Point(x,y), new Dimension(w,h));
+                return new WindowGeometry(new Point(x, y), new Dimension(w, h));
             } else {
                 Main.warn(tr("Ignoring malformed geometry: {0}", arg));
@@ -213,5 +215,5 @@
         }
         WindowGeometry def;
-        if(maximize) {
+        if (maximize) {
             def = new WindowGeometry(screenDimension);
         } else {
@@ -248,5 +250,5 @@
         try {
             initFromPreferences(preferenceKey);
-        } catch(WindowGeometryException e) {
+        } catch (WindowGeometryException e) {
             initFromWindowGeometry(defaultGeometry);
         }
@@ -413,5 +415,5 @@
         Rectangle g = new WindowGeometry(preferenceKey,
             /* default: something on screen 1 */
-            new WindowGeometry(new Point(0,0), new Dimension(10,10))).getRectangle();
+            new WindowGeometry(new Point(0, 0), new Dimension(10, 10))).getRectangle();
         return getScreenInfo(g);
     }
@@ -467,5 +469,5 @@
      */
     public static Rectangle getFullScreenInfo() {
-        return new Rectangle(new Point(0,0), Toolkit.getDefaultToolkit().getScreenSize());
+        return new Rectangle(new Point(0, 0), Toolkit.getDefaultToolkit().getScreenSize());
     }
 
Index: trunk/src/org/openstreetmap/josm/tools/XmlObjectParser.java
===================================================================
--- trunk/src/org/openstreetmap/josm/tools/XmlObjectParser.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/tools/XmlObjectParser.java	(revision 8510)
@@ -300,5 +300,5 @@
             filter.setContentHandler(validator);
             return start(in, filter);
-        } catch(IOException e) {
+        } catch (IOException e) {
             throw new SAXException(tr("Failed to load XML schema."), e);
         }
@@ -306,13 +306,13 @@
 
     public void map(String tagName, Class<?> klass) {
-        mapping.put(tagName, new Entry(klass,false,false));
+        mapping.put(tagName, new Entry(klass, false, false));
     }
 
     public void mapOnStart(String tagName, Class<?> klass) {
-        mapping.put(tagName, new Entry(klass,true,false));
+        mapping.put(tagName, new Entry(klass, true, false));
     }
 
     public void mapBoth(String tagName, Class<?> klass) {
-        mapping.put(tagName, new Entry(klass,false,true));
+        mapping.put(tagName, new Entry(klass, false, true));
     }
 
Index: trunk/src/org/openstreetmap/josm/tools/date/DateUtils.java
===================================================================
--- trunk/src/org/openstreetmap/josm/tools/date/DateUtils.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/tools/date/DateUtils.java	(revision 8510)
@@ -54,5 +54,5 @@
         try {
             fact = DatatypeFactory.newInstance();
-        } catch(DatatypeConfigurationException ce) {
+        } catch (DatatypeConfigurationException ce) {
             Main.error(ce);
         }
@@ -77,5 +77,5 @@
                 parsePart(str, 8, 2),
                 parsePart(str, 11, 2),
-                parsePart(str, 14,2),
+                parsePart(str, 14, 2),
                 parsePart(str, 17, 2));
 
@@ -87,5 +87,5 @@
 
             return calendar.getTime();
-        } else if(checkLayout(str, "xxxx-xx-xxTxx:xx:xx.xxxZ") ||
+        } else if (checkLayout(str, "xxxx-xx-xxTxx:xx:xx.xxxZ") ||
                 checkLayout(str, "xxxx-xx-xxTxx:xx:xx.xxx") ||
                 checkLayout(str, "xxxx-xx-xxTxx:xx:xx.xxx+xx:00") ||
@@ -96,5 +96,5 @@
                 parsePart(str, 8, 2),
                 parsePart(str, 11, 2),
-                parsePart(str, 14,2),
+                parsePart(str, 14, 2),
                 parsePart(str, 17, 2));
             long millis = parsePart(str, 20, 3);
@@ -108,5 +108,5 @@
             SimpleDateFormat f = new SimpleDateFormat("dd-MMM-yy HH:mm:ss");
             Date d = f.parse(str, new ParsePosition(0));
-            if(d != null)
+            if (d != null)
                 return d;
         }
@@ -133,9 +133,9 @@
     private static boolean checkLayout(String text, String pattern) {
         if (text.length() != pattern.length()) return false;
-        for (int i=0; i<pattern.length(); i++) {
+        for (int i = 0; i < pattern.length(); i++) {
             char pc = pattern.charAt(i);
             char tc = text.charAt(i);
-            if(pc == 'x' && tc >= '0' && tc <= '9') continue;
-            else if(pc == 'x' || pc != tc) return false;
+            if (pc == 'x' && tc >= '0' && tc <= '9') continue;
+            else if (pc == 'x' || pc != tc) return false;
         }
         return true;
Index: trunk/src/org/openstreetmap/josm/tools/template_engine/ContextSwitchTemplate.java
===================================================================
--- trunk/src/org/openstreetmap/josm/tools/template_engine/ContextSwitchTemplate.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/tools/template_engine/ContextSwitchTemplate.java	(revision 8510)
@@ -42,4 +42,5 @@
     private abstract class ContextProvider extends Match {
         protected Match condition;
+
         abstract List<OsmPrimitive> getPrimitives(OsmPrimitive root);
     }
@@ -51,8 +52,10 @@
             this.childCondition = child;
         }
-        @Override
-        public boolean match(OsmPrimitive osm) {
-            throw new UnsupportedOperationException();
-        }
+
+        @Override
+        public boolean match(OsmPrimitive osm) {
+            throw new UnsupportedOperationException();
+        }
+
         @Override
         List<OsmPrimitive> getPrimitives(OsmPrimitive root) {
@@ -194,5 +197,5 @@
 
             if (lhs instanceof ContextProvider && rhs instanceof ContextProvider)
-                return new AndSet((ContextProvider)lhs, (ContextProvider)rhs);
+                return new AndSet((ContextProvider) lhs, (ContextProvider) rhs);
             else if (lhs instanceof ContextProvider) {
                 ContextProvider cp = (ContextProvider) lhs;
@@ -218,5 +221,5 @@
 
             if (lhs instanceof ContextProvider && rhs instanceof ContextProvider)
-                return new OrSet((ContextProvider)lhs, (ContextProvider)rhs);
+                return new OrSet((ContextProvider) lhs, (ContextProvider) rhs);
             else if (lhs instanceof ContextProvider)
                 throw new ParseError(
Index: trunk/src/org/openstreetmap/josm/tools/template_engine/TemplateEngineDataProvider.java
===================================================================
--- trunk/src/org/openstreetmap/josm/tools/template_engine/TemplateEngineDataProvider.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/tools/template_engine/TemplateEngineDataProvider.java	(revision 8510)
@@ -8,5 +8,7 @@
 public interface TemplateEngineDataProvider {
     Collection<String> getTemplateKeys();
+
     Object getTemplateValue(String name, boolean special);
+
     boolean evaluateCondition(Match condition);
 }
Index: trunk/src/org/openstreetmap/josm/tools/template_engine/TemplateEntry.java
===================================================================
--- trunk/src/org/openstreetmap/josm/tools/template_engine/TemplateEntry.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/tools/template_engine/TemplateEntry.java	(revision 8510)
@@ -4,4 +4,5 @@
 public interface TemplateEntry {
     void appendText(StringBuilder result, TemplateEngineDataProvider dataProvider);
+
     boolean isValid(TemplateEngineDataProvider dataProvider);
 }
Index: trunk/src/org/openstreetmap/josm/tools/template_engine/Tokenizer.java
===================================================================
--- trunk/src/org/openstreetmap/josm/tools/template_engine/Tokenizer.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/tools/template_engine/Tokenizer.java	(revision 8510)
@@ -36,5 +36,5 @@
         @Override
         public String toString() {
-            return type + (text != null?" " + text:"");
+            return type + (text != null ? " " + text : "");
         }
     }
@@ -85,5 +85,5 @@
                 return new Token(TokenType.CONDITION_START, position);
             } else
-                throw ParseError.unexpectedChar('{', (char)c, position);
+                throw ParseError.unexpectedChar('{', (char) c, position);
         case '!':
             getChar();
@@ -92,5 +92,5 @@
                 return new Token(TokenType.CONTEXT_SWITCH_START, position);
             } else
-                throw ParseError.unexpectedChar('{', (char)c, position);
+                throw ParseError.unexpectedChar('{', (char) c, position);
         case '}':
             getChar();
@@ -103,5 +103,5 @@
             return new Token(TokenType.APOSTROPHE, position);
         default:
-            while (c != -1 && !specialCharaters.contains((char)c)) {
+            while (c != -1 && !specialCharaters.contains((char) c)) {
                 if (c == '\\') {
                     getChar();
@@ -110,5 +110,5 @@
                     }
                 }
-                text.append((char)c);
+                text.append((char) c);
                 getChar();
             }
@@ -132,9 +132,8 @@
                 getChar();
             }
-            result.append((char)c);
+            result.append((char) c);
             getChar();
         }
         return new Token(TokenType.TEXT, position, result.toString());
     }
-
 }
