mirror of https://github.com/apache/jclouds.git
Issue 279: code glitch caught by byteman
This commit is contained in:
parent
c2e1d33d0c
commit
bb3de69eb8
|
@ -162,7 +162,6 @@ public abstract class BaseVCloudRestClientModule<S extends VCloudClient, A exten
|
||||||
return new ExpirableSupplier<VCloudSession>(
|
return new ExpirableSupplier<VCloudSession>(
|
||||||
new RetryOnTimeOutExceptionSupplier<VCloudSession>(new Supplier<VCloudSession>() {
|
new RetryOnTimeOutExceptionSupplier<VCloudSession>(new Supplier<VCloudSession>() {
|
||||||
public VCloudSession get() {
|
public VCloudSession get() {
|
||||||
try {
|
|
||||||
// http://code.google.com/p/google-guice/issues/detail?id=483
|
// http://code.google.com/p/google-guice/issues/detail?id=483
|
||||||
// guice doesn't remember when singleton providers throw exceptions.
|
// guice doesn't remember when singleton providers throw exceptions.
|
||||||
// in this case, if describeRegions fails, it is called again for
|
// in this case, if describeRegions fails, it is called again for
|
||||||
|
@ -170,6 +169,7 @@ public abstract class BaseVCloudRestClientModule<S extends VCloudClient, A exten
|
||||||
// we remember the last exception trusting that guice is single-threaded
|
// we remember the last exception trusting that guice is single-threaded
|
||||||
if (authException != null)
|
if (authException != null)
|
||||||
throw authException;
|
throw authException;
|
||||||
|
try {
|
||||||
return login.login().get(10, TimeUnit.SECONDS);
|
return login.login().get(10, TimeUnit.SECONDS);
|
||||||
} catch (AuthorizationException e) {
|
} catch (AuthorizationException e) {
|
||||||
BaseVCloudRestClientModule.this.authException = e;
|
BaseVCloudRestClientModule.this.authException = e;
|
||||||
|
|
Loading…
Reference in New Issue