Object result = super.invoke(targetObject);
try {
    public Object invoke(Object targetObject)        throws NoSuchMethodException, IllegalAccessException,             InvocationTargetException {        SecurityContextHolder.setContext(securityContext);        if ((SecurityContextHolder.getContext() != null)            && (SecurityContextHolder.getContext().getAuthentication() != null)) {            SecurityContextHolder.getContext().getAuthentication()                                 .setAuthenticated(false);        }        if (logger.isDebugEnabled()) {            logger.debug("Set SecurityContextHolder to contain: "                + securityContext);        }        Object result = super.invoke(targetObject);        SecurityContextHolder.setContext(new SecurityContextImpl());        if (logger.isDebugEnabled()) {            logger.debug(                "Set SecurityContext to new instance of SecurityContextImpl");        }        return result;    }