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

davsclaus 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 229daaf  CAMEL-16617: Fixed NPE during splitter complete due to 
scanner already closed.
229daaf is described below

commit 229daafaf4b7a354101338b056e68b247c705afa
Author: Claus Ibsen <claus.ib...@gmail.com>
AuthorDate: Sat May 15 12:41:47 2021 +0200

    CAMEL-16617: Fixed NPE during splitter complete due to scanner already 
closed.
---
 core/camel-util/src/main/java/org/apache/camel/util/Scanner.java | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/core/camel-util/src/main/java/org/apache/camel/util/Scanner.java 
b/core/camel-util/src/main/java/org/apache/camel/util/Scanner.java
index 531a3cb..46f762d 100644
--- a/core/camel-util/src/main/java/org/apache/camel/util/Scanner.java
+++ b/core/camel-util/src/main/java/org/apache/camel/util/Scanner.java
@@ -120,7 +120,9 @@ public final class Scanner implements Iterator<String>, 
Closeable {
 
     @Override
     public boolean hasNext() {
-        checkClosed();
+        if (closed) {
+            return false;
+        }
         saveState();
         while (!inputExhausted) {
             if (hasTokenInBuffer()) {

Reply via email to