elharo commented on code in PR #2376: URL: https://github.com/apache/maven/pull/2376#discussion_r2105403040
########## compat/maven-compat/src/main/java/org/apache/maven/repository/legacy/DefaultUpdateCheckManager.java: ########## @@ -303,7 +301,7 @@ private Properties read(File touchfile) { Properties props = new Properties(); try (FileInputStream in = new FileInputStream(touchfile)) { - try (FileLock lock = in.getChannel().lock(0, Long.MAX_VALUE, true)) { + try (FileLock ignored = in.getChannel().lock(0, Long.MAX_VALUE, true)) { Review Comment: It's used by the try with resources auto-close. See https://stackoverflow.com/questions/70773389/try-with-resource-without-declaring-variable Unless you can remove the variable, PMD is wrong that this is unused. Maybe Idea is too. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: issues-unsubscr...@maven.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org