Index: trunk/src/org/openstreetmap/josm/data/imagery/GetCapabilitiesParseHelper.java
===================================================================
--- trunk/src/org/openstreetmap/josm/data/imagery/GetCapabilitiesParseHelper.java	(revision 13741)
+++ trunk/src/org/openstreetmap/josm/data/imagery/GetCapabilitiesParseHelper.java	(revision 13742)
@@ -117,5 +117,5 @@
      * @param reader XMLStreamReader that should point to start of element
      * @return content of current tag
-     * @throws XMLStreamException
+     * @throws XMLStreamException if any XML stream error occurs
      */
     public static String getElementTextWithSubtags(XMLStreamReader reader) throws XMLStreamException {
Index: trunk/src/org/openstreetmap/josm/data/imagery/ImageryInfo.java
===================================================================
--- trunk/src/org/openstreetmap/josm/data/imagery/ImageryInfo.java	(revision 13741)
+++ trunk/src/org/openstreetmap/josm/data/imagery/ImageryInfo.java	(revision 13742)
@@ -1432,5 +1432,5 @@
     /**
      * Sets custom HTTP headers that should be sent with request towards imagery provider
-     * @param customHttpHeaders
+     * @param customHttpHeaders http headers
      */
     public void setCustomHttpHeaders(Map<String, String> customHttpHeaders) {
@@ -1462,5 +1462,5 @@
     /**
      * Sets minimum tile expiration in seconds
-     * @param minimumTileExpire
+     * @param minimumTileExpire minimum tile expiration in seconds
      */
     public void setMinimumTileExpire(int minimumTileExpire) {
Index: trunk/src/org/openstreetmap/josm/data/imagery/LayerDetails.java
===================================================================
--- trunk/src/org/openstreetmap/josm/data/imagery/LayerDetails.java	(revision 13741)
+++ trunk/src/org/openstreetmap/josm/data/imagery/LayerDetails.java	(revision 13742)
@@ -38,5 +38,5 @@
      * This is needed to properly handle layer attributes inheritance.
      *
-     * @param parentLayer
+     * @param parentLayer parent layer
      */
     public LayerDetails(LayerDetails parentLayer) {
@@ -70,6 +70,6 @@
 
     /**
+     * @return title "Human readable" title of this layer
      * @see LayerDetails#getName()
-     * @return title "Human readable" title of this layer
      */
     public String getTitle() {
@@ -78,6 +78,6 @@
 
     /**
+     * @param title set title of this layer
      * @see LayerDetails#getName()
-     * @param title set title of this layer
      */
     public void setTitle(String title) {
@@ -88,11 +88,11 @@
      *
      * Citation from OGC WMS specification (WMS 1.3.0):
-     * > A number of elements have both a <Name> and a <Title>. The Name is a text string used for machine-to-machine
+     * > A number of elements have both a {@literal <Name>} and a {@literal <Title>}. The Name is a text string used for machine-to-machine
      * > communication while the Title is for the benefit of humans. For example, a dataset might have the descriptive Title
      * > “Maximum Atmospheric Temperature” and be requested using the abbreviated Name “ATMAX”.
      *
      * And second citation:
-     * > If, and only if, a layer has a <Name>, then it is a map layer that can be requested by using that Name in the
-     * > LAYERS parameter of a GetMap request. A Layer that contains a <Name> element is referred to as a “named
+     * > If, and only if, a layer has a {@literal <Name>}, then it is a map layer that can be requested by using that Name in the
+     * > LAYERS parameter of a GetMap request. A Layer that contains a {@literal <Name>} element is referred to as a “named
      * > layer” in this International Standard. If the layer has a Title but no Name, then that layer is only a category title for
      * > all the layers nested within.
@@ -104,6 +104,6 @@
 
     /**
+     * @param name sets the name of this Layer
      * @see LayerDetails#getName()
-     * @param name sets the name of this Layer
      */
     public void setName(String name) {
@@ -138,5 +138,5 @@
     /**
      * sets bounds of this layer
-     * @param bounds
+     * @param bounds of this layer
      */
     public void setBounds(Bounds bounds) {
@@ -160,5 +160,5 @@
     /**
      * sets children layers for this layer
-     * @param children
+     * @param children children of this layer
      */
     public void setChildren(List<LayerDetails> children) {
@@ -192,5 +192,5 @@
     /**
      * Sets abstract of this layer
-     * @param abstr
+     * @param abstr abstract of this layer
      */
     public void setAbstract(String abstr) {
Index: trunk/src/org/openstreetmap/josm/data/imagery/TileJobOptions.java
===================================================================
--- trunk/src/org/openstreetmap/josm/data/imagery/TileJobOptions.java	(revision 13741)
+++ trunk/src/org/openstreetmap/josm/data/imagery/TileJobOptions.java	(revision 13742)
@@ -23,5 +23,5 @@
      * @param connectTimeout in milliseconds
      * @param readTimeout in milliseconds
-     * @param headers
+     * @param headers http headers
      * @param minimumExpiryTime in seconds
      */
Index: trunk/src/org/openstreetmap/josm/data/imagery/WMSEndpointTileSource.java
===================================================================
--- trunk/src/org/openstreetmap/josm/data/imagery/WMSEndpointTileSource.java	(revision 13741)
+++ trunk/src/org/openstreetmap/josm/data/imagery/WMSEndpointTileSource.java	(revision 13742)
@@ -31,5 +31,5 @@
     private List<DefaultLayer> layers;
     private String urlPattern;
-    private static final Pattern PATTERN_PARAM  = Pattern.compile("\\{([^}]+)\\}");
+    private static final Pattern PATTERN_PARAM = Pattern.compile("\\{([^}]+)\\}");
     private final Map<String, String> headers = new ConcurrentHashMap<>();
 
Index: trunk/src/org/openstreetmap/josm/data/imagery/WMTSTileSource.java
===================================================================
--- trunk/src/org/openstreetmap/josm/data/imagery/WMTSTileSource.java	(revision 13741)
+++ trunk/src/org/openstreetmap/josm/data/imagery/WMTSTileSource.java	(revision 13742)
@@ -303,5 +303,5 @@
      * @param info imagery info
      * @throws IOException if any I/O error occurs
-     * @throws WMTSGetCapabilitiesException
+     * @throws WMTSGetCapabilitiesException when document didn't contain any layers
      * @throws IllegalArgumentException if any other error happens for the given imagery info
      */
@@ -312,5 +312,5 @@
         this.baseUrl = GetCapabilitiesParseHelper.normalizeCapabilitiesUrl(handleTemplate(info.getUrl()));
         WMTSCapabilities capabilities = getCapabilities(baseUrl, headers);
-        this.layers =  capabilities.getLayers();
+        this.layers = capabilities.getLayers();
         this.baseUrl = capabilities.getBaseUrl();
         this.transferMode = capabilities.getTransferMode();
@@ -374,5 +374,5 @@
      * @return capabilities
      * @throws IOException in case of any I/O error
-     * @throws WMTSGetCapabilitiesException
+     * @throws WMTSGetCapabilitiesException when document didn't contain any layers
      * @throws IllegalArgumentException in case of any other error
      */
Index: trunk/src/org/openstreetmap/josm/gui/layer/WMSLayer.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/layer/WMSLayer.java	(revision 13741)
+++ trunk/src/org/openstreetmap/josm/gui/layer/WMSLayer.java	(revision 13742)
@@ -66,5 +66,6 @@
     public WMSLayer(ImageryInfo info) {
         super(info);
-        CheckParameterUtil.ensureThat(info.getImageryType() == ImageryType.WMS || info.getImageryType() == ImageryType.WMS_ENDPOINT, "ImageryType is WMS");
+        CheckParameterUtil.ensureThat(
+                info.getImageryType() == ImageryType.WMS || info.getImageryType() == ImageryType.WMS_ENDPOINT, "ImageryType is WMS");
         CheckParameterUtil.ensureParameterNotNull(info.getUrl(), "info.url");
         if (info.getImageryType() == ImageryType.WMS) {
Index: trunk/src/org/openstreetmap/josm/gui/preferences/imagery/AddImageryPanel.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/preferences/imagery/AddImageryPanel.java	(revision 13741)
+++ trunk/src/org/openstreetmap/josm/gui/preferences/imagery/AddImageryPanel.java	(revision 13742)
@@ -48,5 +48,5 @@
     protected final transient Collection<ContentValidationListener> listeners = new ArrayList<>();
 
-    private final JCheckBox validGeoreference= new JCheckBox(tr("Is layer properly georeferenced?"));
+    private final JCheckBox validGeoreference = new JCheckBox(tr("Is layer properly georeferenced?"));
     private HeadersTable headersTable;
     private JSpinner minimumCacheExpiry;
@@ -72,5 +72,5 @@
         headersTable = new HeadersTable();
         minimumCacheExpiry = new JSpinner(new SpinnerNumberModel(
-                (Number)TimeUnit.MILLISECONDS.toSeconds(TMSCachedTileLoaderJob.MINIMUM_EXPIRES.get()),
+                (Number) TimeUnit.MILLISECONDS.toSeconds(TMSCachedTileLoaderJob.MINIMUM_EXPIRES.get()),
                 0L,
                 Long.valueOf(Integer.MAX_VALUE),
@@ -101,5 +101,5 @@
                     break;
                 default:
-                    Logging.warn("Dupa: " + units.indexOf(e.getItem()));
+                    Logging.warn("Unkown unit: " + units.indexOf(e.getItem()));
                 }
                 minimumCacheExpiry.setValue(newValue);
Index: trunk/src/org/openstreetmap/josm/gui/preferences/imagery/AddWMTSLayerPanel.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/preferences/imagery/AddWMTSLayerPanel.java	(revision 13741)
+++ trunk/src/org/openstreetmap/josm/gui/preferences/imagery/AddWMTSLayerPanel.java	(revision 13742)
@@ -100,5 +100,5 @@
             Layer selectedLayer = layers.get(layerTable.convertRowIndexToModel(index)).getValue().get(0);
             ret.setDefaultLayers(
-                    Collections.<DefaultLayer> singletonList(
+                    Collections.<DefaultLayer>singletonList(
                             new DefaultLayer(
                                     ImageryType.WMTS,
Index: trunk/src/org/openstreetmap/josm/gui/preferences/imagery/HeadersTable.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/preferences/imagery/HeadersTable.java	(revision 13741)
+++ trunk/src/org/openstreetmap/josm/gui/preferences/imagery/HeadersTable.java	(revision 13742)
@@ -72,5 +72,5 @@
 
             } else if (row == headers.size()) {
-                String[] entry = new String[] { "", "" };
+                String[] entry = new String[] {"", ""};
                 entry[col] = (String) value;
                 headers.add(entry);
@@ -93,5 +93,5 @@
     /**
      * Create table prefilled with headers
-     * @param headers
+     * @param headers contents of table
      */
     public HeadersTable(Map<String, String> headers) {
@@ -108,5 +108,5 @@
     private static List<String[]> getHeadersAsVector(Map<String, String> headers) {
         return headers.entrySet().stream().sorted((e1, e2) -> e1.getKey().compareTo(e2.getKey()))
-                .map(e -> new String[] { e.getKey(), e.getValue() }).collect(Collectors.toList());
+                .map(e -> new String[] {e.getKey(), e.getValue()}).collect(Collectors.toList());
     }
 
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
      */
Index: trunk/test/unit/org/openstreetmap/josm/TestUtils.java
===================================================================
--- trunk/test/unit/org/openstreetmap/josm/TestUtils.java	(revision 13741)
+++ trunk/test/unit/org/openstreetmap/josm/TestUtils.java	(revision 13742)
@@ -411,7 +411,8 @@
                     );
     }
+
     /**
      * Renders Temporal to RFC 1123 Date Time
-     * @param time
+     * @param time to convert
      * @return string representation according to RFC1123 of time
      */
@@ -422,5 +423,5 @@
     /**
      * Renders java time stamp to RFC 1123 Date Time
-     * @param time
+     * @param time java timestamp (milliseconds from Epoch)
      * @return string representation according to RFC1123 of time
      */
@@ -428,5 +429,3 @@
         return getHTTPDate(Instant.ofEpochMilli(time));
     }
-
-
 }
Index: trunk/test/unit/org/openstreetmap/josm/data/cache/JCSCachedTileLoaderJobTest.java
===================================================================
--- trunk/test/unit/org/openstreetmap/josm/data/cache/JCSCachedTileLoaderJobTest.java	(revision 13741)
+++ trunk/test/unit/org/openstreetmap/josm/data/cache/JCSCachedTileLoaderJobTest.java	(revision 13742)
@@ -47,9 +47,9 @@
         private String key;
 
-        TestCachedTileLoaderJob(String url, String key)  {
+        TestCachedTileLoaderJob(String url, String key) {
             this(url, key, (int) TimeUnit.DAYS.toSeconds(1));
         }
 
-        TestCachedTileLoaderJob(String url, String key, int minimumExpiry)  {
+        TestCachedTileLoaderJob(String url, String key, int minimumExpiry) {
             super(getCache(), new TileJobOptions(30000, 30000, null, minimumExpiry));
 
@@ -57,5 +57,4 @@
             this.key = key;
         }
-
 
         @Override
@@ -183,6 +182,6 @@
 
     /**
-     * That no requst is made when entry is in cache and force == false
-     * @throws IOException
+     * That no request is made when entry is in cache and force == false
+     * @throws IOException exception
      */
     @Test
@@ -205,10 +204,10 @@
     /**
      * that request is made, when object is in cache, but force mode is used
-     * @throws IOException
+     * @throws IOException exception
      */
     @Test
     public void testRequestMadeWhenEntryInCacheAndForce() throws IOException {
         ICacheAccess<String, CacheEntry> cache = getCache();
-        long expires =  TimeUnit.DAYS.toMillis(1);
+        long expires = TimeUnit.DAYS.toMillis(1);
         long testStart = System.currentTimeMillis();
         cache.put("test",
@@ -227,5 +226,5 @@
      * Mock returns no cache-control / expires headers
      * Expire time should be set to DEFAULT_EXPIRE_TIME
-     * @throws IOException
+     * @throws IOException exception
      */
     @Test
@@ -247,7 +246,10 @@
                 listener.attributes.getExpirationTime() >= testStart + JCSCachedTileLoaderJob.DEFAULT_EXPIRE_TIME);
 
-        assertTrue("Cache entry expiration is " + (listener.attributes.getExpirationTime() - System.currentTimeMillis()) + " which is not less than " +
+        assertTrue("Cache entry expiration is " +
+                (listener.attributes.getExpirationTime() - System.currentTimeMillis()) +
+                " which is not less than " +
                 JCSCachedTileLoaderJob.DEFAULT_EXPIRE_TIME + " (DEFAULT_EXPIRE_TIME)",
-                listener.attributes.getExpirationTime() <= System.currentTimeMillis() + JCSCachedTileLoaderJob.DEFAULT_EXPIRE_TIME);
+                listener.attributes.getExpirationTime() <= System.currentTimeMillis() + JCSCachedTileLoaderJob.DEFAULT_EXPIRE_TIME
+                );
 
         assertArrayEquals("mock entry".getBytes(StandardCharsets.UTF_8), listener.data);
@@ -257,10 +259,10 @@
      * Mock returns expires headers, but Cache-Control
      * Expire time should be set to max-age
-     * @throws IOException
+     * @throws IOException exception
      */
     @Test
     public void testSettingExpireByMaxAge() throws IOException {
         long testStart = System.currentTimeMillis();
-        long expires =  TimeUnit.DAYS.toSeconds(1);
+        long expires = TimeUnit.DAYS.toSeconds(1);
         tileServer.stubFor(
                 WireMock.get(WireMock.urlEqualTo("/test"))
@@ -279,7 +281,10 @@
                 listener.attributes.getExpirationTime() >= testStart + TimeUnit.SECONDS.toMillis(expires));
 
-        assertTrue("Cache entry expiration is " + (listener.attributes.getExpirationTime() - System.currentTimeMillis()) + " which is not less than " +
+        assertTrue("Cache entry expiration is " +
+                (listener.attributes.getExpirationTime() - System.currentTimeMillis()) +
+                " which is not less than " +
                 TimeUnit.SECONDS.toMillis(expires) + " (max-age)",
-                listener.attributes.getExpirationTime() <= System.currentTimeMillis() + TimeUnit.SECONDS.toMillis(expires));
+                listener.attributes.getExpirationTime() <= System.currentTimeMillis() + TimeUnit.SECONDS.toMillis(expires)
+                );
 
         assertArrayEquals("mock entry".getBytes(StandardCharsets.UTF_8), listener.data);
@@ -289,10 +294,10 @@
      * mock returns expiration: JCSCachedTileLoaderJob.DEFAULT_EXPIRE_TIME / 10
      * minimum expire time: JCSCachedTileLoaderJob.DEFAULT_EXPIRE_TIME / 2
-     * @throws IOException
+     * @throws IOException exception
      */
     @Test
     public void testSettingMinimumExpiryByMinimumExpiryTimeLessThanDefault() throws IOException {
         long testStart = System.currentTimeMillis();
-        int minimumExpiryTimeSeconds = (int)(JCSCachedTileLoaderJob.DEFAULT_EXPIRE_TIME / 2);
+        int minimumExpiryTimeSeconds = (int) (JCSCachedTileLoaderJob.DEFAULT_EXPIRE_TIME / 2);
 
         createHeadGetStub(WireMock.urlEqualTo("/test"), (JCSCachedTileLoaderJob.DEFAULT_EXPIRE_TIME / 10), testStart, "eTag", "mock entry");
@@ -306,9 +311,12 @@
         assertTrue("Cache entry expiration is " + (listener.attributes.getExpirationTime() - testStart) + " which is not larger than " +
                 TimeUnit.SECONDS.toMillis(minimumExpiryTimeSeconds) + " (minimumExpireTime)",
-                listener.attributes.getExpirationTime() >= testStart + TimeUnit.SECONDS.toMillis(minimumExpiryTimeSeconds) );
-
-        assertTrue("Cache entry expiration is " + (listener.attributes.getExpirationTime() - System.currentTimeMillis()) + " which is not less than " +
+                listener.attributes.getExpirationTime() >= testStart + TimeUnit.SECONDS.toMillis(minimumExpiryTimeSeconds));
+
+        assertTrue("Cache entry expiration is " +
+                (listener.attributes.getExpirationTime() - System.currentTimeMillis()) +
+                " which is not less than " +
                 TimeUnit.SECONDS.toMillis(minimumExpiryTimeSeconds) + " (minimumExpireTime)",
-                listener.attributes.getExpirationTime() <= System.currentTimeMillis() + TimeUnit.SECONDS.toMillis(minimumExpiryTimeSeconds));
+                listener.attributes.getExpirationTime() <= System.currentTimeMillis() + TimeUnit.SECONDS.toMillis(minimumExpiryTimeSeconds)
+                );
     }
 
@@ -316,5 +324,5 @@
      * mock returns expiration: JCSCachedTileLoaderJob.DEFAULT_EXPIRE_TIME / 10
      * minimum expire time: JCSCachedTileLoaderJob.DEFAULT_EXPIRE_TIME * 2
-     * @throws IOException
+     * @throws IOException exception
      */
 
@@ -322,5 +330,5 @@
     public void testSettingMinimumExpiryByMinimumExpiryTimeGreaterThanDefault() throws IOException {
         long testStart = System.currentTimeMillis();
-        int minimumExpiryTimeSeconds = (int)(JCSCachedTileLoaderJob.DEFAULT_EXPIRE_TIME * 2);
+        int minimumExpiryTimeSeconds = (int) (JCSCachedTileLoaderJob.DEFAULT_EXPIRE_TIME * 2);
 
         createHeadGetStub(WireMock.urlEqualTo("/test"), (JCSCachedTileLoaderJob.DEFAULT_EXPIRE_TIME / 10), testStart, "eTag", "mock entry");
@@ -334,14 +342,17 @@
         assertTrue("Cache entry expiration is " + (listener.attributes.getExpirationTime() - testStart) + " which is not larger than " +
                 TimeUnit.SECONDS.toMillis(minimumExpiryTimeSeconds) + " (minimumExpireTime)",
-                listener.attributes.getExpirationTime() >= testStart + TimeUnit.SECONDS.toMillis(minimumExpiryTimeSeconds) );
-
-        assertTrue("Cache entry expiration is " + (listener.attributes.getExpirationTime() - System.currentTimeMillis()) + " which is not less than " +
+                listener.attributes.getExpirationTime() >= testStart + TimeUnit.SECONDS.toMillis(minimumExpiryTimeSeconds));
+
+        assertTrue("Cache entry expiration is " +
+                (listener.attributes.getExpirationTime() - System.currentTimeMillis()) +
+                " which is not less than " +
                 TimeUnit.SECONDS.toMillis(minimumExpiryTimeSeconds) + " (minimumExpireTime)",
-                listener.attributes.getExpirationTime() <= System.currentTimeMillis() + TimeUnit.SECONDS.toMillis(minimumExpiryTimeSeconds));
+                listener.attributes.getExpirationTime() <= System.currentTimeMillis() + TimeUnit.SECONDS.toMillis(minimumExpiryTimeSeconds)
+                );
     }
 
     /**
      * Check if verifying cache entries using HEAD requests work properly
-     * @throws IOException
+     * @throws IOException exception
      */
     @Test
@@ -385,5 +396,5 @@
         // invalidate entry in cache
         ICacheElement<String, CacheEntry> cacheEntry = cache.getCacheElement("test");
-        CacheEntryAttributes attributes = (CacheEntryAttributes)cacheEntry.getElementAttributes();
+        CacheEntryAttributes attributes = (CacheEntryAttributes) cacheEntry.getElementAttributes();
         attributes.setExpirationTime(testStart - TimeUnit.DAYS.toMillis(1));
         cache.put("test", cacheEntry.getVal(), attributes);
@@ -406,5 +417,5 @@
     /**
      * Check if server returns 304 - it will update cache attributes and not ask again for it
-     * @throws IOException
+     * @throws IOException exception
      */
     @Test
@@ -470,5 +481,5 @@
     }
 
-    private static TestCachedTileLoaderJob getStatusLoaderJob(int responseCode)  {
+    private static TestCachedTileLoaderJob getStatusLoaderJob(int responseCode) {
         return new TestCachedTileLoaderJob("http://httpstat.us/" + responseCode, "key_" + responseCode);
     }
Index: trunk/test/unit/org/openstreetmap/josm/data/imagery/TMSCachedTileLoaderJobTest.java
===================================================================
--- trunk/test/unit/org/openstreetmap/josm/data/imagery/TMSCachedTileLoaderJobTest.java	(revision 13741)
+++ trunk/test/unit/org/openstreetmap/josm/data/imagery/TMSCachedTileLoaderJobTest.java	(revision 13742)
@@ -68,9 +68,9 @@
         private String key;
 
-        TestCachedTileLoaderJob(TileLoaderListener listener, Tile tile, String key) throws IOException  {
-            this(listener, tile, key,  (int) TimeUnit.DAYS.toSeconds(1));
-        }
-
-        TestCachedTileLoaderJob(TileLoaderListener listener, Tile tile, String key, int minimumExpiry) throws IOException  {
+        TestCachedTileLoaderJob(TileLoaderListener listener, Tile tile, String key) throws IOException {
+            this(listener, tile, key, (int) TimeUnit.DAYS.toSeconds(1));
+        }
+
+        TestCachedTileLoaderJob(TileLoaderListener listener, Tile tile, String key, int minimumExpiry) throws IOException {
             super(listener, tile, getCache(), new TileJobOptions(30000, 30000, null, minimumExpiry),
                     (ThreadPoolExecutor) Executors.newFixedThreadPool(1));
@@ -104,5 +104,6 @@
                 return false;
             }
-            return cacheData.getContent().length > 0;        }
+            return cacheData.getContent().length > 0;
+        }
     }
 
@@ -112,5 +113,4 @@
         private byte[] data;
 
-
         @Override
         public synchronized void tileLoadingFinished(Tile tile, boolean success) {
@@ -129,5 +129,5 @@
         private final String url;
 
-        public MockTileSource(String url) {
+        MockTileSource(String url) {
             super(new ImageryInfo("mock"));
             this.url = url;
@@ -191,5 +191,5 @@
     /**
      * When tile server doesn't return any Expires/Cache-Control headers, expire should be at least MINIMUM_EXPIRES
-     * @throws IOException
+     * @throws IOException exception
      */
     @Test
@@ -214,5 +214,5 @@
     /**
      * When tile server doesn't return any Expires/Cache-Control headers, expire should be at least minimumExpires parameter
-     * @throws IOException
+     * @throws IOException exception
      */
     @Test
@@ -224,5 +224,5 @@
      * When tile server doesn't return any Expires/Cache-Control headers, expire should be at least minimumExpires parameter,
      * which is larger than MAXIMUM_EXPIRES
-     * @throws IOException
+     * @throws IOException exception
      */
 
@@ -251,5 +251,5 @@
     /**
      * When tile server returns Expires header shorter than MINIMUM_EXPIRES, we should cache if for at least MINIMUM_EXPIRES
-     * @throws IOException
+     * @throws IOException exception
      */
     @Test
@@ -288,5 +288,4 @@
                 job.getAttributes().getExpirationTime() <= duration);
     }
-
 
     @Test
Index: trunk/test/unit/org/openstreetmap/josm/data/imagery/WMSEndpointTileSourceTest.java
===================================================================
--- trunk/test/unit/org/openstreetmap/josm/data/imagery/WMSEndpointTileSourceTest.java	(revision 13741)
+++ trunk/test/unit/org/openstreetmap/josm/data/imagery/WMSEndpointTileSourceTest.java	(revision 13742)
@@ -53,5 +53,11 @@
                 "<type>wms_endpoint</type>\n" +
                 "<url><![CDATA[" + tileServer.url("/capabilities") + "]]></url>\n" +
-                "<icon>data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAACXBIWXMAAAsSAAALEgHS3X78AAAB5UlEQVQ4y4WTwWsTURDGfy8W1yYmXZOqtGJJFyGw6KF7CEigwYuS0kthrYUi4i0iORS9BU9hQdA/ILcixVBrwENKLz1FUBB0wWOwYFAqxUNYTZq6BfM8yC5d05iBObz3vfnmm3kz4sqDh/zP7szdlG5I+Of1zQ1xFA8xxI4GH2cjg4Cl+UUJcC4SJq6c7FPkKRlIoPQk0+NnuDwxHrhvuYd83+8OVuBlHouE/eDXzW8+/qO9DyHB0vyiVHoy2INSNiPdeg23XuPs3icmIoofPKXGmFJjjEUjgf4EFNi2TT6fJ5FI0Gg0ePrkMRfnbvn41QsJgEAJAQUdbYZyuQxAcvoSpmnydesFAF+cn8f2KUCw/fGt6GgzWJbF706bVCoFwGxyktnk5N8kB79QepL1zQ3xbOulCJWyGbkQHZWlbEZ6JIZhBDI1nQ5Np8P2zi4t9zAwGyNe3QALti11XSedTvsPYrEY73f3Bk+irusAnI6qrNy7z43sNUbFCQC6LYdCoYBbr/k1/2sh690HUalUaH7eIRxXA+6RFItF3HqN6+dP9REIb5lK2Yy0bdsHDMMgl8vRbTkAhOMqlmVhmibLq2ui7xsf1d+IV+0D3zVNw7KsPiXVapXnd2/Lodu4vLomTNMcSvIHY6bDkqJtEqIAAAAASUVORK5CYII=</icon>\n" +
+                "<icon>data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAACXBIWXMAAAsSAAALEgHS3X78AAAB5UlEQVQ4y4WTwWsTURDG" +
+                "fy8W1yYmXZOqtGJJFyGw6KF7CEigwYuS0kthrYUi4i0iORS9BU9hQdA/ILcixVBrwENKLz1FUBB0wWOwYFAqxUNYTZq6BfM8yC5d05iBObz3vfnmm3kz4sqDh/zP" +
+                "7szdlG5I+Of1zQ1xFA8xxI4GH2cjg4Cl+UUJcC4SJq6c7FPkKRlIoPQk0+NnuDwxHrhvuYd83+8OVuBlHouE/eDXzW8+/qO9DyHB0vyiVHoy2INSNiPdeg23XuPs" +
+                "3icmIoofPKXGmFJjjEUjgf4EFNi2TT6fJ5FI0Gg0ePrkMRfnbvn41QsJgEAJAQUdbYZyuQxAcvoSpmnydesFAF+cn8f2KUCw/fGt6GgzWJbF706bVCoFwGxyktnk" +
+                "5N8kB79QepL1zQ3xbOulCJWyGbkQHZWlbEZ6JIZhBDI1nQ5Np8P2zi4t9zAwGyNe3QALti11XSedTvsPYrEY73f3Bk+irusAnI6qrNy7z43sNUbFCQC6LYdCoYBb" +
+                "r/k1/2sh690HUalUaH7eIRxXA+6RFItF3HqN6+dP9REIb5lK2Yy0bdsHDMMgl8vRbTkAhOMqlmVhmibLq2ui7xsf1d+IV+0D3zVNw7KsPiXVapXnd2/Lodu4vLom" +
+                "TNMcSvIHY6bDkqJtEqIAAAAASUVORK5CYII=</icon>\n" +
                 "<attribution-text mandatory=\"true\">© Geofabrik GmbH, OpenStreetMap contributors, CC-BY-SA</attribution-text>\n" +
                 "<attribution-url>http://tools.geofabrik.de/osmi/</attribution-url>\n" +
@@ -72,6 +78,6 @@
         WMSEndpointTileSource tileSource = new WMSEndpointTileSource(wmsImageryInfo, Main.getProjection());
         tileSource.initProjection(Projections.getProjectionByCode("EPSG:3857"));
-        assertEquals("https://tools.geofabrik.de/osmi/views/geometry/wxs?FORMAT=image/png&TRANSPARENT=TRUE&VERSION=1.1.1&SERVICE=WMS&REQUEST=GetMap&"
-                + "LAYERS=single_node_in_way&STYLES=default&"
+        assertEquals("https://tools.geofabrik.de/osmi/views/geometry/wxs?FORMAT=image/png&TRANSPARENT=TRUE&VERSION=1.1.1&SERVICE=WMS&"
+                + "REQUEST=GetMap&LAYERS=single_node_in_way&STYLES=default&"
                 + "SRS=EPSG:3857&WIDTH=512&HEIGHT=512&"
                 + "BBOX=20037506.6204108,-60112521.5836107,60112521.5836107,-20037506.6204108", tileSource.getTileUrl(1, 1, 1));
Index: trunk/test/unit/org/openstreetmap/josm/data/imagery/WMTSTileSourceTest.java
===================================================================
--- trunk/test/unit/org/openstreetmap/josm/data/imagery/WMTSTileSourceTest.java	(revision 13741)
+++ trunk/test/unit/org/openstreetmap/josm/data/imagery/WMTSTileSourceTest.java	(revision 13742)
@@ -46,5 +46,5 @@
     @ClassRule
     @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
-    public static JOSMTestRules test = new JOSMTestRules().preferences().platform().projection().timeout((int)TimeUnit.MINUTES.toMillis(5));
+    public static JOSMTestRules test = new JOSMTestRules().preferences().platform().projection().timeout((int) TimeUnit.MINUTES.toMillis(5));
 
     @Rule
@@ -67,5 +67,4 @@
             "wmts/bug13975-multiple-tile-matrices-for-one-layer-projection.xml");
 
-
     private static ImageryInfo getImagery(String path) {
         try {
@@ -259,5 +258,6 @@
         testSource.initProjection(Main.getProjection());
         assertEquals(
-                "http://maps.ottawa.ca/arcgis/rest/services/Basemap_Imagery_2014/MapServer/WMTS/tile/1.0.0/Basemap_Imagery_2014/default/default028mm/4/2932/2371.jpg",
+                "http://maps.ottawa.ca/arcgis/rest/services/Basemap_Imagery_2014/MapServer/WMTS/tile/1.0.0/Basemap_Imagery_2014/default/"
+                + "default028mm/4/2932/2371.jpg",
                 testSource.getTileUrl(4, 2371, 2932));
         verifyTile(new LatLon(45.4601306, -75.7617187), testSource, 2372, 2932, 4);
@@ -275,5 +275,6 @@
         testSource.initProjection(Main.getProjection());
         assertEquals(
-                "http://maps.ottawa.ca/arcgis/rest/services/Basemap_Imagery_2014/MapServer/WMTS/tile/1.0.0/Basemap_Imagery_2014/default/GoogleMapsCompatible/4/2932/2371.jpg",
+                "http://maps.ottawa.ca/arcgis/rest/services/Basemap_Imagery_2014/MapServer/WMTS/tile/1.0.0/Basemap_Imagery_2014/default/"
+                + "GoogleMapsCompatible/4/2932/2371.jpg",
                 testSource.getTileUrl(4, 2371, 2932));
         verifyMercatorTile(testSource, 74, 91, 8);
@@ -326,5 +327,5 @@
      * Test WMTS dimension.
      * @throws IOException if any I/O error occurs
-     * @throws WMTSGetCapabilitiesException
+     * @throws WMTSGetCapabilitiesException if any error occurs
      */
     @Test
Index: trunk/test/unit/org/openstreetmap/josm/io/imagery/WMSImageryTest.java
===================================================================
--- trunk/test/unit/org/openstreetmap/josm/io/imagery/WMSImageryTest.java	(revision 13741)
+++ trunk/test/unit/org/openstreetmap/josm/io/imagery/WMSImageryTest.java	(revision 13742)
@@ -86,5 +86,8 @@
         tileServer.stubFor(
                 WireMock.get(WireMock.anyUrl())
-                .willReturn(WireMock.aResponse().withBody(Files.readAllBytes(Paths.get(TestUtils.getRegressionDataFile(16248, "capabilities.xml"))))));
+                .willReturn(WireMock.aResponse().withBody(
+                        Files.readAllBytes(Paths.get(TestUtils.getRegressionDataFile(16248, "capabilities.xml")))
+                        ))
+                );
         WMSImagery wms = new WMSImagery(tileServer.url("any"));
         assertEquals("http://wms.hgis.cartomatic.pl/topo/3857/m25k", wms.buildRootUrl());
@@ -92,5 +95,5 @@
         assertEquals("http://wms.hgis.cartomatic.pl/topo/3857/m25kFORMAT=image/png&TRANSPARENT=TRUE&VERSION=1.1.1&SERVICE=WMS&REQUEST=GetMap&"
                 + "LAYERS=wms.hgis.cartomatic.pl&STYLES=&SRS={proj}&WIDTH={width}&HEIGHT={height}&BBOX={bbox}",
-                wms.buildGetMapUrl(wms.getLayers(), (List<String>)null, true));
+                wms.buildGetMapUrl(wms.getLayers(), (List<String>) null, true));
     }
 }
