This is the mail archive of the java-patches@gcc.gnu.org mailing list for the Java project.
| Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
|---|---|---|
| Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
| Other format: | [Raw text] | |
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();
Attachment:
signature.asc
Description: This is a digitally signed message part
| Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
|---|---|---|
| Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |