Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSimon Kaegi2009-04-27 15:00:21 +0000
committerSimon Kaegi2009-04-27 15:00:21 +0000
commit9fcb60ea110d05a58d277a8df1a74819df8a1a2d (patch)
tree18b0132376ced6f00d9e9271c53150e43a6b7139
parenta97c54ee5e6b0bbc26c51947f7f99fb75cdfd09b (diff)
downloadrt.equinox.bundles-9fcb60ea110d05a58d277a8df1a74819df8a1a2d.tar.gz
rt.equinox.bundles-9fcb60ea110d05a58d277a8df1a74819df8a1a2d.tar.xz
rt.equinox.bundles-9fcb60ea110d05a58d277a8df1a74819df8a1a2d.zip
Bug 262906 [http.registry]initializeDelegate in ServletManager.ServletWrapper should be synchronized
-rw-r--r--bundles/org.eclipse.equinox.http.registry/src/org/eclipse/equinox/http/registry/internal/ServletManager.java18
1 files changed, 9 insertions, 9 deletions
diff --git a/bundles/org.eclipse.equinox.http.registry/src/org/eclipse/equinox/http/registry/internal/ServletManager.java b/bundles/org.eclipse.equinox.http.registry/src/org/eclipse/equinox/http/registry/internal/ServletManager.java
index d22aa7d5..cb6a3e73 100644
--- a/bundles/org.eclipse.equinox.http.registry/src/org/eclipse/equinox/http/registry/internal/ServletManager.java
+++ b/bundles/org.eclipse.equinox.http.registry/src/org/eclipse/equinox/http/registry/internal/ServletManager.java
@@ -72,7 +72,7 @@ public class ServletManager implements ExtensionPointTracker.Listener {
IConfigurationElement serviceSelectorElement = elements[i];
if (!SERVICESELECTOR.equals(serviceSelectorElement.getName()))
continue;
-
+
org.osgi.framework.Filter serviceSelector = null;
String clazz = serviceSelectorElement.getAttribute(CLASS);
if (clazz != null) {
@@ -87,7 +87,7 @@ public class ServletManager implements ExtensionPointTracker.Listener {
String filter = serviceSelectorElement.getAttribute(FILTER);
if (filter == null)
return;
-
+
try {
serviceSelector = FrameworkUtil.createFilter(filter);
} catch (InvalidSyntaxException e) {
@@ -96,13 +96,13 @@ public class ServletManager implements ExtensionPointTracker.Listener {
return;
}
}
-
- if (! serviceSelector.match(reference))
+
+ if (!serviceSelector.match(reference))
return;
-
+
break;
- }
-
+ }
+
for (int i = 0; i < elements.length; i++) {
IConfigurationElement servletElement = elements[i];
if (!SERVLET.equals(servletElement.getName()))
@@ -188,7 +188,7 @@ public class ServletManager implements ExtensionPointTracker.Listener {
destroyDelegate();
}
- private void initializeDelegate() throws ServletException {
+ private synchronized void initializeDelegate() throws ServletException {
if (delegate == null) {
try {
Servlet newDelegate = (Servlet) element.createExecutableExtension(CLASS);
@@ -200,7 +200,7 @@ public class ServletManager implements ExtensionPointTracker.Listener {
}
}
- private void destroyDelegate() {
+ private synchronized void destroyDelegate() {
if (delegate != null) {
Servlet doomedDelegate = delegate;
delegate = null;

Back to the top