Description
The IrcEndpoint has a number of methods like createOnPrivmsgExchange, createOnNickExchange etc, where an instance of IrcMessage is created. When the constructor is called, it results in:
16:49:55,426 ERROR [stderr] (Thread-97) Exception in thread "Thread-97" java.lang.NullPointerException 16:49:55,427 ERROR [stderr] (Thread-97) at org.apache.camel.impl.MessageSupport.setBody(MessageSupport.java:122) 16:49:55,427 ERROR [stderr] (Thread-97) at org.apache.camel.component.irc.IrcMessage.<init>(IrcMessage.java:50) 16:49:55,427 ERROR [stderr] (Thread-97) at org.apache.camel.component.irc.IrcEndpoint.createOnPrivmsgExchange(IrcEndpoint.java:71) 16:49:55,427 ERROR [stderr] (Thread-97) at org.apache.camel.component.irc.IrcConsumer$FilteredIRCEventAdapter.onPrivmsg(IrcConsumer.java:203) 16:49:55,427 ERROR [stderr] (Thread-97) at org.schwering.irc.lib.IRCConnection.get(IRCConnection.java:430) 16:49:55,428 ERROR [stderr] (Thread-97) at org.schwering.irc.lib.IRCConnection.run(IRCConnection.java:373)
Seems there's now a dependency on the CamelContext in MessageSupport.setBody and the IrcMessage constructor calls setBody before the CamelContext has been provided to it (it's currently set after the constructor is called).