FYI [gui] IntrospectionIncubator bugfix
Mark Wielaard
mark@klomp.org
Sat Nov 6 22:34:00 GMT 2004
Hi,
Here is a small bugfix from Robert for the IntrospectionIncubator as
found in GNU Classpath.
2004-11-06 Robert Schuster <theBohemian@gmx.net>
Fixes bug #10908
* gnu/java/beans/IntrospectionIncubator.java:
(addMethod): static methods are discarded now, too.
Committed to the gui branch.
Cheers,
Mark
--- gnu/java/beans/IntrospectionIncubator.java 25 Jul 2004 17:04:17 -0000 1.12
+++ gnu/java/beans/IntrospectionIncubator.java 5 Nov 2004 12:32:43 -0000
@@ -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 @@
/**
** 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 @@
/* 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();
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
URL: <http://gcc.gnu.org/pipermail/java-patches/attachments/20041106/0a27fbe5/attachment.sig>
More information about the Java-patches
mailing list