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/13 22:00:36 UTC

svn commit: r1610287 - in /commons/proper/configuration/trunk/src: main/java/org/apache/commons/configuration/event/ test/java/org/apache/commons/configuration/event/

Author: oheger
Date: Sun Jul 13 20:00:36 2014
New Revision: 1610287

URL: http://svn.apache.org/r1610287
Log:
Removed obsolete classes related to Configuration listeners.

Some functionality related to error listeners has been deprecated. This is
going to be reworked.

Removed:
    commons/proper/configuration/trunk/src/main/java/org/apache/commons/configuration/event/ConfigurationListener.java
    commons/proper/configuration/trunk/src/test/java/org/apache/commons/configuration/event/ConfigurationListenerTestImpl.java
Modified:
    commons/proper/configuration/trunk/src/main/java/org/apache/commons/configuration/event/BaseEventSource.java
    commons/proper/configuration/trunk/src/main/java/org/apache/commons/configuration/event/ConfigurationErrorListener.java
    commons/proper/configuration/trunk/src/test/java/org/apache/commons/configuration/event/AbstractTestConfigurationEvents.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=1610287&r1=1610286&r2=1610287&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 Sun Jul 13 20:00:36 2014
@@ -201,7 +201,9 @@ public class BaseEventSource implements 
      * {@code ConfigurationErrorListener}s (this collection is a
      * snapshot of the currently registered listeners; it cannot be manipulated)
      * @since 1.4
+     * @deprecated Use getEventListeners() for events of type error evnet
      */
+    @Deprecated
     public Collection<ConfigurationErrorListener> getErrorListeners()
     {
         return Collections.unmodifiableCollection(new ArrayList<ConfigurationErrorListener>(errorListeners));
@@ -282,7 +284,9 @@ public class BaseEventSource implements 
      * @param propValue the value of the affected property (can be <b>null</b>)
      * @param ex the {@code Throwable} object that caused this error event
      * @since 1.4
+     * @deprecated Error events are now treated as regular events
      */
+    @Deprecated
     protected void fireError(int type, String propName, Object propValue, Throwable ex)
     {
         Iterator<ConfigurationErrorListener> it = errorListeners.iterator();

Modified: commons/proper/configuration/trunk/src/main/java/org/apache/commons/configuration/event/ConfigurationErrorListener.java
URL: http://svn.apache.org/viewvc/commons/proper/configuration/trunk/src/main/java/org/apache/commons/configuration/event/ConfigurationErrorListener.java?rev=1610287&r1=1610286&r2=1610287&view=diff
==============================================================================
--- commons/proper/configuration/trunk/src/main/java/org/apache/commons/configuration/event/ConfigurationErrorListener.java (original)
+++ commons/proper/configuration/trunk/src/main/java/org/apache/commons/configuration/event/ConfigurationErrorListener.java Sun Jul 13 20:00:36 2014
@@ -36,7 +36,9 @@ package org.apache.commons.configuration
  * @version $Id$
  * @since 1.4
  * @see ConfigurationErrorEvent
+ * @deprecated Error events are now handled using regular event listeners
  */
+@Deprecated
 public interface ConfigurationErrorListener
 {
     /**

Modified: commons/proper/configuration/trunk/src/test/java/org/apache/commons/configuration/event/AbstractTestConfigurationEvents.java
URL: http://svn.apache.org/viewvc/commons/proper/configuration/trunk/src/test/java/org/apache/commons/configuration/event/AbstractTestConfigurationEvents.java?rev=1610287&r1=1610286&r2=1610287&view=diff
==============================================================================
--- commons/proper/configuration/trunk/src/test/java/org/apache/commons/configuration/event/AbstractTestConfigurationEvents.java (original)
+++ commons/proper/configuration/trunk/src/test/java/org/apache/commons/configuration/event/AbstractTestConfigurationEvents.java Sun Jul 13 20:00:36 2014
@@ -47,12 +47,6 @@ public abstract class AbstractTestConfig
     /** The configuration to be tested. */
     protected AbstractConfiguration config;
 
-    /**
-     * A test event listener.
-     * @deprecated Use the "modern" listener.
-     */
-    protected ConfigurationListenerTestImpl l;
-
     /** A test event listener. */
     protected EventListenerTestImpl listener;
 
@@ -61,7 +55,6 @@ public abstract class AbstractTestConfig
     {
         config = createConfiguration();
         config.addProperty(EXIST_PROPERTY, "existing value");
-        l = new ConfigurationListenerTestImpl(config);
         listener = new EventListenerTestImpl(config);
         config.addEventListener(ConfigurationEvent.ANY, listener);
     }