protected User safeGetSender ( MessageEnvelope envelope ) { if ( envelope != null && envelope . getSender ( ) != null && envelope . getSender ( ) . getId ( ) != null ) { return envelope . getSender ( ) ; } return new User ( ) ; }
Retrieves the sender from an envelope . It never returns null .