Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=31027
authormarkt <markt@13f79535-47bb-0310-9956-ffa450edef68>
Sun, 27 Feb 2011 13:19:22 +0000 (13:19 +0000)
committermarkt <markt@13f79535-47bb-0310-9956-ffa450edef68>
Sun, 27 Feb 2011 13:19:22 +0000 (13:19 +0000)
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

java/org/apache/catalina/startup/CatalinaProperties.java
webapps/docs/changelog.xml

index 213f1ad..c114437 100644 (file)
@@ -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());
             }
         }
 
index b255c37..60d9909 100644 (file)
         (markt)
       </add>
       <fix>
+        <bug>31027</bug>: Trim whitespace from names and values obtained from
+        <code>$CATALINA_BASE/conf/catalina.properties</code> to avoid hard to
+        diagnose errors on startup. (markt)
+      </fix>
+      <fix>
         <bug>48863</bug>: Better logging when specifying an invalid directory
         for a class loader. Based on a patch by Ralf Hauser. (markt)
       </fix>