Bug 569804 - Update to Jetty 10.0.1
Remove wrong guards which accept 3.1+ and 4.1+ but not 4.0 servlet
version.
As the bundle already requires servlet 3.1 these guards are plain
useless and only generate issues like this one.
Change-Id: If915c2baa6e82b5e4ba6c55f4c888358a1ad14c4
Signed-off-by: Alexander Kurtakov <akurtako@redhat.com>
diff --git a/bundles/org.eclipse.equinox.http.servlet/src/org/eclipse/equinox/http/servlet/internal/HttpServiceRuntimeImpl.java b/bundles/org.eclipse.equinox.http.servlet/src/org/eclipse/equinox/http/servlet/internal/HttpServiceRuntimeImpl.java
index f4d5867..4290dcd 100644
--- a/bundles/org.eclipse.equinox.http.servlet/src/org/eclipse/equinox/http/servlet/internal/HttpServiceRuntimeImpl.java
+++ b/bundles/org.eclipse.equinox.http.servlet/src/org/eclipse/equinox/http/servlet/internal/HttpServiceRuntimeImpl.java
@@ -1094,9 +1094,7 @@
sb.append("(objectClass=").append(ServletRequestAttributeListener.class.getName()).append(")"); //$NON-NLS-1$ //$NON-NLS-2$
sb.append("(objectClass=").append(HttpSessionListener.class.getName()).append(")"); //$NON-NLS-1$ //$NON-NLS-2$
sb.append("(objectClass=").append(HttpSessionAttributeListener.class.getName()).append(")"); //$NON-NLS-1$ //$NON-NLS-2$
- if ((servletContext.getMajorVersion() >= 3) && (servletContext.getMinorVersion() > 0)) {
- sb.append("(objectClass=").append(HttpSessionIdListener.class.getName()).append(")"); //$NON-NLS-1$ //$NON-NLS-2$
- }
+ sb.append("(objectClass=").append(HttpSessionIdListener.class.getName()).append(")"); //$NON-NLS-1$ //$NON-NLS-2$
sb.append(")"); //$NON-NLS-1$
sb.append(")"); //$NON-NLS-1$
diff --git a/bundles/org.eclipse.equinox.http.servlet/src/org/eclipse/equinox/http/servlet/internal/context/ContextController.java b/bundles/org.eclipse.equinox.http.servlet/src/org/eclipse/equinox/http/servlet/internal/context/ContextController.java
index 621f438..883351d 100644
--- a/bundles/org.eclipse.equinox.http.servlet/src/org/eclipse/equinox/http/servlet/internal/context/ContextController.java
+++ b/bundles/org.eclipse.equinox.http.servlet/src/org/eclipse/equinox/http/servlet/internal/context/ContextController.java
@@ -1186,11 +1186,8 @@
classes.add(HttpSessionAttributeListener.class);
}
- ServletContext servletContext = proxyContext.getServletContext();
- if ((servletContext.getMajorVersion() >= 3) && (servletContext.getMinorVersion() > 0)) {
- if (objectClassList.contains(javax.servlet.http.HttpSessionIdListener.class.getName())) {
- classes.add(javax.servlet.http.HttpSessionIdListener.class);
- }
+ if (objectClassList.contains(javax.servlet.http.HttpSessionIdListener.class.getName())) {
+ classes.add(javax.servlet.http.HttpSessionIdListener.class);
}
return classes;
@@ -1258,11 +1255,6 @@
return;
}
- ServletContext servletContext = proxyContext.getServletContext();
- if ((servletContext.getMajorVersion() <= 3) && (servletContext.getMinorVersion() < 1)) {
- return;
- }
-
List<javax.servlet.http.HttpSessionIdListener> listeners = eventListeners.get(javax.servlet.http.HttpSessionIdListener.class);
if (listeners.isEmpty()) {