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

orpiske 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 ef2ee59afce (chores) camel-irc: prevent NPE on lost connection
ef2ee59afce is described below

commit ef2ee59afceb3cc6e3f3cdbdc1b30a0f36d7f04d
Author: Otavio Rodolfo Piske <angusyo...@gmail.com>
AuthorDate: Tue Jan 10 12:45:06 2023 +0100

    (chores) camel-irc: prevent NPE on lost connection
---
 .../src/main/java/org/apache/camel/component/irc/IrcProducer.java       | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git 
a/components/camel-irc/src/main/java/org/apache/camel/component/irc/IrcProducer.java
 
b/components/camel-irc/src/main/java/org/apache/camel/component/irc/IrcProducer.java
index e96cc1e1c0d..2819bb50201 100644
--- 
a/components/camel-irc/src/main/java/org/apache/camel/component/irc/IrcProducer.java
+++ 
b/components/camel-irc/src/main/java/org/apache/camel/component/irc/IrcProducer.java
@@ -54,7 +54,7 @@ public class IrcProducer extends DefaultProducer {
             reconnect();
         }
         if (connection == null || !connection.isConnected()) {
-            throw new RuntimeCamelException("Lost connection to " + 
connection.getHost());
+            throw new RuntimeCamelException("Lost connection" + (connection == 
null ? "" : " to " + connection.getHost()));
         }
 
         if (msg != null) {

Reply via email to