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

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


The following commit(s) were added to refs/heads/main by this push:
     new 16a91d0372 Inline local variable
16a91d0372 is described below

commit 16a91d0372fbe176ca95925c4513ea5143bb757a
Author: Gary Gregory <[email protected]>
AuthorDate: Thu May 30 19:22:11 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 1798920605..5118f1cb9c 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
@@ -325,8 +325,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