MCPcopy Create free account
hub / github.com/apache/tomcat / updateBodyText

Method updateBodyText

java/org/apache/tomcat/util/digester/Digester.java:2147–2163  ·  view source on GitHub ↗

Return a new StringBuilder containing the same contents as the input buffer, except that data of form ${varname} have been replaced by the value of that var as defined in the system property.

(StringBuilder bodyText)

Source from the content-addressed store, hash-verified

2145 * have been replaced by the value of that var as defined in the system property.
2146 */
2147 private StringBuilder updateBodyText(StringBuilder bodyText) {
2148 String in = bodyText.toString();
2149 String out;
2150 try {
2151 out = IntrospectionUtils.replaceProperties(in, null, source, getClassLoader());
2152 } catch (Exception e) {
2153 return bodyText; // return unchanged data
2154 }
2155
2156 if (out == in) {
2157 // No substitutions required. Don't waste memory creating
2158 // a new buffer
2159 return bodyText;
2160 } else {
2161 return new StringBuilder(out);
2162 }
2163 }
2164
2165
2166 private static class EntityResolverWrapper implements EntityResolver {

Callers 1

endElementMethod · 0.95

Calls 3

replacePropertiesMethod · 0.95
getClassLoaderMethod · 0.95
toStringMethod · 0.65

Tested by

no test coverage detected