[
https://issues.jboss.org/browse/FORGE-2589?page=com.atlassian.jira.plugin...
]
Ondrej Zizka updated FORGE-2589:
--------------------------------
Description:
This is just a suggestion to strenghten the contract of getServices(Class).
Often, the code looks like this:
{code}
furnace.getAddonRegistry().getServices(GraphApiCompositeClassLoaderProvider.class).get();
{code}
And all works until something goes wrong with the addons setup.
In that case, getServices() returns null and the user sees a NullPointerException.
I suggest that there could be 2 methods, getServices() which would throw an informative
exception if no such services are found, and findServices() which would return null, as
the current getServices() does.
was:
This is just a suggestion to strenghten the contract of
{code}
furnace.getAddonRegistry().getServices(GraphApiCompositeClassLoaderProvider.class).get();
{code}
Throw when AddonRegistry().getServices(Class) finds nothing
-----------------------------------------------------------
Key: FORGE-2589
URL:
https://issues.jboss.org/browse/FORGE-2589
Project: Forge
Issue Type: Feature Request
Components: Addon Manager, Furnace (Container)
Affects Versions: 2.20.1.Final
Reporter: Ondrej Zizka
This is just a suggestion to strenghten the contract of getServices(Class).
Often, the code looks like this:
{code}
furnace.getAddonRegistry().getServices(GraphApiCompositeClassLoaderProvider.class).get();
{code}
And all works until something goes wrong with the addons setup.
In that case, getServices() returns null and the user sees a NullPointerException.
I suggest that there could be 2 methods, getServices() which would throw an informative
exception if no such services are found, and findServices() which would return null, as
the current getServices() does.
--
This message was sent by Atlassian JIRA
(v6.4.11#64026)