Commit c2914ce5 by Robert Schuster Committed by Mark Wielaard

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
parent 32890afe
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> 2004-11-07 Andrew John Hughes <gnu_andrew@member.fsf.org>
* java/util/GregorianCalendar.java * java/util/GregorianCalendar.java
......
/* gnu.java.beans.IntrospectionIncubator /* 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. This file is part of GNU Classpath.
...@@ -57,10 +57,12 @@ import java.util.Vector; ...@@ -57,10 +57,12 @@ import java.util.Vector;
/** /**
** IntrospectionIncubator takes in a bunch of Methods, and ** 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 ** @author John Keiser
** @version 1.1.0, 30 Jul 1998 ** @author Robert Schuster
** @see gnu.java.beans.ExplicitBeanInfo ** @see gnu.java.beans.ExplicitBeanInfo
** @see java.beans.BeanInfo ** @see java.beans.BeanInfo
**/ **/
...@@ -79,7 +81,8 @@ public class IntrospectionIncubator { ...@@ -79,7 +81,8 @@ public class IntrospectionIncubator {
/* Paving the way for automatic Introspection */ /* Paving the way for automatic Introspection */
public void addMethod(Method method) { 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()); String name = ClassHelper.getTruncatedName(method.getName());
Class retType = method.getReturnType(); Class retType = method.getReturnType();
Class[] params = method.getParameterTypes(); Class[] params = method.getParameterTypes();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment