From ac1ed908de999523efc36f38e69bca1aadfe0808 Mon Sep 17 00:00:00 2001 From: Mark Wielaard Date: Mon, 14 Aug 2006 23:12:35 +0000 Subject: Imported GNU Classpath 0.92 2006-08-14 Mark Wielaard Imported GNU Classpath 0.92 * HACKING: Add more importing hints. Update automake version requirement. * configure.ac (gconf-peer): New enable AC argument. Add --disable-gconf-peer and --enable-default-preferences-peer to classpath configure when gconf is disabled. * scripts/makemake.tcl: Set gnu/java/util/prefs/gconf and gnu/java/awt/dnd/peer/gtk to bc. Classify gnu/java/security/Configuration.java as generated source file. * gnu/java/lang/management/VMGarbageCollectorMXBeanImpl.java, gnu/java/lang/management/VMMemoryPoolMXBeanImpl.java, gnu/java/lang/management/VMClassLoadingMXBeanImpl.java, gnu/java/lang/management/VMRuntimeMXBeanImpl.java, gnu/java/lang/management/VMMemoryManagerMXBeanImpl.java, gnu/java/lang/management/VMThreadMXBeanImpl.java, gnu/java/lang/management/VMMemoryMXBeanImpl.java, gnu/java/lang/management/VMCompilationMXBeanImpl.java: New VM stub classes. * java/lang/management/VMManagementFactory.java: Likewise. * java/net/VMURLConnection.java: Likewise. * gnu/java/nio/VMChannel.java: Likewise. * java/lang/Thread.java (getState): Add stub implementation. * java/lang/Class.java (isEnum): Likewise. * java/lang/Class.h (isEnum): Likewise. * gnu/awt/xlib/XToolkit.java (getClasspathTextLayoutPeer): Removed. * javax/naming/spi/NamingManager.java: New override for StackWalker functionality. * configure, sources.am, Makefile.in, gcj/Makefile.in, include/Makefile.in, testsuite/Makefile.in: Regenerated. From-SVN: r116139 --- libjava/classpath/java/beans/VetoableChangeSupport.java | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) (limited to 'libjava/classpath/java/beans/VetoableChangeSupport.java') diff --git a/libjava/classpath/java/beans/VetoableChangeSupport.java b/libjava/classpath/java/beans/VetoableChangeSupport.java index dce8dff..12051d2 100644 --- a/libjava/classpath/java/beans/VetoableChangeSupport.java +++ b/libjava/classpath/java/beans/VetoableChangeSupport.java @@ -1,5 +1,6 @@ /* VetoableChangeSupport.java -- support to manage vetoable change listeners - Copyright (C) 1998, 1999, 2000, 2002, 2005 Free Software Foundation, Inc. + Copyright (C) 1998, 1999, 2000, 2002, 2005, 2006, + Free Software Foundation, Inc. This file is part of GNU Classpath. @@ -120,14 +121,15 @@ public class VetoableChangeSupport implements Serializable * vetoable change events will be sent to this listener. The listener add * is not unique: that is, n adds with the same listener will * result in n events being sent to that listener for every - * vetoable change. Adding a null listener may cause a NullPointerException - * down the road. This method will unwrap a VetoableChangeListenerProxy, + * vetoable change. This method will unwrap a VetoableChangeListenerProxy, * registering the underlying delegate to the named property list. * - * @param l the listener to add + * @param l the listener to add (null ignored). */ public synchronized void addVetoableChangeListener(VetoableChangeListener l) { + if (l == null) + return; if (l instanceof VetoableChangeListenerProxy) { VetoableChangeListenerProxy p = (VetoableChangeListenerProxy) l; @@ -215,19 +217,19 @@ public class VetoableChangeSupport implements Serializable * being sent to that listener when that property is changed. The effect is * cumulative, too; if you are registered to listen to receive events on * all vetoable changes, and then you register on a particular property, - * you will receive change events for that property twice. Adding a null - * listener may cause a NullPointerException down the road. This method + * you will receive change events for that property twice. This method * will unwrap a VetoableChangeListenerProxy, registering the underlying * delegate to the named property list if the names match, and discarding * it otherwise. * * @param propertyName the name of the property to listen on * @param l the listener to add - * @throws NullPointerException if propertyName is null */ public synchronized void addVetoableChangeListener(String propertyName, VetoableChangeListener l) { + if (propertyName == null || l == null) + return; while (l instanceof VetoableChangeListenerProxy) { VetoableChangeListenerProxy p = (VetoableChangeListenerProxy) l; -- cgit v1.1