Return-Path: Delivered-To: apmail-jakarta-ant-dev-archive@jakarta.apache.org Received: (qmail 99059 invoked by uid 500); 26 Mar 2001 22:58:49 -0000 Mailing-List: contact ant-dev-help@jakarta.apache.org; run by ezmlm Precedence: bulk Reply-To: ant-dev@jakarta.apache.org list-help: list-unsubscribe: list-post: Delivered-To: mailing list ant-dev@jakarta.apache.org Received: (qmail 99047 invoked from network); 26 Mar 2001 22:58:49 -0000 Date: Mon, 26 Mar 2001 14:52:44 -0800 (PST) Message-Id: <200103262252.OAA15480@nagoya-a.betaversion.org> From: bugzilla@apache.org To: ant-dev@jakarta.apache.org, mstover1@apache.org Cc: Subject: [Bug 1124] Changed - RMIC task breaks if package name starts with ".class" X-Spam-Rating: h31.sny.collab.net 1.6.2 0/1000/N http://nagoya.apache.org/bugzilla/show_bug.cgi?id=1124 *** shadow/1124 Mon Mar 26 14:50:46 2001 --- shadow/1124.tmp.15477 Mon Mar 26 14:52:44 2001 *************** *** 5,11 **** | Status: NEW Version: 1.3 | | Resolution: Platform: PC | | Severity: Normal OS/Version: Windows NT/2K | ! | Priority: Component: Core tasks | +----------------------------------------------------------------------------+ | Assigned To: ant-dev@jakarta.apache.org | | Reported By: mstover1@apache.org | --- 5,11 ---- | Status: NEW Version: 1.3 | | Resolution: Platform: PC | | Severity: Normal OS/Version: Windows NT/2K | ! | Priority: High Component: Core tasks | +----------------------------------------------------------------------------+ | Assigned To: ant-dev@jakarta.apache.org | | Reported By: mstover1@apache.org | *************** *** 34,37 **** } } ! It might be better to use the lastIndexOf() method. --- 34,51 ---- } } ! It might be better to use the lastIndexOf() method. ! ! ------- Additional Comments From mstover1@apache.org 2001-03-26 14:52 ------- ! I guess HTML tags are not allowed. Here's the code in a more readable format: ! ! protected void scanDir(File baseDir, String files[], ! FileNameMapper mapper) { ! SourceFileScanner sfs = new SourceFileScanner(this); ! String[] newFiles = sfs.restrict(files, baseDir, baseDir, mapper); ! for (int i = 0; i < newFiles.length; i++) { ! String classname = newFiles[i].replace(File.separatorChar, '.'); ! problem--> classname = classname.substring(0, classname.indexOf(".class")); ! compileList.addElement(classname); ! } ! }