提交 4980f2e3 authored 作者: Thomas Mueller's avatar Thomas Mueller

Make FindBugs happy

上级 46943a3d
...@@ -76,11 +76,13 @@ implements ObjectFactory ...@@ -76,11 +76,13 @@ implements ObjectFactory
//## Java 1.4 end ## //## Java 1.4 end ##
private TraceSystem getTraceSystem() { private TraceSystem getTraceSystem() {
if (cachedTraceSystem == null) { synchronized (JdbcDataSourceFactory.class) {
cachedTraceSystem = new TraceSystem(SysProperties.CLIENT_TRACE_DIRECTORY + "h2datasource" + Constants.SUFFIX_TRACE_FILE, false); if (cachedTraceSystem == null) {
cachedTraceSystem.setLevelFile(SysProperties.DATASOURCE_TRACE_LEVEL); cachedTraceSystem = new TraceSystem(SysProperties.CLIENT_TRACE_DIRECTORY + "h2datasource" + Constants.SUFFIX_TRACE_FILE, false);
cachedTraceSystem.setLevelFile(SysProperties.DATASOURCE_TRACE_LEVEL);
}
return cachedTraceSystem;
} }
return cachedTraceSystem;
} }
Trace getTrace() { Trace getTrace() {
......
...@@ -506,6 +506,9 @@ implements XAConnection, XAResource ...@@ -506,6 +506,9 @@ implements XAConnection, XAResource
} }
protected void finalize() { protected void finalize() {
// don't call super.finalize because
// this should print its own stack trace,
// and would close the connection
if (!SysProperties.runFinalize) { if (!SysProperties.runFinalize) {
return; return;
} }
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论