]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
Fixes bug #10908
authorRobert Schuster <thebohemian@gmx.net>
Sun, 7 Nov 2004 12:38:03 +0000 (12:38 +0000)
committerMark Wielaard <mark@gcc.gnu.org>
Sun, 7 Nov 2004 12:38:03 +0000 (12:38 +0000)
2004-11-07  Robert Schuster  <theBohemian@gmx.net>

       Fixes bug #10908
       * gnu/java/beans/IntrospectionIncubator.java:
       (addMethod): static methods are discarded now, too.

From-SVN: r90230

libjava/ChangeLog
libjava/gnu/java/beans/IntrospectionIncubator.java

index 2c977f3f2667ba6a559b9b16cc14912fc192c94a..a866b44247312a8627f6acb29bc50dc5656c181c 100644 (file)
@@ -1,3 +1,9 @@
+2004-11-07  Robert Schuster  <theBohemian@gmx.net>
+
+       Fixes bug #10908
+       * gnu/java/beans/IntrospectionIncubator.java:
+       (addMethod): static methods are discarded now, too.
+
 2004-11-07  Andrew John Hughes <gnu_andrew@member.fsf.org>
 
        * java/util/GregorianCalendar.java
index b17fc97bedd04ec461dfd86b9fa6ac354081cbc3..d48cc4b058b2be63d8fbc5585eb2de64c18bc0ee 100644 (file)
@@ -1,5 +1,5 @@
 /* gnu.java.beans.IntrospectionIncubator
-   Copyright (C) 1998 Free Software Foundation, Inc.
+   Copyright (C) 1998, 2004 Free Software Foundation, Inc.
 
 This file is part of GNU Classpath.
 
@@ -57,10 +57,12 @@ import java.util.Vector;
 
 /**
  ** IntrospectionIncubator takes in a bunch of Methods, and
- ** Introspects only those Methods you give it.
+ ** Introspects only those Methods you give it. 
+ ** Note that non-public and static methods are silently
+ ** discarded.
  **
  ** @author John Keiser
- ** @version 1.1.0, 30 Jul 1998
+ ** @author Robert Schuster
  ** @see gnu.java.beans.ExplicitBeanInfo
  ** @see java.beans.BeanInfo
  **/
@@ -79,7 +81,8 @@ public class IntrospectionIncubator {
 
        /* Paving the way for automatic Introspection */
        public void addMethod(Method method) {
-               if(Modifier.isPublic(method.getModifiers())) {
+               if(Modifier.isPublic(method.getModifiers()) &&
+                       !Modifier.isStatic(method.getModifiers())) {
                        String name = ClassHelper.getTruncatedName(method.getName());
                        Class retType = method.getReturnType();
                        Class[] params = method.getParameterTypes();