Skip to content

Commit

Permalink
Reduce scope of unchecked
Browse files Browse the repository at this point in the history
git-svn-id: http://anonsvn.jboss.org/repos/weld/ri/trunk@770 1c488680-804c-0410-94cd-c6b725194a0e
  • Loading branch information
pmuir committed Jan 5, 2009
1 parent 64eb777 commit 86ef62b
Showing 1 changed file with 5 additions and 2 deletions.
Expand Up @@ -70,7 +70,6 @@ public ProxyPool()
* @throws InstantiationException When the proxy couldn't be created
* @throws IllegalAccessException When the proxy couldn't be created
*/
@SuppressWarnings("unchecked")
private static <T> T createClientProxy(Bean<T> bean, int beanIndex) throws RuntimeException
{

Expand All @@ -82,7 +81,11 @@ private static <T> T createClientProxy(Bean<T> bean, int beanIndex) throws Runti
ProxyFactory proxyFactory = Proxies.getProxyFactory(classes);
proxyFactory.setHandler(proxyMethodHandler);
Class<?> clazz = proxyFactory.createClass();
return (T) clazz.newInstance();

@SuppressWarnings("unchecked")
T instance = (T) clazz.newInstance();

return instance;
}
catch (InstantiationException e)
{
Expand Down

0 comments on commit 86ef62b

Please sign in to comment.