public static Runnable create(Runnable delegate, SecurityContext securityContext) {
    """
	Factory method for creating a {@link DelegatingSecurityContextRunnable}.
	
	@param delegate the original {@link Runnable} that will be delegated to after
	establishing a {@link SecurityContext} on the {@link SecurityContextHolder}. Cannot
	have null.
	@param securityContext the {@link SecurityContext} to establish before invoking the
	delegate {@link Runnable}. If null, the current {@link SecurityContext} from the
	{@link SecurityContextHolder} will be used.
	@return
    """
		Assert.notNull(delegate, "delegate cannot be  null");
		return securityContext == null ? new DelegatingSecurityContextRunnable(delegate)
				: new DelegatingSecurityContextRunnable(delegate, securityContext);
	}
public static Runnable create(Runnable delegate, SecurityContext securityContext) {
		Assert.notNull(delegate, "delegate cannot be  null");
		return securityContext == null ? new DelegatingSecurityContextRunnable(delegate)
				: new DelegatingSecurityContextRunnable(delegate, securityContext);
	}
public static Runnable create ( Runnable delegate , SecurityContext securityContext ) { Assert . notNull ( delegate , "delegate cannot be  null" ) ; return securityContext == null ? new DelegatingSecurityContextRunnable ( delegate ) : new DelegatingSecurityContextRunnable ( delegate , securityContext ) ; }
Factory method for creating a {@link DelegatingSecurityContextRunnable}.

@param delegate the original {@link Runnable} that will be delegated to after
establishing a {@link SecurityContext} on the {@link SecurityContextHolder}. Cannot
have null.
@param securityContext the {@link SecurityContext} to establish before invoking the
delegate {@link Runnable}. If null, the current {@link SecurityContext} from the
{@link SecurityContextHolder} will be used.
@return
Factory method for creating a { @link DelegatingSecurityContextRunnable } .