[spring-extensions] branch master updated: Adjust new method name.
Scott Cantor
cantor.2 at osu.edu
Fri Jun 19 18:27:51 UTC 2020
This is an automated email from the git hooks/post-receive script.
scantor pushed a commit to branch master
in repository spring-extensions.
View the commit online:
http://git.shibboleth.net/view/?p=spring-extensions.git;a=commit;h=5bcbfceeb2acbfeda789853f1e80475893f8ffb5
The following commit(s) were added to refs/heads/master by this push:
new 5bcbfce Adjust new method name.
5bcbfce is described below
commit 5bcbfceeb2acbfeda789853f1e80475893f8ffb5
Author: Scott Cantor <cantor.2 at osu.edu>
AuthorDate: Fri Jun 19 14:27:45 2020 -0400
Adjust new method name.
---
.../ext/spring/resource/ConditionalResource.java | 14 +++++++-------
1 file changed, 7 insertions(+), 7 deletions(-)
diff --git a/src/main/java/net/shibboleth/ext/spring/resource/ConditionalResource.java b/src/main/java/net/shibboleth/ext/spring/resource/ConditionalResource.java
index 5f72a1d..c6e5807 100644
--- a/src/main/java/net/shibboleth/ext/spring/resource/ConditionalResource.java
+++ b/src/main/java/net/shibboleth/ext/spring/resource/ConditionalResource.java
@@ -49,7 +49,7 @@ public class ConditionalResource extends AbstractIdentifiedInitializableComponen
implements Resource, BeanNameAware, net.shibboleth.utilities.java.support.resource.Resource {
/** Dummy content. */
- @Nonnull @NotEmpty private static final String DEFAULT_EMPTY_RESOURCE =
+ @Nonnull @NotEmpty private static final String DEFAULT_CONTENT =
"<beans xmlns=\"http://www.springframework.org/schema/beans\""
+ " xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\""
+ " xsi:schemaLocation=\"http://www.springframework.org/schema/beans"
@@ -66,7 +66,7 @@ public class ConditionalResource extends AbstractIdentifiedInitializableComponen
@Nonnull private final Resource wrappedResource;
/** Content to return if the resource is missing. */
- @NonnullAfterInit private String emptyResource;
+ @NonnullAfterInit private String defaultContent;
/**
* Constructor.
@@ -75,7 +75,7 @@ public class ConditionalResource extends AbstractIdentifiedInitializableComponen
*/
public ConditionalResource(@Nonnull final Resource wrapped) {
wrappedResource = Constraint.isNotNull(wrapped, "Wrapped resource cannot be null");
- emptyResource = DEFAULT_EMPTY_RESOURCE;
+ defaultContent = DEFAULT_CONTENT;
}
/** {@inheritDoc} */
@@ -90,10 +90,10 @@ public class ConditionalResource extends AbstractIdentifiedInitializableComponen
*
* @since 6.1.0
*/
- public void setEmptyResource(@Nonnull final String content) {
+ public void setDefaultContent(@Nonnull final String content) {
ComponentSupport.ifInitializedThrowUnmodifiabledComponentException(this);
- emptyResource = Constraint.isNotEmpty(content, "Empty content cannot be null");
+ defaultContent = Constraint.isNotEmpty(content, "Empty content cannot be null");
}
/** {@inheritDoc} */
@@ -108,7 +108,7 @@ public class ConditionalResource extends AbstractIdentifiedInitializableComponen
} else {
log.debug("{} getInputStream failed on wrapped resource", getLogPrefix());
}
- return new ByteArrayInputStream(emptyResource.getBytes(StandardCharsets.UTF_8));
+ return new ByteArrayInputStream(defaultContent.getBytes(StandardCharsets.UTF_8));
}
}
@@ -206,7 +206,7 @@ public class ConditionalResource extends AbstractIdentifiedInitializableComponen
if (log.isDebugEnabled()) {
log.debug("{} contentLength failed on wrapped resource", getLogPrefix(), e);
}
- return emptyResource.length();
+ return defaultContent.length();
}
}
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the commits
mailing list