]> source.dussan.org Git - jgit.git/commit
ProtocolV2ParserTest: Fix incorrect usage of ExpectedException 32/129832/2
authorDavid Pursehouse <david.pursehouse@gmail.com>
Sat, 22 Sep 2018 10:28:50 +0000 (19:28 +0900)
committerDavid Pursehouse <david.pursehouse@gmail.com>
Tue, 25 Sep 2018 01:42:03 +0000 (10:42 +0900)
commit071763948599e8cee161be463f28656775568db0
tree73e266db48064aff08ec94c2d2efdf1580320d35
parentc0f89747b69a7919796f1ba185bb67cbbf1c8045
ProtocolV2ParserTest: Fix incorrect usage of ExpectedException

There should only be one statement after the expect(...) method.

Any additional statements after the statement that is expected to
throw will never be executed in a passing test. This can lead to
inappropriately passing tests where later incorrect assertions are
skipped by the thrown exception.

See https://errorprone.info/bugpattern/ExpectedExceptionChecker

Change-Id: I0d6350fafb281b6bdb04289f4cd5eb4bb159628b
Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
org.eclipse.jgit.test/tst/org/eclipse/jgit/transport/ProtocolV2ParserTest.java