提交 d4d00600 authored 作者: Thomas Mueller's avatar Thomas Mueller

Removed unused code and reduce visibility where possible.

上级 bdd93201
...@@ -13,7 +13,7 @@ import org.h2.util.StringUtils; ...@@ -13,7 +13,7 @@ import org.h2.util.StringUtils;
/** /**
* A single terminal rule in a BNF object. * A single terminal rule in a BNF object.
*/ */
public class RuleElement implements Rule { class RuleElement implements Rule {
private boolean keyword; private boolean keyword;
private String name; private String name;
......
...@@ -13,7 +13,7 @@ import org.h2.util.New; ...@@ -13,7 +13,7 @@ import org.h2.util.New;
/** /**
* Represents a sequence of BNF rules, or a list of alternative rules. * Represents a sequence of BNF rules, or a list of alternative rules.
*/ */
public class RuleList implements Rule { class RuleList implements Rule {
private boolean or; private boolean or;
private ArrayList<Rule> list; private ArrayList<Rule> list;
......
...@@ -11,7 +11,7 @@ import java.util.HashMap; ...@@ -11,7 +11,7 @@ import java.util.HashMap;
/** /**
* Represents an optional BNF rule. * Represents an optional BNF rule.
*/ */
public class RuleOptional implements Rule { class RuleOptional implements Rule {
private Rule rule; private Rule rule;
private boolean mapSet; private boolean mapSet;
......
...@@ -11,7 +11,7 @@ import java.util.HashMap; ...@@ -11,7 +11,7 @@ import java.util.HashMap;
/** /**
* Represents a loop in a BNF object. * Represents a loop in a BNF object.
*/ */
public class RuleRepeat implements Rule { class RuleRepeat implements Rule {
private final Rule rule; private final Rule rule;
private final boolean comma; private final boolean comma;
......
...@@ -50,27 +50,27 @@ public class FullText { ...@@ -50,27 +50,27 @@ public class FullText {
/** /**
* A column name of the result set returned by the searchData method. * A column name of the result set returned by the searchData method.
*/ */
protected static final String FIELD_SCHEMA = "SCHEMA"; private static final String FIELD_SCHEMA = "SCHEMA";
/** /**
* A column name of the result set returned by the searchData method. * A column name of the result set returned by the searchData method.
*/ */
protected static final String FIELD_TABLE = "TABLE"; private static final String FIELD_TABLE = "TABLE";
/** /**
* A column name of the result set returned by the searchData method. * A column name of the result set returned by the searchData method.
*/ */
protected static final String FIELD_COLUMNS = "COLUMNS"; private static final String FIELD_COLUMNS = "COLUMNS";
/** /**
* A column name of the result set returned by the searchData method. * A column name of the result set returned by the searchData method.
*/ */
protected static final String FIELD_KEYS = "KEYS"; private static final String FIELD_KEYS = "KEYS";
/** /**
* The hit score. * The hit score.
*/ */
protected static final String FIELD_SCORE = "SCORE"; private static final String FIELD_SCORE = "SCORE";
private static final String TRIGGER_PREFIX = "FT_"; private static final String TRIGGER_PREFIX = "FT_";
private static final String SCHEMA = "FT"; private static final String SCHEMA = "FT";
......
...@@ -1401,7 +1401,8 @@ public class JdbcConnection extends TraceObject implements Connection { ...@@ -1401,7 +1401,8 @@ public class JdbcConnection extends TraceObject implements Connection {
return; return;
} }
if (session != null && openStackTrace != null) { if (session != null && openStackTrace != null) {
trace.error(openStackTrace, "connection not closed"); Exception ex = DbException.get(ErrorCode.TRACE_CONNECTION_NOT_CLOSED);
trace.error(openStackTrace, ex.getMessage());
try { try {
close(); close();
} catch (SQLException e) { } catch (SQLException e) {
......
...@@ -64,11 +64,6 @@ public class Trace { ...@@ -64,11 +64,6 @@ public class Trace {
*/ */
public static final String SCHEMA = "schema"; public static final String SCHEMA = "schema";
/**
* The trace module name for sessions.
*/
public static final String SESSION = "session";
/** /**
* The trace module name for sequences. * The trace module name for sequences.
*/ */
......
...@@ -168,7 +168,7 @@ public class Profiler implements Runnable { ...@@ -168,7 +168,7 @@ public class Profiler implements Runnable {
} }
} }
private boolean startsWithAny(String s, String[] prefixes) { private static boolean startsWithAny(String s, String[] prefixes) {
for (String p : prefixes) { for (String p : prefixes) {
if (p.length() > 0 && s.startsWith(p)) { if (p.length() > 0 && s.startsWith(p)) {
return true; return true;
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论