Adrian Crum wrote:
> Adam Heath wrote:
>> Adam Heath wrote:
>>> T result = Controller.runWith(data, new Callable<T>() {
>>> public T call() throws Exception {
>>> // code
>>> return null;
>>> }
>>> });
>>
>> I've actually attempted this, and while I think the implementation of
>> this pattern is simple, actually *using* it in higher-level code ends
>> up making things rather verbose.
>>
>> /me goes to think more
>
> I like the idea of encapsulating it all, but it seems to me at first
> glance that it will require a lot of code rewriting. I was trying to
> "inject" the new design into existing code without altering the existing
> code. New code could certainly follow a better pattern.
>
Why wasn't java.security.AccessController(and friends) used for this?