]> source.dussan.org Git - vaadin-framework.git/commitdiff
Fix for #2036
authorArtur Signell <artur.signell@itmill.com>
Tue, 2 Sep 2008 12:28:47 +0000 (12:28 +0000)
committerArtur Signell <artur.signell@itmill.com>
Tue, 2 Sep 2008 12:28:47 +0000 (12:28 +0000)
svn changeset:5330/svn branch:trunk

src/com/itmill/toolkit/data/util/BeanItem.java

index 8c24c5acede0bdb7f755b3f3c21d2772b0b20a0c..f30d5fd8200211c2256112da1c832c190b76ab43 100644 (file)
@@ -43,7 +43,7 @@ public class BeanItem extends PropertysetItem {
      * </p>
      * 
      * @param bean
-     *                the Java Bean to copy properties from.
+     *            the Java Bean to copy properties from.
      * 
      */
     public BeanItem(Object bean) {
@@ -63,7 +63,8 @@ public class BeanItem extends PropertysetItem {
                 final Class type = pd[i].getPropertyType();
                 final String name = pd[i].getName();
 
-                if ((getMethod != null)) {
+                if ((getMethod != null)
+                        && getMethod.getDeclaringClass() != Object.class) {
                     final Property p = new MethodProperty(type, bean,
                             getMethod, setMethod);
                     addItemProperty(name, p);
@@ -87,9 +88,9 @@ public class BeanItem extends PropertysetItem {
      * </p>
      * 
      * @param bean
-     *                the Java Bean to copy properties from.
+     *            the Java Bean to copy properties from.
      * @param propertyIds
-     *                id of the property.
+     *            id of the property.
      */
     public BeanItem(Object bean, Collection propertyIds) {
 
@@ -138,9 +139,9 @@ public class BeanItem extends PropertysetItem {
      * </p>
      * 
      * @param bean
-     *                the Java Bean to copy properties from.
+     *            the Java Bean to copy properties from.
      * @param propertyIds
-     *                ids of the properties.
+     *            ids of the properties.
      */
     public BeanItem(Object bean, String[] propertyIds) {
         this(bean, Arrays.asList(propertyIds));