[tomcat] branch 9.0.x updated: Fix BZ 64514 - classes missing from bootstrap.jar

2020-06-15 Thread markt
This is an automated email from the ASF dual-hosted git repository.

markt pushed a commit to branch 9.0.x
in repository https://gitbox.apache.org/repos/asf/tomcat.git


The following commit(s) were added to refs/heads/9.0.x by this push:
 new 15377cb  Fix BZ 64514 - classes missing from bootstrap.jar
15377cb is described below

commit 15377cbe5a71f27774befffc65d03228e73432a6
Author: Raymond Augé 
AuthorDate: Thu Jun 11 16:44:24 2020 -0400

Fix BZ 64514 - classes missing from bootstrap.jar

Signed-off-by: Raymond Augé 
---
 build.xml   |  1 +
 java/org/apache/catalina/Globals.java   |  4 ++--
 java/org/apache/catalina/startup/Bootstrap.java | 26 +
 java/org/apache/catalina/startup/Constants.java | 12 
 java/org/apache/catalina/startup/Tool.java  | 16 +++
 webapps/docs/changelog.xml  |  5 +
 6 files changed, 45 insertions(+), 19 deletions(-)

diff --git a/build.xml b/build.xml
index 56c157b..f22ce5f 100644
--- a/build.xml
+++ b/build.xml
@@ -366,6 +366,7 @@
 
 
 
+
 
 
 
diff --git a/java/org/apache/catalina/Globals.java 
b/java/org/apache/catalina/Globals.java
index addbdca..52a9f96 100644
--- a/java/org/apache/catalina/Globals.java
+++ b/java/org/apache/catalina/Globals.java
@@ -274,14 +274,14 @@ public final class Globals {
  * Name of the system property containing
  * the tomcat product installation path
  */
-public static final String CATALINA_HOME_PROP = "catalina.home";
+public static final String CATALINA_HOME_PROP = 
org.apache.catalina.startup.Constants.CATALINA_HOME_PROP;
 
 
 /**
  * Name of the system property containing
  * the tomcat instance installation path
  */
-public static final String CATALINA_BASE_PROP = "catalina.base";
+public static final String CATALINA_BASE_PROP = 
org.apache.catalina.startup.Constants.CATALINA_BASE_PROP;
 
 
 //  Global 
constants
diff --git a/java/org/apache/catalina/startup/Bootstrap.java 
b/java/org/apache/catalina/startup/Bootstrap.java
index 98f035a..579dc00 100644
--- a/java/org/apache/catalina/startup/Bootstrap.java
+++ b/java/org/apache/catalina/startup/Bootstrap.java
@@ -27,7 +27,6 @@ import java.util.List;
 import java.util.regex.Matcher;
 import java.util.regex.Pattern;
 
-import org.apache.catalina.Globals;
 import org.apache.catalina.security.SecurityClassLoad;
 import org.apache.catalina.startup.ClassLoaderFactory.Repository;
 import org.apache.catalina.startup.ClassLoaderFactory.RepositoryType;
@@ -66,7 +65,7 @@ public final class Bootstrap {
 String userDir = System.getProperty("user.dir");
 
 // Home first
-String home = System.getProperty(Globals.CATALINA_HOME_PROP);
+String home = System.getProperty(Constants.CATALINA_HOME_PROP);
 File homeFile = null;
 
 if (home != null) {
@@ -105,10 +104,10 @@ public final class Bootstrap {
 
 catalinaHomeFile = homeFile;
 System.setProperty(
-Globals.CATALINA_HOME_PROP, catalinaHomeFile.getPath());
+Constants.CATALINA_HOME_PROP, catalinaHomeFile.getPath());
 
 // Then base
-String base = System.getProperty(Globals.CATALINA_BASE_PROP);
+String base = System.getProperty(Constants.CATALINA_BASE_PROP);
 if (base == null) {
 catalinaBaseFile = catalinaHomeFile;
 } else {
@@ -121,7 +120,7 @@ public final class Bootstrap {
 catalinaBaseFile = baseFile;
 }
 System.setProperty(
-Globals.CATALINA_BASE_PROP, catalinaBaseFile.getPath());
+Constants.CATALINA_BASE_PROP, catalinaBaseFile.getPath());
 }
 
 // -- Variables
@@ -222,9 +221,9 @@ public final class Bootstrap {
 String replacement;
 if (propName.length() == 0) {
 replacement = null;
-} else if (Globals.CATALINA_HOME_PROP.equals(propName)) {
+} else if (Constants.CATALINA_HOME_PROP.equals(propName)) {
 replacement = getCatalinaHome();
-} else if (Globals.CATALINA_BASE_PROP.equals(propName)) {
+} else if (Constants.CATALINA_BASE_PROP.equals(propName)) {
 replacement = getCatalinaBase();
 } else {
 replacement = System.getProperty(propName);
@@ -542,16 +541,27 @@ public final class Bootstrap {
 
 
 // Copied from ExceptionUtils since that class is not visible during start
-private static void handleThrowable(Throwable t) {
+static void handleThrowable(Throwable t) {
 if (t instanceof ThreadDeath) {
 throw (ThreadDeath) t;
 }
+if (t instanceof StackOverflowError) {
+// Swallow 

[tomcat] branch 9.0.x updated: Fix BZ 64514 - classes missing from bootstrap.jar

2020-06-15 Thread markt
This is an automated email from the ASF dual-hosted git repository.

markt pushed a commit to branch 9.0.x
in repository https://gitbox.apache.org/repos/asf/tomcat.git


The following commit(s) were added to refs/heads/9.0.x by this push:
 new 15377cb  Fix BZ 64514 - classes missing from bootstrap.jar
15377cb is described below

commit 15377cbe5a71f27774befffc65d03228e73432a6
Author: Raymond Augé 
AuthorDate: Thu Jun 11 16:44:24 2020 -0400

Fix BZ 64514 - classes missing from bootstrap.jar

Signed-off-by: Raymond Augé 
---
 build.xml   |  1 +
 java/org/apache/catalina/Globals.java   |  4 ++--
 java/org/apache/catalina/startup/Bootstrap.java | 26 +
 java/org/apache/catalina/startup/Constants.java | 12 
 java/org/apache/catalina/startup/Tool.java  | 16 +++
 webapps/docs/changelog.xml  |  5 +
 6 files changed, 45 insertions(+), 19 deletions(-)

diff --git a/build.xml b/build.xml
index 56c157b..f22ce5f 100644
--- a/build.xml
+++ b/build.xml
@@ -366,6 +366,7 @@
 
 
 
+
 
 
 
diff --git a/java/org/apache/catalina/Globals.java 
b/java/org/apache/catalina/Globals.java
index addbdca..52a9f96 100644
--- a/java/org/apache/catalina/Globals.java
+++ b/java/org/apache/catalina/Globals.java
@@ -274,14 +274,14 @@ public final class Globals {
  * Name of the system property containing
  * the tomcat product installation path
  */
-public static final String CATALINA_HOME_PROP = "catalina.home";
+public static final String CATALINA_HOME_PROP = 
org.apache.catalina.startup.Constants.CATALINA_HOME_PROP;
 
 
 /**
  * Name of the system property containing
  * the tomcat instance installation path
  */
-public static final String CATALINA_BASE_PROP = "catalina.base";
+public static final String CATALINA_BASE_PROP = 
org.apache.catalina.startup.Constants.CATALINA_BASE_PROP;
 
 
 //  Global 
constants
diff --git a/java/org/apache/catalina/startup/Bootstrap.java 
b/java/org/apache/catalina/startup/Bootstrap.java
index 98f035a..579dc00 100644
--- a/java/org/apache/catalina/startup/Bootstrap.java
+++ b/java/org/apache/catalina/startup/Bootstrap.java
@@ -27,7 +27,6 @@ import java.util.List;
 import java.util.regex.Matcher;
 import java.util.regex.Pattern;
 
-import org.apache.catalina.Globals;
 import org.apache.catalina.security.SecurityClassLoad;
 import org.apache.catalina.startup.ClassLoaderFactory.Repository;
 import org.apache.catalina.startup.ClassLoaderFactory.RepositoryType;
@@ -66,7 +65,7 @@ public final class Bootstrap {
 String userDir = System.getProperty("user.dir");
 
 // Home first
-String home = System.getProperty(Globals.CATALINA_HOME_PROP);
+String home = System.getProperty(Constants.CATALINA_HOME_PROP);
 File homeFile = null;
 
 if (home != null) {
@@ -105,10 +104,10 @@ public final class Bootstrap {
 
 catalinaHomeFile = homeFile;
 System.setProperty(
-Globals.CATALINA_HOME_PROP, catalinaHomeFile.getPath());
+Constants.CATALINA_HOME_PROP, catalinaHomeFile.getPath());
 
 // Then base
-String base = System.getProperty(Globals.CATALINA_BASE_PROP);
+String base = System.getProperty(Constants.CATALINA_BASE_PROP);
 if (base == null) {
 catalinaBaseFile = catalinaHomeFile;
 } else {
@@ -121,7 +120,7 @@ public final class Bootstrap {
 catalinaBaseFile = baseFile;
 }
 System.setProperty(
-Globals.CATALINA_BASE_PROP, catalinaBaseFile.getPath());
+Constants.CATALINA_BASE_PROP, catalinaBaseFile.getPath());
 }
 
 // -- Variables
@@ -222,9 +221,9 @@ public final class Bootstrap {
 String replacement;
 if (propName.length() == 0) {
 replacement = null;
-} else if (Globals.CATALINA_HOME_PROP.equals(propName)) {
+} else if (Constants.CATALINA_HOME_PROP.equals(propName)) {
 replacement = getCatalinaHome();
-} else if (Globals.CATALINA_BASE_PROP.equals(propName)) {
+} else if (Constants.CATALINA_BASE_PROP.equals(propName)) {
 replacement = getCatalinaBase();
 } else {
 replacement = System.getProperty(propName);
@@ -542,16 +541,27 @@ public final class Bootstrap {
 
 
 // Copied from ExceptionUtils since that class is not visible during start
-private static void handleThrowable(Throwable t) {
+static void handleThrowable(Throwable t) {
 if (t instanceof ThreadDeath) {
 throw (ThreadDeath) t;
 }
+if (t instanceof StackOverflowError) {
+// Swallow