Skip to content

Commit 7cdc411

Browse files
committed
Fix PMD violations (#2516)
1 parent 2f286b4 commit 7cdc411

1 file changed

Lines changed: 4 additions & 5 deletions

File tree

systests/transports/src/test/java/org/apache/cxf/systest/http/HTTPConduitIoExceptionsTest.java

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -79,12 +79,11 @@ public void testNoIoExceptions() throws Exception {
7979
@Test
8080
public void testServiceUnavailable() throws Exception {
8181
final Greeter greeter = getGreeter();
82+
final String message = "HTTP response '503: Service Unavailable' when "
83+
+ "communicating with http://localhost:" + BadServer.PORT + "/Mortimer";
8284

8385
exception.expect(WebServiceException.class);
8486
exception.expectCause(new TypeSafeMatcher<Throwable>() {
85-
private final String message = "HTTP response '503: Service Unavailable' when "
86-
+ "communicating with http://localhost:" + BadServer.PORT + "/Mortimer";
87-
8887
@Override
8988
public void describeTo(Description description) {
9089
description
@@ -106,11 +105,11 @@ protected boolean matchesSafely(Throwable item) {
106105
@Test
107106
public void testNotFound() throws Exception {
108107
final Greeter greeter = getGreeter();
108+
final String message = "HTTP response '404: Not Found' when "
109+
+ "communicating with http://localhost:" + BadServer.PORT + "/Mortimer";
109110

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

115114
@Override
116115
public void describeTo(Description description) {

0 commit comments

Comments
 (0)