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 08:16:39 UTC

[camel] branch main 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 main
in repository https://gitbox.apache.org/repos/asf/camel.git


The following commit(s) were added to refs/heads/main by this push:
     new 4b5bf1b8e3b Camel-Bindy: Use isEmpty instead of comparing with empty String
4b5bf1b8e3b is described below

commit 4b5bf1b8e3b61a5465240805cd338c81e4b6a969
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 9bc2b8b505d..b72a493322b 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.");