Implemented Changes as requested by @CyB3RC0nN0R
This commit is contained in:
parent
0a0245da0e
commit
70271482bd
@ -20,13 +20,6 @@ import envoy.server.net.ObjectWriteProxy;
|
||||
*/
|
||||
public class MessageStatusChangeProcessor implements ObjectProcessor<MessageStatusChangeEvent> {
|
||||
|
||||
/**
|
||||
* Creates an instance of @link{MessageStatusChangeProcessor}.
|
||||
*
|
||||
* @since Envoy Server Standalone v0.1-alpha
|
||||
*/
|
||||
public MessageStatusChangeProcessor() {}
|
||||
|
||||
@Override
|
||||
public Class<MessageStatusChangeEvent> getInputClass() { return MessageStatusChangeEvent.class; }
|
||||
|
||||
@ -34,7 +27,7 @@ public class MessageStatusChangeProcessor implements ObjectProcessor<MessageStat
|
||||
public void process(MessageStatusChangeEvent input, long socketId, ObjectWriteProxy writeProxy) throws IOException {
|
||||
try {
|
||||
// any other status than read is not supposed to be sent to the server
|
||||
if (!(input.get() == MessageStatus.READ)) throw new EnvoyException("Message" + input.getId() + "has an invalid status");
|
||||
if (input.get() != MessageStatus.READ) throw new EnvoyException("Message" + input.getId() + "has an invalid status");
|
||||
} catch (EnvoyException e) {
|
||||
e.printStackTrace();
|
||||
return;
|
||||
|
Reference in New Issue
Block a user