lucene-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From r...@apache.org
Subject svn commit: r1521739 - in /lucene/dev/trunk: ./ solr/ solr/core/ solr/core/src/java/org/apache/solr/logging/log4j/Log4jWatcher.java
Date Wed, 11 Sep 2013 05:53:39 GMT
Author: ryan
Date: Wed Sep 11 05:53:39 2013
New Revision: 1521739

URL: http://svn.apache.org/r1521739
Log:
SOLR-3706: avoid NPE  (merge from 4x)

Modified:
    lucene/dev/trunk/   (props changed)
    lucene/dev/trunk/solr/   (props changed)
    lucene/dev/trunk/solr/core/   (props changed)
    lucene/dev/trunk/solr/core/src/java/org/apache/solr/logging/log4j/Log4jWatcher.java

Modified: lucene/dev/trunk/solr/core/src/java/org/apache/solr/logging/log4j/Log4jWatcher.java
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/solr/core/src/java/org/apache/solr/logging/log4j/Log4jWatcher.java?rev=1521739&r1=1521738&r2=1521739&view=diff
==============================================================================
--- lucene/dev/trunk/solr/core/src/java/org/apache/solr/logging/log4j/Log4jWatcher.java (original)
+++ lucene/dev/trunk/solr/core/src/java/org/apache/solr/logging/log4j/Log4jWatcher.java Wed
Sep 11 05:53:39 2013
@@ -152,7 +152,7 @@ public class Log4jWatcher extends LogWat
     doc.setField("time", new Date(event.getTimeStamp()));
     doc.setField("level", event.getLevel().toString());
     doc.setField("logger", event.getLogger().getName());
-    doc.setField("message", event.getMessage().toString());
+    doc.setField("message", event.getMessage() + ""); // avoid NPE when we have an event
with null message
     ThrowableInformation t = event.getThrowableInformation();
     if(t!=null) {
       doc.setField("trace", Throwables.getStackTraceAsString(t.getThrowable()));



Mime
View raw message