openwebbeans-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From strub...@apache.org
Subject svn commit: r1363028 - in /openwebbeans/trunk: webbeans-impl/src/main/java/org/apache/webbeans/container/ webbeans-impl/src/main/java/org/apache/webbeans/decorator/ webbeans-impl/src/main/java/org/apache/webbeans/deployment/ webbeans-impl/src/main/java...
Date Wed, 18 Jul 2012 17:47:53 GMT
Author: struberg
Date: Wed Jul 18 17:47:53 2012
New Revision: 1363028

URL: http://svn.apache.org/viewvc?rev=1363028&view=rev
Log:
OWB-680 remove unused and obsolete getInstance() from most services

Please use WebBeansContext#getXxxxx instead.

Modified:
    openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/container/InjectableBeanManager.java
    openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/container/InjectionResolver.java
    openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/container/SerializableBeanVault.java
    openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/decorator/DecoratorsManager.java
    openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/deployment/StereoTypeManager.java
    openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/inject/AlternativesManager.java
    openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/portable/AnnotatedElementFactory.java
    openwebbeans/trunk/webbeans-porting/src/main/java/org/apache/webbeans/test/tck/ManagersImpl.java

Modified: openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/container/InjectableBeanManager.java
URL: http://svn.apache.org/viewvc/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/container/InjectableBeanManager.java?rev=1363028&r1=1363027&r2=1363028&view=diff
==============================================================================
--- openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/container/InjectableBeanManager.java
(original)
+++ openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/container/InjectableBeanManager.java
Wed Jul 18 17:47:53 2012
@@ -67,12 +67,6 @@ public class InjectableBeanManager imple
         this.bm = bm;
     }
 
-
-    public InjectableBeanManager()
-    {
-        bm = WebBeansContext.getInstance().getBeanManagerImpl();
-    }
-    
     public <T> AnnotatedType<T> createAnnotatedType(Class<T> type)
     {
         return bm.createAnnotatedType(type);

Modified: openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/container/InjectionResolver.java
URL: http://svn.apache.org/viewvc/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/container/InjectionResolver.java?rev=1363028&r1=1363027&r2=1363028&view=diff
==============================================================================
--- openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/container/InjectionResolver.java
(original)
+++ openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/container/InjectionResolver.java
Wed Jul 18 17:47:53 2012
@@ -116,19 +116,6 @@ public class InjectionResolver
     }
 
     /**
-     * Returns bean manager injection resolver.
-     *
-     * @return bean manager injection resolver
-     * @see org.apache.webbeans.config.WebBeansFinder
-     */
-    public static InjectionResolver getInstance()
-    {
-        InjectionResolver instance = WebBeansContext.getInstance().getBeanManagerImpl().getInjectionResolver();
-
-        return instance;
-    }
-
-    /**
      * Check the type of the injection point.
      * <p>
      * Injection point type can not be {@link java.lang.reflect.TypeVariable}.

Modified: openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/container/SerializableBeanVault.java
URL: http://svn.apache.org/viewvc/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/container/SerializableBeanVault.java?rev=1363028&r1=1363027&r2=1363028&view=diff
==============================================================================
--- openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/container/SerializableBeanVault.java
(original)
+++ openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/container/SerializableBeanVault.java
Wed Jul 18 17:47:53 2012
@@ -24,7 +24,6 @@ import java.util.concurrent.ConcurrentHa
 import javax.enterprise.context.spi.Contextual;
 import javax.enterprise.inject.spi.Bean;
 
-import org.apache.webbeans.config.WebBeansContext;
 import org.apache.webbeans.util.WebBeansUtil;
 
 /**
@@ -47,12 +46,6 @@ public class SerializableBeanVault
 
     private Map<String, SerializableBean<?>> serializableBeans = new ConcurrentHashMap<String,
SerializableBean<?>>();
 
-    @Deprecated
-    public static SerializableBeanVault getInstance()
-    {
-        return WebBeansContext.getInstance().getSerializableBeanVault();
-    }
-
     @SuppressWarnings("unchecked")
     public <T> Contextual<T> getSerializableBean(Contextual<T> bean)
     {

Modified: openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/decorator/DecoratorsManager.java
URL: http://svn.apache.org/viewvc/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/decorator/DecoratorsManager.java?rev=1363028&r1=1363027&r2=1363028&view=diff
==============================================================================
--- openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/decorator/DecoratorsManager.java
(original)
+++ openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/decorator/DecoratorsManager.java
Wed Jul 18 17:47:53 2012
@@ -33,19 +33,11 @@ public class DecoratorsManager
     private List<Class<?>> enabledDecorators = new CopyOnWriteArrayList<Class<?>>();
     private final BeanManagerImpl manager;
 
-    public
-    DecoratorsManager(WebBeansContext webBeansContext)
+    public DecoratorsManager(WebBeansContext webBeansContext)
     {
-
         manager = webBeansContext.getBeanManagerImpl();
     }
 
-    @Deprecated
-    public static DecoratorsManager getInstance()
-    {
-        return WebBeansContext.getInstance().getDecoratorsManager();
-    }
-
     public void addNewDecorator(Class<?> decoratorClazz)
     {
         Asserts.assertNotNull(decoratorClazz, "decoratorClazz parameter can not be emtpy");
@@ -102,4 +94,4 @@ public class DecoratorsManager
         }                
     }
 
-}
\ No newline at end of file
+}

Modified: openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/deployment/StereoTypeManager.java
URL: http://svn.apache.org/viewvc/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/deployment/StereoTypeManager.java?rev=1363028&r1=1363027&r2=1363028&view=diff
==============================================================================
--- openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/deployment/StereoTypeManager.java
(original)
+++ openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/deployment/StereoTypeManager.java
Wed Jul 18 17:47:53 2012
@@ -21,7 +21,6 @@ package org.apache.webbeans.deployment;
 import java.util.Map;
 import java.util.concurrent.ConcurrentHashMap;
 
-import org.apache.webbeans.config.WebBeansContext;
 import org.apache.webbeans.deployment.stereotype.IStereoTypeModel;
 import org.apache.webbeans.util.Asserts;
 
@@ -47,16 +46,6 @@ public class StereoTypeManager
     }
 
     /**
-     * Returns manager for this application.
-     * @return singleton instance.
-     */
-    @Deprecated
-    public static StereoTypeManager getInstance()
-    {
-        return WebBeansContext.getInstance().getStereoTypeManager();
-    }
-
-    /**
      * Adds new steretype model instance.
      * @param model new model
      */

Modified: openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/inject/AlternativesManager.java
URL: http://svn.apache.org/viewvc/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/inject/AlternativesManager.java?rev=1363028&r1=1363027&r2=1363028&view=diff
==============================================================================
--- openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/inject/AlternativesManager.java
(original)
+++ openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/inject/AlternativesManager.java
Wed Jul 18 17:47:53 2012
@@ -44,12 +44,6 @@ public class AlternativesManager
         this.webBeansContext = webBeansContext;
     }
 
-    @Deprecated
-    public static AlternativesManager getInstance()
-    {
-        return WebBeansContext.getInstance().getAlternativesManager();
-    }
-
     @SuppressWarnings("unchecked")
     public void addStereoTypeAlternative(Class<?> alternative,String fileName,ScannerService
scanner)
     {                

Modified: openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/portable/AnnotatedElementFactory.java
URL: http://svn.apache.org/viewvc/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/portable/AnnotatedElementFactory.java?rev=1363028&r1=1363027&r2=1363028&view=diff
==============================================================================
--- openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/portable/AnnotatedElementFactory.java
(original)
+++ openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/portable/AnnotatedElementFactory.java
Wed Jul 18 17:47:53 2012
@@ -47,12 +47,6 @@ public final class AnnotatedElementFacto
     // Logger instance
     private final Logger logger = WebBeansLoggerFacade.getLogger(AnnotatedElementFactory.class);
 
-    @Deprecated
-    public static AnnotatedElementFactory getInstance()
-    {
-        return WebBeansContext.getInstance().getAnnotatedElementFactory();
-    }
-
     //Cache of the AnnotatedType
     private ConcurrentMap<Class<?>, AnnotatedType<?>> annotatedTypeCache
=
         new ConcurrentHashMap<Class<?>, AnnotatedType<?>>();

Modified: openwebbeans/trunk/webbeans-porting/src/main/java/org/apache/webbeans/test/tck/ManagersImpl.java
URL: http://svn.apache.org/viewvc/openwebbeans/trunk/webbeans-porting/src/main/java/org/apache/webbeans/test/tck/ManagersImpl.java?rev=1363028&r1=1363027&r2=1363028&view=diff
==============================================================================
--- openwebbeans/trunk/webbeans-porting/src/main/java/org/apache/webbeans/test/tck/ManagersImpl.java
(original)
+++ openwebbeans/trunk/webbeans-porting/src/main/java/org/apache/webbeans/test/tck/ManagersImpl.java
Wed Jul 18 17:47:53 2012
@@ -20,6 +20,7 @@ package org.apache.webbeans.test.tck;
 
 import javax.enterprise.inject.spi.BeanManager;
 
+import org.apache.webbeans.config.WebBeansContext;
 import org.apache.webbeans.container.InjectableBeanManager;
 import org.apache.webbeans.exception.inject.DefinitionException;
 import org.jboss.jsr299.tck.spi.Managers;
@@ -38,7 +39,7 @@ public class ManagersImpl implements Man
     {
         if(beanManager == null)
         {
-            beanManager = new InjectableBeanManager();
+            beanManager = new InjectableBeanManager(WebBeansContext.getInstance().getBeanManagerImpl());
         }
         
         return beanManager; 



Mime
View raw message