CreateBranchIT#assertCreateFails: Restructure to avoid ErrorProne internal error
The current structure of the code causes an IllegalStateException in ErrorProne [1]. Restructure the code to avoid it. [1] https://github.com/google/error-prone/issues/1072 Change-Id: I17c96eca6c8dc8b0e234d504e32dda49d9f4720a
This commit is contained in:
parent
1c92bd2398
commit
e7b20f916f
@ -98,10 +98,10 @@ public class CreateBranchIT extends AbstractDaemonTest {
|
||||
|
||||
private void assertCreateFails(Class<? extends RestApiException> errType, String errMsg)
|
||||
throws Exception {
|
||||
exception.expect(errType);
|
||||
if (errMsg != null) {
|
||||
exception.expectMessage(errMsg);
|
||||
}
|
||||
exception.expect(errType);
|
||||
branch().create(new BranchInput());
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user