You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cxf.apache.org by re...@apache.org on 2025/12/05 21:39:12 UTC
(cxf) 11/13: Fix PMD violations
This is an automated email from the ASF dual-hosted git repository.
reta pushed a commit to branch 3.6.x-fixes
in repository https://gitbox.apache.org/repos/asf/cxf.git
commit b212aae85c4770739a4d4906bfd647647ecbca1a
Author: Andriy Redko <dr...@gmail.com>
AuthorDate: Thu Dec 4 22:12:39 2025 -0500
Fix PMD violations
(cherry picked from commit 48c3f5dcc9ce5e882f20994fc01859b7e931b93d)
(cherry picked from commit 22662d5d062c7bd4a2e359d3684c0ffe7af4f27d)
(cherry picked from commit a6c8be89d7576e39e1168bf8ac821c5e5a6e449d)
---
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.