mirror of https://github.com/apache/lucene.git
the string can be null, for example failed assertions getMessage(), dont throw NPE
git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1042359 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
995abebdec
commit
4e44804c38
|
@ -263,6 +263,8 @@ public class LuceneJUnitResultFormatter implements JUnitResultFormatter {
|
|||
}
|
||||
|
||||
public LuceneJUnitResultFormatter append(String s) {
|
||||
if (s == null)
|
||||
s = "(null)";
|
||||
try {
|
||||
sb.write(s.getBytes()); // intentionally use default charset, its a console.
|
||||
} catch (IOException e) {
|
||||
|
|
Loading…
Reference in New Issue