1
0
Fork 0
mirror of https://github.com/vanitasvitae/Smack.git synced 2024-12-24 03:27:59 +01:00

Make ExceptionUtil.getStackTrace(Throwable) null safe

This commit is contained in:
Florian Schmaus 2019-07-04 15:47:46 +02:00
parent 01289e9682
commit 870e6c674a

View file

@ -22,6 +22,10 @@ import java.io.StringWriter;
public class ExceptionUtil {
public static String getStackTrace(Throwable throwable) {
if (throwable == null) {
return null;
}
StringWriter stringWriter = new StringWriter();
PrintWriter printWriter = new PrintWriter(stringWriter);