Index: /trunk/src/org/openstreetmap/josm/data/UndoRedoHandler.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/data/UndoRedoHandler.java	(revision 19534)
+++ /trunk/src/org/openstreetmap/josm/data/UndoRedoHandler.java	(revision 19535)
@@ -380,5 +380,5 @@
                     try {
                         c.undoCommand();
-                    } catch (Exception e) { // NOPMD
+                    } catch (Exception e) {
                         // fix #20098: restore command stack as we will not fire an event
                         commands.add(c);
Index: /trunk/src/org/openstreetmap/josm/data/cache/JCSCacheManager.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/data/cache/JCSCacheManager.java	(revision 19534)
+++ /trunk/src/org/openstreetmap/josm/data/cache/JCSCacheManager.java	(revision 19535)
@@ -200,5 +200,5 @@
                             diskAttributes, null, null, new StandardSerializer())));
                 }
-            } catch (Exception e) { // NOPMD
+            } catch (Exception e) {
                 // in case any error in setting auxiliary cache, do not use disk cache at all - only memory
                 cc.setAuxCaches(Collections.emptyList());
Index: /trunk/src/org/openstreetmap/josm/data/imagery/vectortile/mapbox/Layer.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/data/imagery/vectortile/mapbox/Layer.java	(revision 19534)
+++ /trunk/src/org/openstreetmap/josm/data/imagery/vectortile/mapbox/Layer.java	(revision 19535)
@@ -99,5 +99,4 @@
      * @throws IOException - if an IO error occurs
      */
-    @SuppressWarnings("PMD.CloseResource") // The resources _are_ closed after use; it just isn't detect with PMD 7.2.x.
     public Layer(Collection<ProtobufRecord> records) throws IOException {
         // Do the unique required fields first
Index: /trunk/src/org/openstreetmap/josm/data/osm/AbstractPrimitive.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/data/osm/AbstractPrimitive.java	(revision 19534)
+++ /trunk/src/org/openstreetmap/josm/data/osm/AbstractPrimitive.java	(revision 19535)
@@ -794,5 +794,4 @@
 
     @Override
-    @SuppressWarnings("PMD.UseArraysAsList") // See https://github.com/pmd/pmd/issues/5071
     public final Collection<String> keySet() {
         String[] tKeys = this.keys;
Index: /trunk/src/org/openstreetmap/josm/data/osm/OsmPrimitive.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/data/osm/OsmPrimitive.java	(revision 19534)
+++ /trunk/src/org/openstreetmap/josm/data/osm/OsmPrimitive.java	(revision 19535)
@@ -658,5 +658,5 @@
             return Stream.empty();
         }
-        final Stream<OsmPrimitive> stream = referrers instanceof OsmPrimitive // NOPMD
+        final Stream<OsmPrimitive> stream = referrers instanceof OsmPrimitive
                 ? Stream.of((OsmPrimitive) referrers)
                 : Arrays.stream((OsmPrimitive[]) referrers);
Index: /trunk/src/org/openstreetmap/josm/data/validation/OsmValidator.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/data/validation/OsmValidator.java	(revision 19534)
+++ /trunk/src/org/openstreetmap/josm/data/validation/OsmValidator.java	(revision 19535)
@@ -672,5 +672,5 @@
                     test.initialize();
                 }
-            } catch (Exception e) { // NOPMD
+            } catch (Exception e) {
                 String message = tr("Error initializing test {0}:\n {1}", test.getClass().getSimpleName(), e);
                 Logging.error(message);
Index: /trunk/src/org/openstreetmap/josm/data/vector/VectorPrimitive.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/data/vector/VectorPrimitive.java	(revision 19534)
+++ /trunk/src/org/openstreetmap/josm/data/vector/VectorPrimitive.java	(revision 19535)
@@ -189,5 +189,5 @@
             return Stream.empty();
         }
-        final Stream<IPrimitive> stream = referrers instanceof IPrimitive // NOPMD
+        final Stream<IPrimitive> stream = referrers instanceof IPrimitive
           ? Stream.of((IPrimitive) referrers)
           : Arrays.stream((IPrimitive[]) referrers);
Index: /trunk/src/org/openstreetmap/josm/gui/datatransfer/ClipboardUtils.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/gui/datatransfer/ClipboardUtils.java	(revision 19534)
+++ /trunk/src/org/openstreetmap/josm/gui/datatransfer/ClipboardUtils.java	(revision 19535)
@@ -117,5 +117,5 @@
                     Thread.currentThread().interrupt();
                 }
-            } catch (NullPointerException | NoClassDefFoundError e) { // NOPMD
+            } catch (NullPointerException | NoClassDefFoundError e) {
                 // JDK-6322854: On Linux/X11, NPE can happen for unknown reasons, on all versions of Java
                 // See #24642: Access can fail due to issues in ImageIO when an image is in clipboard
Index: /trunk/src/org/openstreetmap/josm/gui/datatransfer/OsmTransferHandler.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/gui/datatransfer/OsmTransferHandler.java	(revision 19534)
+++ /trunk/src/org/openstreetmap/josm/gui/datatransfer/OsmTransferHandler.java	(revision 19535)
@@ -95,5 +95,5 @@
         } catch (IllegalStateException e) {
             Logging.debug(e);
-        } catch (NullPointerException e) { // NOPMD
+        } catch (NullPointerException e) {
             // JDK-6322854: On Linux/X11, NPE can happen for unknown reasons, on all versions of Java
             Logging.error(e);
Index: /trunk/src/org/openstreetmap/josm/gui/io/importexport/FileImporter.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/gui/io/importexport/FileImporter.java	(revision 19534)
+++ /trunk/src/org/openstreetmap/josm/gui/io/importexport/FileImporter.java	(revision 19535)
@@ -115,5 +115,5 @@
             displayError(f, e);
             return false;
-        } catch (RuntimeException | LinkageError e) { // NOPMD
+        } catch (RuntimeException | LinkageError e) {
             BugReportExceptionHandler.handleException(e);
             return false;
Index: /trunk/src/org/openstreetmap/josm/gui/layer/AutosaveTask.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/gui/layer/AutosaveTask.java	(revision 19534)
+++ /trunk/src/org/openstreetmap/josm/gui/layer/AutosaveTask.java	(revision 19535)
@@ -264,5 +264,5 @@
                     GuiHelper.runInEDT(this::displayNotification);
                 }
-            } catch (RuntimeException t) { // NOPMD
+            } catch (RuntimeException t) {
                 // Don't let exception stop time thread
                 Logging.error("Autosave failed:");
Index: /trunk/src/org/openstreetmap/josm/gui/mappaint/RenderingCLI.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/gui/mappaint/RenderingCLI.java	(revision 19534)
+++ /trunk/src/org/openstreetmap/josm/gui/mappaint/RenderingCLI.java	(revision 19535)
@@ -274,5 +274,5 @@
                 try {
                     argBounds = new Bounds(arg, ",", Bounds.ParseMethod.LEFT_BOTTOM_RIGHT_TOP, false);
-                } catch (IllegalArgumentException iae) { // NOPMD
+                } catch (IllegalArgumentException iae) {
                     throw new OptionParseException(
                             tr("Unable to parse {0} parameter: {1}", "--bounds", iae.getMessage()), iae);
@@ -309,5 +309,5 @@
                 double lat = LatLonParser.parseCoordinate(parts[1]);
                 argAnchor = new LatLon(lat, lon);
-            } catch (IllegalArgumentException iae) { // NOPMD
+            } catch (IllegalArgumentException iae) {
                 throw new OptionParseException(tr("In option {0}: {1}", "--anchor", iae.getMessage()), iae);
             }
Index: /trunk/src/org/openstreetmap/josm/gui/preferences/PreferenceTabbedPane.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/gui/preferences/PreferenceTabbedPane.java	(revision 19534)
+++ /trunk/src/org/openstreetmap/josm/gui/preferences/PreferenceTabbedPane.java	(revision 19535)
@@ -675,5 +675,5 @@
                 } catch (SecurityException ex) {
                     Logging.error(ex);
-                } catch (RuntimeException ex) { // NOPMD
+                } catch (RuntimeException ex) {
                     // allow to change most settings even if e.g. a plugin fails
                     BugReportExceptionHandler.handleException(ex);
@@ -696,5 +696,5 @@
             } catch (SecurityException ex) {
                 Logging.error(ex);
-            } catch (RuntimeException ex) { // NOPMD
+            } catch (RuntimeException ex) {
                 BugReportExceptionHandler.handleException(ex);
             } finally {
Index: /trunk/src/org/openstreetmap/josm/gui/preferences/map/MapPaintPreference.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/gui/preferences/map/MapPaintPreference.java	(revision 19534)
+++ /trunk/src/org/openstreetmap/josm/gui/preferences/map/MapPaintPreference.java	(revision 19535)
@@ -173,5 +173,5 @@
                 return css.title;
             }
-        } catch (RuntimeException ignore) { // NOPMD
+        } catch (RuntimeException ignore) {
             Logging.debug(ignore);
         }
Index: /trunk/src/org/openstreetmap/josm/gui/progress/swing/PleaseWaitProgressMonitor.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/gui/progress/swing/PleaseWaitProgressMonitor.java	(revision 19534)
+++ /trunk/src/org/openstreetmap/josm/gui/progress/swing/PleaseWaitProgressMonitor.java	(revision 19535)
@@ -112,5 +112,5 @@
             try {
                 runnable.run();
-            } catch (RuntimeException e) { // NOPMD
+            } catch (RuntimeException e) {
                 throw BugReport.intercept(e).put("monitor", this);
             }
Index: /trunk/src/org/openstreetmap/josm/gui/tagging/presets/TaggingPresetReader.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/gui/tagging/presets/TaggingPresetReader.java	(revision 19534)
+++ /trunk/src/org/openstreetmap/josm/gui/tagging/presets/TaggingPresetReader.java	(revision 19535)
@@ -128,4 +128,5 @@
          * @return the last inserted element
          */
+        @SuppressWarnings("PMD.MissingOverride") // For Java >= 21 we can drop the whole class
         public E getLast() {
             return last;
Index: /trunk/src/org/openstreetmap/josm/gui/util/GuiHelper.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/gui/util/GuiHelper.java	(revision 19534)
+++ /trunk/src/org/openstreetmap/josm/gui/util/GuiHelper.java	(revision 19535)
@@ -268,5 +268,5 @@
             try {
                 return callable.call();
-            } catch (Exception e) { // NOPMD
+            } catch (Exception e) {
                 handleEDTException(e);
                 return null;
Index: /trunk/src/org/openstreetmap/josm/gui/widgets/JosmPasswordField.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/gui/widgets/JosmPasswordField.java	(revision 19534)
+++ /trunk/src/org/openstreetmap/josm/gui/widgets/JosmPasswordField.java	(revision 19535)
@@ -129,5 +129,5 @@
                     try {
                         pasteAction.actionPerformed(e);
-                    } catch (NullPointerException npe) { // NOPMD
+                    } catch (NullPointerException npe) {
                         Logging.log(Logging.LEVEL_ERROR, "NullPointerException occurred because of JDK bug 6322854. "
                                 +"Copy/Paste operation has not been performed. Please complain to Oracle: "+
Index: /trunk/src/org/openstreetmap/josm/io/Compression.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/io/Compression.java	(revision 19534)
+++ /trunk/src/org/openstreetmap/josm/io/Compression.java	(revision 19535)
@@ -178,5 +178,5 @@
     public static InputStream getUncompressedFileInputStream(File file) throws IOException {
         try {
-            return getUncompressedFileInputStream(file.toPath());  // NOPMD
+            return getUncompressedFileInputStream(file.toPath());
         } catch (InvalidPathException e) {
             throw new IOException(e);
@@ -192,5 +192,5 @@
      */
     public static InputStream getUncompressedFileInputStream(Path path) throws IOException {
-        InputStream in = Files.newInputStream(path); // NOPMD
+        InputStream in = Files.newInputStream(path);
         try {
             return byExtension(path.getFileName().toString()).getUncompressedInputStream(in);
@@ -233,5 +233,5 @@
      */
     public static OutputStream getCompressedFileOutputStream(File file) throws IOException {
-        return getCompressedFileOutputStream(file.toPath()); // NOPMD
+        return getCompressedFileOutputStream(file.toPath());
     }
 
@@ -246,5 +246,5 @@
      */
     public static OutputStream getCompressedFileOutputStream(Path path) throws IOException {
-        OutputStream out = Files.newOutputStream(path); // NOPMD
+        OutputStream out = Files.newOutputStream(path);
         try {
             return byExtension(path.getFileName().toString()).getCompressedOutputStream(out);
Index: /trunk/src/org/openstreetmap/josm/io/GeoJSONServerReader.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/io/GeoJSONServerReader.java	(revision 19534)
+++ /trunk/src/org/openstreetmap/josm/io/GeoJSONServerReader.java	(revision 19535)
@@ -37,5 +37,5 @@
                 return null;
             progressMonitor.subTask(tr("Downloading OSM data..."));
-            InputStream uncompressedInputStream = compression.getUncompressedInputStream(in); // NOPMD
+            InputStream uncompressedInputStream = compression.getUncompressedInputStream(in);
             ProgressMonitor subTaskMonitor = progressMonitor.createSubTaskMonitor(1, false);
             return GeoJSONReader.parseDataSet(uncompressedInputStream, subTaskMonitor);
Index: /trunk/src/org/openstreetmap/josm/io/GpxParser.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/io/GpxParser.java	(revision 19534)
+++ /trunk/src/org/openstreetmap/josm/io/GpxParser.java	(revision 19535)
@@ -593,5 +593,5 @@
         } else if (currentState != State.LINK) {
             getAttr().ifPresent(attr ->
-                ((Collection<GpxLink>) attr.computeIfAbsent(META_LINKS, e -> new LinkedList<GpxLink>())).add(currentLink));
+                ((Collection<GpxLink>) attr.computeIfAbsent(META_LINKS, e -> new LinkedList<>())).add(currentLink));
         }
     }
Index: /trunk/src/org/openstreetmap/josm/io/GpxReader.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/io/GpxReader.java	(revision 19534)
+++ /trunk/src/org/openstreetmap/josm/io/GpxReader.java	(revision 19535)
@@ -41,5 +41,5 @@
      */
     public GpxReader(InputStream source) throws IOException {
-        Reader utf8stream = UTFInputStreamReader.create(source); // NOPMD
+        Reader utf8stream = UTFInputStreamReader.create(source);
         Reader filtered = new InvalidXmlCharacterFilter(utf8stream); // NOPMD
         this.inputSource = new InputSource(filtered);
Index: /trunk/src/org/openstreetmap/josm/io/NameFinder.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/io/NameFinder.java	(revision 19534)
+++ /trunk/src/org/openstreetmap/josm/io/NameFinder.java	(revision 19535)
@@ -300,5 +300,5 @@
                 Logging.error(ex); // SAXException does not chain correctly
                 throw new SAXException(ex.getMessage(), ex);
-            } catch (NullPointerException ex) { // NOPMD
+            } catch (NullPointerException ex) {
                 Logging.error(ex); // SAXException does not chain correctly
                 throw new SAXException(tr("Null pointer exception, possibly some missing tags."), ex);
Index: /trunk/src/org/openstreetmap/josm/io/OsmJsonReader.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/io/OsmJsonReader.java	(revision 19534)
+++ /trunk/src/org/openstreetmap/josm/io/OsmJsonReader.java	(revision 19535)
@@ -193,5 +193,5 @@
                 IOException soe = (IOException) exception.getCause();
                 soe.addSuppressed(exception); // Add the caught exception as a suppressed exception
-                throw new IllegalDataException(soe); // NOPMD -- PreserveStackTrace should be fixed with PMD 7
+                throw new IllegalDataException(soe);
             }
             throw exception;
Index: /trunk/src/org/openstreetmap/josm/io/OsmServerLocationReader.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/io/OsmServerLocationReader.java	(revision 19534)
+++ /trunk/src/org/openstreetmap/josm/io/OsmServerLocationReader.java	(revision 19535)
@@ -124,5 +124,5 @@
                 return null;
             progressMonitor.subTask(tr("Downloading OSM data..."));
-            InputStream uncompressedInputStream = compression.getUncompressedInputStream(in); // NOPMD
+            InputStream uncompressedInputStream = compression.getUncompressedInputStream(in);
             ProgressMonitor subTaskMonitor = progressMonitor.createSubTaskMonitor(1, false);
             if ("application/json".equals(contentType)) {
Index: /trunk/src/org/openstreetmap/josm/io/imagery/WMSImagery.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/io/imagery/WMSImagery.java	(revision 19534)
+++ /trunk/src/org/openstreetmap/josm/io/imagery/WMSImagery.java	(revision 19535)
@@ -214,5 +214,5 @@
                 try {
                     capabilitiesUrl = new File(workingAddress).toURI().toURL();
-                } catch (MalformedURLException e1) { // NOPMD
+                } catch (MalformedURLException e1) {
                     // do nothing, raise original exception
                     Logging.trace(e1);
Index: /trunk/src/org/openstreetmap/josm/io/remotecontrol/handler/ImportHandler.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/io/remotecontrol/handler/ImportHandler.java	(revision 19534)
+++ /trunk/src/org/openstreetmap/josm/io/remotecontrol/handler/ImportHandler.java	(revision 19535)
@@ -50,5 +50,5 @@
             }
             LoadAndZoomHandler.parseChangesetTags(args);
-        } catch (RuntimeException ex) { // NOPMD
+        } catch (RuntimeException ex) {
             Logging.warn("RemoteControl: Error parsing import remote control request:");
             Logging.error(ex);
Index: /trunk/src/org/openstreetmap/josm/io/remotecontrol/handler/LoadAndZoomHandler.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/io/remotecontrol/handler/LoadAndZoomHandler.java	(revision 19534)
+++ /trunk/src/org/openstreetmap/josm/io/remotecontrol/handler/LoadAndZoomHandler.java	(revision 19535)
@@ -179,5 +179,5 @@
                 }
             }
-        } catch (RuntimeException ex) { // NOPMD
+        } catch (RuntimeException ex) {
             Logging.warn("RemoteControl: Error parsing load_and_zoom remote control request:");
             Logging.error(ex);
@@ -247,5 +247,5 @@
                 ExceptionDialogUtil.explainException(ex);
             } catch (ExecutionException | TimeoutException |
-                     OsmTransferException | RuntimeException ex) { // NOPMD
+                     OsmTransferException | RuntimeException ex) {
                 ExceptionDialogUtil.explainException(ex);
             }
Index: /trunk/src/org/openstreetmap/josm/io/session/GpxTracksSessionExporter.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/io/session/GpxTracksSessionExporter.java	(revision 19534)
+++ /trunk/src/org/openstreetmap/josm/io/session/GpxTracksSessionExporter.java	(revision 19535)
@@ -80,5 +80,5 @@
     @Override
     // The new closable resources in this method will close the input OutputStream
-    @SuppressWarnings({"squid:S2095", "PMD.CloseResource"})
+    @SuppressWarnings("squid:S2095")
     protected void addDataFile(OutputStream out) {
         Writer writer = new OutputStreamWriter(out, StandardCharsets.UTF_8);
Index: /trunk/src/org/openstreetmap/josm/io/session/MarkerSessionExporter.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/io/session/MarkerSessionExporter.java	(revision 19534)
+++ /trunk/src/org/openstreetmap/josm/io/session/MarkerSessionExporter.java	(revision 19535)
@@ -96,5 +96,5 @@
 
     // The new closable resources in this method will close the input OutputStream
-    @SuppressWarnings({"squid:S2095", "PMD.CloseResource"})
+    @SuppressWarnings("squid:S2095")
     protected void addDataFile(OutputStream out) {
         Writer writer = new OutputStreamWriter(out, StandardCharsets.UTF_8);
Index: /trunk/src/org/openstreetmap/josm/io/session/OsmDataSessionExporter.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/io/session/OsmDataSessionExporter.java	(revision 19534)
+++ /trunk/src/org/openstreetmap/josm/io/session/OsmDataSessionExporter.java	(revision 19535)
@@ -39,5 +39,5 @@
      *            avoid potential future issues)
      */
-    @SuppressWarnings({"squid:S2095", "PMD.CloseResource"}) // All the closeables in this method will close the input OutputStream.
+    @SuppressWarnings("squid:S2095") // All the closeables in this method will close the input OutputStream.
     public static void exportData(DataSet data, OutputStream out) {
         // This writer will close out when it is closed
Index: /trunk/src/org/openstreetmap/josm/plugins/PluginClassLoader.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/plugins/PluginClassLoader.java	(revision 19534)
+++ /trunk/src/org/openstreetmap/josm/plugins/PluginClassLoader.java	(revision 19535)
@@ -89,5 +89,4 @@
      * @return the class, if found, otherwise {@code null}
      */
-    @SuppressWarnings("PMD.CloseResource") // NOSONAR We do *not* want to close class loaders in this method...
     private Class<?> findClassInDependencies(String name, boolean resolve) {
         for (PluginClassLoader dep : dependencies) {
@@ -106,5 +105,4 @@
 
     @Override
-    @SuppressWarnings("PMD.CloseResource") // NOSONAR We do *not* want to close class loaders in this method...
     public URL findResource(String name) {
         URL resource = super.findResource(name);
Index: /trunk/src/org/openstreetmap/josm/plugins/PluginHandler.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/plugins/PluginHandler.java	(revision 19534)
+++ /trunk/src/org/openstreetmap/josm/plugins/PluginHandler.java	(revision 19535)
@@ -831,5 +831,4 @@
      * @param plugins the plugins to add
      */
-    @SuppressWarnings("PMD.CloseResource") // NOSONAR We do *not* want to close class loaders in this method...
     private static void extendJoinedPluginResourceCL(Collection<PluginInformation> plugins) {
         // iterate all plugins and collect all libraries of all plugins:
@@ -877,5 +876,5 @@
                         + "Delete from preferences?</html>", "'"+Utils.escapeReservedCharactersHTML(plugin.name)+"'", plugin.className);
             }
-        } catch (RuntimeException e) { // NOPMD
+        } catch (RuntimeException e) {
             pluginLoadingExceptions.put(plugin.name, e);
             Logging.error(e);
@@ -937,5 +936,5 @@
      * @param toLoad The plugins to generate the classloaders for
      */
-    @SuppressWarnings({"squid:S2095", "PMD.CloseResource"}) // NOSONAR the classloaders and put in a map which we want to keep.
+    @SuppressWarnings("squid:S2095") // NOSONAR the classloaders and put in a map which we want to keep.
     private static void generateClassloaders(List<PluginInformation> toLoad) {
         for (PluginInformation info : toLoad) {
@@ -953,5 +952,5 @@
      * @param toLoad The plugins to resolve dependencies for
      */
-    @SuppressWarnings({"squid:S2095", "PMD.CloseResource"}) // NOSONAR the classloaders are from a persistent map
+    @SuppressWarnings("squid:S2095") // NOSONAR the classloaders are from a persistent map
     private static void resolveDependencies(List<PluginInformation> toLoad) {
         for (PluginInformation info : toLoad) {
Index: /trunk/src/org/openstreetmap/josm/tools/HttpClient.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/tools/HttpClient.java	(revision 19534)
+++ /trunk/src/org/openstreetmap/josm/tools/HttpClient.java	(revision 19535)
@@ -402,7 +402,4 @@
          * @see HttpURLConnection#getErrorStream()
          */
-        @SuppressWarnings({"resource",
-                /* All 4 `InputStream in` reassignments would close the original when the returned stream is closed */
-                "PMD.CloseResource"})
         public final InputStream getContent() throws IOException {
             InputStream in = new ProgressInputStream(getInputStream(), getContentLength(), monitor);
Index: /trunk/src/org/openstreetmap/josm/tools/ImageProvider.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/tools/ImageProvider.java	(revision 19534)
+++ /trunk/src/org/openstreetmap/josm/tools/ImageProvider.java	(revision 19535)
@@ -1582,5 +1582,5 @@
         CheckParameterUtil.ensureParameterNotNull(input, "input");
 
-        ImageInputStream stream = createImageInputStream(input); // NOPMD
+        ImageInputStream stream = createImageInputStream(input);
         BufferedImage bi = read(stream, readMetadata, enforceTransparency);
         if (bi == null) {
Index: /trunk/src/org/openstreetmap/josm/tools/bugreport/BugReport.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/tools/bugreport/BugReport.java	(revision 19534)
+++ /trunk/src/org/openstreetmap/josm/tools/bugreport/BugReport.java	(revision 19535)
@@ -154,5 +154,5 @@
             try {
                 out.println(header);
-            } catch (RuntimeException e) { // NOPMD
+            } catch (RuntimeException e) {
                 out.println("Could not generate status report: " + e.getMessage());
             }
Index: /trunk/src/org/openstreetmap/josm/tools/bugreport/ReportedException.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/tools/bugreport/ReportedException.java	(revision 19534)
+++ /trunk/src/org/openstreetmap/josm/tools/bugreport/ReportedException.java	(revision 19535)
@@ -82,5 +82,5 @@
         try {
             BugReportQueue.getInstance().submit(this);
-        } catch (RuntimeException e) { // NOPMD
+        } catch (RuntimeException e) {
             Logging.error(e);
         }
@@ -227,5 +227,5 @@
                 string = value.toString();
             }
-        } catch (RuntimeException t) { // NOPMD
+        } catch (RuntimeException t) {
             Logging.warn(t);
             string = "<Error calling toString()>";
Index: /trunk/tools/pmd/josm-ruleset.xml
===================================================================
--- /trunk/tools/pmd/josm-ruleset.xml	(revision 19534)
+++ /trunk/tools/pmd/josm-ruleset.xml	(revision 19535)
@@ -108,5 +108,4 @@
   <rule ref="category/java/design.xml">
     <exclude name="PublicMemberInNonPublicType" reason="Fixing these issues does not improve the code quality, rather the opposite"/>
-    <exclude name="AvoidCatchingGenericException"/>
     <exclude name="AvoidDeeplyNestedIfStmts"/>
     <exclude name="AvoidRethrowingException"/>
@@ -147,4 +146,5 @@
   </rule>
   <rule ref="category/java/errorprone.xml">
+    <exclude name="AvoidCatchingGenericException"/>
     <exclude name="AssignmentInOperand"/>
     <exclude name="AssignmentToNonFinalStatic"/>
