提交 c324777c authored 作者: noelgrandin's avatar noelgrandin

these fields can be replaced by local variables

上级 8303f563
...@@ -60,12 +60,6 @@ class WebSession { ...@@ -60,12 +60,6 @@ class WebSession {
private Connection conn; private Connection conn;
private DatabaseMetaData meta; private DatabaseMetaData meta;
private DbContents contents = new DbContents(); private DbContents contents = new DbContents();
private DbContextRule columnRule;
private DbContextRule newAliasRule;
private DbContextRule schemaRule;
private DbContextRule tableRule;
private DbContextRule aliasRule;
private DbContextRule columnAliasRule;
private Bnf bnf; private Bnf bnf;
private boolean shutdownServerOnDisconnect; private boolean shutdownServerOnDisconnect;
...@@ -120,12 +114,12 @@ class WebSession { ...@@ -120,12 +114,12 @@ class WebSession {
void loadBnf() { void loadBnf() {
try { try {
Bnf newBnf = Bnf.getInstance(null); Bnf newBnf = Bnf.getInstance(null);
columnRule = new DbContextRule(contents, DbContextRule.COLUMN); DbContextRule columnRule = new DbContextRule(contents, DbContextRule.COLUMN);
newAliasRule = new DbContextRule(contents, DbContextRule.NEW_TABLE_ALIAS); DbContextRule newAliasRule = new DbContextRule(contents, DbContextRule.NEW_TABLE_ALIAS);
aliasRule = new DbContextRule(contents, DbContextRule.TABLE_ALIAS); DbContextRule aliasRule = new DbContextRule(contents, DbContextRule.TABLE_ALIAS);
tableRule = new DbContextRule(contents, DbContextRule.TABLE); DbContextRule tableRule = new DbContextRule(contents, DbContextRule.TABLE);
schemaRule = new DbContextRule(contents, DbContextRule.SCHEMA); DbContextRule schemaRule = new DbContextRule(contents, DbContextRule.SCHEMA);
columnAliasRule = new DbContextRule(contents, DbContextRule.COLUMN_ALIAS); DbContextRule columnAliasRule = new DbContextRule(contents, DbContextRule.COLUMN_ALIAS);
newBnf.updateTopic("column_name", columnRule); newBnf.updateTopic("column_name", columnRule);
newBnf.updateTopic("new_table_alias", newAliasRule); newBnf.updateTopic("new_table_alias", newAliasRule);
newBnf.updateTopic("table_alias", aliasRule); newBnf.updateTopic("table_alias", aliasRule);
......
...@@ -33,8 +33,6 @@ public class TestShell extends TestBase { ...@@ -33,8 +33,6 @@ public class TestShell extends TestBase {
*/ */
InputStream toolIn; InputStream toolIn;
private PrintStream testOut;
private PipedInputStream testIn;
private LineNumberReader lineReader; private LineNumberReader lineReader;
/** /**
...@@ -69,11 +67,11 @@ public class TestShell extends TestBase { ...@@ -69,11 +67,11 @@ public class TestShell extends TestBase {
} }
private void test(final boolean commandLineArgs) throws IOException { private void test(final boolean commandLineArgs) throws IOException {
testIn = new PipedInputStream(); PipedInputStream testIn = new PipedInputStream();
PipedOutputStream out = new PipedOutputStream(testIn); PipedOutputStream out = new PipedOutputStream(testIn);
toolOut = new PrintStream(out, true); toolOut = new PrintStream(out, true);
out = new PipedOutputStream(); out = new PipedOutputStream();
testOut = new PrintStream(out, true); PrintStream testOut = new PrintStream(out, true);
toolIn = new PipedInputStream(out); toolIn = new PipedInputStream(out);
Task task = new Task() { Task task = new Task() {
public void call() throws Exception { public void call() throws Exception {
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论