From commits-return-62823-apmail-harmony-commits-archive=harmony.apache.org@harmony.apache.org Tue Jun 15 15:03:45 2010 Return-Path: Delivered-To: apmail-harmony-commits-archive@www.apache.org Received: (qmail 38319 invoked from network); 15 Jun 2010 15:03:45 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 15 Jun 2010 15:03:45 -0000 Received: (qmail 26225 invoked by uid 500); 15 Jun 2010 15:03:45 -0000 Delivered-To: apmail-harmony-commits-archive@harmony.apache.org Received: (qmail 26191 invoked by uid 500); 15 Jun 2010 15:03:44 -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 26182 invoked by uid 99); 15 Jun 2010 15:03:44 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 15 Jun 2010 15:03:44 +0000 X-ASF-Spam-Status: No, hits=-1521.2 required=10.0 tests=ALL_TRUSTED,AWL X-Spam-Check-By: apache.org Received: from [140.211.11.22] (HELO thor.apache.org) (140.211.11.22) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 15 Jun 2010 15:03:44 +0000 Received: from thor (localhost [127.0.0.1]) by thor.apache.org (8.13.8+Sun/8.13.8) with ESMTP id o5FF3NDu011193 for ; Tue, 15 Jun 2010 15:03:23 GMT Message-ID: <13370142.8291276614203497.JavaMail.jira@thor> Date: Tue, 15 Jun 2010 11:03:23 -0400 (EDT) From: "Alexei Fedotov (JIRA)" To: commits@harmony.apache.org Subject: [jira] Commented: (HARMONY-6553) Implement ServiceRegistry.lookupProviders(class) In-Reply-To: <31401344.861276575143144.JavaMail.jira@thor> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/HARMONY-6553?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12878997#action_12878997 ] Alexei Fedotov commented on HARMONY-6553: ----------------------------------------- An interesting documentation link which answers the question where are we going (note, ServiceLoader is a new class in Java 6 javadoc). http://java.sun.com/javase/6/docs/api/java/util/ServiceLoader.html > Implement ServiceRegistry.lookupProviders(class) > ------------------------------------------------ > > Key: HARMONY-6553 > URL: https://issues.apache.org/jira/browse/HARMONY-6553 > Project: Harmony > Issue Type: Sub-task > Reporter: Lang Yang > Attachments: HARMONY-6553.diff, TestLookupProviders.java > > > spec - http://java.sun.com/j2se/1.4.2/docs/api/javax/imageio/spi/ServiceRegistry.html#lookupProviders(java.lang.Class) > I have created a new Iterator - "private static class LookupProvidersIterator implements Iterator" for this method. The iterator needs to instantiates new objects and throws ServiceConfigurationError exception at runtime, so we have to use customized Iterator. > The flow: > 1. call ClassLoader.getResourse(String) to get a set of provider-configuration files that related to the specified class. > 2. The iterator parses all provider-configuration files to get the names of provider classes > - Provider-Configuration File spec: http://java.sun.com/j2se/1.5.0/docs/guide/jar/jar.html#Provider Configuration File > 3. In LookupProvidersIterator.next(), instantiate objects -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.