openwebbeans-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From a...@apache.org
Subject svn commit: r1502035 [2/2] - in /openwebbeans/trunk: webbeans-impl/src/main/java/org/apache/webbeans/component/ webbeans-impl/src/main/java/org/apache/webbeans/component/creation/ webbeans-impl/src/main/java/org/apache/webbeans/config/ webbeans-impl/sr...
Date Wed, 10 Jul 2013 22:48:59 GMT
Added: openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/newtests/injection/generics/Foo.java
URL: http://svn.apache.org/viewvc/openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/newtests/injection/generics/Foo.java?rev=1502035&view=auto
==============================================================================
--- openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/newtests/injection/generics/Foo.java
(added)
+++ openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/newtests/injection/generics/Foo.java
Wed Jul 10 22:48:58 2013
@@ -0,0 +1,25 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.webbeans.newtests.injection.generics;
+
+import javax.enterprise.context.RequestScoped;
+
+@RequestScoped
+public class Foo extends Bar<String, BazSubclass> {
+}
\ No newline at end of file

Copied: openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/newtests/injection/generics/GenericBeanTest.java
(from r1502033, openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test/unittests/inject/generic/GenericBeanTest.java)
URL: http://svn.apache.org/viewvc/openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/newtests/injection/generics/GenericBeanTest.java?p2=openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/newtests/injection/generics/GenericBeanTest.java&p1=openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test/unittests/inject/generic/GenericBeanTest.java&r1=1502033&r2=1502035&rev=1502035&view=diff
==============================================================================
--- openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test/unittests/inject/generic/GenericBeanTest.java
(original)
+++ openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/newtests/injection/generics/GenericBeanTest.java
Wed Jul 10 22:48:58 2013
@@ -16,44 +16,26 @@
  * specific language governing permissions and limitations
  * under the License.
  */
-package org.apache.webbeans.test.unittests.inject.generic;
+package org.apache.webbeans.newtests.injection.generics;
 
-import org.apache.webbeans.component.AbstractOwbBean;
-import org.apache.webbeans.test.TestContext;
+import org.apache.webbeans.newtests.AbstractUnitTest;
 import org.apache.webbeans.test.component.inject.generic.GenericComponent;
 import org.apache.webbeans.test.component.inject.generic.GenericComponentInjector;
 import org.junit.Assert;
-import org.junit.Before;
 import org.junit.Test;
 
-public class GenericBeanTest extends TestContext
+public class GenericBeanTest extends AbstractUnitTest
 {
-    public GenericBeanTest()
-    {
-        super(GenericBeanTest.class.getName());
-    }
-
-    @Override
-    @Before
-    public void init()
-    {
-        super.init();
-    }
     
     @Test
-    @SuppressWarnings("unchecked")
     public void testGenericBeanInjection()
     {
-        defineManagedBean(GenericComponent.class);
-        AbstractOwbBean<GenericComponentInjector> bean2 = defineManagedBean(GenericComponentInjector.class);
+        startContainer(GenericComponent.class, GenericComponentInjector.class);
         
-        GenericComponentInjector<?> instance = getManager().getInstance(bean2);
+        GenericComponentInjector<?> instance = getInstance(GenericComponentInjector.class);
         Assert.assertNotNull(instance.getInjection1());
         Assert.assertNotNull(instance.getInjection2());
         Assert.assertNotNull(instance.getInjection3());
         Assert.assertNotNull(instance.getInjection4());
-        
-        
-        
     }
 }

Added: openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/newtests/injection/generics/GenericFactory.java
URL: http://svn.apache.org/viewvc/openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/newtests/injection/generics/GenericFactory.java?rev=1502035&view=auto
==============================================================================
--- openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/newtests/injection/generics/GenericFactory.java
(added)
+++ openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/newtests/injection/generics/GenericFactory.java
Wed Jul 10 22:48:58 2013
@@ -0,0 +1,41 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.webbeans.newtests.injection.generics;
+
+import java.util.List;
+
+import javax.enterprise.inject.Produces;
+
+public class GenericFactory {
+    @Produces
+    @GenericQualifier
+    public String produceString() {
+        return "a produced String";
+    }
+
+    @Produces
+    public String[] produceStringArray() {
+        return new String[0];
+    }
+
+    @Produces
+    public Baz<List<BazSubclass>> produceBazBazBazSubclass() {
+        return new Baz();
+    }
+}

Added: openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/newtests/injection/generics/GenericQualifier.java
URL: http://svn.apache.org/viewvc/openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/newtests/injection/generics/GenericQualifier.java?rev=1502035&view=auto
==============================================================================
--- openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/newtests/injection/generics/GenericQualifier.java
(added)
+++ openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/newtests/injection/generics/GenericQualifier.java
Wed Jul 10 22:48:58 2013
@@ -0,0 +1,36 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.webbeans.newtests.injection.generics;
+
+import static java.lang.annotation.ElementType.FIELD;
+import static java.lang.annotation.ElementType.METHOD;
+import static java.lang.annotation.ElementType.PARAMETER;
+import static java.lang.annotation.ElementType.TYPE;
+import static java.lang.annotation.RetentionPolicy.RUNTIME;
+
+import java.lang.annotation.Retention;
+import java.lang.annotation.Target;
+
+import javax.inject.Qualifier;
+
+@Target({ TYPE, METHOD, PARAMETER, FIELD })
+@Retention(RUNTIME)
+@Qualifier
+public @interface GenericQualifier {
+}
\ No newline at end of file

Added: openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/newtests/injection/generics/GenericsTest.java
URL: http://svn.apache.org/viewvc/openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/newtests/injection/generics/GenericsTest.java?rev=1502035&view=auto
==============================================================================
--- openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/newtests/injection/generics/GenericsTest.java
(added)
+++ openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/newtests/injection/generics/GenericsTest.java
Wed Jul 10 22:48:58 2013
@@ -0,0 +1,112 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.webbeans.newtests.injection.generics;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.fail;
+
+import java.lang.annotation.Annotation;
+import java.util.List;
+import java.util.Set;
+
+import javax.enterprise.inject.spi.Bean;
+import javax.enterprise.inject.spi.InjectionPoint;
+import javax.enterprise.inject.spi.ObserverMethod;
+import javax.enterprise.util.TypeLiteral;
+
+import org.apache.webbeans.newtests.AbstractUnitTest;
+import org.junit.Before;
+import org.junit.Ignore;
+import org.junit.Test;
+
+@Ignore
+public class GenericsTest extends AbstractUnitTest
+{
+
+    @Before
+    public void startContainer()
+    {
+        addExtension(new BarVetoExtension());
+        startContainer(Foo.class, Bar.class, Baz.class, BazSubclass.class, GenericFactory.class);
+    }
+
+    @Test
+    public void injectionPoint() throws Exception
+    {
+        Bean<Foo> fooBean = getBean(Foo.class);
+        Set<InjectionPoint> injectionPoints = fooBean.getInjectionPoints();
+
+        assertEquals(4, injectionPoints.size());
+
+        for (InjectionPoint injectionPoint : injectionPoints)
+        {
+            if ("baz".equals(injectionPoint.getMember().getName()))
+            {
+                assertEquals(new TypeLiteral<Baz<String>>() { }.getType(), injectionPoint.getType());
+            }
+            else if ("a".equals(injectionPoint.getMember().getName()))
+            {
+                assertEquals(String.class, injectionPoint.getType());
+            }
+            else if ("bBazList".equals(injectionPoint.getMember().getName()))
+            {
+                assertEquals(new TypeLiteral<Baz<List<BazSubclass>>>()
{ }.getType(), injectionPoint.getType());
+            }
+            else if ("setAArray".equals(injectionPoint.getMember().getName()))
+            {
+                assertEquals(String[].class, injectionPoint.getType());
+            }
+            else
+            {
+                fail("Unexpected injection point");
+            }
+        }
+    }
+
+    @Test
+    public void testInjected() throws Exception
+    {
+        Foo foo = getInstance(Foo.class);
+        assertNotNull(foo);
+        assertNotNull(foo.getBaz());
+        assertNotNull(foo.getAArray());
+        assertNotNull(foo.getBBazList());
+    }
+
+    @Test
+    public void observerResolution() throws Exception
+    {
+        Set<ObserverMethod<? super BazSubclass>> observerMethods = getBeanManager().resolveObserverMethods(new
BazSubclass(null));
+        assertEquals(observerMethods.size(), 1);
+        ObserverMethod<? super Class<BazSubclass>> observerMethod = (ObserverMethod<?
super Class<BazSubclass>>)observerMethods.iterator().next();
+        assertEquals(observerMethod.getBeanClass(), Foo.class);
+        assertEquals(observerMethod.getObservedType(), new TypeLiteral<Baz<String>>()
{ }.getType());
+    }
+
+    @Test
+    public void testObserver() throws Exception
+    {
+        Foo foo = getInstance(Foo.class);
+        assertNotNull(foo);
+        getBeanManager().fireEvent(new BazSubclass(null));
+        assertNotNull(foo.getABazEvent());
+        assertEquals((String) foo.getAObserverInjectionPoint(), "a produced String");
+    }
+}

Modified: openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/newtests/promethods/beans/MethodTypeProduces1.java
URL: http://svn.apache.org/viewvc/openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/newtests/promethods/beans/MethodTypeProduces1.java?rev=1502035&r1=1502034&r2=1502035&view=diff
==============================================================================
--- openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/newtests/promethods/beans/MethodTypeProduces1.java
(original)
+++ openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/newtests/promethods/beans/MethodTypeProduces1.java
Wed Jul 10 22:48:58 2013
@@ -24,7 +24,7 @@ import javax.enterprise.context.Dependen
 import javax.enterprise.inject.Produces;
 import javax.inject.Named;
 
-public class MethodTypeProduces1<T>
+public class MethodTypeProduces1<T extends String>
 {
     @Produces @Dependent @Named("ProMethodParameterized3") 
     ArrayList<T> methodPT3() 

Modified: openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test/unittests/clazz/ClazzTest.java
URL: http://svn.apache.org/viewvc/openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test/unittests/clazz/ClazzTest.java?rev=1502035&r1=1502034&r2=1502035&view=diff
==============================================================================
--- openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test/unittests/clazz/ClazzTest.java
(original)
+++ openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test/unittests/clazz/ClazzTest.java
Wed Jul 10 22:48:58 2013
@@ -19,12 +19,11 @@
 package org.apache.webbeans.test.unittests.clazz;
 
 import java.lang.reflect.Type;
-import java.util.HashSet;
 import java.util.Set;
 
 import junit.framework.Assert;
 
-import org.apache.webbeans.util.ClassUtil;
+import org.apache.webbeans.util.GenericsUtil;
 import org.junit.Test;
 
 public class ClazzTest
@@ -32,19 +31,16 @@ public class ClazzTest
     @Test
     public void testStudent()
     {
-        Set<Type> set = new HashSet<Type>();
-        ClassUtil.setTypeHierarchy(set, Student.class);
+        Set<Type> set = GenericsUtil.getTypeClosure(Student.class, Student.class, Student.class);
 
         Assert.assertEquals(5, set.size());
 
     }
 
     @Test
-    public void testSutdent2()
+    public void testStudent2()
     {
-        Set<Type> set = new HashSet<Type>();
-
-        ClassUtil.setTypeHierarchy(set, Student2.class);
+        Set<Type> set = GenericsUtil.getTypeClosure(Student2.class, Student2.class,
Student2.class);
 
         Assert.assertEquals(4, set.size());
 

Modified: openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test/unittests/inject/parametrized/GenericClassTest.java
URL: http://svn.apache.org/viewvc/openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test/unittests/inject/parametrized/GenericClassTest.java?rev=1502035&r1=1502034&r2=1502035&view=diff
==============================================================================
--- openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test/unittests/inject/parametrized/GenericClassTest.java
(original)
+++ openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test/unittests/inject/parametrized/GenericClassTest.java
Wed Jul 10 22:48:58 2013
@@ -25,6 +25,7 @@ import org.apache.webbeans.test.componen
 import org.apache.webbeans.test.component.inject.parametrized.UserDao;
 import org.apache.webbeans.test.component.inject.parametrized.WithTypeVariable;
 import org.apache.webbeans.util.ClassUtil;
+import org.apache.webbeans.util.GenericsUtil;
 import org.junit.Assert;
 import org.junit.Test;
 
@@ -46,10 +47,10 @@ public class GenericClassTest extends Te
             Field check22Bound = Dao.class.getField("check22WithBound");
             Field check4 = WithTypeVariable.class.getField("check4");
             
-            Assert.assertFalse(ClassUtil.isAssignable(t.getGenericType() , raw.getGenericType()));
-            Assert.assertTrue(ClassUtil.isAssignable(t.getGenericType() , check4.getGenericType()));
-            Assert.assertTrue(ClassUtil.isAssignable(t.getGenericType() , check22.getGenericType()));
-            Assert.assertTrue(ClassUtil.isAssignable(t.getGenericType() , check22Bound.getGenericType()));
+            Assert.assertFalse(GenericsUtil.satisfiesDependency(raw.getGenericType(), t.getGenericType()));
+            Assert.assertTrue(GenericsUtil.satisfiesDependency(check4.getGenericType(), t.getGenericType()));
+            Assert.assertTrue(GenericsUtil.satisfiesDependency(check22.getGenericType(),
t.getGenericType()));
+            Assert.assertTrue(GenericsUtil.satisfiesDependency(check22Bound.getGenericType(),
t.getGenericType()));
             
         }catch(Exception e)
         {
@@ -68,9 +69,9 @@ public class GenericClassTest extends Te
             Field f3 = UserDao.class.getField("field3");
             Field f4 = UserDao.class.getField("field4");
             
-            Assert.assertTrue(ClassUtil.isAssignable(f1.getGenericType() , f2.getGenericType()));
-            Assert.assertTrue(ClassUtil.isAssignable(f1.getGenericType() , f3.getGenericType()));
-            Assert.assertTrue(ClassUtil.isAssignable(f1.getGenericType() , f4.getGenericType()));
+            Assert.assertTrue(GenericsUtil.satisfiesDependency(f2.getGenericType(), f1.getGenericType()));
+            Assert.assertTrue(GenericsUtil.satisfiesDependency(f3.getGenericType(), f1.getGenericType()));
+            Assert.assertTrue(GenericsUtil.satisfiesDependency(f4.getGenericType(), f1.getGenericType()));
             
         }catch(Exception e)
         {

Added: openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/util/GenericsUtilTest.java
URL: http://svn.apache.org/viewvc/openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/util/GenericsUtilTest.java?rev=1502035&view=auto
==============================================================================
--- openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/util/GenericsUtilTest.java
(added)
+++ openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/util/GenericsUtilTest.java
Wed Jul 10 22:48:58 2013
@@ -0,0 +1,86 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.webbeans.util;
+
+import static org.junit.Assert.assertEquals;
+
+import java.lang.reflect.Field;
+
+import org.junit.Test;
+
+public class GenericsUtilTest {
+
+    @Test
+    public void resolveType() throws NoSuchFieldException {
+        Field field = AbstractObject.class.getDeclaredField("field");
+        assertEquals(Object.class, GenericsUtil.resolveType(SimpleObject.class, field));
+        assertEquals(String.class, GenericsUtil.resolveType(StringObject.class, field));
+        assertEquals(Object.class, GenericsUtil.resolveType(GenericObject.class, field));
+        assertEquals(Number.class, GenericsUtil.resolveType(GenericNumberObject.class, field));
+        assertEquals(Integer.class, GenericsUtil.resolveType(IntegerObject.class, field));
+        assertEquals(Object[].class, GenericsUtil.resolveType(GenericArrayObject.class, field));
+        assertEquals(Long[].class, GenericsUtil.resolveType(LongArrayObject.class, field));
+        assertEquals(SubInterface.class, GenericsUtil.resolveType(InterfaceObject.class,
field));
+    }
+
+    public static abstract class AbstractObject<V> {
+    
+        private V field;
+    }
+
+    private static class SimpleObject extends AbstractObject {
+
+    }
+
+    private static class StringObject extends AbstractObject<String> {
+
+    }
+
+    private static class GenericObject<T, V> extends AbstractObject<T> {
+
+    }
+
+    private static class GenericNumberObject<X, Y extends Number & Comparable<Integer>>
extends AbstractObject<Y> {
+
+    }
+
+    private static class IntegerObject extends GenericNumberObject<String, Integer>
{
+
+    }
+
+    private static class GenericArrayObject<V> extends GenericObject<V[], V>
{
+
+    }
+
+    private static class LongArrayObject extends GenericArrayObject<Long> {
+
+    }
+
+    private static class InterfaceObject<V extends SubInterface & SuperInterface>
extends AbstractObject<V> {
+
+    }
+
+    private interface SuperInterface {
+
+    }
+
+    private interface SubInterface extends SuperInterface {
+
+    }
+}

Modified: openwebbeans/trunk/webbeans-jsf/src/main/java/org/apache/webbeans/jsf/plugin/OpenWebBeansJsfPlugin.java
URL: http://svn.apache.org/viewvc/openwebbeans/trunk/webbeans-jsf/src/main/java/org/apache/webbeans/jsf/plugin/OpenWebBeansJsfPlugin.java?rev=1502035&r1=1502034&r2=1502035&view=diff
==============================================================================
--- openwebbeans/trunk/webbeans-jsf/src/main/java/org/apache/webbeans/jsf/plugin/OpenWebBeansJsfPlugin.java
(original)
+++ openwebbeans/trunk/webbeans-jsf/src/main/java/org/apache/webbeans/jsf/plugin/OpenWebBeansJsfPlugin.java
Wed Jul 10 22:48:58 2013
@@ -22,7 +22,6 @@ import javax.faces.component.UIComponent
 
 import org.apache.webbeans.exception.WebBeansConfigurationException;
 import org.apache.webbeans.spi.plugins.AbstractOwbPlugin;
-import org.apache.webbeans.util.ClassUtil;
 
 public class OpenWebBeansJsfPlugin extends AbstractOwbPlugin
 {
@@ -30,7 +29,7 @@ public class OpenWebBeansJsfPlugin exten
     @Override
     public void isManagedBean( Class<?> clazz ) throws WebBeansConfigurationException
     {
-        if (ClassUtil.isClassAssignable(UIComponent.class, clazz))
+        if (UIComponent.class.isAssignableFrom(clazz))
         {
             throw new WebBeansConfigurationException("Bean implementation class : " + clazz.getName()

                                                      + " can not implement JSF UIComponent");

Modified: openwebbeans/trunk/webbeans-jsf12/src/main/java/org/apache/webbeans/jsf12/plugin/OpenWebBeansJsfPlugin.java
URL: http://svn.apache.org/viewvc/openwebbeans/trunk/webbeans-jsf12/src/main/java/org/apache/webbeans/jsf12/plugin/OpenWebBeansJsfPlugin.java?rev=1502035&r1=1502034&r2=1502035&view=diff
==============================================================================
--- openwebbeans/trunk/webbeans-jsf12/src/main/java/org/apache/webbeans/jsf12/plugin/OpenWebBeansJsfPlugin.java
(original)
+++ openwebbeans/trunk/webbeans-jsf12/src/main/java/org/apache/webbeans/jsf12/plugin/OpenWebBeansJsfPlugin.java
Wed Jul 10 22:48:58 2013
@@ -22,7 +22,6 @@ package org.apache.webbeans.jsf12.plugin
 import javax.faces.component.UIComponent;
 import org.apache.webbeans.exception.WebBeansConfigurationException;
 import org.apache.webbeans.spi.plugins.AbstractOwbPlugin;
-import org.apache.webbeans.util.ClassUtil;
 
 public class OpenWebBeansJsfPlugin extends AbstractOwbPlugin
 {
@@ -30,7 +29,7 @@ public class OpenWebBeansJsfPlugin exten
     @Override
     public void isManagedBean( Class<?> clazz ) throws WebBeansConfigurationException
     {
-        if (ClassUtil.isClassAssignable(UIComponent.class, clazz))
+        if (UIComponent.class.isAssignableFrom(clazz))
         {
             throw new WebBeansConfigurationException("Bean implementation class : " + clazz.getName()

                                                      + " can not implement JSF UIComponent");



Mime
View raw message