Index: applications/editors/josm/plugins/imagery-xml-bounds/build.xml
===================================================================
--- applications/editors/josm/plugins/imagery-xml-bounds/build.xml	(revision 34802)
+++ applications/editors/josm/plugins/imagery-xml-bounds/build.xml	(revision 34803)
@@ -4,5 +4,5 @@
     <property name="commit.message" value="Commit message"/>
     <!-- enter the *lowest* JOSM version this plugin is currently compatible with -->
-    <property name="plugin.main.version" value="14153"/>
+    <property name="plugin.main.version" value="14347"/>
     
     <!-- Configure these properties (replace "..." accordingly).
Index: applications/editors/josm/plugins/imagery-xml-bounds/src/net/boplicity/xmleditor/XmlTextPane.java
===================================================================
--- applications/editors/josm/plugins/imagery-xml-bounds/src/net/boplicity/xmleditor/XmlTextPane.java	(revision 34802)
+++ applications/editors/josm/plugins/imagery-xml-bounds/src/net/boplicity/xmleditor/XmlTextPane.java	(revision 34803)
@@ -84,7 +84,7 @@
                 try {
                     if (text.charAt(start) != NEW_LINE) {
-                        while ((end < text.length())
-                                && (Character.isWhitespace(text.charAt(end)))
-                                && (text.charAt(end) != NEW_LINE)) {
+                        while (end < text.length()
+                                && Character.isWhitespace(text.charAt(end))
+                                && text.charAt(end) != NEW_LINE) {
                             end++;
                         }
Index: applications/editors/josm/plugins/imagery-xml-bounds/src/org/openstreetmap/josm/plugins/imageryxmlbounds/actions/downloadtask/DownloadXmlBoundsTask.java
===================================================================
--- applications/editors/josm/plugins/imagery-xml-bounds/src/org/openstreetmap/josm/plugins/imageryxmlbounds/actions/downloadtask/DownloadXmlBoundsTask.java	(revision 34802)
+++ applications/editors/josm/plugins/imagery-xml-bounds/src/org/openstreetmap/josm/plugins/imageryxmlbounds/actions/downloadtask/DownloadXmlBoundsTask.java	(revision 34803)
@@ -4,4 +4,5 @@
 import static org.openstreetmap.josm.tools.I18n.tr;
 
+import java.util.Optional;
 import java.util.concurrent.Future;
 
@@ -9,4 +10,5 @@
 import org.openstreetmap.josm.actions.downloadtasks.DownloadParams;
 import org.openstreetmap.josm.data.Bounds;
+import org.openstreetmap.josm.data.osm.DataSet;
 import org.openstreetmap.josm.gui.MainApplication;
 import org.openstreetmap.josm.gui.layer.Layer;
@@ -93,6 +95,6 @@
 
         @Override
-        protected OsmDataLayer createNewLayer() {
-            return new XmlBoundsLayer(dataSet, XmlBoundsLayer.createNewName(), null);
+        protected OsmDataLayer createNewLayer(DataSet ds, Optional<String> layerName) {
+            return new XmlBoundsLayer(ds, layerName.orElseGet(this::generateLayerName), null);
         }
     }
