Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
为 GitLab 提交贡献
登录/注册
切换导航
H
h2database
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分枝图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
计划
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
分枝图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
Administrator
h2database
Commits
189775e1
提交
189775e1
authored
7月 08, 2010
作者:
Thomas Mueller
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Checkstyle.
上级
4bd2e81a
显示空白字符变更
内嵌
并排
正在显示
10 个修改的文件
包含
105 行增加
和
96 行删除
+105
-96
checkstyle.xml
h2/src/installer/checkstyle.xml
+85
-77
AlterSchemaRename.java
h2/src/main/org/h2/command/ddl/AlterSchemaRename.java
+2
-2
CreateView.java
h2/src/main/org/h2/command/ddl/CreateView.java
+5
-3
DbUpgrade.java
h2/src/main/org/h2/upgrade/DbUpgrade.java
+1
-1
DbUpgradeNonPageStoreToCurrent.java
...c/main/org/h2/upgrade/DbUpgradeNonPageStoreToCurrent.java
+3
-3
Utils.java
h2/src/main/org/h2/util/Utils.java
+1
-2
TestMultiDimension.java
h2/src/test/org/h2/test/db/TestMultiDimension.java
+4
-4
TestNestedJoins.java
h2/src/test/org/h2/test/db/TestNestedJoins.java
+2
-2
TestUndoLogLarge.java
h2/src/test/org/h2/test/todo/TestUndoLogLarge.java
+1
-1
UpgradeCreator.java
h2/src/tools/org/h2/build/upgrade/UpgradeCreator.java
+1
-1
没有找到文件。
h2/src/installer/checkstyle.xml
浏览文件 @
189775e1
<?xml version="1.0" encoding="UTF-8"?>
<?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
This configuration file was written by the eclipse-cs plugin configuration editor
-->
-->
...
@@ -6,7 +8,6 @@
...
@@ -6,7 +8,6 @@
Checkstyle-Configuration: MyCheckstyle
Checkstyle-Configuration: MyCheckstyle
Description: none
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"
>
<module
name=
"Checker"
>
<property
name=
"severity"
value=
"warning"
/>
<property
name=
"severity"
value=
"warning"
/>
<module
name=
"TreeWalker"
>
<module
name=
"TreeWalker"
>
...
@@ -31,10 +32,11 @@
...
@@ -31,10 +32,11 @@
</module>
</module>
<module
name=
"NoWhitespaceBefore"
/>
<module
name=
"NoWhitespaceBefore"
/>
<module
name=
"OperatorWrap"
>
<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>
<module
name=
"ParenPad"
/>
<module
name=
"ParenPad"
/>
<module
name=
"TabCharacter"
/>
<module
name=
"WhitespaceAfter"
/>
<module
name=
"WhitespaceAfter"
/>
<module
name=
"WhitespaceAround"
>
<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"
/>
<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 @@
...
@@ -62,11 +64,11 @@
<module
name=
"ArrayTypeStyle"
/>
<module
name=
"ArrayTypeStyle"
/>
<module
name=
"GenericIllegalRegexp"
>
<module
name=
"GenericIllegalRegexp"
>
<property
name=
"severity"
value=
"ignore"
/>
<property
name=
"severity"
value=
"ignore"
/>
<property
name=
"format"
value=
"\s+$"
/>
<metadata
name=
"net.sf.eclipsecs.core.lastEnabledSeverity"
value=
"inherit"
/>
<property
name=
"message"
value=
"Line has trailing spaces."
/>
</module>
</module>
<module
name=
"TodoComment"
>
<module
name=
"TodoComment"
>
<property
name=
"severity"
value=
"ignore"
/>
<property
name=
"severity"
value=
"ignore"
/>
<metadata
name=
"net.sf.eclipsecs.core.lastEnabledSeverity"
value=
"inherit"
/>
</module>
</module>
<module
name=
"UpperEll"
/>
<module
name=
"UpperEll"
/>
<module
name=
"JavadocType"
/>
<module
name=
"JavadocType"
/>
...
@@ -80,12 +82,18 @@
...
@@ -80,12 +82,18 @@
<module
name=
"SuperClone"
/>
<module
name=
"SuperClone"
/>
<module
name=
"UnnecessaryParentheses"
/>
<module
name=
"UnnecessaryParentheses"
/>
<module
name=
"TrailingComment"
/>
<module
name=
"TrailingComment"
/>
<module
name=
"PackageHtml"
>
<property
name=
"severity"
value=
"ignore"
/>
<metadata
name=
"net.sf.eclipsecs.core.lastEnabledSeverity"
value=
"inherit"
/>
</module>
</module>
<module
name=
"NewlineAtEndOfFile"
>
</module>
<module
name=
"FileTabCharacter"
>
<property
name=
"severity"
value=
"ignore"
/>
<property
name=
"severity"
value=
"ignore"
/>
<metadata
name=
"net.sf.eclipsecs.core.lastEnabledSeverity"
value=
"inherit"
/>
</module>
</module>
<module
name=
"Translation"
/>
<module
name=
"NewlineAtEndOfFile"
>
<module
name=
"PackageHtml"
>
<property
name=
"severity"
value=
"ignore"
/>
<property
name=
"severity"
value=
"ignore"
/>
<metadata
name=
"net.sf.eclipsecs.core.lastEnabledSeverity"
value=
"inherit"
/>
</module>
</module>
<module
name=
"Translation"
/>
</module>
</module>
h2/src/main/org/h2/command/ddl/AlterSchemaRename.java
浏览文件 @
189775e1
...
@@ -28,8 +28,8 @@ public class AlterSchemaRename extends DefineCommand {
...
@@ -28,8 +28,8 @@ public class AlterSchemaRename extends DefineCommand {
super
(
session
);
super
(
session
);
}
}
public
void
setOldSchema
(
Schema
S
chema
)
{
public
void
setOldSchema
(
Schema
s
chema
)
{
oldSchema
=
S
chema
;
oldSchema
=
s
chema
;
}
}
public
void
setNewName
(
String
name
)
{
public
void
setNewName
(
String
name
)
{
...
...
h2/src/main/org/h2/command/ddl/CreateView.java
浏览文件 @
189775e1
...
@@ -167,9 +167,11 @@ public class CreateView extends SchemaCommand {
...
@@ -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
* Class that holds a snapshot of dependent view information. We can't just
// when we drop the parent view.
* work with TableViews directly because they become invalid when we drop
* the parent view.
*/
private
class
DependentView
{
private
class
DependentView
{
String
viewName
;
String
viewName
;
String
createSql
;
String
createSql
;
...
...
h2/src/main/org/h2/upgrade/DbUpgrade.java
浏览文件 @
189775e1
...
@@ -37,7 +37,7 @@ public class DbUpgrade {
...
@@ -37,7 +37,7 @@ public class DbUpgrade {
* @param info The connection Properties
* @param info The connection Properties
* @throws SQLException
* @throws SQLException
*/
*/
public
s
ynchronized
static
void
upgrade
(
String
url
,
Properties
info
)
throws
SQLException
{
public
s
tatic
synchronized
void
upgrade
(
String
url
,
Properties
info
)
throws
SQLException
{
if
(
nonPageStoreToCurrentEnabled
)
{
if
(
nonPageStoreToCurrentEnabled
)
{
upgradeFromNonPageStore
(
url
,
info
);
upgradeFromNonPageStore
(
url
,
info
);
}
}
...
...
h2/src/main/org/h2/upgrade/DbUpgradeNonPageStoreToCurrent.java
浏览文件 @
189775e1
...
@@ -23,8 +23,8 @@ import org.h2.util.Utils;
...
@@ -23,8 +23,8 @@ import org.h2.util.Utils;
*/
*/
public
class
DbUpgradeNonPageStoreToCurrent
{
public
class
DbUpgradeNonPageStoreToCurrent
{
private
static
boolean
scriptInTmpDir
=
false
;
private
static
boolean
scriptInTmpDir
;
private
static
boolean
deleteOldDb
=
false
;
private
static
boolean
deleteOldDb
;
private
String
url
;
private
String
url
;
private
Properties
info
;
private
Properties
info
;
...
...
h2/src/main/org/h2/util/Utils.java
浏览文件 @
189775e1
...
@@ -15,7 +15,6 @@ import java.io.ObjectOutputStream;
...
@@ -15,7 +15,6 @@ import java.io.ObjectOutputStream;
import
java.lang.reflect.Constructor
;
import
java.lang.reflect.Constructor
;
import
java.lang.reflect.Method
;
import
java.lang.reflect.Method
;
import
java.lang.reflect.Modifier
;
import
java.lang.reflect.Modifier
;
import
java.sql.SQLException
;
import
java.util.ArrayList
;
import
java.util.ArrayList
;
import
java.util.HashMap
;
import
java.util.HashMap
;
import
java.util.HashSet
;
import
java.util.HashSet
;
...
@@ -625,7 +624,7 @@ public class Utils {
...
@@ -625,7 +624,7 @@ public class Utils {
private
static
int
match
(
Class
<?>[]
params
,
Object
[]
values
)
{
private
static
int
match
(
Class
<?>[]
params
,
Object
[]
values
)
{
if
(
params
.
length
==
values
.
length
)
{
if
(
params
.
length
==
values
.
length
)
{
int
points
=
1
;
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
<?>
pc
=
getNonPrimitiveClass
(
params
[
i
]);
Class
<?>
vc
=
values
[
i
].
getClass
();
Class
<?>
vc
=
values
[
i
].
getClass
();
if
(
pc
==
vc
)
{
if
(
pc
==
vc
)
{
...
...
h2/src/test/org/h2/test/db/TestMultiDimension.java
浏览文件 @
189775e1
...
@@ -52,12 +52,12 @@ public class TestMultiDimension extends TestBase {
...
@@ -52,12 +52,12 @@ public class TestMultiDimension extends TestBase {
assertEquals
(
5
,
m
.
interleave
(
3
,
0
));
assertEquals
(
5
,
m
.
interleave
(
3
,
0
));
assertEquals
(
5
,
m
.
interleave
(
new
int
[]{
3
,
0
}));
assertEquals
(
5
,
m
.
interleave
(
new
int
[]{
3
,
0
}));
assertEquals
(
10
,
m
.
interleave
(
0
,
3
));
assertEquals
(
10
,
m
.
interleave
(
0
,
3
));
assertEquals
(
10
,
m
.
interleave
(
new
int
[]
{
0
,
3
}));
assertEquals
(
10
,
m
.
interleave
(
new
int
[]
{
0
,
3
}));
long
v
=
(
(
long
)
Integer
.
MAX_VALUE
|
((
long
)
Integer
.
MAX_VALUE
<<
31L
)
);
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
(
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
);
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
);
int
x
=
random
.
nextInt
(
Integer
.
MAX_VALUE
),
y
=
random
.
nextInt
(
Integer
.
MAX_VALUE
);
v
=
m
.
interleave
(
new
int
[]
{
x
,
y
});
v
=
m
.
interleave
(
new
int
[]
{
x
,
y
});
long
v2
=
m
.
interleave
(
x
,
y
);
long
v2
=
m
.
interleave
(
x
,
y
);
...
...
h2/src/test/org/h2/test/db/TestNestedJoins.java
浏览文件 @
189775e1
...
@@ -104,7 +104,7 @@ public class TestNestedJoins extends TestBase {
...
@@ -104,7 +104,7 @@ public class TestNestedJoins extends TestBase {
}
}
}
}
Random
random
=
new
Random
(
1
);
Random
random
=
new
Random
(
1
);
for
(
int
i
=
0
;
i
<
10000
;
i
++)
{
for
(
int
i
=
0
;
i
<
10000
;
i
++)
{
StringBuilder
buff
=
new
StringBuilder
();
StringBuilder
buff
=
new
StringBuilder
();
int
t
=
1
+
random
.
nextInt
(
9
);
int
t
=
1
+
random
.
nextInt
(
9
);
buff
.
append
(
"select "
);
buff
.
append
(
"select "
);
...
@@ -223,7 +223,7 @@ public class TestNestedJoins extends TestBase {
...
@@ -223,7 +223,7 @@ public class TestNestedJoins extends TestBase {
ArrayList
<
String
>
list
=
New
.
arrayList
();
ArrayList
<
String
>
list
=
New
.
arrayList
();
while
(
rs
.
next
())
{
while
(
rs
.
next
())
{
StringBuilder
buff
=
new
StringBuilder
();
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
)
{
if
(
i
>
0
)
{
buff
.
append
(
" "
);
buff
.
append
(
" "
);
}
}
...
...
h2/src/test/org/h2/test/todo/TestUndoLogLarge.java
浏览文件 @
189775e1
...
@@ -38,7 +38,7 @@ public class TestUndoLogLarge {
...
@@ -38,7 +38,7 @@ public class TestUndoLogLarge {
PreparedStatement
prep
=
conn
.
prepareStatement
(
PreparedStatement
prep
=
conn
.
prepareStatement
(
"insert into test(name) values(space(1024*1024))"
);
"insert into test(name) values(space(1024*1024))"
);
long
time
=
System
.
currentTimeMillis
();
long
time
=
System
.
currentTimeMillis
();
for
(
int
i
=
0
;
i
<
2500
;
i
++)
{
for
(
int
i
=
0
;
i
<
2500
;
i
++)
{
prep
.
execute
();
prep
.
execute
();
long
now
=
System
.
currentTimeMillis
();
long
now
=
System
.
currentTimeMillis
();
if
(
now
>
time
+
5000
)
{
if
(
now
>
time
+
5000
)
{
...
...
h2/src/tools/org/h2/build/upgrade/UpgradeCreator.java
浏览文件 @
189775e1
...
@@ -20,7 +20,7 @@ public class UpgradeCreator {
...
@@ -20,7 +20,7 @@ public class UpgradeCreator {
*
*
* @param args the command line parameters
* @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
* This method is called when executing this application from the command
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论