]> WPIA git - gigi.git/blobdiff - lib/jetty/org/eclipse/jetty/util/component/AbstractLifeCycle.java
updating jetty to jetty-9.2.16.v2016040
[gigi.git] / lib / jetty / org / eclipse / jetty / util / component / AbstractLifeCycle.java
index 8f2d9dc7ab02447bad8e8abf2c28994acc481e0d..4aef3418f49386ba9ddb2a3d488c12260aa0a181 100644 (file)
@@ -1,6 +1,6 @@
 //
 //  ========================================================================
-//  Copyright (c) 1995-2014 Mort Bay Consulting Pty. Ltd.
+//  Copyright (c) 1995-2016 Mort Bay Consulting Pty. Ltd.
 //  ------------------------------------------------------------------------
 //  All rights reserved. This program and the accompanying materials
 //  are made available under the terms of the Eclipse Public License v1.0
@@ -18,9 +18,9 @@
 
 package org.eclipse.jetty.util.component;
 
-import java.lang.management.ManagementFactory;
 import java.util.concurrent.CopyOnWriteArrayList;
 
+import org.eclipse.jetty.util.Uptime;
 import org.eclipse.jetty.util.annotation.ManagedAttribute;
 import org.eclipse.jetty.util.annotation.ManagedObject;
 import org.eclipse.jetty.util.log.Log;
@@ -174,15 +174,15 @@ public abstract class AbstractLifeCycle implements LifeCycle
     {
         _state = __STARTED;
         if (LOG.isDebugEnabled())
-            
-        LOG.debug(STARTED+" @{}ms {}",ManagementFactory.getRuntimeMXBean().getUptime(),this);
+            LOG.debug(STARTED+" @{}ms {}",Uptime.getUptime(),this);
         for (Listener listener : _listeners)
             listener.lifeCycleStarted(this);
     }
 
     private void setStarting()
     {
-        LOG.debug("starting {}",this);
+        if (LOG.isDebugEnabled())
+            LOG.debug("starting {}",this);
         _state = __STARTING;
         for (Listener listener : _listeners)
             listener.lifeCycleStarting(this);
@@ -190,7 +190,8 @@ public abstract class AbstractLifeCycle implements LifeCycle
 
     private void setStopping()
     {
-        LOG.debug("stopping {}",this);
+        if (LOG.isDebugEnabled())
+            LOG.debug("stopping {}",this);
         _state = __STOPPING;
         for (Listener listener : _listeners)
             listener.lifeCycleStopping(this);
@@ -199,7 +200,8 @@ public abstract class AbstractLifeCycle implements LifeCycle
     private void setStopped()
     {
         _state = __STOPPED;
-        LOG.debug("{} {}",STOPPED,this);
+        if (LOG.isDebugEnabled())
+            LOG.debug("{} {}",STOPPED,this);
         for (Listener listener : _listeners)
             listener.lifeCycleStopped(this);
     }