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:56:38 UTC

[camel] branch bindy-3.20.x created (now 91e5f4958e6)

This is an automated email from the ASF dual-hosted git repository.

acosentino pushed a change to branch bindy-3.20.x
in repository https://gitbox.apache.org/repos/asf/camel.git


      at 91e5f4958e6 Camel-Bindy: Use isEmpty instead of comparing with empty String

This branch includes the following new commits:

     new 91e5f4958e6 Camel-Bindy: Use isEmpty instead of comparing with empty String

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.



[camel] 01/01: Camel-Bindy: Use isEmpty instead of comparing with empty String

Posted by ac...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

acosentino pushed a commit to branch bindy-3.20.x
in repository https://gitbox.apache.org/repos/asf/camel.git

commit 91e5f4958e64f4d5ba139a6f9ba5315d2267859f
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 36d9a42a4a6..f2fc8ade4ed 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.");