You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@logging.apache.org by gg...@apache.org on 2016/11/06 02:49:22 UTC

logging-log4j2 git commit: Refactor common string into constant.

Repository: logging-log4j2
Updated Branches:
  refs/heads/LOG4J2-1651 858764a00 -> 2ec161ce6


Refactor common string into constant.

Project: http://git-wip-us.apache.org/repos/asf/logging-log4j2/repo
Commit: http://git-wip-us.apache.org/repos/asf/logging-log4j2/commit/2ec161ce
Tree: http://git-wip-us.apache.org/repos/asf/logging-log4j2/tree/2ec161ce
Diff: http://git-wip-us.apache.org/repos/asf/logging-log4j2/diff/2ec161ce

Branch: refs/heads/LOG4J2-1651
Commit: 2ec161ce60c0237ce3febdde6932644ef05ba58a
Parents: 858764a
Author: Gary Gregory <gg...@apache.org>
Authored: Sat Nov 5 19:49:21 2016 -0700
Committer: Gary Gregory <gg...@apache.org>
Committed: Sat Nov 5 19:49:21 2016 -0700

----------------------------------------------------------------------
 .../log4j/core/config/plugins/processor/PluginCache.java       | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/2ec161ce/log4j-core/src/main/java/org/apache/logging/log4j/core/config/plugins/processor/PluginCache.java
----------------------------------------------------------------------
diff --git a/log4j-core/src/main/java/org/apache/logging/log4j/core/config/plugins/processor/PluginCache.java b/log4j-core/src/main/java/org/apache/logging/log4j/core/config/plugins/processor/PluginCache.java
index bf79ccc..9486042 100644
--- a/log4j-core/src/main/java/org/apache/logging/log4j/core/config/plugins/processor/PluginCache.java
+++ b/log4j-core/src/main/java/org/apache/logging/log4j/core/config/plugins/processor/PluginCache.java
@@ -108,7 +108,7 @@ public class PluginCache {
 
             @Override
             public void writeCache(final PluginCache pluginCache, final OutputStream os) throws IOException {
-                toProperties(pluginCache).store(os, "Log4j2 plugin cache file");
+                toProperties(pluginCache).store(os, COMMENT);
             }
 
         },
@@ -127,7 +127,7 @@ public class PluginCache {
 
             @Override
             public void writeCache(final PluginCache pluginCache, final OutputStream os) throws IOException {
-                toProperties(pluginCache).storeToXML(os, "Log4j2 plugin cache file");
+                toProperties(pluginCache).storeToXML(os, COMMENT);
             }
         },
 
@@ -149,6 +149,8 @@ public class PluginCache {
             }
         };
 
+        private static final String COMMENT = "Log4j2 plugin cache file";
+
         /**
          * Parses a comma-separated list of {@code Format}s.
          *