This is an automated email from the ASF dual-hosted git repository.

ggregory pushed a commit to branch 2.x
in repository https://gitbox.apache.org/repos/asf/logging-log4j2.git


The following commit(s) were added to refs/heads/2.x by this push:
     new 0f85bdda75 Inline local variable
0f85bdda75 is described below

commit 0f85bdda75a7cf4e67dd03b38baee4eeaf386ec5
Author: Gary Gregory <garydgreg...@gmail.com>
AuthorDate: Thu May 30 19:11:49 2024 -0400

    Inline local variable
---
 .../src/main/java/org/apache/logging/log4j/core/util/WatchManager.java | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git 
a/log4j-core/src/main/java/org/apache/logging/log4j/core/util/WatchManager.java 
b/log4j-core/src/main/java/org/apache/logging/log4j/core/util/WatchManager.java
index 1761498087..15e9009b75 100644
--- 
a/log4j-core/src/main/java/org/apache/logging/log4j/core/util/WatchManager.java
+++ 
b/log4j-core/src/main/java/org/apache/logging/log4j/core/util/WatchManager.java
@@ -337,8 +337,7 @@ public class WatchManager extends AbstractLifeCycle {
      * @since 2.11.0
      */
     public void unwatchFile(final File file) {
-        final Source source = new Source(file);
-        unwatch(source);
+        unwatch(new Source(file));
     }
 
     /**

Reply via email to