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]

FYI: Patch: BeanDescriptor


Hi list,


I just merged the attached patch from classpath to get in a fix by Mark 
Wielaard.


Michael


2004-03-11  Mark Wielaard  <mark@klomp.org>

	* java/beans/BeanDescriptor.java (BeanDescriptor):
	Set the FeatureDescriptor programmatic name.

Index: java/beans/BeanDescriptor.java
===================================================================
RCS file: /cvs/gcc/gcc/libjava/java/beans/BeanDescriptor.java,v
retrieving revision 1.3
diff -u -b -B -r1.3 BeanDescriptor.java
--- java/beans/BeanDescriptor.java	4 Dec 2003 19:36:13 -0000	1.3
+++ java/beans/BeanDescriptor.java	11 Mar 2004 14:35:54 -0000
@@ -1,5 +1,5 @@
 /* java.beans.BeanDescriptor
-   Copyright (C) 1998 Free Software Foundation, Inc.
+   Copyright (C) 1998, 2004 Free Software Foundation, Inc.
 
 This file is part of GNU Classpath.
 
@@ -67,6 +67,14 @@
 	public BeanDescriptor(Class beanClass, Class customizerClass) {
 		this.beanClass = beanClass;
 		this.customizerClass = customizerClass;
+
+		// Set the FeatureDescriptor programmatic name.
+		String name = beanClass.getName();
+		int lastInd = name.lastIndexOf('.');
+		if (lastInd != -1)
+		  name = name.substring(lastInd + 1);
+
+		setName(name);
 	}
 
 	/** Get the Bean's class. **/

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]