Return-Path: Delivered-To: apmail-cocoon-dev-archive@www.apache.org Received: (qmail 51591 invoked from network); 29 Apr 2004 00:48:55 -0000 Received: from daedalus.apache.org (HELO mail.apache.org) (208.185.179.12) by minotaur-2.apache.org with SMTP; 29 Apr 2004 00:48:55 -0000 Received: (qmail 483 invoked by uid 500); 29 Apr 2004 00:48:34 -0000 Delivered-To: apmail-cocoon-dev-archive@cocoon.apache.org Received: (qmail 437 invoked by uid 500); 29 Apr 2004 00:48:34 -0000 Mailing-List: contact dev-help@cocoon.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: list-post: Reply-To: dev@cocoon.apache.org Delivered-To: mailing list dev@cocoon.apache.org Received: (qmail 423 invoked from network); 29 Apr 2004 00:48:34 -0000 Received: from unknown (HELO mail.gmx.net) (213.165.64.20) by daedalus.apache.org with SMTP; 29 Apr 2004 00:48:34 -0000 Received: (qmail 23862 invoked by uid 65534); 29 Apr 2004 00:48:41 -0000 Received: from a183069.studnetz.uni-leipzig.de (EHLO gmx.de) (139.18.183.69) by mail.gmx.net (mp004) with SMTP; 29 Apr 2004 02:48:41 +0200 X-Authenticated: #3483660 Message-ID: <409050F0.9070703@gmx.de> Date: Thu, 29 Apr 2004 02:48:48 +0200 From: Joerg Heinicke User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.6) Gecko/20040113 X-Accept-Language: de-de, de, en-us, en-gb, en MIME-Version: 1.0 To: dev@cocoon.apache.org Subject: NetUtils / StringUtils / Tokenizer Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit 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 After Cheche's bug report I had a look at NetUtils. Though Ugo fixed it with a quick fix, it does not really solve the problem as a test with the updated NetUtilsTestCase and the NetUtils before my latest commit can easily show. My problem is that there are many problems in different places in the code: 1. o.a.commons.lang.StringUtils.split() behaves strange in that way that o.a.com.l.SU.split("", "/") return an empty String[] while o.a.coc.u.SU.split("", "/") returns String[] {""} which is what I would expect. Also o.a.com.l.SU.split("/", "/") returns empty String[]. This means the iteration over the string array can never really work with o.a.commons.lang.StringUtils. => reverted that change. 2. our Tokenizer behaves strange in one case: o.a.coc.u.SU.split("/", "/") => new Tokenizer("/", "/", false) => tokenizer.countTokens() = 2 => but tokenizer.hasMoreTokens() returns true only once => leads to String[] {"", null} while it should be String[] {"", ""} 3. while the Tokenizer correctly works on "/../" the NetUtils.normalize() method has a problem with it: result of split/tokenize: String[] {"", "..", ""} result of normalize(): "" Joerg