mirror of https://github.com/apache/jclouds.git
Address error-prone AssertFalse warnings
This commit is contained in:
parent
04f1bb2b49
commit
cdbf856900
|
@ -121,9 +121,7 @@ public class Throwables2 {
|
|||
AuthorizationException aex = getFirstThrowableOfType(e, AuthorizationException.class);
|
||||
if (aex != null)
|
||||
throw aex;
|
||||
propagate(e);
|
||||
assert false : "exception should have propagated " + e;
|
||||
return null;
|
||||
throw propagate(e);
|
||||
}
|
||||
|
||||
// Note that ordering matters to propagateIfPossible.
|
||||
|
|
|
@ -33,6 +33,7 @@ import org.jclouds.concurrent.config.ExecutorServiceModule;
|
|||
import org.jclouds.lifecycle.Closer;
|
||||
import org.testng.annotations.Test;
|
||||
|
||||
import com.google.common.base.Throwables;
|
||||
import com.google.common.util.concurrent.ExecutionList;
|
||||
import com.google.common.util.concurrent.ListeningExecutorService;
|
||||
import com.google.inject.AbstractModule;
|
||||
|
@ -130,7 +131,7 @@ public class LifeCycleModuleTest {
|
|||
assert closer.getState() == Closer.State.PROCESSING;
|
||||
closeDone.await();
|
||||
} catch (InterruptedException e) {
|
||||
assert false : e.getMessage();
|
||||
throw Throwables.propagate(e);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
@ -141,7 +142,7 @@ public class LifeCycleModuleTest {
|
|||
try {
|
||||
closer.close();
|
||||
} catch (IOException e) {
|
||||
assert false : e.getMessage();
|
||||
throw Throwables.propagate(e);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
@ -180,7 +181,7 @@ public class LifeCycleModuleTest {
|
|||
try {
|
||||
closer.close();
|
||||
} catch (IOException e) {
|
||||
assert false : e.getMessage();
|
||||
throw Throwables.propagate(e);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
|
|
@ -190,8 +190,7 @@ public class JschSshClient implements SshClient {
|
|||
}
|
||||
}
|
||||
}
|
||||
assert false : "should not reach here";
|
||||
return null;
|
||||
throw new AssertionError("should not reach here");
|
||||
}
|
||||
|
||||
public void connect() {
|
||||
|
|
|
@ -216,8 +216,7 @@ public class SshjSshClient implements SshClient {
|
|||
}
|
||||
}
|
||||
}
|
||||
assert false : "should not reach here";
|
||||
return null;
|
||||
throw new AssertionError("should not reach here");
|
||||
}
|
||||
|
||||
public void connect() {
|
||||
|
|
Loading…
Reference in New Issue