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/05/19 21:59:51 UTC
svn commit: r1596030 -
/commons/proper/configuration/trunk/src/main/java/org/apache/commons/configuration/builder/BasicConfigurationBuilder.java
Author: oheger
Date: Mon May 19 19:59:50 2014
New Revision: 1596030
URL: http://svn.apache.org/r1596030
Log:
Removed obsolete methods from BasicConfigurationBuilder.
Event listeners are now exclusively added or removed using the new methods
defined by the ConfigurationBuilder interface.
Modified:
commons/proper/configuration/trunk/src/main/java/org/apache/commons/configuration/builder/BasicConfigurationBuilder.java
Modified: commons/proper/configuration/trunk/src/main/java/org/apache/commons/configuration/builder/BasicConfigurationBuilder.java
URL: http://svn.apache.org/viewvc/commons/proper/configuration/trunk/src/main/java/org/apache/commons/configuration/builder/BasicConfigurationBuilder.java?rev=1596030&r1=1596029&r2=1596030&view=diff
==============================================================================
--- commons/proper/configuration/trunk/src/main/java/org/apache/commons/configuration/builder/BasicConfigurationBuilder.java (original)
+++ commons/proper/configuration/trunk/src/main/java/org/apache/commons/configuration/builder/BasicConfigurationBuilder.java Mon May 19 19:59:50 2014
@@ -37,7 +37,6 @@ import org.apache.commons.configuration.
import org.apache.commons.configuration.event.EventType;
import org.apache.commons.configuration.ex.ConfigurationException;
import org.apache.commons.configuration.ex.ConfigurationRuntimeException;
-import org.apache.commons.lang3.event.EventListenerSupport;
/**
* <p>
@@ -126,9 +125,6 @@ public class BasicConfigurationBuilder<T
private final Collection<ConfigurationErrorListener> errorListeners;
/** An object managing the builder listeners registered at this builder. */
- private final EventListenerSupport<BuilderListener> builderListeners;
-
- /** An object managing the builder listeners registered at this builder. */
private final EventListenerList eventListeners;
/** A flag whether exceptions on initializing configurations are allowed. */
@@ -196,7 +192,6 @@ public class BasicConfigurationBuilder<T
this.allowFailOnInit = allowFailOnInit;
configListeners = new ArrayList<ConfigurationListener>();
errorListeners = new ArrayList<ConfigurationErrorListener>();
- builderListeners = EventListenerSupport.create(BuilderListener.class);
eventListeners = new EventListenerList();
updateParameters(params);
}
@@ -367,31 +362,6 @@ public class BasicConfigurationBuilder<T
}
/**
- * {@inheritDoc} The listener must not be <b>null</b>, otherwise an
- * exception is thrown.
- *
- * @throws IllegalArgumentException if the listener is <b>null</b>
- */
- public void addBuilderListener(BuilderListener l)
- {
- if (l == null)
- {
- throw new IllegalArgumentException(
- "Builder listener must not be null!");
- }
- builderListeners.addListener(l);
- }
-
- /**
- * {@inheritDoc} If the specified listener is not registered at this object,
- * this method has no effect.
- */
- public void removeBuilderListener(BuilderListener l)
- {
- builderListeners.removeListener(l);
- }
-
- /**
* {@inheritDoc}
*
* @throws IllegalArgumentException if the event type or the listener is
@@ -424,7 +394,6 @@ public class BasicConfigurationBuilder<T
resultDeclaration = null;
}
- builderListeners.fire().builderReset(this);
eventListeners.fire(new ConfigurationBuilderEvent(this,
ConfigurationBuilderEvent.RESET));
}