Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSimone Bordet2014-07-15 16:49:14 +0000
committerSimone Bordet2014-07-15 16:49:14 +0000
commit745f757552698139934a6f403d9c7396cb06044a (patch)
tree92affb2e411dd4d54bc9ffd5bbf78a8643ac3af6 /jetty-annotations
parent406eba7e26b535c5729e80ce55323af72e47c5c9 (diff)
downloadorg.eclipse.jetty.project-745f757552698139934a6f403d9c7396cb06044a.tar.gz
org.eclipse.jetty.project-745f757552698139934a6f403d9c7396cb06044a.tar.xz
org.eclipse.jetty.project-745f757552698139934a6f403d9c7396cb06044a.zip
Guarded calls to LOG.debug() with if (LOG.isDebugEnabled()) to reduce allocation of varargs Object[].
Diffstat (limited to 'jetty-annotations')
-rw-r--r--jetty-annotations/src/main/java/org/eclipse/jetty/annotations/AnnotationConfiguration.java15
1 files changed, 7 insertions, 8 deletions
diff --git a/jetty-annotations/src/main/java/org/eclipse/jetty/annotations/AnnotationConfiguration.java b/jetty-annotations/src/main/java/org/eclipse/jetty/annotations/AnnotationConfiguration.java
index 4845caaa59..2a79a43bd1 100644
--- a/jetty-annotations/src/main/java/org/eclipse/jetty/annotations/AnnotationConfiguration.java
+++ b/jetty-annotations/src/main/java/org/eclipse/jetty/annotations/AnnotationConfiguration.java
@@ -36,7 +36,6 @@ import java.util.concurrent.ConcurrentHashMap;
import java.util.concurrent.CountDownLatch;
import java.util.concurrent.Semaphore;
import java.util.concurrent.TimeUnit;
-
import javax.servlet.ServletContainerInitializer;
import javax.servlet.annotation.HandlesTypes;
@@ -557,16 +556,16 @@ public class AnnotationConfiguration extends AbstractConfiguration
boolean timeout = !latch.await(getMaxScanWait(context), TimeUnit.SECONDS);
if (LOG.isDebugEnabled())
- {
+ {
for (ParserTask p:_parserTasks)
LOG.debug("Scanned {} in {}ms", p.getResource(), TimeUnit.MILLISECONDS.convert(p.getStatistic().getElapsed(), TimeUnit.NANOSECONDS));
+
+ LOG.debug("Scanned {} container path jars, {} WEB-INF/lib jars, {} WEB-INF/classes dirs in {}ms for context {}",
+ _containerPathStats.getTotal(), _webInfLibStats.getTotal(), _webInfClassesStats.getTotal(),
+ (TimeUnit.MILLISECONDS.convert(System.nanoTime()-start, TimeUnit.NANOSECONDS)),
+ context);
}
-
- LOG.debug("Scanned {} container path jars, {} WEB-INF/lib jars, {} WEB-INF/classes dirs in {}ms for context {}",
- _containerPathStats.getTotal(), _webInfLibStats.getTotal(), _webInfClassesStats.getTotal(),
- (TimeUnit.MILLISECONDS.convert(System.nanoTime()-start, TimeUnit.NANOSECONDS)),
- context);
-
+
if (timeout)
me.add(new Exception("Timeout scanning annotations"));
me.ifExceptionThrow();

Back to the top