openwebbeans-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gerdo...@apache.org
Subject svn commit: r826309 - in /incubator/openwebbeans/trunk/webbeans-impl/src: main/java/org/apache/webbeans/util/ test/java/org/apache/webbeans/test/component/ test/java/org/apache/webbeans/test/component/service/ test/java/org/apache/webbeans/test/unittes...
Date Sat, 17 Oct 2009 21:04:45 GMT
Author: gerdogdu
Date: Sat Oct 17 21:04:44 2009
New Revision: 826309

URL: http://svn.apache.org/viewvc?rev=826309&view=rev
Log:
Several updates and clean up.

Modified:
    incubator/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/util/ClassUtil.java
    incubator/openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test/component/CurrentBindingComponent.java
    incubator/openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test/component/InjectedTypeLiteralComponent.java
    incubator/openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test/component/Singleton.java
    incubator/openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test/component/service/TypedInjectionWithoutArguments.java
    incubator/openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test/unittests/TypedComponentTest.java
    incubator/openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test/unittests/typedliteral/TypedLiteralComponentTest.java

Modified: incubator/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/util/ClassUtil.java
URL: http://svn.apache.org/viewvc/incubator/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/util/ClassUtil.java?rev=826309&r1=826308&r2=826309&view=diff
==============================================================================
--- incubator/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/util/ClassUtil.java
(original)
+++ incubator/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/util/ClassUtil.java
Sat Oct 17 21:04:44 2009
@@ -770,7 +770,7 @@
         }
         else if (beanType instanceof Class && requiredType instanceof Class)
         {
-            return isAssignable((Class) requiredType, (Class) beanType);
+            return requiredType.equals(beanType);
         }
         else if(beanType instanceof ParameterizedType && requiredType instanceof
Class)
         {

Modified: incubator/openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test/component/CurrentBindingComponent.java
URL: http://svn.apache.org/viewvc/incubator/openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test/component/CurrentBindingComponent.java?rev=826309&r1=826308&r2=826309&view=diff
==============================================================================
--- incubator/openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test/component/CurrentBindingComponent.java
(original)
+++ incubator/openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test/component/CurrentBindingComponent.java
Sat Oct 17 21:04:44 2009
@@ -28,7 +28,7 @@
 @SuppressWarnings("unchecked")
 public class CurrentBindingComponent
 {
-    private ITyped2 typed2 = null;
+    private ITyped2<String, Object> typed2 = null;
 
     public CurrentBindingComponent()
     {
@@ -36,7 +36,7 @@
     }
 
     @Inject
-    public CurrentBindingComponent(@Binding1 @Binding2 ITyped2 typed2)
+    public CurrentBindingComponent(@Binding1 @Binding2 ITyped2<String, Object> typed2)
     {
         this.typed2 = typed2;
     }

Modified: incubator/openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test/component/InjectedTypeLiteralComponent.java
URL: http://svn.apache.org/viewvc/incubator/openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test/component/InjectedTypeLiteralComponent.java?rev=826309&r1=826308&r2=826309&view=diff
==============================================================================
--- incubator/openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test/component/InjectedTypeLiteralComponent.java
(original)
+++ incubator/openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test/component/InjectedTypeLiteralComponent.java
Sat Oct 17 21:04:44 2009
@@ -24,8 +24,6 @@
 {
     private @Inject @Default ITypeLiteralComponent<List<String>> component;
     
-    private @Inject @Default ITypeLiteralComponent eraseComponent;
-
     public InjectedTypeLiteralComponent()
     {
         super();
@@ -47,20 +45,5 @@
         this.component = component;
     }
 
-    /**
-     * @return the eraseComponent
-     */
-    public ITypeLiteralComponent getEraseComponent()
-    {
-        return eraseComponent;
-    }
-
-    /**
-     * @param eraseComponent the eraseComponent to set
-     */
-    public void setEraseComponent(ITypeLiteralComponent eraseComponent)
-    {
-        this.eraseComponent = eraseComponent;
-    }
 
 }

Modified: incubator/openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test/component/Singleton.java
URL: http://svn.apache.org/viewvc/incubator/openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test/component/Singleton.java?rev=826309&r1=826308&r2=826309&view=diff
==============================================================================
--- incubator/openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test/component/Singleton.java
(original)
+++ incubator/openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test/component/Singleton.java
Sat Oct 17 21:04:44 2009
@@ -31,11 +31,11 @@
 public class Singleton implements Serializable
 {
     @SuppressWarnings("unchecked")
-    private ITyped2 typed2 = null;
+    private ITyped2<String, Object> typed2 = null;
 
     @SuppressWarnings("unchecked")
     @Inject
-    public void inject(@Binding1 ITyped2 typed2)
+    public void inject(@Binding1 ITyped2<String, Object> typed2)
     {
         this.typed2 = typed2;
     }

Modified: incubator/openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test/component/service/TypedInjectionWithoutArguments.java
URL: http://svn.apache.org/viewvc/incubator/openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test/component/service/TypedInjectionWithoutArguments.java?rev=826309&r1=826308&r2=826309&view=diff
==============================================================================
--- incubator/openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test/component/service/TypedInjectionWithoutArguments.java
(original)
+++ incubator/openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test/component/service/TypedInjectionWithoutArguments.java
Sat Oct 17 21:04:44 2009
@@ -27,7 +27,7 @@
 @SuppressWarnings("unchecked")
 public class TypedInjectionWithoutArguments implements Serializable
 {
-    @Inject @Binding1 @Binding2 ITyped2 v = null;
+    @Inject @Binding1 @Binding2 ITyped2<String, Object> v = null;
 
     public ITyped2<String, Object> getV()
     {

Modified: incubator/openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test/unittests/TypedComponentTest.java
URL: http://svn.apache.org/viewvc/incubator/openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test/unittests/TypedComponentTest.java?rev=826309&r1=826308&r2=826309&view=diff
==============================================================================
--- incubator/openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test/unittests/TypedComponentTest.java
(original)
+++ incubator/openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test/unittests/TypedComponentTest.java
Sat Oct 17 21:04:44 2009
@@ -15,8 +15,10 @@
 
 import java.lang.annotation.Annotation;
 import java.util.List;
+import java.util.Set;
 
 import javax.enterprise.inject.Default;
+import javax.enterprise.inject.spi.Bean;
 import javax.enterprise.inject.spi.BeanManager;
 
 import junit.framework.Assert;
@@ -52,7 +54,7 @@
         List<AbstractBean<?>> list = getComponents();
 
         @SuppressWarnings("unused")
-        AbstractBean<?> itype = (AbstractBean<?>) getManager().resolveByType(TypedComponentTest.class.getDeclaredField("s").getType(),
new Default()
+        Set<Bean<?>> beans= getManager().resolveByType(TypedComponentTest.class.getDeclaredField("s").getType(),
new Default()
         {
 
             public Class<? extends Annotation> annotationType()
@@ -61,9 +63,9 @@
                 return Default.class;
             }
 
-        }).iterator().next();
+        });
 
-        Assert.assertTrue(list.size() > 0 ? true : false);
+        Assert.assertTrue(beans.size() == 0 ? true : false);
     }
 
 }

Modified: incubator/openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test/unittests/typedliteral/TypedLiteralComponentTest.java
URL: http://svn.apache.org/viewvc/incubator/openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test/unittests/typedliteral/TypedLiteralComponentTest.java?rev=826309&r1=826308&r2=826309&view=diff
==============================================================================
--- incubator/openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test/unittests/typedliteral/TypedLiteralComponentTest.java
(original)
+++ incubator/openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test/unittests/typedliteral/TypedLiteralComponentTest.java
Sat Oct 17 21:04:44 2009
@@ -67,10 +67,6 @@
 
         Assert.assertTrue(tc.getComponent() instanceof TypeLiteralComponent);
         
-        Assert.assertNotNull(tc.getEraseComponent());
-
-        Assert.assertEquals("GURKAN", TypeLiteralComponent.getSTR());
-
         ContextFactory.destroyRequestContext(null);
     }
 



Mime
View raw message