Author: rmannibucau
Date: Mon Oct 28 13:55:42 2013
New Revision: 1536352

URL: http://svn.apache.org/r1536352
Log:
no more need of this logic since it is done eagerly in core so simply route to 
the right method

Modified:
    
tomee/tomee/trunk/tomee/tomee-catalina/src/main/java/org/apache/tomee/catalina/OpenEJBContextConfig.java

Modified: 
tomee/tomee/trunk/tomee/tomee-catalina/src/main/java/org/apache/tomee/catalina/OpenEJBContextConfig.java
URL: 
http://svn.apache.org/viewvc/tomee/tomee/trunk/tomee/tomee-catalina/src/main/java/org/apache/tomee/catalina/OpenEJBContextConfig.java?rev=1536352&r1=1536351&r2=1536352&view=diff
==============================================================================
--- 
tomee/tomee/trunk/tomee/tomee-catalina/src/main/java/org/apache/tomee/catalina/OpenEJBContextConfig.java
 (original)
+++ 
tomee/tomee/trunk/tomee/tomee-catalina/src/main/java/org/apache/tomee/catalina/OpenEJBContextConfig.java
 Mon Oct 28 13:55:42 2013
@@ -431,25 +431,15 @@ public class OpenEJBContextConfig extend
                             }
                         } else {
                             try {
-                                // we need to load the class (entry.getKey()) 
with the finder classloader = tempClassLoader otherwise isAssignable is false 
in almost all cases
-                                // don't warn since it is in the spec + JavaEE 
7 will rely a lot on it so *we* need to improve and not the opposite!
-                                // logger.info("Using @HandlesTypes on a 
parent class (and not an annotation) is a performance killer. See " + 
annotation.getName() + " on " + sci.getClass().getName());
-                                if (AnnotationFinder.class.isInstance(finder)) 
{
-                                    if (annotation.isInterface()) {
-                                        if (!foundImplementations) {
-                                            
AnnotationFinder.class.cast(finder).enableFindImplementations();
-                                            foundImplementations = true;
-                                        }
-                                    } else {
-                                        if (!foundSubClasses) {
-                                            
AnnotationFinder.class.cast(finder).enableFindSubclasses();
-                                            foundSubClasses = true;
-                                        }
-                                    }
+                                final Class<?> reloadedClass = 
tempLoader.loadClass(annotation.getName());
+
+                                final List<Class<?>> implementations;
+                                if (annotation.isInterface()) {
+                                    implementations = 
finder.findImplementations(reloadedClass);
+                                } else {
+                                    implementations = 
finder.findSubclasses(reloadedClass);
                                 }
 
-                                final Class<?> reloadedClass = 
tempLoader.loadClass(annotation.getName());
-                                final List<Class<?>> implementations = 
List.class.cast(finder.findImplementations(reloadedClass));
                                 addClassesWithRightLoader(loader, sci, 
implementations);
                             } catch (final Throwable th) {
                                 // no-op


Reply via email to