Uploaded image for project: 'Commons Lang'
  1. Commons Lang
  2. LANG-1183

Making replacePattern/removePattern methods null safe

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • None
    • 3.5
    • lang.*
    • None

    Description

      Following the #LANG-1139 ticket, it would be nice to make these methods null safe in StringUtils :

      public static String replacePattern(final String source, final String regex, final String replacement);
      public static String removePattern(final String source, final String regex);
      

      A null reference passed to these methods would be a no-op.

      Attachments

        Activity

          People

            rikles Loic Guibert
            rikles Loic Guibert
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: