public static void registerHandler(String key, PolicyContextHandler handler, boolean replace) {
public static void registerHandler(String key, PolicyContextHandler handler, boolean replace) throws PolicyContextException {
    public static void registerHandler(String key, PolicyContextHandler handler, boolean replace) {        if (key == null) throw new IllegalArgumentException("Key must not be null");        if (handler == null) throw new IllegalArgumentException("Handler must not be null");        if (!replace && handlers.containsKey(key)) throw new IllegalArgumentException("A handler has already been registered under '" + key + "' and replace is false.");        SecurityManager sm = System.getSecurityManager();        if (sm != null) sm.checkPermission(SET_POLICY);        handlers.put(key, handler);    }