You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@shiro.apache.org by lh...@apache.org on 2010/05/14 21:08:04 UTC
svn commit: r944403 -
/incubator/shiro/trunk/core/src/main/java/org/apache/shiro/util/ThreadContext.java
Author: lhazlewood
Date: Fri May 14 19:08:04 2010
New Revision: 944403
URL: http://svn.apache.org/viewvc?rev=944403&view=rev
Log:
SHIRO-159: updated JavaDoc to indicate 1.0 methods
Modified:
incubator/shiro/trunk/core/src/main/java/org/apache/shiro/util/ThreadContext.java
Modified: incubator/shiro/trunk/core/src/main/java/org/apache/shiro/util/ThreadContext.java
URL: http://svn.apache.org/viewvc/incubator/shiro/trunk/core/src/main/java/org/apache/shiro/util/ThreadContext.java?rev=944403&r1=944402&r2=944403&view=diff
==============================================================================
--- incubator/shiro/trunk/core/src/main/java/org/apache/shiro/util/ThreadContext.java (original)
+++ incubator/shiro/trunk/core/src/main/java/org/apache/shiro/util/ThreadContext.java Fri May 14 19:08:04 2010
@@ -127,6 +127,14 @@ public abstract class ThreadContext {
return resources != null ? new HashMap<Object,Object>(resources.get()) : null;
}
+ /**
+ * Allows a caller to explicitly set the entire resource map. This operation overwrites everything that existed
+ * previously in the ThreadContext - if you need to retain what was on the thread prior to calling this method,
+ * call the {@link #getResources()} method, which will give you the existing state.
+ *
+ * @param resources the resources to replace the existing {@link #getResources() resources}.
+ * @since 1.0
+ */
public static void setResources(Map<Object,Object> resources) {
if (CollectionUtils.isEmpty(resources) ) {
return;