You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@logging.apache.org by rp...@apache.org on 2016/03/22 17:24:54 UTC
[2/3] logging-log4j2 git commit: RingBufferLogEvent bugfix: do not
use setValues(null,
null....) to clear() the RingBufferLogEvent: Message is expected to be
non-null in setValues()
RingBufferLogEvent bugfix: do not use setValues(null, null....) to clear() the RingBufferLogEvent: Message is expected to be non-null in setValues()
Project: http://git-wip-us.apache.org/repos/asf/logging-log4j2/repo
Commit: http://git-wip-us.apache.org/repos/asf/logging-log4j2/commit/11ab37bc
Tree: http://git-wip-us.apache.org/repos/asf/logging-log4j2/tree/11ab37bc
Diff: http://git-wip-us.apache.org/repos/asf/logging-log4j2/diff/11ab37bc
Branch: refs/heads/LOG4J2-1278-gc-free-logger
Commit: 11ab37bcc2c070c5baae055969aabfc403fe4163
Parents: ff3c78b
Author: rpopma <rp...@apache.org>
Authored: Wed Mar 23 01:24:09 2016 +0900
Committer: rpopma <rp...@apache.org>
Committed: Wed Mar 23 01:24:09 2016 +0900
----------------------------------------------------------------------
.../log4j/core/async/RingBufferLogEvent.java | 26 +++++++++-----------
1 file changed, 11 insertions(+), 15 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/11ab37bc/log4j-core/src/main/java/org/apache/logging/log4j/core/async/RingBufferLogEvent.java
----------------------------------------------------------------------
diff --git a/log4j-core/src/main/java/org/apache/logging/log4j/core/async/RingBufferLogEvent.java b/log4j-core/src/main/java/org/apache/logging/log4j/core/async/RingBufferLogEvent.java
index d7a24c2..5ad280b 100644
--- a/log4j-core/src/main/java/org/apache/logging/log4j/core/async/RingBufferLogEvent.java
+++ b/log4j-core/src/main/java/org/apache/logging/log4j/core/async/RingBufferLogEvent.java
@@ -343,21 +343,17 @@ public class RingBufferLogEvent implements LogEvent {
* Release references held by ring buffer to allow objects to be garbage-collected.
*/
public void clear() {
- setValues(null, // asyncLogger
- null, // loggerName
- null, // marker
- null, // fqcn
- null, // level
- null, // data
- null, // t
- null, // map
- null, // contextStack
- 0, // threadName
- null, // location
- 0, // currentTimeMillis
- null,
- 0, 0 // nanoTime
- );
+ this.asyncLogger = null;
+ this.loggerName = null;
+ this.marker = null;
+ this.fqcn = null;
+ this.level = null;
+ this.message = null;
+ this.thrown = null;
+ this.thrownProxy = null;
+ this.contextMap = null;
+ this.contextStack = null;
+ this.location = null;
trimMessageText();
}