提交 6216db17 authored 作者: Thomas Mueller's avatar Thomas Mueller

Cleanup:

- Fix missing or incorrectly formatted license headers
- Line comments are lowercase except for complete sentences
- Remove trailing whitespace (the IDE should fix this)
上级 8a7312b8
...@@ -55,14 +55,14 @@ public class AnnotationsTest extends TestBase { ...@@ -55,14 +55,14 @@ public class AnnotationsTest extends TestBase {
private void testIndexCreation() throws SQLException { private void testIndexCreation() throws SQLException {
// test indexes are created, and columns are in the right order // test indexes are created, and columns are in the right order
DatabaseMetaData meta = db.getConnection().getMetaData(); DatabaseMetaData meta = db.getConnection().getMetaData();
ResultSet rs = meta.getIndexInfo(null, "PUBLIC", "ANNOTATEDPRODUCT", false, true); ResultSet rs = meta.getIndexInfo(null, "PUBLIC", "ANNOTATED" + "PRODUCT", false, true);
assertTrue(rs.next()); assertTrue(rs.next());
assertStartsWith(rs.getString("INDEX_NAME"), "PRIMARY_KEY"); assertStartsWith(rs.getString("INDEX_NAME"), "PRIMARY_KEY");
assertTrue(rs.next()); assertTrue(rs.next());
assertStartsWith(rs.getString("INDEX_NAME"), "ANNOTATEDPRODUCT_"); assertStartsWith(rs.getString("INDEX_NAME"), "ANNOTATED" + "PRODUCT_");
assertStartsWith(rs.getString("COLUMN_NAME"), "NAME"); assertStartsWith(rs.getString("COLUMN_NAME"), "NAME");
assertTrue(rs.next()); assertTrue(rs.next());
assertStartsWith(rs.getString("INDEX_NAME"), "ANNOTATEDPRODUCT_"); assertStartsWith(rs.getString("INDEX_NAME"), "ANNOTATED" + "PRODUCT_");
assertStartsWith(rs.getString("COLUMN_NAME"), "CAT"); assertStartsWith(rs.getString("COLUMN_NAME"), "CAT");
assertFalse(rs.next()); assertFalse(rs.next());
} }
......
...@@ -103,7 +103,7 @@ public class ModelsTest extends TestBase { ...@@ -103,7 +103,7 @@ public class ModelsTest extends TestBase {
private void testDatabaseUpgrade() { private void testDatabaseUpgrade() {
Db db = Db.open("jdbc:h2:mem:", "sa", "sa"); Db db = Db.open("jdbc:h2:mem:", "sa", "sa");
// Insert a Database version record // insert a database version record
db.insert(new DbVersion(1)); db.insert(new DbVersion(1));
TestDbUpgrader dbUpgrader = new TestDbUpgrader(); TestDbUpgrader dbUpgrader = new TestDbUpgrader();
...@@ -120,11 +120,11 @@ public class ModelsTest extends TestBase { ...@@ -120,11 +120,11 @@ public class ModelsTest extends TestBase {
private void testTableUpgrade() { private void testTableUpgrade() {
Db db = Db.open("jdbc:h2:mem:", "sa", "sa"); Db db = Db.open("jdbc:h2:mem:", "sa", "sa");
// Insert first, this will create version record automatically // insert first, this will create version record automatically
List<SupportedTypes> original = SupportedTypes.createList(); List<SupportedTypes> original = SupportedTypes.createList();
db.insertAll(original); db.insertAll(original);
// Reset the dbUpgrader (clears updatecheck cache) // reset the dbUpgrader (clears the update check cache)
TestDbUpgrader dbUpgrader = new TestDbUpgrader(); TestDbUpgrader dbUpgrader = new TestDbUpgrader();
db.setDbUpgrader(dbUpgrader); db.setDbUpgrader(dbUpgrader);
......
/* /*
* Copyright 2004-2011 H2 Group. Multiple-Licensed under the H2 License, Version * Copyright 2004-2011 H2 Group. Multiple-Licensed under the H2 License,
* 1.0, and under the Eclipse Public License, Version 1.0 * Version 1.0, and under the Eclipse Public License, Version 1.0
* (http://h2database.com/html/license.html). Initial Developer: H2 Group * (http://h2database.com/html/license.html).
* Initial Developer: James Moger
*/ */
package org.h2.test.jaqu; package org.h2.test.jaqu;
// ## Java 1.5 begin ## //## Java 1.5 begin ##
import java.util.Arrays; import java.util.Arrays;
import java.util.List; import java.util.List;
import org.h2.jaqu.Table.JQColumn; import org.h2.jaqu.Table.JQColumn;
...@@ -15,7 +16,7 @@ import org.h2.jaqu.Table.JQTable; ...@@ -15,7 +16,7 @@ import org.h2.jaqu.Table.JQTable;
/** /**
* A table containing product data. * A table containing product data.
*/ */
// ## Java 1.5 begin ## //## Java 1.5 begin ##
@JQTable(name = "AnnotatedProduct", primaryKey = "id") @JQTable(name = "AnnotatedProduct", primaryKey = "id")
@JQIndex(standard = "name, cat") @JQIndex(standard = "name, cat")
public class ProductAnnotationOnly { public class ProductAnnotationOnly {
...@@ -80,4 +81,4 @@ public class ProductAnnotationOnly { ...@@ -80,4 +81,4 @@ public class ProductAnnotationOnly {
} }
} }
// ## Java 1.5 end ## //## Java 1.5 end ##
/*
* Copyright 2004-2011 H2 Group. Multiple-Licensed under the H2 License,
* Version 1.0, and under the Eclipse Public License, Version 1.0
* (http://h2database.com/html/license.html).
* Initial Developer: James Moger
*/
package org.h2.test.jaqu; package org.h2.test.jaqu;
import java.util.Arrays; import java.util.Arrays;
......
/* /*
* Copyright 2004-2011 H2 Group. Multiple-Licensed under the H2 License, Version * Copyright 2004-2011 H2 Group. Multiple-Licensed under the H2 License,
* 1.0, and under the Eclipse Public License, Version 1.0 * Version 1.0, and under the Eclipse Public License, Version 1.0
* (http://h2database.com/html/license.html). Initial Developer: H2 Group * (http://h2database.com/html/license.html).
* Initial Developer: James Moger
*/ */
package org.h2.test.jaqu; package org.h2.test.jaqu;
// ## Java 1.5 begin ## //## Java 1.5 begin ##
import java.util.Arrays; import java.util.Arrays;
import java.util.List; import java.util.List;
import org.h2.jaqu.Table.JQColumn; import org.h2.jaqu.Table.JQColumn;
...@@ -15,7 +16,7 @@ import org.h2.jaqu.Table.JQTable; ...@@ -15,7 +16,7 @@ import org.h2.jaqu.Table.JQTable;
/** /**
* A table containing product data. * A table containing product data.
*/ */
// ## Java 1.5 begin ## //## Java 1.5 begin ##
@JQTable(annotationsOnly = false) @JQTable(annotationsOnly = false)
@JQIndex(standard = "name, cat") @JQIndex(standard = "name, cat")
public class ProductMixedAnnotation { public class ProductMixedAnnotation {
...@@ -80,4 +81,4 @@ public class ProductMixedAnnotation { ...@@ -80,4 +81,4 @@ public class ProductMixedAnnotation {
} }
} }
// ## Java 1.5 end ## //## Java 1.5 end ##
/* /*
* Copyright 2004-2011 H2 Group. Multiple-Licensed under the H2 License, Version * Copyright 2004-2011 H2 Group. Multiple-Licensed under the H2 License,
* 1.0, and under the Eclipse Public License, Version 1.0 * Version 1.0, and under the Eclipse Public License, Version 1.0
* (http://h2database.com/html/license.html). Initial Developer: H2 Group * (http://h2database.com/html/license.html).
* Initial Developer: James Moger
*/ */
package org.h2.test.jaqu; package org.h2.test.jaqu;
// ## Java 1.5 begin ## //## Java 1.5 begin ##
import java.util.Arrays; import java.util.Arrays;
import java.util.List; import java.util.List;
import org.h2.jaqu.Table.JQColumn; import org.h2.jaqu.Table.JQColumn;
import org.h2.jaqu.Table.JQTable; import org.h2.jaqu.Table.JQTable;
//## Java 1.5 end ##
/** /**
* A table containing product data. * A table containing product data.
*/ */
// ## Java 1.5 begin ## //## Java 1.5 begin ##
@JQTable(createIfRequired = false) @JQTable(createIfRequired = false)
public class ProductNoCreateTable { public class ProductNoCreateTable {
...@@ -45,4 +47,4 @@ public class ProductNoCreateTable { ...@@ -45,4 +47,4 @@ public class ProductNoCreateTable {
} }
} }
// ## Java 1.5 end ## //## Java 1.5 end ##
/*
* Copyright 2004-2011 H2 Group. Multiple-Licensed under the H2 License,
* Version 1.0, and under the Eclipse Public License, Version 1.0
* (http://h2database.com/html/license.html).
* Initial Developer: James Moger
*/
package org.h2.test.jaqu; package org.h2.test.jaqu;
import java.math.BigDecimal; import java.math.BigDecimal;
......
...@@ -18,7 +18,7 @@ import static java.sql.Date.valueOf; ...@@ -18,7 +18,7 @@ import static java.sql.Date.valueOf;
*/ */
public class UpdateTest extends TestBase { public class UpdateTest extends TestBase {
Db db; private Db db;
/** /**
* This method is called when executing this application from the command * This method is called when executing this application from the command
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论