[webbeans-commits] Webbeans SVN: r3551 - ri/trunk/impl/src/main/java/org/jboss/webbeans/introspector/jlr.

webbeans-commits at lists.jboss.org webbeans-commits at lists.jboss.org
Tue Aug 18 11:50:55 EDT 2009


Author: pete.muir at jboss.org
Date: 2009-08-18 11:50:55 -0400 (Tue, 18 Aug 2009)
New Revision: 3551

Modified:
   ri/trunk/impl/src/main/java/org/jboss/webbeans/introspector/jlr/WBClassImpl.java
Log:
Fix casts

Modified: ri/trunk/impl/src/main/java/org/jboss/webbeans/introspector/jlr/WBClassImpl.java
===================================================================
--- ri/trunk/impl/src/main/java/org/jboss/webbeans/introspector/jlr/WBClassImpl.java	2009-08-18 15:46:24 UTC (rev 3550)
+++ ri/trunk/impl/src/main/java/org/jboss/webbeans/introspector/jlr/WBClassImpl.java	2009-08-18 15:50:55 UTC (rev 3551)
@@ -250,10 +250,11 @@
         
       });
       this.declaredConstructorsBySignature = new HashMap<ConstructorSignature, WBConstructor<?>>();
-      for (Constructor<Object> constructor : rawType.getDeclaredConstructors())
+      for (Constructor<?> constructor : rawType.getDeclaredConstructors())
       {
          // TODO Fix this cast
-         WBConstructor<T> annotatedConstructor = (WBConstructor<T>) WBConstructorImpl.of(constructor, getDeclaringWBClass(constructor, classTransformer), classTransformer);
+         Constructor<T> c = (Constructor<T>) constructor;
+         WBConstructor<T> annotatedConstructor = WBConstructorImpl.of(c, this.<T>getDeclaringWBClass(c, classTransformer), classTransformer);
          if (!constructor.isAccessible())
          {
             constructor.setAccessible(true);
@@ -370,8 +371,7 @@
       }
       else
       {
-         WBClass<X> loadClass = transformer.loadClass(member.getDeclaringClass());
-         return loadClass;
+         return transformer.loadClass((Class<X>) member.getDeclaringClass());
       }
    }
 




More information about the weld-commits mailing list