fix null pointer in test case

git-svn-id: https://svn.apache.org/repos/asf/activemq/trunk@558052 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Robert Davies 2007-07-20 17:03:39 +00:00
parent 2d5bb84a47
commit cfdc5e3de3
1 changed files with 9 additions and 7 deletions

View File

@ -1603,11 +1603,13 @@ public class ActiveMQConnection implements Connection, TopicConnection, QueueCon
}
@Override
public Response processProducerAck(ProducerAck pa) throws Exception {
ActiveMQMessageProducer producer = producers.get(pa.getProducerId());
if( producer!=null ) {
public Response processProducerAck(ProducerAck pa) throws Exception{
if(pa!=null&&pa.getProducerId()!=null){
ActiveMQMessageProducer producer=producers.get(pa.getProducerId());
if(producer!=null){
producer.onProducerAck(pa);
}
}
return null;
}