You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by GitBox <gi...@apache.org> on 2022/05/17 03:19:19 UTC

[GitHub] [commons-configuration] darkma773r commented on a diff in pull request #182: CONFIGURATION-764: Single Variable Interpolation

darkma773r commented on code in PR #182:
URL: https://github.com/apache/commons-configuration/pull/182#discussion_r874324516


##########
src/main/java/org/apache/commons/configuration2/interpol/ConfigurationInterpolator.java:
##########
@@ -322,14 +322,14 @@ public boolean isEnableSubstitutionInVariables() {
 
     /**
      * Checks whether a value to be interpolated seems to be a single variable. In this case, it is resolved directly
-     * without using the {@code StringSubstitutor}. Note that it is okay if this method returns a false positive: In this
-     * case, resolving is going to fail, and standard mechanism is used.
+     * without using the {@code StringSubstitutor}.
      *
      * @param strValue the value to be interpolated
      * @return a flag whether this value seems to be a single variable
      */
     private boolean looksLikeSingleVariable(final String strValue) {
-        return strValue.startsWith(VAR_START) && strValue.endsWith(VAR_END);

Review Comment:
   Yes, it is strict. I've updated the name and the docs.



-- 
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.

To unsubscribe, e-mail: issues-unsubscribe@commons.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org