public static void put(Object key, Object value) {
        if (key == null) {
            throw new IllegalArgumentException("key cannot be null");
        }

        if (value == null) {
            remove(key);
            return;
        }

        ensureResourcesInitialized();
        RESOURCES.get().put(key, value);

        if (LOGGER.isTraceEnabled()) {
            String msg = "Bound value of type [" + value.getClass().getName() + "] for key ["
                    + key + "] to thread " + "[" + Thread.currentThread().getName() + "]";
            LOGGER.trace(msg);
        }
    }
Binds <tt>value</tt> for the given <code>key</code> to the current thread.
<p/>
<p>A <tt>null</tt> <tt>value</tt> has the same effect as if <tt>remove</tt> was called for the given
<tt>key</tt>, i.e.:
<p/>
<pre>
if ( value == null ) {
    remove( key );
}</pre>

@param key   The key with which to identify the <code>value</code>.
@param value The value to bind to the thread.
@throws IllegalArgumentException if the <code>key</code> argument is <tt>null</tt>.
core/src/main/java/org/apache/shiro/util/ThreadContext.java