Details
-
Improvement
-
Status: Resolved
-
Major
-
Resolution: Fixed
-
None
-
None
Description
The newMsg may cause NPE
/** * In addition to the message, it also takes a value. */ public void rateLimitLog(String newMsg, String value) { long now = Time.currentElapsedTime(); if (newMsg.equals(msg)) { ++count; this.value = value; if (now - timestamp >= LOG_INTERVAL) { flush(); msg = newMsg; timestamp = now; this.value = value; } } else { flush(); msg = newMsg; this.value = value; timestamp = now; LOG.warn("Message:{} Value:{}", msg, value); } }
Attachments
Issue Links
- links to