From 2b1456b46f6f01a61420aa32b0de39d7e3b72d4d Mon Sep 17 00:00:00 2001 From: Andriy Redko Date: Sat, 1 Mar 2025 21:30:44 -0500 Subject: [PATCH] Fix PMD violations --- .../cxf/systest/http/HTTPConduitIoExceptionsTest.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/systests/transports/src/test/java/org/apache/cxf/systest/http/HTTPConduitIoExceptionsTest.java b/systests/transports/src/test/java/org/apache/cxf/systest/http/HTTPConduitIoExceptionsTest.java index 9a7b7993b9e..451c0e08f29 100644 --- a/systests/transports/src/test/java/org/apache/cxf/systest/http/HTTPConduitIoExceptionsTest.java +++ b/systests/transports/src/test/java/org/apache/cxf/systest/http/HTTPConduitIoExceptionsTest.java @@ -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() { - 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 @@ -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() { - 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