code style

This commit is contained in:
Fredrik Osterlind 2012-03-28 11:01:17 +02:00
parent 3c3610d9cc
commit 7c2b6238fe
1 changed files with 14 additions and 14 deletions

View File

@ -2943,24 +2943,24 @@ public class GUI extends Observable {
* null * null
*/ */
public static void main(String[] args) { public static void main(String[] args) {
String logConfigFile = null; String logConfigFile = null;
for (String element : args) { for (String element : args) {
if (element.startsWith("-log4j=")) { if (element.startsWith("-log4j=")) {
String arg = element.substring("-log4j=".length()); String arg = element.substring("-log4j=".length());
logConfigFile = arg; logConfigFile = arg;
} }
} }
try { try {
// Configure logger // Configure logger
if ( logConfigFile != null){ if (logConfigFile != null) {
if(new File(logConfigFile).exists()) { if (new File(logConfigFile).exists()) {
DOMConfigurator.configure(logConfigFile); DOMConfigurator.configure(logConfigFile);
} else { } else {
System.err.println("Failed to open " + logConfigFile); System.err.println("Failed to open " + logConfigFile);
System.exit(1); System.exit(1);
} }
} else if ((new File(LOG_CONFIG_FILE)).exists()) { } else if (new File(LOG_CONFIG_FILE).exists()) {
DOMConfigurator.configure(LOG_CONFIG_FILE); DOMConfigurator.configure(LOG_CONFIG_FILE);
} else { } else {
// Used when starting from jar // Used when starting from jar