LOG4J2-1447 clarified in javadoc that returned object may be read-only

Project: http://git-wip-us.apache.org/repos/asf/logging-log4j2/repo
Commit: http://git-wip-us.apache.org/repos/asf/logging-log4j2/commit/ca9d5e09
Tree: http://git-wip-us.apache.org/repos/asf/logging-log4j2/tree/ca9d5e09
Diff: http://git-wip-us.apache.org/repos/asf/logging-log4j2/diff/ca9d5e09

Branch: refs/heads/master
Commit: ca9d5e09a3a5f4bf5a969b2225934e5e58dac134
Parents: 4e4d133
Author: rpopma <rpo...@apache.org>
Authored: Thu Sep 22 10:52:48 2016 +0900
Committer: rpopma <rpo...@apache.org>
Committed: Thu Sep 22 10:52:48 2016 +0900

----------------------------------------------------------------------
 .../apache/logging/log4j/spi/MutableContextDataSupplier.java | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/ca9d5e09/log4j-api/src/main/java/org/apache/logging/log4j/spi/MutableContextDataSupplier.java
----------------------------------------------------------------------
diff --git 
a/log4j-api/src/main/java/org/apache/logging/log4j/spi/MutableContextDataSupplier.java
 
b/log4j-api/src/main/java/org/apache/logging/log4j/spi/MutableContextDataSupplier.java
index 7afdeaa..3f242ed 100644
--- 
a/log4j-api/src/main/java/org/apache/logging/log4j/spi/MutableContextDataSupplier.java
+++ 
b/log4j-api/src/main/java/org/apache/logging/log4j/spi/MutableContextDataSupplier.java
@@ -18,13 +18,19 @@ package org.apache.logging.log4j.spi;
 
 /**
  * Interface for objects that know how to provide a {@code MutableContextData} 
object.
+ * <p>
+ * This interface offers no guarantee that the returned context data is 
actually mutable; it may have been
+ * {@linkplain MutableContextData#freeze() frozen}, making the data structure 
read-only.
+ * </p>
  *
  * @since 2.7
  */
 public interface MutableContextDataSupplier {
 
     /**
-     * Retuns the {@code MutableContextData}.
+     * Returns the {@code MutableContextData}. Note that the returned context 
data may not be mutable; it may have been
+     * {@linkplain MutableContextData#freeze() frozen}, making the data 
structure read-only.
+     *
      * @return the {@code MutableContextData}
      */
     MutableContextData getMutableContextData();

Reply via email to