From: markt Date: Sun, 27 Feb 2011 13:19:22 +0000 (+0000) Subject: Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=31027 X-Git-Url: https://git.internetallee.de/?a=commitdiff_plain;h=0301610053656e73b33f3ac4411d558843b9fb8b;p=tomcat7.0 Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=31027 Trim whitespace from names and values obtained from $CATALINA_BASE/conf/catalina.properties to avoid hard to diagnose errors on startup. git-svn-id: https://svn.apache.org/repos/asf/tomcat/trunk@1075050 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/java/org/apache/catalina/startup/CatalinaProperties.java b/java/org/apache/catalina/startup/CatalinaProperties.java index 213f1ad85..c114437e6 100644 --- a/java/org/apache/catalina/startup/CatalinaProperties.java +++ b/java/org/apache/catalina/startup/CatalinaProperties.java @@ -140,7 +140,9 @@ public class CatalinaProperties { String name = (String) enumeration.nextElement(); String value = properties.getProperty(name); if (value != null) { - System.setProperty(name, value); + // Remove leading/trailing whitespace as that can lead to hard + // to diagnose failures + System.setProperty(name.trim(), value.trim()); } } diff --git a/webapps/docs/changelog.xml b/webapps/docs/changelog.xml index b255c3725..60d990976 100644 --- a/webapps/docs/changelog.xml +++ b/webapps/docs/changelog.xml @@ -62,6 +62,11 @@ (markt) + 31027: Trim whitespace from names and values obtained from + $CATALINA_BASE/conf/catalina.properties to avoid hard to + diagnose errors on startup. (markt) + + 48863: Better logging when specifying an invalid directory for a class loader. Based on a patch by Ralf Hauser. (markt)