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 2010/09/09 16:01:51 UTC
svn commit: r995432 -
/tomcat/trunk/modules/jdbc-pool/java/org/apache/tomcat/jdbc/pool/PoolProperties.java
Author: markt
Date: Thu Sep 9 14:01:50 2010
New Revision: 995432
URL: http://svn.apache.org/viewvc?rev=995432&view=rev
Log:
Trim whitespace from interceptor class names, property names and property values.
Modified:
tomcat/trunk/modules/jdbc-pool/java/org/apache/tomcat/jdbc/pool/PoolProperties.java
Modified: tomcat/trunk/modules/jdbc-pool/java/org/apache/tomcat/jdbc/pool/PoolProperties.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/modules/jdbc-pool/java/org/apache/tomcat/jdbc/pool/PoolProperties.java?rev=995432&r1=995431&r2=995432&view=diff
==============================================================================
--- tomcat/trunk/modules/jdbc-pool/java/org/apache/tomcat/jdbc/pool/PoolProperties.java (original)
+++ tomcat/trunk/modules/jdbc-pool/java/org/apache/tomcat/jdbc/pool/PoolProperties.java Thu Sep 9 14:01:50 2010
@@ -403,16 +403,16 @@ public class PoolProperties implements P
int propIndex = interceptorValues[i].indexOf("(");
int endIndex = interceptorValues[i].indexOf(")");
if (propIndex<0 || endIndex<0 || endIndex <= propIndex) {
- definitions[i] = new InterceptorDefinition(interceptorValues[i]);
+ definitions[i] = new InterceptorDefinition(interceptorValues[i].trim());
} else {
- String name = interceptorValues[i].substring(0,propIndex);
+ String name = interceptorValues[i].substring(0,propIndex).trim();
definitions[i] = new InterceptorDefinition(name);
String propsAsString = interceptorValues[i].substring(propIndex+1, interceptorValues[i].length()-1);
String[] props = propsAsString.split(",");
for (int j=0; j<props.length; j++) {
int pidx = props[j].indexOf("=");
- String propName = props[j].substring(0,pidx);
- String propValue = props[j].substring(pidx+1);
+ String propName = props[j].substring(0,pidx).trim();
+ String propValue = props[j].substring(pidx+1).trim();
definitions[i].addProperty(new InterceptorProperty(propName,propValue));
}
}
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org