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

these fields can be replaced by local variables

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