diff options
author | Robert Schuster <thebohemian@gmx.net> | 2004-11-07 12:38:03 +0000 |
---|---|---|
committer | Mark Wielaard <mark@gcc.gnu.org> | 2004-11-07 12:38:03 +0000 |
commit | c2914ce5bf1b488c0cf7201621d446b24b13723d (patch) | |
tree | 42c64a057da3893c895060c41b6b7ad5ee5d9fcc /libjava/gnu/java/beans/IntrospectionIncubator.java | |
parent | 32890afef4bc5135a96ade2c0a658ac2e1b99c7e (diff) | |
download | gcc-c2914ce5bf1b488c0cf7201621d446b24b13723d.zip gcc-c2914ce5bf1b488c0cf7201621d446b24b13723d.tar.gz gcc-c2914ce5bf1b488c0cf7201621d446b24b13723d.tar.bz2 |
Fixes bug #10908
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
Diffstat (limited to 'libjava/gnu/java/beans/IntrospectionIncubator.java')
-rw-r--r-- | libjava/gnu/java/beans/IntrospectionIncubator.java | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/libjava/gnu/java/beans/IntrospectionIncubator.java b/libjava/gnu/java/beans/IntrospectionIncubator.java index b17fc97..d48cc4b 100644 --- a/libjava/gnu/java/beans/IntrospectionIncubator.java +++ b/libjava/gnu/java/beans/IntrospectionIncubator.java @@ -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(); |