From 0a24f8c56cb0f156bd548883a5e3b53cfc149ce2 Mon Sep 17 00:00:00 2001 From: tkellner Date: Wed, 10 Apr 2013 19:28:34 +0000 Subject: Move log4j props and config to avoid name clashes git-svn-id: https://joinup.ec.europa.eu/svn/pdf-over/trunk@340 174cde9d-5d70-4d2a-aa98-46368bc2aaf7 --- .../gui/workflow/states/PrepareConfigurationState.java | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) (limited to 'pdf-over-gui/src/main/java/at/asit') diff --git a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/states/PrepareConfigurationState.java b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/states/PrepareConfigurationState.java index 955d125a..3a9048ba 100644 --- a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/states/PrepareConfigurationState.java +++ b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/states/PrepareConfigurationState.java @@ -57,7 +57,7 @@ public class PrepareConfigurationState extends State { private static final Logger log = LoggerFactory .getLogger(PrepareConfigurationState.class); - private static String RES_SEPARATOR = "/"; //$NON-NLS-1$ + private static String RES_PATH = "/at/asit/pdfover/gui/"; //$NON-NLS-1$ private static String FILE_SEPARATOR = File.separator; @@ -104,7 +104,7 @@ public class PrepareConfigurationState extends State { // default value! try { InputStream is = this.getClass().getResourceAsStream( - RES_SEPARATOR + filename); + RES_PATH + filename); this.stateMachine.getConfigProvider() .loadConfiguration(is); @@ -150,10 +150,11 @@ public class PrepareConfigurationState extends State { InputStream inputStream = null; FileOutputStream pdfOverConfig = null; try { - inputStream = this.getClass().getResourceAsStream( - RES_SEPARATOR + Constants.DEFAULT_CONFIG_FILENAME); - pdfOverConfig = new FileOutputStream(this.stateMachine.getConfigProvider().getConfigurationDirectory() - + FILE_SEPARATOR + Constants.DEFAULT_CONFIG_FILENAME); + inputStream = this.getClass().getResourceAsStream(RES_PATH + + Constants.DEFAULT_CONFIG_FILENAME); + pdfOverConfig = new FileOutputStream( + this.stateMachine.getConfigProvider().getConfigurationDirectory() + + FILE_SEPARATOR + Constants.DEFAULT_CONFIG_FILENAME); while ((byteCount = inputStream.read(buffer)) >= 0) { pdfOverConfig.write(buffer, 0, byteCount); @@ -188,7 +189,7 @@ public class PrepareConfigurationState extends State { pdfOverConfig = null; try { inputStream = this.getClass().getResourceAsStream( - RES_SEPARATOR + Constants.DEFAULT_LOG4J_FILENAME); + RES_PATH + Constants.DEFAULT_LOG4J_FILENAME); pdfOverConfig = new FileOutputStream(this.stateMachine.getConfigProvider().getConfigurationDirectory() + FILE_SEPARATOR + Constants.DEFAULT_LOG4J_FILENAME); -- cgit v1.2.3