MCPcopy Index your code
hub / github.com/apache/tomcat / updateAttributes

Method updateAttributes

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

Returns an attributes list which contains all the attributes passed in, with any text of form "${xxx}" in an attribute value replaced by the appropriate value from the system property.

(Attributes list)

Source from the content-addressed store, hash-verified

2119 * attribute value replaced by the appropriate value from the system property.
2120 */
2121 private Attributes updateAttributes(Attributes list) {
2122
2123 if (list.getLength() == 0) {
2124 return list;
2125 }
2126
2127 AttributesImpl newAttrs = new AttributesImpl(list);
2128 int nAttributes = newAttrs.getLength();
2129 for (int i = 0; i < nAttributes; ++i) {
2130 String value = newAttrs.getValue(i);
2131 try {
2132 newAttrs.setValue(i,
2133 IntrospectionUtils.replaceProperties(value, null, source, getClassLoader()).intern());
2134 } catch (Exception e) {
2135 log.warn(sm.getString("digester.failedToUpdateAttributes", newAttrs.getLocalName(i), value), e);
2136 }
2137 }
2138
2139 return newAttrs;
2140 }
2141
2142
2143 /**

Callers 1

startElementMethod · 0.95

Calls 8

replacePropertiesMethod · 0.95
getClassLoaderMethod · 0.95
getLengthMethod · 0.65
getValueMethod · 0.65
setValueMethod · 0.65
warnMethod · 0.65
getStringMethod · 0.65
getLocalNameMethod · 0.65

Tested by

no test coverage detected