[JBoss JIRA] (FORGE-1206) Imported<?>.get() has a different behavior compared to iterator()
by George Gastaldi (JIRA)
[ https://issues.jboss.org/browse/FORGE-1206?page=com.atlassian.jira.plugin... ]
George Gastaldi updated FORGE-1206:
-----------------------------------
Description:
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.
was:
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.
> 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
10 years, 9 months
[JBoss JIRA] (FORGE-1206) Imported<?>.get() has a different behavior compared to iterator()
by George Gastaldi (JIRA)
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
10 years, 9 months
[JBoss JIRA] (FORGE-1205) Migrate CommandScoped to Forge 2
by George Gastaldi (JIRA)
George Gastaldi created FORGE-1205:
--------------------------------------
Summary: Migrate CommandScoped to Forge 2
Key: FORGE-1205
URL: https://issues.jboss.org/browse/FORGE-1205
Project: Forge
Issue Type: Feature Request
Components: UI - API
Affects Versions: 2.0.0.Alpha12
Reporter: George Gastaldi
Fix For: 2.x Future
CommandScoped allows binding objects to the scope of a command execution (starts when command is invoked and stops when command is executed with success/fail or canceled).
--
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
10 years, 9 months
[JBoss JIRA] (FORGE-1204) ResourceFactory can't be retrieve from registry
by George Gastaldi (JIRA)
[ https://issues.jboss.org/browse/FORGE-1204?page=com.atlassian.jira.plugin... ]
George Gastaldi reopened FORGE-1204:
------------------------------------
Reopened to wait for feedback
> ResourceFactory can't be retrieve from registry
> -----------------------------------------------
>
> Key: FORGE-1204
> URL: https://issues.jboss.org/browse/FORGE-1204
> Project: Forge
> Issue Type: Feature Request
> Components: Addon Manager
> Affects Versions: 2.0.0.Alpha12
> Environment: Mac OSX Java 1.7.0_40
> Reporter: Robb Greathouse
>
> ResourceFactory resourceFactory = ((ResourceFactory) registry.getExportedTypes(ResourceFactory.class));
> No longer returns a ResourceFactory. Instead it returns an empty Hashset. This code is used to create a DirectoryResource.
> ResourceFactory resourceFactory = ((ResourceFactory) registry.getExportedTypes(ResourceFactory.class));
> ProjectFactory projectFactory = (ProjectFactory) registry.getExportedTypes(ProjectFactory.class);
> FacetFactory facetFactory = (FacetFactory) registry.getExportedTypes(FacetFactory.class);
>
> DirectoryResource dr = resourceFactory.create(DirectoryResource.class, forgeOutput);
> DirectoryResource projectDir = dr.getChildDirectory(archive.getName());
> projectDir.mkdir();
> List<Class<JavaSourceFacet>> facetsToInstall = Arrays
> .asList(JavaSourceFacet.class);
>
> Project project = projectFactory.createProject(projectDir);
--
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
10 years, 9 months
[JBoss JIRA] (FORGE-1204) ResourceFactory can't be retrieve from registry
by George Gastaldi (JIRA)
[ https://issues.jboss.org/browse/FORGE-1204?page=com.atlassian.jira.plugin... ]
George Gastaldi closed FORGE-1204.
----------------------------------
Resolution: Rejected
The API was changed in this alpha12. It should read:
{code}
ResourceFactory resourceFactory = registry.getServices(ResourceFactory.class).get();
{code}
See https://github.com/forge/core/blob/2.0/resources/README.asciidoc for more info.
> ResourceFactory can't be retrieve from registry
> -----------------------------------------------
>
> Key: FORGE-1204
> URL: https://issues.jboss.org/browse/FORGE-1204
> Project: Forge
> Issue Type: Feature Request
> Components: Addon Manager
> Affects Versions: 2.0.0.Alpha12
> Environment: Mac OSX Java 1.7.0_40
> Reporter: Robb Greathouse
>
> ResourceFactory resourceFactory = ((ResourceFactory) registry.getExportedTypes(ResourceFactory.class));
> No longer returns a ResourceFactory. Instead it returns an empty Hashset. This code is used to create a DirectoryResource.
> ResourceFactory resourceFactory = ((ResourceFactory) registry.getExportedTypes(ResourceFactory.class));
> ProjectFactory projectFactory = (ProjectFactory) registry.getExportedTypes(ProjectFactory.class);
> FacetFactory facetFactory = (FacetFactory) registry.getExportedTypes(FacetFactory.class);
>
> DirectoryResource dr = resourceFactory.create(DirectoryResource.class, forgeOutput);
> DirectoryResource projectDir = dr.getChildDirectory(archive.getName());
> projectDir.mkdir();
> List<Class<JavaSourceFacet>> facetsToInstall = Arrays
> .asList(JavaSourceFacet.class);
>
> Project project = projectFactory.createProject(projectDir);
--
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
10 years, 9 months
[JBoss JIRA] (FORGE-1204) ResourceFactory can't be retrieve from registry
by Lincoln Baxter III (JIRA)
[ https://issues.jboss.org/browse/FORGE-1204?page=com.atlassian.jira.plugin... ]
Lincoln Baxter III commented on FORGE-1204:
-------------------------------------------
Hey Robb,
Sorry you're having trouble, but this feature is definitely not broken (or nothing would work and the release would have failed hard) - Since I'm guessing you encountered this when upgrading to Alpha12, is it possible that the Resources Addon has not started yet? Remember to check all the versions in your Addon.waitUntilStartd(...) statements to give Furnace appropriate time to start up the Addons you need.
~Lincoln
> ResourceFactory can't be retrieve from registry
> -----------------------------------------------
>
> Key: FORGE-1204
> URL: https://issues.jboss.org/browse/FORGE-1204
> Project: Forge
> Issue Type: Feature Request
> Components: Addon Manager
> Affects Versions: 2.0.0.Alpha12
> Environment: Mac OSX Java 1.7.0_40
> Reporter: Robb Greathouse
>
> ResourceFactory resourceFactory = ((ResourceFactory) registry.getExportedTypes(ResourceFactory.class));
> No longer returns a ResourceFactory. Instead it returns an empty Hashset. This code is used to create a DirectoryResource.
> ResourceFactory resourceFactory = ((ResourceFactory) registry.getExportedTypes(ResourceFactory.class));
> ProjectFactory projectFactory = (ProjectFactory) registry.getExportedTypes(ProjectFactory.class);
> FacetFactory facetFactory = (FacetFactory) registry.getExportedTypes(FacetFactory.class);
>
> DirectoryResource dr = resourceFactory.create(DirectoryResource.class, forgeOutput);
> DirectoryResource projectDir = dr.getChildDirectory(archive.getName());
> projectDir.mkdir();
> List<Class<JavaSourceFacet>> facetsToInstall = Arrays
> .asList(JavaSourceFacet.class);
>
> Project project = projectFactory.createProject(projectDir);
--
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
10 years, 9 months
[JBoss JIRA] (FORGE-1204) ResourceFactory can't be retrieve from registry
by Robb Greathouse (JIRA)
Robb Greathouse created FORGE-1204:
--------------------------------------
Summary: ResourceFactory can't be retrieve from registry
Key: FORGE-1204
URL: https://issues.jboss.org/browse/FORGE-1204
Project: Forge
Issue Type: Feature Request
Components: Addon Manager
Affects Versions: 2.0.0.Alpha12
Environment: Mac OSX Java 1.7.0_40
Reporter: Robb Greathouse
ResourceFactory resourceFactory = ((ResourceFactory) registry.getExportedTypes(ResourceFactory.class));
No longer returns a ResourceFactory. Instead it returns an empty Hashset. This code is used to create a DirectoryResource.
ResourceFactory resourceFactory = ((ResourceFactory) registry.getExportedTypes(ResourceFactory.class));
ProjectFactory projectFactory = (ProjectFactory) registry.getExportedTypes(ProjectFactory.class);
FacetFactory facetFactory = (FacetFactory) registry.getExportedTypes(FacetFactory.class);
DirectoryResource dr = resourceFactory.create(DirectoryResource.class, forgeOutput);
DirectoryResource projectDir = dr.getChildDirectory(archive.getName());
projectDir.mkdir();
List<Class<JavaSourceFacet>> facetsToInstall = Arrays
.asList(JavaSourceFacet.class);
Project project = projectFactory.createProject(projectDir);
--
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
10 years, 9 months