* OutNetMessage: Fix NPE when log level = INFO (ticket #676)

This commit is contained in:
zzz
2012-08-03 11:22:48 +00:00
parent 4d32eaa036
commit 2972e79f9e

View File

@ -325,7 +325,7 @@ public class OutNetMessage {
buf.append(" with onFailedReply job: ").append(_onFailedReply);
if (_onFailedSend != null)
buf.append(" with onFailedSend job: ").append(_onFailedSend);
if (_log.shouldLog(Log.INFO)) {
if (_timestamps != null && _timestampOrder != null && _log.shouldLog(Log.INFO)) {
buf.append(" {timestamps: \n");
renderTimestamps(buf);
buf.append("}");
@ -335,7 +335,8 @@ public class OutNetMessage {
}
/**
* Only useful if log level is INFO or DEBUG
* Only useful if log level is INFO or DEBUG;
* locked_initTimestamps() must have been called previously
*/
private void renderTimestamps(StringBuilder buf) {
synchronized (this) {