Commit cbccc937 authored by Nico Mack's avatar Nico Mack

Changes resulting from refactoring of Logger in TangibleApplication

class
parent 14c6101f
......@@ -66,7 +66,7 @@ public abstract class TangibleApplication {
}
/** A {@link Logger} to log all messages during execution. */
protected static final Logger logger = LoggerFactory.getLogger(TangibleApplication.class.getSimpleName());
protected static final Logger LOGGER = LoggerFactory.getLogger(TangibleApplication.class.getSimpleName());
/**
* An instance of the {@link TangibleObjectManager} to handle all interactions with tangible
......@@ -121,25 +121,25 @@ public abstract class TangibleApplication {
try {
adapter = (TuiAdapter) Class.forName(properties.getProperty("adapter.class")).getConstructor(StageManager.class).newInstance(stageManager); //$NON-NLS-1$
} catch (InstantiationException e) {
logger.error("Cannot instantiate adapter. The adapter must be a concrete class, not an interface or abstract class and it must directly inherit from TuiAdapter! Check your properties file and set adapter.class accordingly."); //$NON-NLS-1$
LOGGER.error("Cannot instantiate adapter. The adapter must be a concrete class, not an interface or abstract class and it must directly inherit from TuiAdapter! Check your properties file and set adapter.class accordingly."); //$NON-NLS-1$
System.exit(42);
} catch (IllegalAccessException e) {
logger.error("The currently executing method does not have access to the definition of the constructor."); //$NON-NLS-1$
LOGGER.error("The currently executing method does not have access to the definition of the constructor."); //$NON-NLS-1$
System.exit(42);
} catch (IllegalArgumentException e) {
logger.error("A erroneous argument has been passed to the adapter."); //$NON-NLS-1$
LOGGER.error("A erroneous argument has been passed to the adapter."); //$NON-NLS-1$
System.exit(42);
} catch (InvocationTargetException e) {
logger.error("An exception has been thrown in the constructor of the adapter."); //$NON-NLS-1$
LOGGER.error("An exception has been thrown in the constructor of the adapter."); //$NON-NLS-1$
System.exit(42);
} catch (NoSuchMethodException e) {
logger.error("The called method was not found. Make sure your implementation supports the method."); //$NON-NLS-1$
LOGGER.error("The called method was not found. Make sure your implementation supports the method."); //$NON-NLS-1$
System.exit(42);
} catch (SecurityException e) {
logger.error("Security violation."); //$NON-NLS-1$
LOGGER.error("Security violation."); //$NON-NLS-1$
System.exit(42);
} catch (ClassNotFoundException e) {
logger.error("The class " + properties.getProperty("adapter.class") + " was not found. Check your spelling!"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
LOGGER.error("The class " + properties.getProperty("adapter.class") + " was not found. Check your spelling!"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
System.exit(42);
}
......@@ -160,7 +160,7 @@ public abstract class TangibleApplication {
try {
document = builder.build(xmlFile);
} catch (IOException | JDOMException e) {
logger.error("Error occured while trying to process the object bootstrapping file!", e); //$NON-NLS-1$
LOGGER.error("Error occured while trying to process the object bootstrapping file!", e); //$NON-NLS-1$
throw new BuildException("The document containing the bootstrapping information could not be processed!", e); //$NON-NLS-1$
}
......
......@@ -239,7 +239,7 @@ public class TangibleApplicationTest2 {
try {
adapter = (TuiAdapter) Class.forName(properties.getProperty("tableAdapter")).getConstructor().newInstance(); //$NON-NLS-1$
} catch (NoSuchMethodException e) {
logger.error("The called method was not found"); //$NON-NLS-1$
LOGGER.error("The called method was not found"); //$NON-NLS-1$
System.exit(42);
}
}
......@@ -265,7 +265,7 @@ public class TangibleApplicationTest2 {
try {
adapter = (TuiAdapter) Class.forName(properties.getProperty("tableAdapter")).getConstructor(TangibleInterfaceManager.class).newInstance(new String()); //$NON-NLS-1$
} catch (IllegalArgumentException e) {
logger.error("A wrong argument has been passed to the adapter."); //$NON-NLS-1$
LOGGER.error("A wrong argument has been passed to the adapter."); //$NON-NLS-1$
System.exit(42);
}
}
......@@ -292,7 +292,7 @@ public class TangibleApplicationTest2 {
try {
adapter = new TestFakeAdapter(null);
} catch (InvocationTargetException e) {
logger.error("An exception has been thrown in the constructor of the adapter"); //$NON-NLS-1$
LOGGER.error("An exception has been thrown in the constructor of the adapter"); //$NON-NLS-1$
System.exit(42);
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment