git-svn-id: https://svn.apache.org/repos/asf/tomcat/trunk@708185
13f79535-47bb-0310-9956-
ffa450edef68
*/
public static String replaceProperties(String value, Hashtable staticProp,
PropertySource dynamicProp[]) {
+ if (value.indexOf("$") < 0) {
+ return value;
+ }
StringBuffer sb = new StringBuffer();
int prev = 0;
// assert value!=nil
try {
String newValue =
IntrospectionUtils.replaceProperties(value, null, source);
- if (!value.equals(newValue)) {
+ if (value != newValue) {
newAttrs.setValue(i, newValue);
}
}
return bodyText; // return unchanged data
}
- if (out.equals(in)) {
+ if (out == in) {
// No substitutions required. Don't waste memory creating
// a new buffer
return bodyText;