ARTEMIS-1743 fix NPE in server log when Artemis trace logging is enabled

This commit is contained in:
Stanislav Knot 2018-03-13 12:19:01 +01:00 committed by Clebert Suconic
parent a00245dd06
commit 84a098a4f4
1 changed files with 4 additions and 1 deletions

View File

@ -644,8 +644,11 @@ public class CoreMessage extends RefCountMessage implements ICoreMessage {
@Override
public int getEncodeSize() {
if (buffer == null) {
return -1;
}
checkEncode();
return buffer == null ? -1 : buffer.writerIndex();
return buffer.writerIndex();
}
@Override