Skip to content

Commit

Permalink
Fix PMD violations
Browse files Browse the repository at this point in the history
  • Loading branch information
reta committed Mar 2, 2025
1 parent f00b5ad commit 2b1456b
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -77,12 +77,13 @@ public void testNoIoExceptions() throws Exception {
}

@Test
@SuppressWarnings("PMD.FinalFieldCouldBeStatic")
public void testServiceUnavailable() throws Exception {
final Greeter greeter = getGreeter();

exception.expect(WebServiceException.class);
exception.expectCause(new TypeSafeMatcher<Throwable>() {
private static final String message = "HTTP response '503: Service Unavailable' when "
private final String message = "HTTP response '503: Service Unavailable' when "
+ "communicating with http://localhost:" + BadServer.PORT + "/Mortimer";

@Override
Expand All @@ -104,12 +105,13 @@ protected boolean matchesSafely(Throwable item) {
}

@Test
@SuppressWarnings("PMD.FinalFieldCouldBeStatic")
public void testNotFound() throws Exception {
final Greeter greeter = getGreeter();

exception.expect(WebServiceException.class);
exception.expectCause(new TypeSafeMatcher<Throwable>() {
private static final String message = "HTTP response '404: Not Found' when "
private final String message = "HTTP response '404: Not Found' when "
+ "communicating with http://localhost:" + BadServer.PORT + "/Mortimer";

@Override
Expand Down

0 comments on commit 2b1456b

Please sign in to comment.