[Kaffe] bug in java.beans class

Moses DeJong dejong at cs.umn.edu
Thu Jan 14 00:03:24 PST 1999


I think there is a bug in java.beans.EventSetDescriptor. For some
reason calling getListenerType() returns null under Kaffe. This
same code works (does not return null) under the JDK. I looked
around in Introspector.java but I could not figure out what was
going on. Has anyone run into this before?


import java.lang.reflect.*;
import java.beans.*;
import java.util.*;

public class BeanBug {
    public static void main(String[] argv) throws Exception {

	Class cls = java.awt.Button.class;

	BeanInfo beanInfo = Introspector.getBeanInfo(cls);

	EventSetDescriptor[] events = beanInfo.getEventSetDescriptors();

	for (int i=0; i < events.length ; i++) {

	    Class lsnType = events[i].getListenerType();

	    if (lsnType == null) {
		throw new NullPointerException("index " + i);
	    }
	}
    }
}



I hope that helps
mo dejong
dejong at cs.umn.edu



More information about the kaffe mailing list