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

@param securityManager the application's SecurityManager instance to bind to the thread.  If the argument is
                       null, nothing will be done.
@since 0.9
core/src/main/java/org/apache/shiro/util/ThreadContext.java