提交 25d38fde authored 作者: Thomas Mueller's avatar Thomas Mueller

checkstyle

上级 d862db41
...@@ -884,10 +884,9 @@ public class Parser { ...@@ -884,10 +884,9 @@ public class Parser {
command.setQuery(parseSelect()); command.setQuery(parseSelect());
read(")"); read(")");
return command; return command;
} else {
Column[] columns = parseColumnList(table);
command.setColumns(columns);
} }
Column[] columns = parseColumnList(table);
command.setColumns(columns);
} }
if (readIf("DEFAULT")) { if (readIf("DEFAULT")) {
read("VALUES"); read("VALUES");
......
...@@ -127,10 +127,9 @@ public class JavaFunction extends Expression implements FunctionCall { ...@@ -127,10 +127,9 @@ public class JavaFunction extends Expression implements FunctionCall {
case ExpressionVisitor.DETERMINISTIC: case ExpressionVisitor.DETERMINISTIC:
if (!isDeterministic()) { if (!isDeterministic()) {
return false; return false;
} else {
// only if all parameters are deterministic as well
break;
} }
// only if all parameters are deterministic as well
break;
case ExpressionVisitor.GET_DEPENDENCIES: case ExpressionVisitor.GET_DEPENDENCIES:
visitor.addDependency(functionAlias); visitor.addDependency(functionAlias);
break; break;
......
...@@ -596,7 +596,7 @@ public class FullText { ...@@ -596,7 +596,7 @@ public class FullText {
} }
} }
private static void addWords(FullTextSettings setting, HashSet set, String text) { static void addWords(FullTextSettings setting, HashSet set, String text) {
StringTokenizer tokenizer = new StringTokenizer(text, " \t\n\r\f+\"*%&/()=?'!,.;:-_#@|^~`{}[]"); StringTokenizer tokenizer = new StringTokenizer(text, " \t\n\r\f+\"*%&/()=?'!,.;:-_#@|^~`{}[]");
while (tokenizer.hasMoreTokens()) { while (tokenizer.hasMoreTokens()) {
String word = tokenizer.nextToken(); String word = tokenizer.nextToken();
......
...@@ -49,10 +49,10 @@ import org.h2.util.StringUtils; ...@@ -49,10 +49,10 @@ import org.h2.util.StringUtils;
public class FullTextLucene extends FullText { public class FullTextLucene extends FullText {
//## Java 1.4 begin ## //## Java 1.4 begin ##
static final HashMap INDEX_MODIFIERS = new HashMap();
static final boolean STORE_DOCUMENT_TEXT_IN_INDEX = Boolean.getBoolean("h2.storeDocumentTextInIndex");
private static final String TRIGGER_PREFIX = "FTL_"; private static final String TRIGGER_PREFIX = "FTL_";
private static final String SCHEMA = "FTL"; private static final String SCHEMA = "FTL";
private static final boolean STORE_DOCUMENT_TEXT_IN_INDEX = Boolean.getBoolean("h2.storeDocumentTextInIndex");
private static final HashMap INDEX_MODIFIERS = new HashMap();
private static final String FIELD_DATA = "DATA"; private static final String FIELD_DATA = "DATA";
private static final String FIELD_COLUMN_PREFIX = "_"; private static final String FIELD_COLUMN_PREFIX = "_";
private static final String FIELD_QUERY = "QUERY"; private static final String FIELD_QUERY = "QUERY";
...@@ -201,7 +201,7 @@ public class FullTextLucene extends FullText { ...@@ -201,7 +201,7 @@ public class FullTextLucene extends FullText {
return search(conn, text, limit, offset, true); return search(conn, text, limit, offset, true);
} }
private static SQLException convertException(Exception e) { static SQLException convertException(Exception e) {
SQLException e2 = new SQLException("FULLTEXT", "Error while indexing document"); SQLException e2 = new SQLException("FULLTEXT", "Error while indexing document");
e2.initCause(e); e2.initCause(e);
return e2; return e2;
...@@ -221,7 +221,7 @@ public class FullTextLucene extends FullText { ...@@ -221,7 +221,7 @@ public class FullTextLucene extends FullText {
stat.execute(buff.toString()); stat.execute(buff.toString());
} }
private static IndexModifier getIndexModifier(Connection conn) throws SQLException { static IndexModifier getIndexModifier(Connection conn) throws SQLException {
String path = getIndexPath(conn); String path = getIndexPath(conn);
IndexModifier indexer; IndexModifier indexer;
synchronized (INDEX_MODIFIERS) { synchronized (INDEX_MODIFIERS) {
...@@ -240,7 +240,7 @@ public class FullTextLucene extends FullText { ...@@ -240,7 +240,7 @@ public class FullTextLucene extends FullText {
return indexer; return indexer;
} }
private static String getIndexPath(Connection conn) throws SQLException { static String getIndexPath(Connection conn) throws SQLException {
Statement stat = conn.createStatement(); Statement stat = conn.createStatement();
ResultSet rs = stat.executeQuery("CALL DATABASE_PATH()"); ResultSet rs = stat.executeQuery("CALL DATABASE_PATH()");
rs.next(); rs.next();
......
...@@ -155,10 +155,9 @@ public class BtreeNode extends BtreePage { ...@@ -155,10 +155,9 @@ public class BtreeNode extends BtreePage {
// root page: save as it (empty) // root page: save as it (empty)
index.updatePage(session, this); index.updatePage(session, this);
return first; return first;
} else {
// no more children - this page is empty as well
return oldRow;
} }
// no more children - this page is empty as well
return oldRow;
} }
if (at == 0) { if (at == 0) {
// the first child is empty - then the first row of this subtree // the first child is empty - then the first row of this subtree
......
...@@ -773,7 +773,7 @@ public class Recover extends Tool implements DataHandler { ...@@ -773,7 +773,7 @@ public class Recover extends Tool implements DataHandler {
break; break;
case Page.TYPE_LOG: case Page.TYPE_LOG:
writer.println("-- page " + page + ": log " + (last ? "(last)" : "")); writer.println("-- page " + page + ": log " + (last ? "(last)" : ""));
dumpPageLog(store, writer, s, last); dumpPageLog(writer, s, last);
break; break;
default: default:
writer.println("-- page " + page + ": ERROR unknown type " + type); writer.println("-- page " + page + ": ERROR unknown type " + type);
...@@ -926,7 +926,7 @@ public class Recover extends Tool implements DataHandler { ...@@ -926,7 +926,7 @@ public class Recover extends Tool implements DataHandler {
} }
private void dumpPageLog(FileStore store, PrintWriter writer, DataPage s, boolean last) { private void dumpPageLog(PrintWriter writer, DataPage s, boolean last) {
if (last) { if (last) {
int size = s.readInt(); int size = s.readInt();
writer.println("-- size:" + size); writer.println("-- size:" + size);
......
...@@ -20,7 +20,7 @@ public abstract class CacheObject { ...@@ -20,7 +20,7 @@ public abstract class CacheObject {
/** /**
* Compare cache objects by position. * Compare cache objects by position.
*/ */
private static class CacheComparator implements Comparator { static class CacheComparator implements Comparator {
public int compare(Object a, Object b) { public int compare(Object a, Object b) {
int pa = ((CacheObject) a).getPos(); int pa = ((CacheObject) a).getPos();
int pb = ((CacheObject) b).getPos(); int pb = ((CacheObject) b).getPos();
......
...@@ -626,6 +626,7 @@ public class TestFunctions extends TestBase implements AggregateFunction { ...@@ -626,6 +626,7 @@ public class TestFunctions extends TestBase implements AggregateFunction {
//## Java 1.5 end ## //## Java 1.5 end ##
public void add(Object value) throws SQLException { public void add(Object value) throws SQLException {
// ignore
} }
public Object getResult() throws SQLException { public Object getResult() throws SQLException {
...@@ -640,6 +641,7 @@ public class TestFunctions extends TestBase implements AggregateFunction { ...@@ -640,6 +641,7 @@ public class TestFunctions extends TestBase implements AggregateFunction {
} }
public void init(Connection conn) throws SQLException { public void init(Connection conn) throws SQLException {
// ignore
} }
} }
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论