Skip to content

NullPointerException at transferDone() in DecisionEngineRouter.java #9

@oleotiger

Description

@oleotiger

In DecisionEngineRouter.java ,
Message transferred = this.getMessage(con.getMessage().getId()); may get transferred=null as con.getMessage() will return a message which is not in messages in this router already. getMessage() will return null on this condition.

This may occur when eg. M25 is transferred to N12 while the destination of M25 is N16 and N16 has received the message. Tuple <M25,N1>, <M25,N16>, <M25, N2> are added to outgoingMessages. In startTransfer() when test <M25,N16> , M25 should be deleted on N12. But tuple <M25,N2> is still in outgoingMessages and startTransfer() will return rcv_ok.

What's more, when a message is delete for ttl but it's still on transferring, what will happen? I think the transmission should be aborted but I didn't find where the program handle this situation

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions