harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Alexei Fedotov (JIRA)" <j...@apache.org>
Subject [jira] Commented: (HARMONY-6553) Implement ServiceRegistry.lookupProviders(class)
Date Tue, 15 Jun 2010 08:43:23 GMT

    [ https://issues.apache.org/jira/browse/HARMONY-6553?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12878893#action_12878893
] 

Alexei Fedotov commented on HARMONY-6553:
-----------------------------------------

Lang, is there anything in common between two implementations? I believe there should be something
in common, for example, features described by the specification. 

Could you create a unit test from your "TestLookupProviders"? As you said, there could be
some behavior difference which the test should ignore. You may ignore particular class names,
and check only their existence, or their allowed MIME types regardless of their order.



> 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.


Mime
View raw message