>     public void addToClose(Closeable toClose) {
>        methodsToClose.add(toClose);
>     }
>  
>     public void close() throws IOException {
> -      Collections.reverse(methodsToClose);
> -      for (Closeable toClose : methodsToClose) {
> -         toClose.close();
> +      if (state.compareAndSet(State.OPEN, State.CLOSING)) {

Tricky, I agree. I think after seeing the various review comments we can say 
that if it passes all the tests, we should be OK with this change. Once it's 
committed perhaps an email to the user@ list might not be a bad idea.

@nacx What do you think?

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds/pull/32/files#r4723366

Reply via email to