diff --git a/src/main/java/teetime/framework/pipe/PipeFactoryLoader.java b/src/main/java/teetime/framework/pipe/PipeFactoryLoader.java index 6c1f251d62fac85043c6ad1b5563bef56dd7a619..d9b2a140f28a4073feb2602f1cc37a00cf5003af 100644 --- a/src/main/java/teetime/framework/pipe/PipeFactoryLoader.java +++ b/src/main/java/teetime/framework/pipe/PipeFactoryLoader.java @@ -53,7 +53,9 @@ public final class PipeFactoryLoader { pipeFactories.add(pipeFactory); } } catch (ClassNotFoundException e) { - LOGGER.warn("Could not find class: " + line, e); // NOMPD (PMD.GuardLogStatement) + if (LOGGER.isWarnEnabled()) { + LOGGER.warn("Could not find class: " + line, e); + } } catch (InstantiationException e) { LOGGER.warn("Could not instantiate pipe factory", e); } catch (IllegalAccessException e) { diff --git a/src/main/java/teetime/framework/pipe/PipeFactoryRegistry.java b/src/main/java/teetime/framework/pipe/PipeFactoryRegistry.java index 6c40c6bdc0f4f82b0f1ebb444a7f5e59b85df823..335d7349ecb0c94f8364fde17a43fd9fe234892f 100644 --- a/src/main/java/teetime/framework/pipe/PipeFactoryRegistry.java +++ b/src/main/java/teetime/framework/pipe/PipeFactoryRegistry.java @@ -101,7 +101,9 @@ public final class PipeFactoryRegistry { public void register(final IPipeFactory pipeFactory) { final String key = this.buildKey(pipeFactory.getThreadCommunication(), pipeFactory.getOrdering(), pipeFactory.isGrowable()); this.pipeFactories.put(key, pipeFactory); - LOGGER.info("Registered pipe factory: " + pipeFactory.getClass().getCanonicalName()); + if (LOGGER.isInfoEnabled()) { + LOGGER.info("Registered pipe factory: " + pipeFactory.getClass().getCanonicalName()); + } } private String buildKey(final ThreadCommunication tc, final PipeOrdering ordering, final boolean growable) {