public static void bind(Subject subject) {
        if (subject != null) {
            put(SUBJECT_KEY, subject);
        }
    }
Convenience method that simplifies binding a Subject to the ThreadContext.
<p/>
<p>The method's existence is to help reduce casting in your own code and to simplify remembering of
ThreadContext key names.  The implementation is simple in that, if the Subject is not <tt>null</tt>,
it binds it to the thread, i.e.:
<p/>
<pre>
if (subject != null) {
    put( SUBJECT_KEY, subject );
}</pre>

@param subject the Subject object to bind to the thread.  If the argument is null, nothing will be done.
@since 0.2
core/src/main/java/org/apache/shiro/util/ThreadContext.java