Author: pete.muir(a)jboss.org
Date: 2009-01-05 11:47:09 -0500 (Mon, 05 Jan 2009)
New Revision: 770
Modified:
ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/bean/proxy/ProxyPool.java
Log:
Reduce scope of unchecked
Modified: ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/bean/proxy/ProxyPool.java
===================================================================
---
ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/bean/proxy/ProxyPool.java 2009-01-05
16:26:33 UTC (rev 769)
+++
ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/bean/proxy/ProxyPool.java 2009-01-05
16:47:09 UTC (rev 770)
@@ -70,7 +70,6 @@
* @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
{
@@ -82,7 +81,11 @@
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)
{
Show replies by date