[forge-issues] [JBoss JIRA] (FORGE-1206) Imported<?>.get() has a different behavior compared to iterator()
George Gastaldi (JIRA)
jira-events at lists.jboss.org
Mon Sep 16 10:41:03 EDT 2013
George Gastaldi created FORGE-1206:
--------------------------------------
Summary: Imported<?>.get() has a different behavior compared to iterator()
Key: FORGE-1206
URL: https://issues.jboss.org/browse/FORGE-1206
Project: Forge
Issue Type: Bug
Components: Furnace (Container)
Affects Versions: 2.0.0.Alpha12
Reporter: George Gastaldi
Fix For: 2.x Future
Given:
{code:java}
public interface MyInterface {}
{code}
and
{code:java}
public class Foo implements MyInterface {}
{code}
Trying to retrieve it from the Imported object from AddonRegistry:
{code:java}
Imported<MyInterface> imported = addonRegistry.getServices(MyInterface.class);
{code}:
The following statements are observed:
# imported.get() returns instance of Foo
# imported.iterator().hasNext() returns false.
Since no {{@Exported}} is placed in {{MyInterface}}, I believe the first statement is a 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
More information about the forge-issues
mailing list