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

ResourceBundleStringLookup.lookup(String) throws MissingResourceException instead of returning null

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 1.6
    • 1.7
    • None

    Description

      The method org.apache.commons.text.lookup.ResourceBundleStringLookup.lookup(String) throws a MissingResourceException instead of returning null if a key is absent.

      This is a problem when you are using a resource bundle like this for example, when the key is missing, we want the method to return null such that an interpolator can supply a default value.

       

      Attachments

        Activity

          People

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

            Dates

              Created:
              Updated:
              Resolved: