[jboss-cvs] JBossAS SVN: r66548 - in projects/microcontainer/trunk/container/src: tests/org/jboss/test/beaninfo/support and 1 other directories.

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Mon Oct 29 13:45:24 EDT 2007


Author: alesj
Date: 2007-10-29 13:45:24 -0400 (Mon, 29 Oct 2007)
New Revision: 66548

Added:
   projects/microcontainer/trunk/container/src/tests/org/jboss/test/beaninfo/support/BeanInfoDoubleCovariantImpl.java
   projects/microcontainer/trunk/container/src/tests/org/jboss/test/beaninfo/support/BeanInfoNumberCovariantImpl.java
Modified:
   projects/microcontainer/trunk/container/src/main/org/jboss/beans/info/plugins/AbstractBeanInfoFactory.java
   projects/microcontainer/trunk/container/src/tests/org/jboss/test/beaninfo/test/BeanInfoUnitTestCase.java
Log:
Exclude volatile methods.

Modified: projects/microcontainer/trunk/container/src/main/org/jboss/beans/info/plugins/AbstractBeanInfoFactory.java
===================================================================
--- projects/microcontainer/trunk/container/src/main/org/jboss/beans/info/plugins/AbstractBeanInfoFactory.java	2007-10-29 17:27:27 UTC (rev 66547)
+++ projects/microcontainer/trunk/container/src/main/org/jboss/beans/info/plugins/AbstractBeanInfoFactory.java	2007-10-29 17:45:24 UTC (rev 66548)
@@ -205,7 +205,7 @@
          {
             for (int i = 0; i < minfos.length; ++i)
             {
-               if (result.contains(minfos[i]) == false && minfos[i].isPublic() && minfos[i].isStatic() == false)
+               if (result.contains(minfos[i]) == false && minfos[i].isPublic() && minfos[i].isStatic() == false && minfos[i].isVolatile() == false)
                   result.add(minfos[i]);
             }
          }

Added: projects/microcontainer/trunk/container/src/tests/org/jboss/test/beaninfo/support/BeanInfoDoubleCovariantImpl.java
===================================================================
--- projects/microcontainer/trunk/container/src/tests/org/jboss/test/beaninfo/support/BeanInfoDoubleCovariantImpl.java	                        (rev 0)
+++ projects/microcontainer/trunk/container/src/tests/org/jboss/test/beaninfo/support/BeanInfoDoubleCovariantImpl.java	2007-10-29 17:45:24 UTC (rev 66548)
@@ -0,0 +1,39 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2006, JBoss Inc., and individual contributors as indicated
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* This is free software; you can redistribute it and/or modify it
+* under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 of
+* the License, or (at your option) any later version.
+*
+* This software is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+*/
+package org.jboss.test.beaninfo.support;
+
+/**
+ * A BeanInfoDoubleCovariantImpl
+ *
+ * @author <a href="ales.justin at jboss.com">Ales Justin</a>
+ */
+public class BeanInfoDoubleCovariantImpl extends BeanInfoNumberCovariantImpl
+{
+   public Double getProperty()
+   {
+      return null;
+   }
+
+   public void setProperty(Double value)
+   {
+   }
+}

Added: projects/microcontainer/trunk/container/src/tests/org/jboss/test/beaninfo/support/BeanInfoNumberCovariantImpl.java
===================================================================
--- projects/microcontainer/trunk/container/src/tests/org/jboss/test/beaninfo/support/BeanInfoNumberCovariantImpl.java	                        (rev 0)
+++ projects/microcontainer/trunk/container/src/tests/org/jboss/test/beaninfo/support/BeanInfoNumberCovariantImpl.java	2007-10-29 17:45:24 UTC (rev 66548)
@@ -0,0 +1,39 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2006, JBoss Inc., and individual contributors as indicated
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* This is free software; you can redistribute it and/or modify it
+* under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 of
+* the License, or (at your option) any later version.
+*
+* This software is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+*/
+package org.jboss.test.beaninfo.support;
+
+/**
+ * A BeanInfoNumberCovariantImpl
+ *
+ * @author <a href="ales.justin at jboss.com">Ales Justin</a>
+ */
+public class BeanInfoNumberCovariantImpl
+{
+   public Number getProperty()
+   {
+      return null;
+   }
+
+   public void setProperty(Number value)
+   {
+   }
+}

Modified: projects/microcontainer/trunk/container/src/tests/org/jboss/test/beaninfo/test/BeanInfoUnitTestCase.java
===================================================================
--- projects/microcontainer/trunk/container/src/tests/org/jboss/test/beaninfo/test/BeanInfoUnitTestCase.java	2007-10-29 17:27:27 UTC (rev 66547)
+++ projects/microcontainer/trunk/container/src/tests/org/jboss/test/beaninfo/test/BeanInfoUnitTestCase.java	2007-10-29 17:45:24 UTC (rev 66548)
@@ -25,7 +25,6 @@
 import java.util.Set;
 
 import junit.framework.Test;
-
 import org.jboss.beans.info.spi.BeanInfo;
 import org.jboss.beans.info.spi.PropertyInfo;
 import org.jboss.test.beaninfo.support.BeanInfoAnnotatedGetterAndSetter;
@@ -37,6 +36,7 @@
 import org.jboss.test.beaninfo.support.BeanInfoBooleanProperties;
 import org.jboss.test.beaninfo.support.BeanInfoConstructors;
 import org.jboss.test.beaninfo.support.BeanInfoDefaultConstructor;
+import org.jboss.test.beaninfo.support.BeanInfoDoubleCovariantImpl;
 import org.jboss.test.beaninfo.support.BeanInfoEmpty;
 import org.jboss.test.beaninfo.support.BeanInfoGenericGetterAndSetter;
 import org.jboss.test.beaninfo.support.BeanInfoGenericGetterOnly;
@@ -240,6 +240,15 @@
       assertEquals("java.lang.String", property.getType().getName());
    }
    
+   public void testCovariantImpl() throws Throwable
+   {
+      BeanInfo beanInfo = getBeanInfo(BeanInfoDoubleCovariantImpl.class);
+      assertNotNull(beanInfo);
+      PropertyInfo property = beanInfo.getProperty("property");
+      assertNotNull(property);
+      assertEquals("java.lang.Double", property.getType().getName());
+   }
+
    protected void testBean(Class clazz, String[] beanNames) throws Throwable
    {
       BeanInfo beanInfo = getBeanInfo(clazz);




More information about the jboss-cvs-commits mailing list