[java-opensaml] branch master updated: Forgot to update javadoc, also some missing annotations.

Scott Cantor cantor.2 at osu.edu
Mon Nov 6 12:01:37 EST 2017


This is an automated email from the git hooks/post-receive script.

scantor pushed a commit to branch master
in repository java-opensaml.

View the commit online:
http://git.shibboleth.net/view/?p=java-opensaml.git;a=commit;h=8d7c254cf3ac8c58b11ae2e108942b3ebd5fbfd3

The following commit(s) were added to refs/heads/master by this push:
       new  8d7c254   Forgot to update javadoc, also some missing annotations.
8d7c254 is described below

commit 8d7c254cf3ac8c58b11ae2e108942b3ebd5fbfd3
Author: Scott Cantor <cantor.2 at osu.edu>
AuthorDate: Mon Nov 6 12:01:35 2017 -0500

    Forgot to update javadoc, also some missing annotations.
---
 .../messaging/context/InOutOperationContext.java    | 21 ++++++++++-----------
 .../opensaml/messaging/context/MessageContext.java  |  7 ++++---
 .../opensaml/messaging/context/ScratchContext.java  | 10 +---------
 3 files changed, 15 insertions(+), 23 deletions(-)

diff --git a/opensaml-messaging-api/src/main/java/org/opensaml/messaging/context/InOutOperationContext.java b/opensaml-messaging-api/src/main/java/org/opensaml/messaging/context/InOutOperationContext.java
index 08308b9..83fad75 100644
--- a/opensaml-messaging-api/src/main/java/org/opensaml/messaging/context/InOutOperationContext.java
+++ b/opensaml-messaging-api/src/main/java/org/opensaml/messaging/context/InOutOperationContext.java
@@ -17,6 +17,7 @@
 
 package org.opensaml.messaging.context;
 
+import javax.annotation.Nullable;
 
 /**
 * An operation context which represents concretely a message exchange pattern involving an 
@@ -29,14 +30,13 @@ package org.opensaml.messaging.context;
 public class InOutOperationContext<InboundMessageType, OutboundMessageType> extends BaseContext {
 
     /** The inbound message context. */
-    private MessageContext<InboundMessageType> inboundContext;
+    @Nullable private MessageContext<InboundMessageType> inboundContext;
 
     /** The outbound message context. */
-    private MessageContext<OutboundMessageType> outboundContext;
+    @Nullable private MessageContext<OutboundMessageType> outboundContext;
 
     /** Constructor. Sets ID to a generated UUID and creation time to now. */
     protected InOutOperationContext() {
-        super();
     }
 
     /**
@@ -45,9 +45,8 @@ public class InOutOperationContext<InboundMessageType, OutboundMessageType> exte
      * @param inbound the inbound message context
      * @param outbound the outbound message context
      */
-    public InOutOperationContext(final MessageContext<InboundMessageType> inbound,
-            final MessageContext<OutboundMessageType> outbound) {
-        this();
+    public InOutOperationContext(@Nullable final MessageContext<InboundMessageType> inbound,
+            @Nullable final MessageContext<OutboundMessageType> outbound) {
 
         setInboundMessageContext(inbound);
         setOutboundMessageContext(outbound);
@@ -59,7 +58,7 @@ public class InOutOperationContext<InboundMessageType, OutboundMessageType> exte
      * 
      * @return the inbound message context
      */
-    public MessageContext<InboundMessageType> getInboundMessageContext() {
+    @Nullable public MessageContext<InboundMessageType> getInboundMessageContext() {
         return inboundContext;
     }
     
@@ -68,7 +67,7 @@ public class InOutOperationContext<InboundMessageType, OutboundMessageType> exte
      * 
      * @param context inbound message context, may be null
      */
-    public void setInboundMessageContext(final MessageContext<InboundMessageType> context) {
+    public void setInboundMessageContext(@Nullable final MessageContext<InboundMessageType> context) {
         // Unlink the old context from this parent
         if (inboundContext != null) {
             inboundContext.setParent(null);
@@ -87,7 +86,7 @@ public class InOutOperationContext<InboundMessageType, OutboundMessageType> exte
      * 
      * @return the outbound message context
      */
-    public MessageContext<OutboundMessageType> getOutboundMessageContext() {
+    @Nullable public MessageContext<OutboundMessageType> getOutboundMessageContext() {
         return outboundContext;
     }
     
@@ -96,7 +95,7 @@ public class InOutOperationContext<InboundMessageType, OutboundMessageType> exte
      * 
      * @param context outbound message context, may be null
      */
-    public void setOutboundMessageContext(final MessageContext<OutboundMessageType> context) {
+    public void setOutboundMessageContext(@Nullable final MessageContext<OutboundMessageType> context) {
         // Unlink the old context from this parent
         if (outboundContext != null) {
             outboundContext.setParent(null);
@@ -110,4 +109,4 @@ public class InOutOperationContext<InboundMessageType, OutboundMessageType> exte
         }
     }
 
-}
+}
\ No newline at end of file
diff --git a/opensaml-messaging-api/src/main/java/org/opensaml/messaging/context/MessageContext.java b/opensaml-messaging-api/src/main/java/org/opensaml/messaging/context/MessageContext.java
index c13f49b..df97ceb 100644
--- a/opensaml-messaging-api/src/main/java/org/opensaml/messaging/context/MessageContext.java
+++ b/opensaml-messaging-api/src/main/java/org/opensaml/messaging/context/MessageContext.java
@@ -17,6 +17,7 @@
 
 package org.opensaml.messaging.context;
 
+import javax.annotation.Nullable;
 
 /**
  * A context component which holds the state related to the processing of a single message.
@@ -34,14 +35,14 @@ package org.opensaml.messaging.context;
 public class MessageContext<MessageType> extends BaseContext {
 
     /** The message represented. */
-    private MessageType msg;
+    @Nullable private MessageType msg;
 
     /**
      * Get the message represented by the message context.
      * 
      * @return the message
      */
-    public MessageType getMessage() {
+    @Nullable public MessageType getMessage() {
         return msg;
     }
 
@@ -50,7 +51,7 @@ public class MessageContext<MessageType> extends BaseContext {
      * 
      * @param message the message
      */
-    public void setMessage(final MessageType message) {
+    public void setMessage(@Nullable final MessageType message) {
         msg = message;
     }
 
diff --git a/opensaml-messaging-api/src/main/java/org/opensaml/messaging/context/ScratchContext.java b/opensaml-messaging-api/src/main/java/org/opensaml/messaging/context/ScratchContext.java
index 453b7aa..66adc6e 100644
--- a/opensaml-messaging-api/src/main/java/org/opensaml/messaging/context/ScratchContext.java
+++ b/opensaml-messaging-api/src/main/java/org/opensaml/messaging/context/ScratchContext.java
@@ -25,15 +25,7 @@ import javax.annotation.Nonnull;
 import net.shibboleth.utilities.java.support.annotation.constraint.Live;
 
 /**
- * A context component which holds the state related to the processing of a single message.
- * 
- * <p>
- * Additional information associated with the message represented by the context may be held by the context
- * as subordinate subcontext instances. Subcontext instances may simply hold state information related to the message, 
- * in which case they may be seen as a type-safe variant of the ubiquitous properties map pattern.  They may 
- * also be more functional or operational in nature, for example providing "views" onto the message 
- * and/or message context data.
- * </p>
+ * A context subclass for holding arbitrary data in a map.
  */
 public class ScratchContext extends BaseContext {
 

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the commits mailing list