[java-opensaml COMMIT] in /trunk: opensaml-saml-impl/src/main/java/org/opensaml/saml/common/binding/artifact/StorageS...

noreply at shibboleth.net noreply at shibboleth.net
Tue Sep 24 17:39:20 EDT 2013


Author: scantor
Date: Tue Sep 24 17:39:19 2013
New Revision: 3453

URL: http://svn.shibboleth.net/view/java-opensaml?rev=3453&view=rev
Log:
More session work in progress, rationalized StorageSerializer parameter set and order.

Modified:
    trunk/opensaml-saml-impl/src/main/java/org/opensaml/saml/common/binding/artifact/StorageServiceSAMLArtifactMapEntryFactory.java
    trunk/opensaml-saml-impl/src/test/java/org/opensaml/saml/common/binding/artifact/StorageServiceSAMLArtifactMapEntryFactoryTest.java
    trunk/opensaml-storage-api/src/main/java/org/opensaml/storage/StorageRecord.java
    trunk/opensaml-storage-api/src/main/java/org/opensaml/storage/StorageSerializer.java

Modified: trunk/opensaml-saml-impl/src/main/java/org/opensaml/saml/common/binding/artifact/StorageServiceSAMLArtifactMapEntryFactory.java
URL: http://svn.shibboleth.net/view/java-opensaml/trunk/opensaml-saml-impl/src/main/java/org/opensaml/saml/common/binding/artifact/StorageServiceSAMLArtifactMapEntryFactory.java?rev=3453&r1=3452&r2=3453&view=diff
==============================================================================
--- trunk/opensaml-saml-impl/src/main/java/org/opensaml/saml/common/binding/artifact/StorageServiceSAMLArtifactMapEntryFactory.java (original)
+++ trunk/opensaml-saml-impl/src/main/java/org/opensaml/saml/common/binding/artifact/StorageServiceSAMLArtifactMapEntryFactory.java Tue Sep 24 17:39:19 2013
@@ -21,6 +21,7 @@
 import java.io.StringReader;
 
 import javax.annotation.Nonnull;
+import javax.annotation.Nullable;
 
 import net.shibboleth.utilities.java.support.annotation.constraint.NotEmpty;
 import net.shibboleth.utilities.java.support.logic.Constraint;
@@ -124,8 +125,10 @@
     }
 
     /** {@inheritDoc} */
-    @Nonnull public SAMLArtifactMapEntry deserialize(String value, String context, String key, Long expiration)
-            throws IOException {
+    // Checkstyle: CyclomaticComplexity OFF
+    @Nonnull public SAMLArtifactMapEntry deserialize(final int version, @Nonnull @NotEmpty final String context,
+            @Nonnull @NotEmpty final String key, @Nonnull @NotEmpty final String value, @Nullable final Long expiration)
+                    throws IOException {
         log.debug("Deserializing artifact mapping data from stored string");
 
         if (log.isTraceEnabled()) {
@@ -167,5 +170,6 @@
             throw new IOException("Error unmarshalling DOM into SAMLObject", e);
         }
     }
+    // Checkstyle: CyclomaticComplexity ON
 
 }

Modified: trunk/opensaml-saml-impl/src/test/java/org/opensaml/saml/common/binding/artifact/StorageServiceSAMLArtifactMapEntryFactoryTest.java
URL: http://svn.shibboleth.net/view/java-opensaml/trunk/opensaml-saml-impl/src/test/java/org/opensaml/saml/common/binding/artifact/StorageServiceSAMLArtifactMapEntryFactoryTest.java?rev=3453&r1=3452&r2=3453&view=diff
==============================================================================
--- trunk/opensaml-saml-impl/src/test/java/org/opensaml/saml/common/binding/artifact/StorageServiceSAMLArtifactMapEntryFactoryTest.java (original)
+++ trunk/opensaml-saml-impl/src/test/java/org/opensaml/saml/common/binding/artifact/StorageServiceSAMLArtifactMapEntryFactoryTest.java Tue Sep 24 17:39:19 2013
@@ -80,7 +80,7 @@
         
         String s = factory.serialize(basicEntry);
         BasicSAMLArtifactMapEntry newEntry = (BasicSAMLArtifactMapEntry) factory.deserialize(
-                s, StorageServiceSAMLArtifactMap.STORAGE_CONTEXT, basicEntry.getArtifact(), null);
+                1, StorageServiceSAMLArtifactMap.STORAGE_CONTEXT, basicEntry.getArtifact(), s, null);
         
         Assert.assertEquals(basicEntry.getArtifact(), newEntry.getArtifact());
         Assert.assertEquals(basicEntry.getIssuerId(), newEntry.getIssuerId());

Modified: trunk/opensaml-storage-api/src/main/java/org/opensaml/storage/StorageRecord.java
URL: http://svn.shibboleth.net/view/java-opensaml/trunk/opensaml-storage-api/src/main/java/org/opensaml/storage/StorageRecord.java?rev=3453&r1=3452&r2=3453&view=diff
==============================================================================
--- trunk/opensaml-storage-api/src/main/java/org/opensaml/storage/StorageRecord.java (original)
+++ trunk/opensaml-storage-api/src/main/java/org/opensaml/storage/StorageRecord.java Tue Sep 24 17:39:19 2013
@@ -76,14 +76,14 @@
      * Get the record value, using a custom deserialization process.
      * 
      * @param serializer a custom (de)serialization process to apply
-     * @param context context of record, if available
-     * @param key key of record, if available
+     * @param context context of record
+     * @param key key of record
      * @return  the record value
      * @throws IOException if deserialization fails
      */
-    @Nonnull public Type getValue(@Nonnull final StorageSerializer<Type> serializer, @Nullable final String context,
-            @Nullable final String key) throws IOException {
-        return serializer.deserialize(value, context, key, expiration);

[... 34 lines stripped ...]


More information about the commits mailing list