Last part can be simplified to:

```
try {
    return c.call();
} finally {
    SecurityContextHolder.setContext(originalExecutorContext);
}
```