openwebbeans-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From strub...@apache.org
Subject svn commit: r1363038 - in /openwebbeans/trunk/webbeans-impl/src: main/java/org/apache/webbeans/container/BeanManagerImpl.java test/java/org/apache/webbeans/test/TestContext.java test/java/org/apache/webbeans/test/mock/MockManager.java
Date Wed, 18 Jul 2012 18:37:44 GMT
Author: struberg
Date: Wed Jul 18 18:37:44 2012
New Revision: 1363038

URL: http://svn.apache.org/viewvc?rev=1363038&view=rev
Log:
OWB-681 remove old deprecated methods from BeanManagerImpl

Modified:
    openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/container/BeanManagerImpl.java
    openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test/TestContext.java
    openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test/mock/MockManager.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=1363038&r1=1363037&r2=1363038&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 Jul 18 18:37:44 2012
@@ -476,20 +476,7 @@ public class BeanManagerImpl implements 
 
         notificationManager.fireEvent(event, bindings);
     }
-    
-    @Deprecated
-    public <T> T getInstanceToInject(InjectionPoint injectionPoint, CreationalContext<?>
context)
-    {
-        return (T)getInjectableReference(injectionPoint, context);
-    }
-    
-    @Deprecated
-    public Object getInstanceToInject(InjectionPoint injectionPoint)
-    {        
-        return getInstanceToInject(injectionPoint, null);
-    }
 
-    
     @Deprecated
     public <T> T getInstanceByType(Class<T> type, Annotation... bindingTypes)
     {
@@ -865,14 +852,6 @@ public class BeanManagerImpl implements 
         return set;
     }
 
-    @Deprecated
-    public <X> Bean<? extends X> getMostSpecializedBean(Bean<X> bean)
-    {
-        Bean<? extends X> specialized = (Bean<? extends X>) WebBeansUtil.getMostSpecializedBean(this,
bean);
-        
-        return specialized;
-    }
-
     public Bean<?> getPassivationCapableBean(String id)
     {
         return passivationBeans.get(id);

Modified: openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test/TestContext.java
URL: http://svn.apache.org/viewvc/openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test/TestContext.java?rev=1363038&r1=1363037&r2=1363038&view=diff
==============================================================================
--- openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test/TestContext.java
(original)
+++ openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test/TestContext.java
Wed Jul 18 18:37:44 2012
@@ -18,7 +18,6 @@
  */
 package org.apache.webbeans.test;
 
-import java.io.InputStream;
 import java.lang.annotation.Annotation;
 import java.util.HashSet;
 import java.util.Iterator;
@@ -29,11 +28,9 @@ import java.util.logging.Logger;
 import javax.decorator.Decorator;
 import javax.enterprise.context.Dependent;
 import javax.enterprise.context.spi.Context;
-import javax.enterprise.inject.Instance;
 import javax.enterprise.inject.spi.AnnotatedType;
 import javax.enterprise.inject.spi.Bean;
 import javax.enterprise.inject.spi.BeanManager;
-import javax.enterprise.inject.spi.InjectionPoint;
 import javax.interceptor.Interceptor;
 
 import org.apache.webbeans.component.AbstractOwbBean;
@@ -176,20 +173,6 @@ public abstract class TestContext implem
         initializeStereoType(StereoWithSessionScope2.class);
 
     }
-    
-    protected void addInstanceImplicitBean(Bean<?> bean)
-    {
-        Set<InjectionPoint> injectionPoints = bean.getInjectionPoints();
-        for(InjectionPoint injectionPoint : injectionPoints)
-        {
-            //If contains the @Obtains, defines implicit component
-            if(injectionPoint.getAnnotated().getBaseType().equals(Instance.class))
-            {
-                //WebBeansUtil.addInjectedImplicitInstanceComponent(injectionPoint);
-            }                                    
-        }
-
-    }
 
     /**
      * Default stereo types
@@ -200,13 +183,6 @@ public abstract class TestContext implem
         initializeStereoType(Decorator.class);
     }
 
-    /**
-     * Call before test.
-     */
-    protected void beforeTest()
-    {
-
-    }
 
     /**
      * This will be called whenever the test is failed. NOT : This method is
@@ -223,20 +199,6 @@ public abstract class TestContext implem
     }
 
     /**
-     * This will be called whenever the test is passed. NOT : This method is
-     * used for running the tests from the ServletContextListener. It is
-     * not used for normal unit tests.
-     * 
-     * @see TestListener
-     * @see ComponentResolutionByTypeTest
-     * @param methodName passed method name
-     */
-    public void pass(String methodName)
-    {
-        logger.info("Test Class: " + clazzName + ",Method Name: " + methodName + " is PASSED");
-    }
-
-    /**
      * Initialize all tests. NOT : This method is used for initializing the all
      * tests classes from the ServletContextListener. It is not used for
      * normal unit tests.
@@ -380,17 +342,6 @@ public abstract class TestContext implem
     }
 
     /**
-     * Gets the ith component in the {@link MockManager}
-     * 
-     * @param i ith component in the {@link MockManager}
-     * @return the ith component in the list
-     */
-    protected AbstractOwbBean<?> getComponent(int i)
-    {
-        return manager.getComponent(i);
-    }
-
-    /**
      * Gets all components in the {@link MockManager}
      * 
      * @return all components
@@ -449,7 +400,7 @@ public abstract class TestContext implem
     }
 
     /**
-     * Return new {@link MockHttpSession}
+     * Return new MockHttpSession
      * 
      * @return new mock session
      */
@@ -460,17 +411,6 @@ public abstract class TestContext implem
     }
 
     /**
-     * Configuration of the webbeans XML file.
-     * 
-     * @param file input stream
-     * @param fileName file name
-     */
-    protected void configureFromXML(InputStream file, String fileName)
-    {
-        this.xmlConfigurator.configure(file, fileName);
-    }
-
-    /**
      * Add new stereotype model.
      * 
      * @param stereoClass stereotype class

Modified: openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test/mock/MockManager.java
URL: http://svn.apache.org/viewvc/openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test/mock/MockManager.java?rev=1363038&r1=1363037&r2=1363038&view=diff
==============================================================================
--- openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test/mock/MockManager.java
(original)
+++ openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test/mock/MockManager.java
Wed Jul 18 18:37:44 2012
@@ -125,17 +125,6 @@ public class MockManager implements Bean
         return manager.getContext(scopeType);
     }
 
-    public <T> T getInstanceToInject(InjectionPoint injectionPoint, CreationalContext<?>
context)
-    {
-        return manager.<T>getInstanceToInject(injectionPoint, context); //X ugly <T>
due to javac bug 6302954
-    }
-    
-    public Object getInstanceToInject(InjectionPoint injectionPoint)
-    {
-       return manager.getInstanceToInject(injectionPoint);
-        
-    }    
-    
     public <T> T getInstance(Bean<T> bean)
     {
         return manager.getInstance(bean,null);
@@ -188,91 +177,72 @@ public class MockManager implements Bean
         return this.manager.createAnnotatedType(type);
     }
 
-
     @Override
     public <T> CreationalContext<T> createCreationalContext(Contextual<T>
contextual)
     {
         return this.manager.createCreationalContext(contextual);
     }
 
-
     @Override
     public Set<Bean<?>> getBeans(Type beanType, Annotation... bindings)
     {
         return this.manager.getBeans();
     }
 
-
     @Override
     public Set<Bean<?>> getBeans(String name)
     {
         return this.manager.getBeans(name);
     }
 
-
     @Override
     public ELResolver getELResolver()
     {
         return this.manager.getELResolver();
     }
 
-
     @Override
     public Object getInjectableReference(InjectionPoint injectionPoint, CreationalContext<?>
ctx)
     {
         return this.manager.getInjectableReference(injectionPoint, ctx);
     }
 
-
     @Override
     public Set<Annotation> getInterceptorBindingDefinition(Class<? extends Annotation>
binding)
     {
         return this.manager.getInterceptorBindingDefinition(binding);
     }
 
-
-    @Deprecated
-    public <X> Bean<? extends X> getMostSpecializedBean(Bean<X> bean)
-    {
-        return this.manager.getMostSpecializedBean(bean);
-    }
-
-
     @Override
     public Bean<?> getPassivationCapableBean(String id)
     {
         return this.manager.getPassivationCapableBean(id);
     }
 
-
     @Override
     public Object getReference(Bean<?> bean, Type beanType, CreationalContext<?>
ctx)
     {
         return this.manager.getReference(bean, beanType, ctx);
     }
 
-
     @Override
     public Set<Annotation> getStereotypeDefinition(Class<? extends Annotation>
stereotype)
     {
         return this.manager.getStereotypeDefinition(stereotype);
     }
 
-
     @Override
     public boolean isQualifier(Class<? extends Annotation> annotationType)
     {
         return this.manager.isQualifier(annotationType);
     }
 
-
     @Override
     public boolean isInterceptorBinding(Class<? extends Annotation> annotationType)
     {
         return this.manager.isInterceptorBinding(annotationType);
     }
 
-
     @Override
     public boolean isScope(Class<? extends Annotation> annotationType)
     {
@@ -297,14 +267,12 @@ public class MockManager implements Bean
         return this.manager.isStereotype(annotationType);
     }
 
-
     @Override
     public <X> Bean<? extends X> resolve(Set<Bean<? extends X>> beans)
     {
         return this.manager.resolve(beans);
     }
 
-
     @Override
     public void validate(InjectionPoint injectionPoint)
     {
@@ -312,25 +280,21 @@ public class MockManager implements Bean
         
     }
 
-
     @Override
     public <T> InjectionTarget<T> createInjectionTarget(AnnotatedType<T>
type)
     {
         return this.manager.createInjectionTarget(type);
     }
 
-
     @Override
     public <T> Set<ObserverMethod<? super T>> resolveObserverMethods(T
event, Annotation... bindings)
     {
         return this.manager.resolveObserverMethods(event, bindings);
     }
 
-
     @Override
     public ExpressionFactory wrapExpressionFactory(ExpressionFactory expressionFactory)
     {
-        // TODO Auto-generated method stub
         return null;
     }
 }



Mime
View raw message