Return-Path: Delivered-To: apmail-jakarta-commons-dev-archive@www.apache.org Received: (qmail 80232 invoked from network); 22 Nov 2003 06:14:00 -0000 Received: from daedalus.apache.org (HELO mail.apache.org) (208.185.179.12) by minotaur-2.apache.org with SMTP; 22 Nov 2003 06:14:00 -0000 Received: (qmail 15390 invoked by uid 500); 22 Nov 2003 06:13:35 -0000 Delivered-To: apmail-jakarta-commons-dev-archive@jakarta.apache.org Received: (qmail 15335 invoked by uid 500); 22 Nov 2003 06:13:35 -0000 Mailing-List: contact commons-dev-help@jakarta.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Subscribe: List-Help: List-Post: List-Id: "Jakarta Commons Developers List" Reply-To: "Jakarta Commons Developers List" Delivered-To: mailing list commons-dev@jakarta.apache.org Received: (qmail 15322 invoked from network); 22 Nov 2003 06:13:35 -0000 Received: from unknown (HELO web41305.mail.yahoo.com) (66.218.93.54) by daedalus.apache.org with SMTP; 22 Nov 2003 06:13:35 -0000 Message-ID: <20031122061346.50566.qmail@web41305.mail.yahoo.com> Received: from [67.101.45.47] by web41305.mail.yahoo.com via HTTP; Fri, 21 Nov 2003 22:13:46 PST Date: Fri, 21 Nov 2003 22:13:46 -0800 (PST) From: Al Chou Subject: Re: [lang] unexpected StringUtils.split behavior (was RE: suggestion for new StringUtils.method) To: Jakarta Commons Developers List In-Reply-To: <3FBEEC6F.6030303@steitz.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N Hi, Phil, I thought no one would ever ask, and I was sitting here modifying my code to conform to the existing tests so that I could at least submit my two new methods. I'll open a ticket with a patch for those, then open a ticket for my proposed change in behavior, plus patches to split( String, String, int ) and my split( String, String, boolean, int ) to implement the change. Thanks, Al --- Phil Steitz wrote: > Al Chou wrote: > > > > > While testing, I discovered that my expectations for the behavior of the > split( > > *, ..., int max ) methods didn't match their actual behavior. I expected > to > > get a maximum of "max" substrings, all of which were delimited in the > parent > > string by the specified delimiters. Instead, what you get is "max - 1" > such > > substrings, plus the rest of the parent string as the final result > substring. > > This behavior seems counter to what StringTokenizer would do, which is > > surprising, given the Javadoc comments about using the split methods as > > alternatives to StringTokenizer. > > > > Can you open a Bugzilla ticket and attach a test case that shows the > problem and a patch that shows how you think it should be fixed? > > Phil ===== Albert Davidson Chou Get answers to Mac questions at http://www.Mac-Mgrs.org/ . __________________________________ Do you Yahoo!? Free Pop-Up Blocker - Get it now http://companion.yahoo.com/ --------------------------------------------------------------------- To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org For additional commands, e-mail: commons-dev-help@jakarta.apache.org