提交 189775e1 authored 作者: Thomas Mueller's avatar Thomas Mueller

Checkstyle.

上级 4bd2e81a
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE module PUBLIC "-//Puppy Crawl//DTD Check Configuration 1.3//EN" "http://www.puppycrawl.com/dtds/configuration_1_3.dtd">
<!--
This configuration file was written by the eclipse-cs plugin configuration editor
-->
......@@ -6,7 +8,6 @@
Checkstyle-Configuration: MyCheckstyle
Description: none
-->
<!DOCTYPE module PUBLIC "-//Puppy Crawl//DTD Check Configuration 1.2//EN" "http://www.puppycrawl.com/dtds/configuration_1_2.dtd">
<module name="Checker">
<property name="severity" value="warning"/>
<module name="TreeWalker">
......@@ -31,10 +32,11 @@
</module>
<module name="NoWhitespaceBefore"/>
<module name="OperatorWrap">
<property name="tokens" value="BAND,BOR,BSR,BXOR,COLON,DIV,EQUAL,GE,GT,LAND,LE,LITERAL_INSTANCEOF,LOR,LT,MINUS,MOD,NOT_EQUAL,SL,SR,STAR"/>
<property name="severity" value="ignore"/>
<property name="tokens" value="BAND,BOR,BSR,BXOR,COLON,DIV,EQUAL,GE,GT,LAND,LE,LITERAL_INSTANCEOF,LT,MINUS,MOD,NOT_EQUAL,SL,SR,STAR"/>
<metadata name="net.sf.eclipsecs.core.lastEnabledSeverity" value="inherit"/>
</module>
<module name="ParenPad"/>
<module name="TabCharacter"/>
<module name="WhitespaceAfter"/>
<module name="WhitespaceAround">
<property name="tokens" value="ASSIGN,BAND,BAND_ASSIGN,BOR,BOR_ASSIGN,BSR,BSR_ASSIGN,BXOR,BXOR_ASSIGN,DIV_ASSIGN,EQUAL,GE,GT,LAND,LE,LITERAL_ASSERT,LITERAL_CATCH,LITERAL_DO,LITERAL_ELSE,LITERAL_FINALLY,LITERAL_FOR,LITERAL_IF,LITERAL_RETURN,LITERAL_SYNCHRONIZED,LITERAL_TRY,LITERAL_WHILE,LOR,LT,MINUS,MINUS_ASSIGN,MOD,MOD_ASSIGN,NOT_EQUAL,PLUS_ASSIGN,SL,SLIST,SL_ASSIGN,SR,SR_ASSIGN,STAR,STAR_ASSIGN,LITERAL_ASSERT,TYPE_EXTENSION_AND,WILDCARD_TYPE"/>
......@@ -62,11 +64,11 @@
<module name="ArrayTypeStyle"/>
<module name="GenericIllegalRegexp">
<property name="severity" value="ignore"/>
<property name="format" value="\s+$"/>
<property name="message" value="Line has trailing spaces."/>
<metadata name="net.sf.eclipsecs.core.lastEnabledSeverity" value="inherit"/>
</module>
<module name="TodoComment">
<property name="severity" value="ignore"/>
<metadata name="net.sf.eclipsecs.core.lastEnabledSeverity" value="inherit"/>
</module>
<module name="UpperEll"/>
<module name="JavadocType"/>
......@@ -80,12 +82,18 @@
<module name="SuperClone"/>
<module name="UnnecessaryParentheses"/>
<module name="TrailingComment"/>
<module name="PackageHtml">
<property name="severity" value="ignore"/>
<metadata name="net.sf.eclipsecs.core.lastEnabledSeverity" value="inherit"/>
</module>
<module name="NewlineAtEndOfFile">
</module>
<module name="FileTabCharacter">
<property name="severity" value="ignore"/>
<metadata name="net.sf.eclipsecs.core.lastEnabledSeverity" value="inherit"/>
</module>
<module name="Translation"/>
<module name="PackageHtml">
<module name="NewlineAtEndOfFile">
<property name="severity" value="ignore"/>
<metadata name="net.sf.eclipsecs.core.lastEnabledSeverity" value="inherit"/>
</module>
<module name="Translation"/>
</module>
......@@ -28,8 +28,8 @@ public class AlterSchemaRename extends DefineCommand {
super(session);
}
public void setOldSchema(Schema Schema) {
oldSchema = Schema;
public void setOldSchema(Schema schema) {
oldSchema = schema;
}
public void setNewName(String name) {
......
......@@ -167,9 +167,11 @@ public class CreateView extends SchemaCommand {
}
}
// Class that holds a snapshot of dependent view information.
// We can't just work with TableViews directly because they become invalid
// when we drop the parent view.
/**
* Class that holds a snapshot of dependent view information. We can't just
* work with TableViews directly because they become invalid when we drop
* the parent view.
*/
private class DependentView {
String viewName;
String createSql;
......
......@@ -37,7 +37,7 @@ public class DbUpgrade {
* @param info The connection Properties
* @throws SQLException
*/
public synchronized static void upgrade(String url, Properties info) throws SQLException {
public static synchronized void upgrade(String url, Properties info) throws SQLException {
if (nonPageStoreToCurrentEnabled) {
upgradeFromNonPageStore(url, info);
}
......
......@@ -23,8 +23,8 @@ import org.h2.util.Utils;
*/
public class DbUpgradeNonPageStoreToCurrent {
private static boolean scriptInTmpDir = false;
private static boolean deleteOldDb = false;
private static boolean scriptInTmpDir;
private static boolean deleteOldDb;
private String url;
private Properties info;
......
......@@ -15,7 +15,6 @@ import java.io.ObjectOutputStream;
import java.lang.reflect.Constructor;
import java.lang.reflect.Method;
import java.lang.reflect.Modifier;
import java.sql.SQLException;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.HashSet;
......@@ -625,7 +624,7 @@ public class Utils {
private static int match(Class<?>[] params, Object[] values) {
if (params.length == values.length) {
int points = 1;
for (int i=0; i<params.length; i++) {
for (int i = 0; i < params.length; i++) {
Class<?> pc = getNonPrimitiveClass(params[i]);
Class<?> vc = values[i].getClass();
if (pc == vc) {
......
......@@ -52,12 +52,12 @@ public class TestMultiDimension extends TestBase {
assertEquals(5, m.interleave(3, 0));
assertEquals(5, m.interleave(new int[]{3, 0}));
assertEquals(10, m.interleave(0, 3));
assertEquals(10, m.interleave(new int[]{0, 3}));
long v = ((long) Integer.MAX_VALUE | ((long) Integer.MAX_VALUE << 31L));
assertEquals(10, m.interleave(new int[] { 0, 3 }));
long v = (long) Integer.MAX_VALUE | ((long) Integer.MAX_VALUE << 31L);
assertEquals(v, m.interleave(Integer.MAX_VALUE, Integer.MAX_VALUE));
assertEquals(v, m.interleave(new int[] {Integer.MAX_VALUE, Integer.MAX_VALUE }));
assertEquals(v, m.interleave(new int[] { Integer.MAX_VALUE, Integer.MAX_VALUE }));
Random random = new Random(1);
for (int i=0; i<1000; i++) {
for (int i = 0; i < 1000; i++) {
int x = random.nextInt(Integer.MAX_VALUE), y = random.nextInt(Integer.MAX_VALUE);
v = m.interleave(new int[] {x, y});
long v2 = m.interleave(x, y);
......
......@@ -104,7 +104,7 @@ public class TestNestedJoins extends TestBase {
}
}
Random random = new Random(1);
for (int i=0; i<10000; i++) {
for (int i = 0; i < 10000; i++) {
StringBuilder buff = new StringBuilder();
int t = 1 + random.nextInt(9);
buff.append("select ");
......@@ -223,7 +223,7 @@ public class TestNestedJoins extends TestBase {
ArrayList<String> list = New.arrayList();
while (rs.next()) {
StringBuilder buff = new StringBuilder();
for (int i=0; i<rs.getMetaData().getColumnCount(); i++) {
for (int i = 0; i < rs.getMetaData().getColumnCount(); i++) {
if (i > 0) {
buff.append(" ");
}
......
......@@ -38,7 +38,7 @@ public class TestUndoLogLarge {
PreparedStatement prep = conn.prepareStatement(
"insert into test(name) values(space(1024*1024))");
long time = System.currentTimeMillis();
for (int i=0; i<2500; i++) {
for (int i = 0; i < 2500; i++) {
prep.execute();
long now = System.currentTimeMillis();
if (now > time + 5000) {
......
......@@ -20,7 +20,7 @@ public class UpgradeCreator {
*
* @param args the command line parameters
*/
private static String[] TEXT_FILE_EXTENSIONS = { ".java", ".xml", ".bat", ".sh", ".txt", ".html", ".csv" };
private static final String[] TEXT_FILE_EXTENSIONS = { ".java", ".xml", ".bat", ".sh", ".txt", ".html", ".csv" };
/**
* This method is called when executing this application from the command
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论