Uploaded image for project: 'Commons Text'
  1. Commons Text
  2. TEXT-171

StringLookupFactory.addDefaultStringLookups(Map<String, StringLookup>) does not convert keys to lower case

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • None
    • 1.8
    • None

    Description

      Internally, the class org.apache.commons.text.lookup.InterpolatorStringLookup normalizes its string lookup map with lower-case keys. The goal probably to make keys cases insensitive so you can say "${env:USER}" or "${ENV:USER}" or "${Env:USER}".

      The method org.apache.commons.text.lookup.StringLookupFactory.addDefaultStringLookups(Map<String, StringLookup>) does not convert keys to lower case before adding entries to the string lookup map such that string look ups are not found when resolving variables.

      This means that string lookup keys like "resourceBundle" that are mixed case strings are not found and therefore not applied.

      The list of keys that are not applied is:

      • base64Decoder
      • base64Encoder
      • resourceBundle
      • urlDecoder
      • urlEncoder

       

      Attachments

        Activity

          People

            ggregory Gary D. Gregory
            ggregory Gary D. Gregory
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: