Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJan Bartel2014-01-13 03:50:41 -0500
committerJan Bartel2014-01-13 03:50:41 -0500
commita8b74ea9afb5fd46597ac55c4ea6014fceea13c0 (patch)
tree5463e045f41f8527ad388bbbe0f292f3d36a32ff /jetty-osgi/jetty-osgi-boot/src
parent91429ea12304e75efbeaf8a06b994aa1fc4180ed (diff)
downloadorg.eclipse.jetty.project-a8b74ea9afb5fd46597ac55c4ea6014fceea13c0.tar.gz
org.eclipse.jetty.project-a8b74ea9afb5fd46597ac55c4ea6014fceea13c0.tar.xz
org.eclipse.jetty.project-a8b74ea9afb5fd46597ac55c4ea6014fceea13c0.zip
425275 org.eclipse.jetty.osgi.annotations.AnnotationConfiguration.BundleParserTask.getStatistic() returns null when debug is enabled.
Diffstat (limited to 'jetty-osgi/jetty-osgi-boot/src')
-rw-r--r--jetty-osgi/jetty-osgi-boot/src/main/java/org/eclipse/jetty/osgi/annotations/AnnotationConfiguration.java17
1 files changed, 15 insertions, 2 deletions
diff --git a/jetty-osgi/jetty-osgi-boot/src/main/java/org/eclipse/jetty/osgi/annotations/AnnotationConfiguration.java b/jetty-osgi/jetty-osgi-boot/src/main/java/org/eclipse/jetty/osgi/annotations/AnnotationConfiguration.java
index 1f13fc1bf3..322aec55e7 100644
--- a/jetty-osgi/jetty-osgi-boot/src/main/java/org/eclipse/jetty/osgi/annotations/AnnotationConfiguration.java
+++ b/jetty-osgi/jetty-osgi-boot/src/main/java/org/eclipse/jetty/osgi/annotations/AnnotationConfiguration.java
@@ -25,6 +25,8 @@ import org.eclipse.jetty.annotations.AnnotationParser.Handler;
import org.eclipse.jetty.annotations.ClassNameResolver;
import org.eclipse.jetty.osgi.boot.OSGiWebappConstants;
import org.eclipse.jetty.osgi.boot.utils.internal.PackageAdminServiceTracker;
+import org.eclipse.jetty.util.log.Log;
+import org.eclipse.jetty.util.log.Logger;
import org.eclipse.jetty.util.resource.Resource;
import org.eclipse.jetty.webapp.WebAppContext;
import org.osgi.framework.Bundle;
@@ -37,12 +39,14 @@ import org.osgi.framework.Constants;
*/
public class AnnotationConfiguration extends org.eclipse.jetty.annotations.AnnotationConfiguration
{
+ private static final Logger LOG = Log.getLogger(org.eclipse.jetty.annotations.AnnotationConfiguration.class);
+
public class BundleParserTask extends ParserTask
{
public BundleParserTask (AnnotationParser parser, Set<? extends Handler>handlers, Resource resource, ClassNameResolver resolver)
{
- super(parser, handlers, resource, resolver);
+ super(parser, handlers, resource, resolver);
}
public Void call() throws Exception
@@ -51,7 +55,11 @@ public class AnnotationConfiguration extends org.eclipse.jetty.annotations.Annot
{
org.eclipse.jetty.osgi.annotations.AnnotationParser osgiAnnotationParser = (org.eclipse.jetty.osgi.annotations.AnnotationParser)_parser;
Bundle bundle = osgiAnnotationParser.getBundle(_resource);
+ if (_stat != null)
+ _stat.start();
osgiAnnotationParser.parse(_handlers, bundle, _resolver);
+ if (_stat != null)
+ _stat.end();
}
return null;
}
@@ -178,7 +186,12 @@ public class AnnotationConfiguration extends org.eclipse.jetty.annotations.Annot
ClassNameResolver classNameResolver = createClassNameResolver(context);
if (_parserTasks != null)
- _parserTasks.add(new BundleParserTask(parser, handlers, bundleRes, classNameResolver));
+ {
+ BundleParserTask task = new BundleParserTask(parser, handlers, bundleRes, classNameResolver);
+ _parserTasks.add(task);
+ if (LOG.isDebugEnabled())
+ task.setStatistic(new TimeStatistic());
+ }
}
/**

Back to the top