Return-Path: Delivered-To: apmail-commons-issues-archive@minotaur.apache.org Received: (qmail 41465 invoked from network); 6 Apr 2011 05:32:47 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 6 Apr 2011 05:32:47 -0000 Received: (qmail 1019 invoked by uid 500); 6 Apr 2011 05:32:47 -0000 Delivered-To: apmail-commons-issues-archive@commons.apache.org Received: (qmail 633 invoked by uid 500); 6 Apr 2011 05:32:46 -0000 Mailing-List: contact issues-help@commons.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: issues@commons.apache.org Delivered-To: mailing list issues@commons.apache.org Received: (qmail 605 invoked by uid 99); 6 Apr 2011 05:32:46 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 06 Apr 2011 05:32:46 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED,T_RP_MATCHES_RCVD X-Spam-Check-By: apache.org Received: from [140.211.11.116] (HELO hel.zones.apache.org) (140.211.11.116) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 06 Apr 2011 05:32:43 +0000 Received: from hel.zones.apache.org (hel.zones.apache.org [140.211.11.116]) by hel.zones.apache.org (Postfix) with ESMTP id 297EC94F00 for ; Wed, 6 Apr 2011 05:32:06 +0000 (UTC) Date: Wed, 6 Apr 2011 05:32:06 +0000 (UTC) From: "Henri Yandell (JIRA)" To: issues@commons.apache.org Message-ID: <1754918822.37170.1302067926166.JavaMail.tomcat@hel.zones.apache.org> In-Reply-To: <1814735884.5981.1300252049792.JavaMail.tomcat@hel.zones.apache.org> Subject: [jira] [Reopened] (LANG-687) Convert more of the StringUtils API to take CharSequence MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/LANG-687?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Henri Yandell reopened LANG-687: -------------------------------- > Convert more of the StringUtils API to take CharSequence > -------------------------------------------------------- > > Key: LANG-687 > URL: https://issues.apache.org/jira/browse/LANG-687 > Project: Commons Lang > Issue Type: Improvement > Components: lang.* > Reporter: Henri Yandell > Fix For: 3.0 > > > Use CharSequence and not String in the StringUtils API for non-mutating operations. > Anything which has to choose between the mutable and immutable nature of CharSequence subclasses (i.e. takes a String and returns a String), should not be changed. Anything that does not mutate the input (even in spirit) should use CharSequence. > Additionally there should be a unit test that uses reflection to confirm this rule is in place. > Listing remaining methods to move to CharSequence: > public static boolean equalsIgnoreCase(String str1, String str2) { > public static int ordinalIndexOf(String str, String searchStr, int ordinal) { > public static int indexOfIgnoreCase(String str, String searchStr) { > public static int indexOfIgnoreCase(String str, String searchStr, int startPos) { > public static int lastOrdinalIndexOf(String str, String searchStr, int ordinal) { > public static int lastIndexOfIgnoreCase(String str, String searchStr) { > public static int lastIndexOfIgnoreCase(String str, String searchStr, int startPos) { > public static boolean containsIgnoreCase(String str, String searchStr) { > public static int countMatches(String str, String sub) { > public static boolean startsWith(String str, String prefix) { > public static boolean startsWithIgnoreCase(String str, String prefix) { > public static boolean startsWithAny(String string, String... searchStrings) { > public static boolean endsWith(String str, String suffix) { > public static boolean endsWithIgnoreCase(String str, String suffix) { > public static boolean endsWithAny(String string, String... searchStrings) { -- This message is automatically generated by JIRA. For more information on JIRA, see: http://www.atlassian.com/software/jira