You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by ac...@apache.org on 2023/06/28 09:16:08 UTC
[camel] branch camel-3.x updated: Camel-Bindy: Use isEmpty instead of comparing with empty String
This is an automated email from the ASF dual-hosted git repository.
acosentino pushed a commit to branch camel-3.x
in repository https://gitbox.apache.org/repos/asf/camel.git
The following commit(s) were added to refs/heads/camel-3.x by this push:
new 341860d5c18 Camel-Bindy: Use isEmpty instead of comparing with empty String
341860d5c18 is described below
commit 341860d5c18682686fe533ea6308c56adef06aac
Author: Andrea Cosentino <an...@gmail.com>
AuthorDate: Wed Jun 28 10:00:52 2023 +0200
Camel-Bindy: Use isEmpty instead of comparing with empty String
Signed-off-by: Andrea Cosentino <an...@gmail.com>
---
.../java/org/apache/camel/dataformat/bindy/BindyFixedLengthFactory.java | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/components/camel-bindy/src/main/java/org/apache/camel/dataformat/bindy/BindyFixedLengthFactory.java b/components/camel-bindy/src/main/java/org/apache/camel/dataformat/bindy/BindyFixedLengthFactory.java
index 6f0cff771e9..3c299eda3f5 100644
--- a/components/camel-bindy/src/main/java/org/apache/camel/dataformat/bindy/BindyFixedLengthFactory.java
+++ b/components/camel-bindy/src/main/java/org/apache/camel/dataformat/bindy/BindyFixedLengthFactory.java
@@ -467,7 +467,7 @@ public class BindyFixedLengthFactory extends BindyAbstractFactory implements Bin
fieldLength = Integer.parseInt(resultVals.get(0));
}
- if (fieldLength <= 0 && datafield.delimiter().equals("") && datafield.lengthPos() == 0) {
+ if (fieldLength <= 0 && datafield.delimiter().isEmpty() && datafield.lengthPos() == 0) {
throw new IllegalArgumentException(
"Either a delimiter value or length for the field: "
+ field.getName() + " is mandatory.");