Repository: logging-log4j2
Updated Branches:
  refs/heads/LOG4J2-1651 5cce8c115 -> 858764a00


Remove old code now that we have SortedProperties.

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

Branch: refs/heads/LOG4J2-1651
Commit: 858764a00d6c8ebfcad78756bf5eaa45ce60f8aa
Parents: 5cce8c1
Author: Gary Gregory <[email protected]>
Authored: Sat Nov 5 19:48:49 2016 -0700
Committer: Gary Gregory <[email protected]>
Committed: Sat Nov 5 19:48:49 2016 -0700

----------------------------------------------------------------------
 .../core/config/plugins/processor/PluginCache.java | 17 +----------------
 1 file changed, 1 insertion(+), 16 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/858764a0/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 912f247..bf79ccc 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,22 +108,7 @@ public class PluginCache {
 
             @Override
             public void writeCache(final PluginCache pluginCache, final 
OutputStream os) throws IOException {
-                final ByteArrayOutputStream baos = new ByteArrayOutputStream();
-                toProperties(pluginCache).store(baos, "Log4j2 plugin cache 
file");
-                final String str = baos.toString("UTF-8");
-                // sort
-                final BufferedReader r = new BufferedReader(new 
StringReader(str));
-                String line;
-                final List<String> list = new ArrayList<>();
-                while ((line = r.readLine()) != null) {
-                    list.add(line);
-                }
-                Collections.sort(list);
-                // write sorted
-                final PrintStream ps = new PrintStream(os);
-                for (final String string : list) {
-                    ps.println(string);
-                }
+                toProperties(pluginCache).store(os, "Log4j2 plugin cache 
file");
             }
 
         },

Reply via email to