You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by ma...@apache.org on 2019/07/23 10:04:07 UTC
[tomcat] branch 7.0.x updated: Enable a default Tomcat 7 install to
start on Java 6
This is an automated email from the ASF dual-hosted git repository.
markt pushed a commit to branch 7.0.x
in repository https://gitbox.apache.org/repos/asf/tomcat.git
The following commit(s) were added to refs/heads/7.0.x by this push:
new 85bc2dc Enable a default Tomcat 7 install to start on Java 6
85bc2dc is described below
commit 85bc2dcbaa78ad8206776be15328b26d9cb15c2c
Author: Mark Thomas <ma...@apache.org>
AuthorDate: Tue Jul 23 11:02:12 2019 +0100
Enable a default Tomcat 7 install to start on Java 6
The alignment with 8.5.x added a use of a ReflectiveOperationException
which Tomcat 7 tries to load when it loads the SCI. That the code never
reaches the place where this is used (because of the test for Java 7+
earlier) doesn't prevent the SCI from failing to load on Java 6.
---
java/org/apache/tomcat/websocket/server/WsSci.java | 16 +++++++++++++---
webapps/docs/changelog.xml | 8 ++++++++
2 files changed, 21 insertions(+), 3 deletions(-)
diff --git a/java/org/apache/tomcat/websocket/server/WsSci.java b/java/org/apache/tomcat/websocket/server/WsSci.java
index d451f6f..7ad0328 100644
--- a/java/org/apache/tomcat/websocket/server/WsSci.java
+++ b/java/org/apache/tomcat/websocket/server/WsSci.java
@@ -16,6 +16,7 @@
*/
package org.apache.tomcat.websocket.server;
+import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Modifier;
import java.util.HashSet;
import java.util.Set;
@@ -47,8 +48,7 @@ public class WsSci implements ServletContainerInitializer {
private static boolean logMessageWritten = false;
private final Log log = LogFactory.getLog(WsSci.class); // must not be static
- private static final StringManager sm =
- StringManager.getManager(Constants.PACKAGE_NAME);
+ private static final StringManager sm = StringManager.getManager(WsSci.class);
@Override
public void onStartup(Set<Class<?>> clazzes, ServletContext ctx)
@@ -104,7 +104,17 @@ public class WsSci implements ServletContainerInitializer {
scannedPojoEndpoints.add(clazz);
}
}
- } catch (ReflectiveOperationException e) {
+ } catch (InstantiationException e) {
+ throw new ServletException(e);
+ } catch (IllegalArgumentException e) {
+ throw new ServletException(e);
+ } catch (SecurityException e) {
+ throw new ServletException(e);
+ } catch (IllegalAccessException e) {
+ throw new ServletException(e);
+ } catch (InvocationTargetException e) {
+ throw new ServletException(e);
+ } catch (NoSuchMethodException e) {
throw new ServletException(e);
}
diff --git a/webapps/docs/changelog.xml b/webapps/docs/changelog.xml
index bf8e126..7983edd 100644
--- a/webapps/docs/changelog.xml
+++ b/webapps/docs/changelog.xml
@@ -78,6 +78,14 @@
</fix>
</changelog>
</subsection>
+ <subsection name="WebSocket">
+ <changelog>
+ <fix>
+ Correct a regression that prevented a default Tomcat 7 install from
+ starting on Java 6. (markt)
+ </fix>
+ </changelog>
+ </subsection>
</section>
<section name="Tomcat 7.0.95 (violetagg)">
<subsection name="Catalina">
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org