PammyS / jsmpp

Automatically exported from code.google.com/p/jsmpp
Apache License 2.0
0 stars 0 forks source link

DefaultComposer.submitMultiResp() should check for null UnsuccessDelivery param #45

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Assume all the messages are delivered
2. From Server Simulator, on onAcceptSubmitMulti(), you return 
UnsuccessDelivery as null as param

like new SubmitMultiResult(messageId.getValue(), null);

You get null pointer exception

What is the expected output? What do you see instead?

Response should be sent back

Here is stacktrace
5345 [pool-3-thread-2] DEBUG org.jsmpp.session.AbstractSessionContext  - 
Activity notified
Exception in thread "pool-3-thread-2" java.lang.NullPointerException
5657 [pool-3-thread-2] DEBUG org.jsmpp.examples.SMPPServerSimulator  - 
Receiving submit_multi_sm {}, and return message id {}
    at 
org.jsmpp.util.DefaultComposer.submitMultiResp(DefaultComposer.java:556)
    at 
org.jsmpp.DefaultPDUSender.sendSubmitMultiResp(DefaultPDUSender.java:399)
5657 [pool-3-thread-2] DEBUG 
org.jsmpp.session.state.SMPPServerSessionBoundTX  - Sending response with 
message_id 6659a3a8 for request with sequence_number 2
    at 
org.jsmpp.SynchronizedPDUSender.sendSubmitMultiResp(SynchronizedPDUSender.j
ava:388)
    at 
org.jsmpp.session.SMPPServerSession$ResponseHandlerImpl.sendSubmitMultiResp
onse(SMPPServerSession.java:383)
    at 
org.jsmpp.session.state.SMPPServerSessionBoundTX.processSubmitMulti(SMPPSer
verSessionBoundTX.java:76)
    at 
org.jsmpp.session.PDUProcessServerTask.run(PDUProcessServerTask.java:75)
    at 
java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.j
ava:885)
    at 
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:
907)
    at java.lang.Thread.run(Thread.java:619)

Original issue reported on code.google.com by paliwala...@gmail.com on 10 Aug 2009 at 10:55