From 3d1706fcbe7f95830ff6fd23cf679ee55c6d0595 Mon Sep 17 00:00:00 2001 From: Instrumental Date: Wed, 7 Aug 2019 13:40:39 -0500 Subject: Remove Tabs, per Jococo Issue-ID: AAF-932 Change-Id: I3ab0ebcc082048d2d1424a58a90ea479fb005ee6 Signed-off-by: Instrumental --- .../org/onap/aaf/misc/env/log4j/LogFileNamer.java | 30 +++++++++++----------- 1 file changed, 15 insertions(+), 15 deletions(-) (limited to 'misc/log4j/src/main/java/org') diff --git a/misc/log4j/src/main/java/org/onap/aaf/misc/env/log4j/LogFileNamer.java b/misc/log4j/src/main/java/org/onap/aaf/misc/env/log4j/LogFileNamer.java index 85aae6f0..35d5038c 100644 --- a/misc/log4j/src/main/java/org/onap/aaf/misc/env/log4j/LogFileNamer.java +++ b/misc/log4j/src/main/java/org/onap/aaf/misc/env/log4j/LogFileNamer.java @@ -56,24 +56,24 @@ public class LogFileNamer { * @throws IOException */ public String setAppender(String appender) throws IOException { - File f = new File(String.format(FIRST_FILE_FORMAT_STR, dir, root, appender)); - File lock = new File(f.getAbsoluteFile()+".lock"); - if(f.exists()) { - if(lock.exists()) { - int i = 0; - while ((f = new File(String.format(FILE_FORMAT_STR, dir, root, appender, i))).exists() && - (lock = new File(f.getAbsoluteFile()+".lock")).exists()) { - ++i; - } - } - } + File f = new File(String.format(FIRST_FILE_FORMAT_STR, dir, root, appender)); + File lock = new File(f.getAbsoluteFile()+".lock"); + if(f.exists()) { + if(lock.exists()) { + int i = 0; + while ((f = new File(String.format(FILE_FORMAT_STR, dir, root, appender, i))).exists() && + (lock = new File(f.getAbsoluteFile()+".lock")).exists()) { + ++i; + } + } + } try { - lock.createNewFile(); - lock.deleteOnExit(); - f.createNewFile(); + lock.createNewFile(); + lock.deleteOnExit(); + f.createNewFile(); } catch (IOException e) { - throw new IOException("Cannot create file '" + f.getCanonicalPath() + '\'', e); + throw new IOException("Cannot create file '" + f.getCanonicalPath() + '\'', e); } System.setProperty("LOG4J_FILENAME_" + appender, f.getCanonicalPath()); return appender; -- cgit 1.2.3-korg