Index: trunk/src/org/openstreetmap/josm/io/imagery/ImageryReader.java
===================================================================
--- trunk/src/org/openstreetmap/josm/io/imagery/ImageryReader.java	(revision 13741)
+++ trunk/src/org/openstreetmap/josm/io/imagery/ImageryReader.java	(revision 13742)
@@ -290,5 +290,10 @@
                 if ("layer".equals(qName)) {
                     newState = State.NOOP;
-                    defaultLayers.add(new DefaultLayer(entry.getImageryType(), atts.getValue("name"),atts.getValue("style"), atts.getValue("tileMatrixSet")));
+                    defaultLayers.add(new DefaultLayer(
+                            entry.getImageryType(),
+                            atts.getValue("name"),
+                            atts.getValue("style"),
+                            atts.getValue("tileMatrixSet")
+                            ));
                 }
                 break;
Index: trunk/src/org/openstreetmap/josm/io/imagery/WMSImagery.java
===================================================================
--- trunk/src/org/openstreetmap/josm/io/imagery/WMSImagery.java	(revision 13741)
+++ trunk/src/org/openstreetmap/josm/io/imagery/WMSImagery.java	(revision 13742)
@@ -132,6 +132,6 @@
      * Make getCapabilities request towards given URL
      * @param url service url
-     * @throws IOException
-     * @throws WMSGetCapabilitiesException
+     * @throws IOException when connection error when fetching get capabilities document
+     * @throws WMSGetCapabilitiesException when there are errors when parsing get capabilities document
      */
     public WMSImagery(String url) throws IOException, WMSGetCapabilitiesException {
@@ -143,6 +143,6 @@
      * @param url service url
      * @param headers HTTP headers to be sent with request
-     * @throws IOException
-     * @throws WMSGetCapabilitiesException
+     * @throws IOException when connection error when fetching get capabilities document
+     * @throws WMSGetCapabilitiesException when there are errors when parsing get capabilities document
      */
     public WMSImagery(String url, Map<String, String> headers) throws IOException, WMSGetCapabilitiesException {
@@ -185,4 +185,5 @@
                 } catch (MalformedURLException e1) { // NOPMD
                     // do nothing, raise original exception
+                    Logging.trace(e1);
                 }
             }
@@ -287,10 +288,9 @@
 
     /**
-     * @see #buildGetMapUrl(List, boolean)
-     *
      * @param selectedLayers selected layers as subset of the tree returned by {@link #getLayers()}
      * @param selectedStyles selected styles for all selectedLayers
      * @param transparent whether returned images should contain transparent pixels (if supported by format)
      * @return URL template for GetMap service
+     * @see #buildGetMapUrl(List, boolean)
      */
     public String buildGetMapUrl(List<LayerDetails> selectedLayers, List<String> selectedStyles, boolean transparent) {
@@ -303,6 +303,4 @@
 
     /**
-     * @see #buildGetMapUrl(List, boolean)
-     *
      * @param selectedLayers selected layers as list of strings
      * @param selectedStyles selected styles of layers as list of strings
@@ -310,4 +308,5 @@
      * @param transparent whether returned images should contain transparent pixels (if supported by format)
      * @return URL template for GetMap service
+     * @see #buildGetMapUrl(List, boolean)
      */
     public String buildGetMapUrl(List<String> selectedLayers,
@@ -385,4 +384,5 @@
         if (GetCapabilitiesParseHelper.moveReaderToTag(reader, this::tagEquals, QN_TITLE)) {
             this.title = reader.getElementText();
+            // CHECKSTYLE.OFF: EmptyBlock
             for (int event = reader.getEventType();
                     reader.hasNext() && !(event == XMLStreamReader.END_ELEMENT && tagEquals(QN_SERVICE, reader.getName()));
@@ -390,4 +390,5 @@
                 // empty loop, just move reader to the end of Service tag, if moveReaderToTag return false, it's already done
             }
+            // CHECKSTYLE.ON: EmptyBlock
         }
     }
@@ -591,5 +592,4 @@
     }
 
-
     private String normalizeUrl(String serviceUrlStr) throws MalformedURLException {
         URL getCapabilitiesUrl = null;
@@ -641,5 +641,4 @@
     }
 
-
     static boolean imageFormatHasTransparency(final String format) {
         return format != null && (format.startsWith("image/png") || format.startsWith("image/gif")
@@ -686,5 +685,5 @@
 
     /**
-     * @param defaultLayers
+     * @param defaultLayers default layers that should select layer object
      * @return collection of LayerDetails specified by DefaultLayers
      */
