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

Commons-Lang3; StringUtils JavaDoc page wrong for containsOnly and containsNone

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Minor
    • Resolution: Unresolved
    • 3.8.1
    • None
    • lang.*
    • None

    Description

      TLDR: 'xxx' is not java and can never compile.

       

      The descriptions of the containsOnly(CharSequence cs, char... valid) and containsNone(CharSequence cs, char... valid) methods contain incorrect examples.

       

      One such bad example: 

      StringUtils.containsOnly("abab", 'abc') = true

       

      This is not Java code and can never compile.

       

      The description of the containsAny(CharSequence cs, char... valid) method does contain correct examples.

       

      One such correct example: 

      StringUtils.containsAny("zzabyycdxx",['z','a']) = true

       

      Attachments

        Activity

          People

            chtompki Rob Tompkins
            burhans David W. Burhans
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated: