Index: trunk/src/org/openstreetmap/josm/data/imagery/WMTSTileSource.java
===================================================================
--- trunk/src/org/openstreetmap/josm/data/imagery/WMTSTileSource.java	(revision 8570)
+++ trunk/src/org/openstreetmap/josm/data/imagery/WMTSTileSource.java	(revision 8571)
@@ -73,5 +73,5 @@
     };
 
-    private class TileMatrix {
+    private static class TileMatrix {
         String identifier;
         double scaleDenominator;
@@ -81,5 +81,5 @@
     }
 
-    private class TileMatrixSet {
+    private static class TileMatrixSet {
         SortedSet<TileMatrix> tileMatrix = new TreeSet<>(new Comparator<TileMatrix>() {
             @Override
@@ -93,5 +93,5 @@
     }
 
-    private class Layer {
+    private static class Layer {
         String format;
         String name;
@@ -124,5 +124,5 @@
     }
 
-    private final class SelectLayerDialog extends ExtendedDialog {
+    private static final class SelectLayerDialog extends ExtendedDialog {
         private Layer[] layers;
         private JList<String> list;
@@ -207,5 +207,4 @@
         builderFactory.setNamespaceAware(false);
         DocumentBuilder builder = null;
-        byte[] data = {};
         InputStream in = new CachedFile(baseUrl).
                 setHttpHeaders(headers).
@@ -215,5 +214,5 @@
         try {
             builder = builderFactory.newDocumentBuilder();
-            data = Utils.readBytesFromStream(in);
+            byte[] data = Utils.readBytesFromStream(in);
             if (data == null || data.length == 0) {
                 throw new IllegalArgumentException("Could not read data from: " + baseUrl);
Index: trunk/src/org/openstreetmap/josm/gui/layer/AbstractTileSourceLayer.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/layer/AbstractTileSourceLayer.java	(revision 8570)
+++ trunk/src/org/openstreetmap/josm/gui/layer/AbstractTileSourceLayer.java	(revision 8571)
@@ -1014,9 +1014,7 @@
                     g.drawLine(0, p.y, mv.getWidth(), p.y);
                 }
-                yCursor = t.getYtile();
-            }
-            // This draws the vertical lines for the entire
-            // column. Only draw them for the top tile in
-            // the column.
+                //yCursor = t.getYtile();
+            }
+            // This draws the vertical lines for the entire column. Only draw them for the top tile in the column.
             if (xCursor < t.getXtile()) {
                 if (t.getXtile() % 32 == 0) {
@@ -1026,5 +1024,5 @@
                     g.drawLine(p.x, 0, p.x, mv.getHeight());
                 }
-                xCursor = t.getXtile();
+                //xCursor = t.getXtile();
             }
         }
