[java-opensaml COMMIT] /trunk/opensaml-storage-api/src/main/java/org/opensaml/storage/AbstractStorageService.java
noreply at shibboleth.net
noreply at shibboleth.net
Wed Oct 2 12:24:20 EDT 2013
Author: scantor
Date: Wed Oct 2 12:24:19 2013
New Revision: 3458
URL: http://svn.shibboleth.net/view/java-opensaml?rev=3458&view=rev
Log:
Adjust error handling when calling setters after initialization.
Modified:
trunk/opensaml-storage-api/src/main/java/org/opensaml/storage/AbstractStorageService.java
Modified: trunk/opensaml-storage-api/src/main/java/org/opensaml/storage/AbstractStorageService.java
URL: http://svn.shibboleth.net/view/java-opensaml/trunk/opensaml-storage-api/src/main/java/org/opensaml/storage/AbstractStorageService.java?rev=3458&r1=3457&r2=3458&view=diff
==============================================================================
--- trunk/opensaml-storage-api/src/main/java/org/opensaml/storage/AbstractStorageService.java (original)
+++ trunk/opensaml-storage-api/src/main/java/org/opensaml/storage/AbstractStorageService.java Wed Oct 2 12:24:19 2013
@@ -29,6 +29,7 @@
import net.shibboleth.utilities.java.support.annotation.constraint.NotEmpty;
import net.shibboleth.utilities.java.support.component.AbstractDestructableIdentifiableInitializableComponent;
import net.shibboleth.utilities.java.support.component.ComponentInitializationException;
+import net.shibboleth.utilities.java.support.component.ComponentSupport;
import net.shibboleth.utilities.java.support.component.ComponentValidationException;
/**
@@ -78,9 +79,7 @@
* @param interval number of seconds between one cleanup and another
*/
public synchronized void setCleanupInterval(final long interval) {
- if (isInitialized()) {
- return;
- }
+ ComponentSupport.ifInitializedThrowUnmodifiabledComponentException(this);
cleanupInterval = interval;
}
@@ -102,9 +101,7 @@
* @param timer timer used to schedule configuration reload tasks
*/
public synchronized void setCleanupTaskTimer(@Nullable final Timer timer) {
- if (isInitialized()) {
- return;
- }
+ ComponentSupport.ifInitializedThrowUnmodifiabledComponentException(this);
cleanupTaskTimer = timer;
}
More information about the commits
mailing list