This is an automated email from the ASF dual-hosted git repository. reta pushed a commit to branch 4.1.x-fixes in repository https://gitbox.apache.org/repos/asf/cxf.git
commit 22662d5d062c7bd4a2e359d3684c0ffe7af4f27d Author: Andriy Redko <[email protected]> AuthorDate: Thu Dec 4 22:12:39 2025 -0500 Fix PMD violations (cherry picked from commit 48c3f5dcc9ce5e882f20994fc01859b7e931b93d) --- core/src/main/java/org/apache/cxf/helpers/ServiceUtils.java | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/core/src/main/java/org/apache/cxf/helpers/ServiceUtils.java b/core/src/main/java/org/apache/cxf/helpers/ServiceUtils.java index a39ee94d44..b79c462e91 100644 --- a/core/src/main/java/org/apache/cxf/helpers/ServiceUtils.java +++ b/core/src/main/java/org/apache/cxf/helpers/ServiceUtils.java @@ -47,13 +47,13 @@ public final class ServiceUtils { SchemaValidationType validationType = getSchemaValidationType(message); boolean isRequestor = MessageUtils.isRequestor(message); - if (SchemaValidationType.REQUEST.equals(validationType)) { + if (SchemaValidationType.REQUEST == validationType) { if (isRequestor) { validationType = SchemaValidationType.OUT; } else { validationType = SchemaValidationType.IN; } - } else if (SchemaValidationType.RESPONSE.equals(validationType)) { + } else if (SchemaValidationType.RESPONSE == validationType) { if (isRequestor) { validationType = SchemaValidationType.IN; } else { @@ -61,9 +61,9 @@ public final class ServiceUtils { } } - return validationType.equals(type) - || ((SchemaValidationType.IN.equals(type) || SchemaValidationType.OUT.equals(type)) - && SchemaValidationType.BOTH.equals(validationType)); + return validationType == type + || ((SchemaValidationType.IN == type || SchemaValidationType.OUT == type) + && SchemaValidationType.BOTH == validationType); } /** * A convenience method to check for schema validation config in the message context, and then in the service model.
