Repository: logging-log4j2 Updated Branches: refs/heads/master 4791f6d34 -> 2fc6784f7
Minor refactoring of dup calls. Project: http://git-wip-us.apache.org/repos/asf/logging-log4j2/repo Commit: http://git-wip-us.apache.org/repos/asf/logging-log4j2/commit/2fc6784f Tree: http://git-wip-us.apache.org/repos/asf/logging-log4j2/tree/2fc6784f Diff: http://git-wip-us.apache.org/repos/asf/logging-log4j2/diff/2fc6784f Branch: refs/heads/master Commit: 2fc6784f7566586ff40f8d08ab420e3f94133f85 Parents: 4791f6d Author: Gary Gregory <[email protected]> Authored: Fri Sep 23 17:52:59 2016 -0700 Committer: Gary Gregory <[email protected]> Committed: Fri Sep 23 17:52:59 2016 -0700 ---------------------------------------------------------------------- .../org/apache/log4j/config/Log4j1ConfigurationConverter.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/2fc6784f/log4j-1.2-api/src/main/java/org/apache/log4j/config/Log4j1ConfigurationConverter.java ---------------------------------------------------------------------- diff --git a/log4j-1.2-api/src/main/java/org/apache/log4j/config/Log4j1ConfigurationConverter.java b/log4j-1.2-api/src/main/java/org/apache/log4j/config/Log4j1ConfigurationConverter.java index e48e54c..9e63a73 100644 --- a/log4j-1.2-api/src/main/java/org/apache/log4j/config/Log4j1ConfigurationConverter.java +++ b/log4j-1.2-api/src/main/java/org/apache/log4j/config/Log4j1ConfigurationConverter.java @@ -142,11 +142,13 @@ public final class Log4j1ConfigurationConverter { } InputStream getInputStream() throws IOException { - return cla.pathIn == null ? System.in : new InputStreamWrapper(Files.newInputStream(cla.pathIn), cla.pathIn.toString()); + final Path pathIn = cla.getPathIn(); + return pathIn == null ? System.in : new InputStreamWrapper(Files.newInputStream(pathIn), pathIn.toString()); } OutputStream getOutputStream() throws IOException { - return cla.pathOut == null ? System.out : Files.newOutputStream(cla.pathOut); + final Path pathOut = cla.getPathOut(); + return pathOut == null ? System.out : Files.newOutputStream(pathOut); } private void run() {
