camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "michal.warecki" <michal.ware...@gmail.com>
Subject Re: Connection pooling with camel-amqp
Date Wed, 08 Aug 2012 10:00:21 GMT
Hmm, I don't know... In class AMQDestination there is method equals, and in
case _exchangeClass or _exchangeName are null there is NPE thrown.

Maybe try to replace lines:

if (!_exchangeClass.equals(that._exchangeClass))
{
    return false;

}

if (!_exchangeName.equals(that._exchangeName))
{
    return false;

}

with this:

if(_exchangeClass == null && that._exchangeClass != null)
{
	return false;
}

if(_exchangeClass != null && that._exchangeClass == null)
{
	return false;
}

if(_exchangeClass != null && that._exchangeClass != null) {
	if (!_exchangeClass.equals(that._exchangeClass))
        {
            return false;
        }	
}

if(_exchangeName == null && that._exchangeName != null)
{
	return false;
}

if(_exchangeName != null && that._exchangeName == null)
{
	return false;
}

if(_exchangeName != null && that._exchangeName != null) {
	if (!_exchangeName.equals(that._exchangeName))
        {

            return false;
        }	
}

I don't know the details of AMQDestination so I don't know if this is
correct code...



--
View this message in context: http://camel.465427.n5.nabble.com/Connection-pooling-with-camel-amqp-tp5716936p5716977.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Mime
View raw message