[java-identity-provider] branch master updated: JSPT-79 - Review date and time handling for Java 8
Scott Cantor
cantor.2 at osu.edu
Wed Mar 20 14:43:19 EDT 2019
This is an automated email from the git hooks/post-receive script.
scantor pushed a commit to branch master
in repository java-identity-provider.
View the commit online:
http://git.shibboleth.net/view/?p=java-identity-provider.git;a=commit;h=9e9a4308402dbc559ea4c7e900edeb67013095cc
The following commit(s) were added to refs/heads/master by this push:
new 9e9a430 JSPT-79 - Review date and time handling for Java 8
9e9a430 is described below
commit 9e9a4308402dbc559ea4c7e900edeb67013095cc
Author: Scott Cantor <cantor.2 at osu.edu>
AuthorDate: Wed Mar 20 14:43:17 2019 -0400
JSPT-79 - Review date and time handling for Java 8
https://issues.shibboleth.net/jira/browse/JSPT-79
Convert more classes to DOMTypeSupport for formatting.
---
.../attribute/filter/matcher/saml/impl/AttributeInMetadataMatcher.java | 3 ++-
.../idp/saml/attribute/mapping/AbstractSAMLAttributeValueMapper.java | 3 ++-
2 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/idp-attribute-filter-impl/src/main/java/net/shibboleth/idp/attribute/filter/matcher/saml/impl/AttributeInMetadataMatcher.java b/idp-attribute-filter-impl/src/main/java/net/shibboleth/idp/attribute/filter/matcher/saml/impl/AttributeInMetadataMatcher.java
index 8309e26..a9bba40 100644
--- a/idp-attribute-filter-impl/src/main/java/net/shibboleth/idp/attribute/filter/matcher/saml/impl/AttributeInMetadataMatcher.java
+++ b/idp-attribute-filter-impl/src/main/java/net/shibboleth/idp/attribute/filter/matcher/saml/impl/AttributeInMetadataMatcher.java
@@ -38,6 +38,7 @@ import net.shibboleth.utilities.java.support.annotation.constraint.NonnullElemen
import net.shibboleth.utilities.java.support.component.AbstractIdentifiableInitializableComponent;
import net.shibboleth.utilities.java.support.component.ComponentSupport;
import net.shibboleth.utilities.java.support.primitive.StringSupport;
+import net.shibboleth.utilities.java.support.xml.DOMTypeSupport;
import org.opensaml.core.xml.XMLObject;
import org.opensaml.core.xml.schema.XSAny;
@@ -355,7 +356,7 @@ public class AttributeInMetadataMatcher extends AbstractIdentifiableInitializabl
} else if (xmlObj instanceof XSDateTime) {
final Instant dt = ((XSDateTime) xmlObj).getValue();
if (dt != null) {
- toMatch = ((XSDateTime) xmlObj).getDateTimeFormatter().format(dt);
+ toMatch = DOMTypeSupport.instantToDateTime(dt);
}
} else if (xmlObj instanceof XSBase64Binary) {
toMatch = ((XSBase64Binary) xmlObj).getValue();
diff --git a/idp-saml-api/src/main/java/net/shibboleth/idp/saml/attribute/mapping/AbstractSAMLAttributeValueMapper.java b/idp-saml-api/src/main/java/net/shibboleth/idp/saml/attribute/mapping/AbstractSAMLAttributeValueMapper.java
index 1bd2dd0..b34d453 100644
--- a/idp-saml-api/src/main/java/net/shibboleth/idp/saml/attribute/mapping/AbstractSAMLAttributeValueMapper.java
+++ b/idp-saml-api/src/main/java/net/shibboleth/idp/saml/attribute/mapping/AbstractSAMLAttributeValueMapper.java
@@ -33,6 +33,7 @@ import net.shibboleth.utilities.java.support.component.AbstractInitializableComp
import net.shibboleth.utilities.java.support.component.ComponentInitializationException;
import net.shibboleth.utilities.java.support.component.ComponentSupport;
import net.shibboleth.utilities.java.support.logic.Constraint;
+import net.shibboleth.utilities.java.support.xml.DOMTypeSupport;
import org.opensaml.core.xml.XMLObject;
import org.opensaml.core.xml.schema.XSAny;
@@ -108,7 +109,7 @@ public abstract class AbstractSAMLAttributeValueMapper extends AbstractInitializ
final Instant dt = ((XSDateTime) object).getValue();
if (dt != null) {
- retVal = ((XSDateTime) object).getDateTimeFormatter().format(dt);
+ retVal = DOMTypeSupport.instantToDateTime(dt);
} else {
retVal = null;
}
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the commits
mailing list