Fix NullPointerException in SimpleLog#write(Object) on null input
This commit is contained in:
@@ -47,6 +47,7 @@ The <action> type attribute can be add,update,fix,remove.
|
|||||||
<!-- FIX -->
|
<!-- FIX -->
|
||||||
<action dev="ggregory" type="fix" due-to="Gary Gregory">Fix PMD UnnecessaryFullyQualifiedName in SimpleLog.</action>
|
<action dev="ggregory" type="fix" due-to="Gary Gregory">Fix PMD UnnecessaryFullyQualifiedName in SimpleLog.</action>
|
||||||
<action dev="ggregory" type="fix" issue="LOGGING-193" due-to="Philippe Marschall">Update Log4j 2 Imports #268.</action>
|
<action dev="ggregory" type="fix" issue="LOGGING-193" due-to="Philippe Marschall">Update Log4j 2 Imports #268.</action>
|
||||||
|
<action dev="ggregory" type="fix" due-to="Gary Gregory">Fix NullPointerException in SimpleLog#write(Object) on null input.</action>
|
||||||
<!-- ADD -->
|
<!-- ADD -->
|
||||||
<!-- UPDATE -->
|
<!-- UPDATE -->
|
||||||
<action dev="ggregory" type="update" due-to="Dependabot">Bump org.apache.commons:commons-parent from 69 to 71 #267.</action>
|
<action dev="ggregory" type="update" due-to="Dependabot">Bump org.apache.commons:commons-parent from 69 to 71 #267.</action>
|
||||||
|
|||||||
@@ -27,6 +27,7 @@ import java.security.PrivilegedAction;
|
|||||||
import java.text.DateFormat;
|
import java.text.DateFormat;
|
||||||
import java.text.SimpleDateFormat;
|
import java.text.SimpleDateFormat;
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
|
import java.util.Objects;
|
||||||
import java.util.Properties;
|
import java.util.Properties;
|
||||||
|
|
||||||
import org.apache.commons.logging.Log;
|
import org.apache.commons.logging.Log;
|
||||||
@@ -640,7 +641,7 @@ public class SimpleLog implements Log, Serializable {
|
|||||||
* text to be logged
|
* text to be logged
|
||||||
*/
|
*/
|
||||||
private void write(final Object buffer) {
|
private void write(final Object buffer) {
|
||||||
System.err.println(buffer.toString());
|
System.err.println(Objects.toString(buffer));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
Reference in New Issue
Block a user