You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by oh...@apache.org on 2014/07/11 22:36:05 UTC
svn commit: r1609823 - in /commons/proper/configuration/trunk/src:
main/java/org/apache/commons/configuration/event/BaseEventSource.java
test/java/org/apache/commons/configuration/event/TestEventSource.java
Author: oheger
Date: Fri Jul 11 20:36:05 2014
New Revision: 1609823
URL: http://svn.apache.org/r1609823
Log:
Removed further obsolete methods in BaseEventSource.
Modified:
commons/proper/configuration/trunk/src/main/java/org/apache/commons/configuration/event/BaseEventSource.java
commons/proper/configuration/trunk/src/test/java/org/apache/commons/configuration/event/TestEventSource.java
Modified: commons/proper/configuration/trunk/src/main/java/org/apache/commons/configuration/event/BaseEventSource.java
URL: http://svn.apache.org/viewvc/commons/proper/configuration/trunk/src/main/java/org/apache/commons/configuration/event/BaseEventSource.java?rev=1609823&r1=1609822&r2=1609823&view=diff
==============================================================================
--- commons/proper/configuration/trunk/src/main/java/org/apache/commons/configuration/event/BaseEventSource.java (original)
+++ commons/proper/configuration/trunk/src/main/java/org/apache/commons/configuration/event/BaseEventSource.java Fri Jul 11 20:36:05 2014
@@ -71,9 +71,6 @@ import java.util.concurrent.CopyOnWriteA
*/
public class BaseEventSource implements EventSource
{
- /** A collection for the registered event listeners. */
- private Collection<ConfigurationListener> listeners;
-
/** A collection for the registered error listeners.*/
private Collection<ConfigurationErrorListener> errorListeners;
@@ -95,21 +92,6 @@ public class BaseEventSource implements
}
/**
- * Returns a collection with all configuration event listeners that are
- * currently registered at this object.
- *
- * @return a collection with the registered
- * {@code ConfigurationListener}s (this collection is a snapshot
- * of the currently registered listeners; manipulating it has no effect
- * on this event source object)
- */
- @Deprecated
- public Collection<ConfigurationListener> getConfigurationListeners()
- {
- return Collections.unmodifiableCollection(new ArrayList<ConfigurationListener>(listeners));
- }
-
- /**
* Returns a collection with all event listeners of the specified event type
* that are currently registered at this object.
*
@@ -246,36 +228,6 @@ public class BaseEventSource implements
/**
* Creates an event object and delivers it to all registered event
- * listeners. The method will check first if sending an event is allowed
- * (making use of the {@code detailEvents} property), and if
- * listeners are registered.
- *
- * @param type the event's type
- * @param propName the name of the affected property (can be <b>null</b>)
- * @param propValue the value of the affected property (can be <b>null</b>)
- * @param before the before update flag
- * @deprecated Use fireEvent() with an EventType
- */
- @Deprecated
- protected void fireEvent(int type, String propName, Object propValue, boolean before)
- {
- if (checkDetailEvents(-1))
- {
- Iterator<ConfigurationListener> it = listeners.iterator();
- if (it.hasNext())
- {
- ConfigurationEvent event =
- createEvent(type, propName, propValue, before);
- while (it.hasNext())
- {
- it.next().configurationChanged(event);
- }
- }
- }
- }
-
- /**
- * Creates an event object and delivers it to all registered event
* listeners. The method checks first if sending an event is allowed (making
* use of the {@code detailEvents} property), and if listeners are
* registered.
@@ -306,22 +258,6 @@ public class BaseEventSource implements
/**
* Creates a {@code ConfigurationEvent} object based on the passed in
- * parameters. This is called by {@code fireEvent()} if it decides
- * that an event needs to be generated.
- *
- * @param type the event's type
- * @param propName the name of the affected property (can be <b>null</b>)
- * @param propValue the value of the affected property (can be <b>null</b>)
- * @param before the before update flag
- * @return the newly created event object
- */
- protected ConfigurationEvent createEvent(int type, String propName, Object propValue, boolean before)
- {
- return new ConfigurationEvent(this, type, propName, propValue, before);
- }
-
- /**
- * Creates a {@code ConfigurationEvent} object based on the passed in
* parameters. This method is called by {@code fireEvent()} if it decides
* that an event needs to be generated.
*
@@ -417,7 +353,6 @@ public class BaseEventSource implements
*/
private void initListeners()
{
- listeners = new CopyOnWriteArrayList<ConfigurationListener>();
errorListeners = new CopyOnWriteArrayList<ConfigurationErrorListener>();
eventListeners = new EventListenerList();
}
Modified: commons/proper/configuration/trunk/src/test/java/org/apache/commons/configuration/event/TestEventSource.java
URL: http://svn.apache.org/viewvc/commons/proper/configuration/trunk/src/test/java/org/apache/commons/configuration/event/TestEventSource.java?rev=1609823&r1=1609822&r2=1609823&view=diff
==============================================================================
--- commons/proper/configuration/trunk/src/test/java/org/apache/commons/configuration/event/TestEventSource.java (original)
+++ commons/proper/configuration/trunk/src/test/java/org/apache/commons/configuration/event/TestEventSource.java Fri Jul 11 20:36:05 2014
@@ -135,7 +135,7 @@ public class TestEventSource
}
/**
- * Tests that the collection returned by getConfigurationListeners() is
+ * Tests that the collection returned by getEventListeners() is
* really a snapshot. A later added listener must not be visible.
*/
@Test