You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by zr...@apache.org on 2018/08/21 13:48:46 UTC

[camel] branch master updated: CAMEL-12745: NullPointerException in APT IOHelper

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

zregvart pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/camel.git


The following commit(s) were added to refs/heads/master by this push:
     new e9a0ac3  CAMEL-12745: NullPointerException in APT IOHelper
e9a0ac3 is described below

commit e9a0ac368fe59990a6b46cc476c5fefddb023aea
Author: Zoran Regvart <zr...@apache.org>
AuthorDate: Tue Aug 21 15:48:43 2018 +0200

    CAMEL-12745: NullPointerException in APT IOHelper
---
 .../apt/src/main/java/org/apache/camel/tools/apt/helper/IOHelper.java | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/tooling/apt/src/main/java/org/apache/camel/tools/apt/helper/IOHelper.java b/tooling/apt/src/main/java/org/apache/camel/tools/apt/helper/IOHelper.java
index 32c1518..8167a4a 100644
--- a/tooling/apt/src/main/java/org/apache/camel/tools/apt/helper/IOHelper.java
+++ b/tooling/apt/src/main/java/org/apache/camel/tools/apt/helper/IOHelper.java
@@ -70,7 +70,9 @@ public final class IOHelper {
     public static void close(Closeable... closeables) {
         for (Closeable closeable : closeables) {
             try {
-                closeable.close();
+                if (closeable != null) {
+                    closeable.close();
+                }
             } catch (IOException e) {
                 // ignore
             }