From 3ddabaf64f03286d67c0a4b7e254999a2a74ba8d Mon Sep 17 00:00:00 2001 From: Michael Gorovoy Date: Wed, 25 May 2011 02:34:01 +0000 Subject: [PATCH] 346998 AbstractLifeCycle.isRunning() returns false if state changes from STARTING to STARTED during call git-svn-id: svn+ssh://dev.eclipse.org/svnroot/rt/org.eclipse.jetty/jetty/trunk@3251 7e9141cc-0065-0410-87d8-b60c137991c4 --- VERSION.txt | 1 + .../org/eclipse/jetty/util/component/AbstractLifeCycle.java | 4 +++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/VERSION.txt b/VERSION.txt index b2a4dcf0114..37b905e0373 100644 --- a/VERSION.txt +++ b/VERSION.txt @@ -9,6 +9,7 @@ jetty-7.4.2-SNAPSHOT + 346124 ServletContext resources paths not resolved correctly when using UNC shares + 346179 o.e.j.util.ScannerTest fails on MacOS X platform + 346181 o.e.j.server.StressTest stalls on MacOS X platform + + 346998 AbstractLifeCycle.isRunning() returns false if state changes from STARTING to STARTED during call + JETTY-1342 Recreate selector if wakeup throws JVM bug + 346614 HttpConnection.handle() spins in case of SSL truncation attacks + 346764 OrderedGroupBinding deployment binding diff --git a/jetty-util/src/main/java/org/eclipse/jetty/util/component/AbstractLifeCycle.java b/jetty-util/src/main/java/org/eclipse/jetty/util/component/AbstractLifeCycle.java index 905ab7c083b..4cae9a32798 100644 --- a/jetty-util/src/main/java/org/eclipse/jetty/util/component/AbstractLifeCycle.java +++ b/jetty-util/src/main/java/org/eclipse/jetty/util/component/AbstractLifeCycle.java @@ -98,7 +98,9 @@ public abstract class AbstractLifeCycle implements LifeCycle public boolean isRunning() { - return _state == __STARTED || _state == __STARTING; + final int state = _state; + + return state == __STARTED || state == __STARTING; } public boolean isStarted()