提交 c1cd6d99 编写于 作者: A Alexander Fedorov

#2556 PostgreDebugSessionWorker.sql should be final

Former-commit-id: 0ff51306
上级 53493b42
......@@ -70,8 +70,6 @@ public class PostgreDebugSession implements DBGSession<PostgreDebugSessionInfo,
private List<PostgreDebugBreakpoint> breakpoints = new ArrayList<PostgreDebugBreakpoint>(1);
private PostgreDebugSessionWorker worker;
private FutureTask<Void> task;
private Thread workerThread = null;
......@@ -131,7 +129,6 @@ public class PostgreDebugSession implements DBGSession<PostgreDebugSessionInfo,
this.sessionDebugInfo = sessionDebugInfo;
this.connection = connection;
this.title = sessionManagerInfo.application;
this.worker = new PostgreDebugSessionWorker(this.connection);
sessionId = listen();
}
......@@ -373,7 +370,7 @@ public class PostgreDebugSession implements DBGSession<PostgreDebugSessionInfo,
connection.setAutoCommit(false);
worker.execSQL(commandSQL);
PostgreDebugSessionWorker worker = new PostgreDebugSessionWorker(connection, commandSQL);
task = new FutureTask<Void>(worker);
......
......@@ -26,16 +26,12 @@ import java.util.concurrent.Callable;
public class PostgreDebugSessionWorker implements Callable<Void> {
private final Connection conn;
private String sql = "";
private final String sql;
public void execSQL(String sqlCommand)
{
this.sql = sqlCommand;
}
public PostgreDebugSessionWorker(Connection conn)
public PostgreDebugSessionWorker(Connection conn, String sqlCommand)
{
this.conn = conn;
this.sql = sqlCommand;
}
@Override
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册