openwebbeans-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tandrasc...@apache.org
Subject svn commit: r1776284 - /openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/container/BeanManagerImpl.java
Date Wed, 28 Dec 2016 14:28:40 GMT
Author: tandraschko
Date: Wed Dec 28 14:28:40 2016
New Revision: 1776284

URL: http://svn.apache.org/viewvc?rev=1776284&view=rev
Log:
OWB-1163 reduce duplicate code

Modified:
    openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/container/BeanManagerImpl.java

Modified: openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/container/BeanManagerImpl.java
URL: http://svn.apache.org/viewvc/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/container/BeanManagerImpl.java?rev=1776284&r1=1776283&r2=1776284&view=diff
==============================================================================
--- openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/container/BeanManagerImpl.java
(original)
+++ openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/container/BeanManagerImpl.java
Wed Dec 28 14:28:40 2016
@@ -1295,6 +1295,12 @@ public class BeanManagerImpl implements
 
     public <T> void addAdditionalAnnotatedType(Object extension, AnnotatedType<T>
inAnnotatedType, String id)
     {
+        if (id == null)
+        {
+            addAdditionalAnnotatedType(extension, inAnnotatedType);
+            return;
+        }
+
         final AnnotatedType<T> annotatedType = new AnnotatedTypeWrapper<T>(Extension.class.cast(extension),
inAnnotatedType);
         if (annotatedType.getAnnotation(Vetoed.class) != null)
         {
@@ -1302,11 +1308,6 @@ public class BeanManagerImpl implements
             return;
         }
 
-        if (id == null)
-        {
-            id = extension.getClass().getName() + annotatedType + AnnotatedElementFactory.OWB_DEFAULT_KEY;
-        }
-        
         webBeansContext.getAnnotatedElementFactory().setAnnotatedType(annotatedType, id);
         ConcurrentMap<String, AnnotatedType<?>> annotatedTypes = additionalAnnotatedTypes.get(annotatedType.getJavaClass());
         if (annotatedTypes == null)



Mime
View raw message