FSchumacher commented on a change in pull request #309:
URL: https://github.com/apache/tomcat/pull/309#discussion_r446874481
##########
File path: java/org/apache/tomcat/util/IntrospectionUtils.java
##########
@@ -332,7 +341,15 @@ public static String replaceProperties(String value,
}
if (prev < value.length())
sb.append(value.substring(prev));
- return sb.toString();
+ String newval = sb.toString();
+ if (newval.indexOf('$') < 0) {
+ return newval;
+ }
+ if (newval.equals(value))
+ return value;
+ if (log.isDebugEnabled())
+ log.debug("IntrospectionUtils.replaceProperties iter on: " +
newval);
+ return replaceProperties(newval, staticProp, dynamicProp, classLoader,
iterationCount+1);
Review comment:
I would stay with the recursion here, as it is doesn't seem to be time
critical to replace those placeholders and I find it easier to read with the
recursion.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]