You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@aries.apache.org by "Amichai Rothman (JIRA)" <ji...@apache.org> on 2013/04/25 16:20:15 UTC

[jira] [Created] (ARIES-1059) proxies don't maintain the order of interfaces

Amichai Rothman created ARIES-1059:
--------------------------------------

             Summary: proxies don't maintain the order of interfaces
                 Key: ARIES-1059
                 URL: https://issues.apache.org/jira/browse/ARIES-1059
             Project: Aries
          Issue Type: Bug
         Environment: Oracle JDK 1.7.0_21, Karaf 2.3.1 (which includes Aries blueprint core 1.1.0)
            Reporter: Amichai Rothman
            Priority: Minor


Both Class.getInterfaces() and the java.lang.reflect.Proxy API make explicit guarantees about the order of the interfaces they return, however by the time proxy service classes are provided by blueprint to bind/unbind callbacks (and elsewhere, I assume) the order of the interfaces implemented by the proxies are mixed up. It would be better if Aries stayed consistent with the standard Proxy API.

I haven't verified this, but at a quick glance it seems like the bug might be in the ServiceRecipe class, whose getClassesForProxying method and several other methods use HashSets which are unordered - if those were changed to LinkedHashSets the order would be preserved as the classes are passed around, and this might fix this bug.


--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira