You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@camel.apache.org by MeBigFatGuy <db...@apache.org> on 2008/06/10 03:14:13 UTC
Question about QuartzEndpoint.java
<code>
@Override
public QuartzExchange createExchange(ExchangePattern pattern) {
return new QuartzExchange(getCamelContext(), pattern, null);
}
</code>
<code>
public QuartzExchange(CamelContext context, ExchangePattern pattern,
JobExecutionContext jobExecutionContext) {
super(context, pattern);
setIn(new QuartzMessage(this, jobExecutionContext));
}
</code>
<code>
public QuartzMessage(QuartzExchange exchange, JobExecutionContext
jobExecutionContext) {
this.jobExecutionContext = jobExecutionContext;
setExchange(exchange);
setBody(jobExecutionContext.getJobDetail());
}
</code>
looks to me that null in the first code block, gets passed down in the
QuartzMessage ctor, and is dereferenced there. Seems like it always creates
NPEs, to me.
--
View this message in context: http://www.nabble.com/Question-about-QuartzEndpoint.java-tp17745769s22882p17745769.html
Sent from the Camel - Development mailing list archive at Nabble.com.
Re: Question about QuartzEndpoint.java
Posted by James Strachan <ja...@gmail.com>.
2008/6/10 MeBigFatGuy <db...@apache.org>:
>
> <code>
> @Override
> public QuartzExchange createExchange(ExchangePattern pattern) {
> return new QuartzExchange(getCamelContext(), pattern, null);
> }
> </code>
> <code>
> public QuartzExchange(CamelContext context, ExchangePattern pattern,
> JobExecutionContext jobExecutionContext) {
> super(context, pattern);
> setIn(new QuartzMessage(this, jobExecutionContext));
> }
> </code>
> <code>
> public QuartzMessage(QuartzExchange exchange, JobExecutionContext
> jobExecutionContext) {
> this.jobExecutionContext = jobExecutionContext;
> setExchange(exchange);
> setBody(jobExecutionContext.getJobDetail());
> }
> </code>
>
> looks to me that null in the first code block, gets passed down in the
> QuartzMessage ctor, and is dereferenced there. Seems like it always creates
> NPEs, to me.
Great catch! Patch applied with thanks
--
James
-------
http://macstrac.blogspot.com/
Open Source Integration
http://open.iona.com