提交 dd9311b8 authored 作者: Noel Grandin's avatar Noel Grandin

make Session::toString() more robust again null

for debugging purposes
上级 5054b861
......@@ -33,8 +33,8 @@ import org.h2.message.TraceSystem;
import org.h2.mvstore.MVMap;
import org.h2.mvstore.db.MVTable;
import org.h2.mvstore.db.MVTableEngine;
import org.h2.mvstore.tx.TransactionStore;
import org.h2.mvstore.tx.Transaction;
import org.h2.mvstore.tx.TransactionStore;
import org.h2.mvstore.tx.VersionedValue;
import org.h2.result.ResultInterface;
import org.h2.result.Row;
......@@ -1419,7 +1419,7 @@ public class Session extends SessionWithState implements TransactionStore.Rollba
@Override
public String toString() {
return "#" + serialId + " (user: " + user.getName() + ")";
return "#" + serialId + " (user: " + (user == null ? "<null>" : user.getName()) + ")";
}
public void setUndoLogEnabled(boolean b) {
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论