commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "David W. Burhans (JIRA)" <j...@apache.org>
Subject [jira] [Created] (LANG-1448) Commons-Lang3; StringUtils JavaDoc page wrong for containsOnly and containsNone
Date Thu, 11 Apr 2019 14:25:00 GMT
David W. Burhans created LANG-1448:
--------------------------------------

             Summary: Commons-Lang3; StringUtils JavaDoc page wrong for containsOnly and containsNone
                 Key: LANG-1448
                 URL: https://issues.apache.org/jira/browse/LANG-1448
             Project: Commons Lang
          Issue Type: Bug
          Components: lang.*
    Affects Versions: 3.8.1
            Reporter: David W. Burhans


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

 

The descriptions of the containsOnly([CharSequence|https://docs.oracle.com/javase/7/docs/api/java/lang/CharSequence.html?is-external=true] cs,
char... valid) and containsNone([CharSequence|https://docs.oracle.com/javase/7/docs/api/java/lang/CharSequence.html?is-external=true] 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|https://docs.oracle.com/javase/7/docs/api/java/lang/CharSequence.html?is-external=true] cs,
char... valid) method does contain correct examples.

 

One such correct example: 

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

 



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Mime
View raw message