Return-Path: Delivered-To: apmail-harmony-commits-archive@www.apache.org Received: (qmail 47190 invoked from network); 30 Mar 2009 06:38:14 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 30 Mar 2009 06:38:14 -0000 Received: (qmail 92884 invoked by uid 500); 30 Mar 2009 06:38:13 -0000 Delivered-To: apmail-harmony-commits-archive@harmony.apache.org Received: (qmail 92817 invoked by uid 500); 30 Mar 2009 06:38:13 -0000 Mailing-List: contact commits-help@harmony.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@harmony.apache.org Delivered-To: mailing list commits@harmony.apache.org Received: (qmail 92808 invoked by uid 99); 30 Mar 2009 06:38:13 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 30 Mar 2009 06:38:13 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.140] (HELO brutus.apache.org) (140.211.11.140) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 30 Mar 2009 06:38:11 +0000 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 7AB1A234C041 for ; Sun, 29 Mar 2009 23:37:50 -0700 (PDT) Message-ID: <726139457.1238395070498.JavaMail.jira@brutus> Date: Sun, 29 Mar 2009 23:37:50 -0700 (PDT) From: "Kevin Zhou (JIRA)" To: commits@harmony.apache.org Subject: [jira] Commented: (HARMONY-6136) [classlib][luni] java.net.URLClassLoader never finds resources existing in the jars specified from META-INF/INDEX.LIST In-Reply-To: <925860286.1238394951624.JavaMail.jira@brutus> 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/HARMONY-6136?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12693672#action_12693672 ] Kevin Zhou commented on HARMONY-6136: ------------------------------------- hyts_1.jar, hyts_2.jar and hyts_3.jar can be found in the support materials. > [classlib][luni] java.net.URLClassLoader never finds resources existing in the jars specified from META-INF/INDEX.LIST > ---------------------------------------------------------------------------------------------------------------------- > > Key: HARMONY-6136 > URL: https://issues.apache.org/jira/browse/HARMONY-6136 > Project: Harmony > Issue Type: Bug > Components: Classlib > Affects Versions: 5.0M8 > Reporter: Kevin Zhou > Fix For: 5.0M9 > > > Given a test case [1], RI and HY works differently. > Reproduce Steps: > (1) Create a URLClassLoader object using a url of "hyts_1.jar" and a null classloader. > (2) The META-INF/INDEX.LIST of "hyts_1.jar" specifies some index [2] > (3) Invoke URLClassLoader.findResource("bpack/") to find "bpack" package. > RI outputs: > jar:file:/C:/DOCUME~1/ADMINI~1/LOCALS~1/Temp/hyts_resources60467/JarIndex/hyts_22.jar!/bpack/ > HY prints: > null > Thus, RI can successfully find resources existing in the jars specified from META-INF/INDEX.LIST but HY can't. > [1] Test Case: > public class URLClassLoaderTest extends TestCase { > public void test_findResources() throws Exception { > File resources = Support_Resources.createTempFolder(); > String resPath = resources.toString(); > if (resPath.charAt(0) == '/' || resPath.charAt(0) == ' ') { resPath = resPath.substring(1); } > Support_Resources.copyFile(resources, "JarIndex", "hyts_21.jar"); > Support_Resources.copyFile(resources, "JarIndex", "hyts_22.jar"); > Support_Resources.copyFile(resources, "JarIndex", "hyts_23.jar"); > URLClassLoader urlClassloader = URLClassLoader.newInstance(new URL[] { new URL("file:/" + resPath + "/JarIndex/hyts_21.jar") }, null); > System.out.println(urlClassloader.findResource("bpack/"));}} > [2] The content of META-INF/INDEX.LIST of "hyts_1.jar" > hyts_21.jar > apack > hyts_22.jar > bpack > bpack/test > hyts_23.jar > cpack > Main2.class > Main3.class > bpack -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.