[utilities COMMIT] in /java-support/trunk/src: main/java/net/shibboleth/utilities/java/support/component/ComponentSup...
noreply at shibboleth.net
noreply at shibboleth.net
Sat Feb 22 07:36:39 EST 2014
Author: rdw
Date: Sat Feb 22 07:36:39 2014
New Revision: 533
URL: http://svn.shibboleth.net/view/utilities?rev=533&view=rev
Log:
JSPT-41 Remove Java-support used of ValidateableComponent. leave the component and exception in place for now
Modified:
java-support/trunk/src/main/java/net/shibboleth/utilities/java/support/component/ComponentSupport.java
java-support/trunk/src/test/java/net/shibboleth/utilities/java/support/component/ComponentSupportTest.java
java-support/trunk/src/test/java/net/shibboleth/utilities/java/support/component/CountingDestructableInitializableValidatableComponent.java
java-support/trunk/src/test/java/net/shibboleth/utilities/java/support/logic/ComponentValidationExceptionFunction.java
java-support/trunk/src/test/java/net/shibboleth/utilities/java/support/logic/ComponentValidationExceptionPredicate.java
java-support/trunk/src/test/java/net/shibboleth/utilities/java/support/logic/CountingDestructableInitializableValidatableFunction.java
java-support/trunk/src/test/java/net/shibboleth/utilities/java/support/logic/CountingDestructableInitializableValidatablePredicate.java
Modified: java-support/trunk/src/main/java/net/shibboleth/utilities/java/support/component/ComponentSupport.java
URL: http://svn.shibboleth.net/view/utilities/java-support/trunk/src/main/java/net/shibboleth/utilities/java/support/component/ComponentSupport.java?rev=533&r1=532&r2=533&view=diff
==============================================================================
--- java-support/trunk/src/main/java/net/shibboleth/utilities/java/support/component/ComponentSupport.java (original)
+++ java-support/trunk/src/main/java/net/shibboleth/utilities/java/support/component/ComponentSupport.java Sat Feb 22 07:36:39 2014
@@ -61,24 +61,6 @@
if (obj instanceof InitializableComponent) {
((InitializableComponent) obj).initialize();
- }
- }
-
- /**
- * If the given object is not null and an instance of {@link ValidatableComponent}, then this method calls the given
- * object's {@link ValidatableComponent#validate()} method.
- *
- * @param obj object to validate, may be null
- *
- * @throws ComponentValidationException thrown if there is a problem validating the object
- */
- public static void validate(@Nullable final Object obj) throws ComponentValidationException {
- if (obj == null) {
- return;
- }
-
- if (obj instanceof ValidatableComponent) {
- ((ValidatableComponent) obj).validate();
}
}
Modified: java-support/trunk/src/test/java/net/shibboleth/utilities/java/support/component/ComponentSupportTest.java
URL: http://svn.shibboleth.net/view/utilities/java-support/trunk/src/test/java/net/shibboleth/utilities/java/support/component/ComponentSupportTest.java?rev=533&r1=532&r2=533&view=diff
==============================================================================
--- java-support/trunk/src/test/java/net/shibboleth/utilities/java/support/component/ComponentSupportTest.java (original)
+++ java-support/trunk/src/test/java/net/shibboleth/utilities/java/support/component/ComponentSupportTest.java Sat Feb 22 07:36:39 2014
@@ -25,7 +25,7 @@
/** Tests for {@link ComponentSupport} */
public class ComponentSupportTest {
- @Test public void testDestroy() throws ComponentInitializationException, ComponentValidationException {
+ @Test public void testDestroy() throws ComponentInitializationException {
ComponentSupport.destroy(null);
ComponentSupport.destroy(new Object());
@@ -37,7 +37,7 @@
Assert.assertTrue(component.isDestroyed(), "Destroyed component destroyed");
}
- @Test public void testInitialized() throws ComponentInitializationException, ComponentValidationException {
+ @Test public void testInitialized() throws ComponentInitializationException {
ComponentSupport.initialize(null);
ComponentSupport.initialize(new Object());
@@ -47,18 +47,6 @@
ComponentSupport.initialize(component);
Assert.assertTrue(component.isInitialized(), "Initialized component initialized");
- }
-
- @Test public void testValidate() throws ComponentInitializationException, ComponentValidationException {
- ComponentSupport.validate(null);
-
- ComponentSupport.validate(new Object());
-
- ValidatabledComponent component = new ValidatabledComponent();
- Assert.assertFalse(component.isValidated(), "New component not validated");
-
- ComponentSupport.validate(component);
- Assert.assertTrue(component.isValidated(), "Validated component validated");
}
@Test public void testIfDestroyedThrowDestroyedComponentException() {
@@ -141,11 +129,13 @@
private boolean destroyed;
/** {@inheritDoc} */
+ @Override
public void destroy() {
destroyed = true;
}
/** {@inheritDoc} */
+ @Override
public boolean isDestroyed() {
return destroyed;
}
@@ -156,32 +146,16 @@
[... 35 lines stripped ...]
More information about the commits
mailing list