[java-support] branch master updated: IDP-1004 @Duration can go on a method. Add to appropriate methods
Rod Widdowson
rdw at steadingsoftware.com
Sun Jul 10 09:12:50 EDT 2016
This is an automated email from the git hooks/post-receive script.
rdw pushed a commit to branch master
in repository java-support.
View the commit online:
http://git.shibboleth.net/view/?p=java-support.git;a=commit;h=402cbd0673983f497dd48e7f26d27c5fd41df771
The following commit(s) were added to refs/heads/master by this push:
new 402cbd0 IDP-1004 @Duration can go on a method. Add to appropriate methods
402cbd0 is described below
commit 402cbd0673983f497dd48e7f26d27c5fd41df771
Author: Rod Widdowson <rdw at steadingsoftware.com>
AuthorDate: Sun Jul 10 14:02:14 2016 +0100
IDP-1004 @Duration can go on a method. Add to appropriate methods
https://issues.shibboleth.net/jira/browse/IDP-1004
See also https://jira.spring.io/browse/SPR-14434
In order to make the annotation-driven converted work robustly we
need to add @Duration to the setter for any @Duration the appropriate
parameter in the constructors.
Make @Duration usable in such instances.
Add @Duration to all appropriate setters as well as their associated
getters. Leave the @Duration on the parameter for readability.
---
.../net/shibboleth/utilities/java/support/annotation/Duration.java | 2 +-
.../utilities/java/support/security/BasicKeystoreKeyStrategy.java | 2 +-
.../utilities/java/support/service/AbstractReloadableService.java | 4 ++--
3 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/src/main/java/net/shibboleth/utilities/java/support/annotation/Duration.java b/src/main/java/net/shibboleth/utilities/java/support/annotation/Duration.java
index cf83115..a99f331 100644
--- a/src/main/java/net/shibboleth/utilities/java/support/annotation/Duration.java
+++ b/src/main/java/net/shibboleth/utilities/java/support/annotation/Duration.java
@@ -28,7 +28,7 @@ import java.lang.annotation.Target;
*/
@Documented
@Retention(RetentionPolicy.RUNTIME)
- at Target({ElementType.FIELD, ElementType.PARAMETER})
+ at Target({ElementType.FIELD, ElementType.PARAMETER, ElementType.METHOD})
public @interface Duration {
}
\ No newline at end of file
diff --git a/src/main/java/net/shibboleth/utilities/java/support/security/BasicKeystoreKeyStrategy.java b/src/main/java/net/shibboleth/utilities/java/support/security/BasicKeystoreKeyStrategy.java
index c1bb570..3fe90de 100644
--- a/src/main/java/net/shibboleth/utilities/java/support/security/BasicKeystoreKeyStrategy.java
+++ b/src/main/java/net/shibboleth/utilities/java/support/security/BasicKeystoreKeyStrategy.java
@@ -184,7 +184,7 @@ public class BasicKeystoreKeyStrategy extends AbstractInitializableComponent imp
*
* @param interval number of milliseconds between key update checks
*/
- public void setUpdateInterval(@Duration @NonNegative final long interval) {
+ @Duration public void setUpdateInterval(@Duration @NonNegative final long interval) {
ComponentSupport.ifInitializedThrowUnmodifiabledComponentException(this);
updateInterval = Constraint.isGreaterThanOrEqual(0, interval,
diff --git a/src/main/java/net/shibboleth/utilities/java/support/service/AbstractReloadableService.java b/src/main/java/net/shibboleth/utilities/java/support/service/AbstractReloadableService.java
index bed62d4..a5a0509 100644
--- a/src/main/java/net/shibboleth/utilities/java/support/service/AbstractReloadableService.java
+++ b/src/main/java/net/shibboleth/utilities/java/support/service/AbstractReloadableService.java
@@ -91,7 +91,7 @@ public abstract class AbstractReloadableService<T> extends AbstractIdentifiableI
*
* @return number of milliseconds between one reload check and another
*/
- public long getReloadCheckDelay() {
+ @Duration public long getReloadCheckDelay() {
return reloadCheckDelay;
}
@@ -103,7 +103,7 @@ public abstract class AbstractReloadableService<T> extends AbstractIdentifiableI
*
* @param delay number of milliseconds between one reload check and another
*/
- public void setReloadCheckDelay(@Duration final long delay) {
+ @Duration public void setReloadCheckDelay(@Duration final long delay) {
ComponentSupport.ifInitializedThrowUnmodifiabledComponentException(this);
reloadCheckDelay = delay;
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the commits
mailing list