From b1c8641a63a67e3c64d948f9e8dce5c01e11e2dd Mon Sep 17 00:00:00 2001 From: mcentner Date: Wed, 5 May 2010 15:29:01 +0000 Subject: Merged feature branch mocca-1.2.13-id@r724 back to trunk. git-svn-id: https://joinup.ec.europa.eu/svn/mocca/trunk@725 8a26b1a7-26f0-462f-b9ef-d0e30c41f5a4 --- .../at/gv/egiz/bku/viewer/ValidatorFactory.java | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) (limited to 'bkucommon/src/main/java/at/gv/egiz/bku/viewer/ValidatorFactory.java') diff --git a/bkucommon/src/main/java/at/gv/egiz/bku/viewer/ValidatorFactory.java b/bkucommon/src/main/java/at/gv/egiz/bku/viewer/ValidatorFactory.java index ad9bf6bb..c5a90a61 100644 --- a/bkucommon/src/main/java/at/gv/egiz/bku/viewer/ValidatorFactory.java +++ b/bkucommon/src/main/java/at/gv/egiz/bku/viewer/ValidatorFactory.java @@ -26,15 +26,15 @@ import java.util.Iterator; import java.util.List; import java.util.Properties; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; public class ValidatorFactory { /** * Logging facility. */ - protected static Log log = LogFactory.getLog(ValidatorFactory.class); + private final Logger log = LoggerFactory.getLogger(ValidatorFactory.class); private static final Class VALIDATOR_CLASS = Validator.class; @@ -93,7 +93,7 @@ public class ValidatorFactory { try { properties.load(url.openStream()); } catch (IOException e) { - log.error("Failed to load service properties " + url.toExternalForm()); + log.error("Failed to load service properties {}.", url.toExternalForm()); continue; } String className = properties.getProperty(mimeType); @@ -124,22 +124,22 @@ public class ValidatorFactory { return (Validator) implConstructor.newInstance((Object[])null); } catch (InvocationTargetException ex) { //ex from constructor - log.error("Failed to initialize validator class '" + className + "': " + ex.getCause().getMessage(), ex.getCause()); + log.error("Failed to initialize validator class '{}'.", className, ex.getCause()); throw ex; } catch (NoSuchMethodException ex) { - log.error("Validator class '" + className + "' has no nullary constructor", ex); + log.error("Validator class '{}' has no nullary constructor.", className, ex); throw ex; } catch (ClassNotFoundException e) { - log.error("Validator class '" + className + "' not found.", e); + log.error("Validator class '{}' not found.", className, e); throw e; } catch (InstantiationException e) { - log.error("Faild to initialize validator class '" + className + "'.", e); + log.error("Faild to initialize validator class '{}'.", className, e); throw e; } catch (IllegalAccessException e) { - log.error("Faild to initialize validator class '" + className + "'.", e); + log.error("Faild to initialize validator class '{}'.", className, e); throw e; } catch (ClassCastException e) { - log.error("Class '" + className + "' is not a validator implementation.", e); + log.error("Class '{}' is not a validator implementation.", className, e); throw e; } @@ -168,7 +168,7 @@ public class ValidatorFactory { }; } catch (IOException e) { - log.error("Failed to enumerate resources " + SERVICE_ID); + log.error("Failed to enumerate resources {}.", SERVICE_ID); List list = Collections.emptyList(); return list.iterator(); } -- cgit v1.2.3