Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
为 GitLab 提交贡献
登录/注册
切换导航
H
h2database
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分枝图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
计划
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
分枝图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
Administrator
h2database
Commits
7d7fbc8d
提交
7d7fbc8d
authored
9月 24, 2009
作者:
Thomas Mueller
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Don't throw Error
上级
f756c00f
隐藏空白字符变更
内嵌
并排
正在显示
17 个修改的文件
包含
52 行增加
和
48 行删除
+52
-48
TestCache.java
h2/src/test/org/h2/test/unit/TestCache.java
+1
-1
TestDataPage.java
h2/src/test/org/h2/test/unit/TestDataPage.java
+3
-3
TestIntIntHashMap.java
h2/src/test/org/h2/test/unit/TestIntIntHashMap.java
+3
-3
TestSecurity.java
h2/src/test/org/h2/test/unit/TestSecurity.java
+1
-1
TestStringCache.java
h2/src/test/org/h2/test/unit/TestStringCache.java
+1
-1
TestValueHashMap.java
h2/src/test/org/h2/test/unit/TestValueHashMap.java
+1
-1
TestValueMemory.java
h2/src/test/org/h2/test/unit/TestValueMemory.java
+1
-1
Build.java
h2/src/tools/org/h2/build/Build.java
+3
-3
BuildBase.java
h2/src/tools/org/h2/build/BuildBase.java
+23
-19
CheckTextFiles.java
h2/src/tools/org/h2/build/code/CheckTextFiles.java
+2
-2
MergeDocs.java
h2/src/tools/org/h2/build/doc/MergeDocs.java
+1
-1
XMLParser.java
h2/src/tools/org/h2/build/doc/XMLParser.java
+1
-1
dictionary.txt
h2/src/tools/org/h2/build/doc/dictionary.txt
+1
-1
Base64.java
h2/src/tools/org/h2/dev/util/Base64.java
+3
-3
Db.java
h2/src/tools/org/h2/jaqu/Db.java
+2
-2
ClassReader.java
h2/src/tools/org/h2/jaqu/util/ClassReader.java
+4
-4
WeakIdentityHashMap.java
h2/src/tools/org/h2/jaqu/util/WeakIdentityHashMap.java
+1
-1
没有找到文件。
h2/src/test/org/h2/test/unit/TestCache.java
浏览文件 @
7d7fbc8d
...
@@ -36,7 +36,7 @@ public class TestCache extends TestBase implements CacheWriter {
...
@@ -36,7 +36,7 @@ public class TestCache extends TestBase implements CacheWriter {
}
}
public
void
test
()
throws
SQLException
{
public
void
test
()
throws
SQLException
{
testCache
(
false
);
//
testCache(false);
testCache
(
true
);
testCache
(
true
);
testCacheDb
(
false
);
testCacheDb
(
false
);
testCacheDb
(
true
);
testCacheDb
(
true
);
...
...
h2/src/test/org/h2/test/unit/TestDataPage.java
浏览文件 @
7d7fbc8d
...
@@ -242,11 +242,11 @@ public class TestDataPage extends TestBase implements DataHandler {
...
@@ -242,11 +242,11 @@ public class TestDataPage extends TestBase implements DataHandler {
}
}
public
int
getMaxLengthInplaceLob
()
{
public
int
getMaxLengthInplaceLob
()
{
throw
new
Error
();
throw
new
Assertion
Error
();
}
}
public
int
allocateObjectId
(
boolean
b
,
boolean
c
)
{
public
int
allocateObjectId
(
boolean
b
,
boolean
c
)
{
throw
new
Error
();
throw
new
Assertion
Error
();
}
}
public
String
createTempFile
()
throws
SQLException
{
public
String
createTempFile
()
throws
SQLException
{
...
@@ -254,7 +254,7 @@ public class TestDataPage extends TestBase implements DataHandler {
...
@@ -254,7 +254,7 @@ public class TestDataPage extends TestBase implements DataHandler {
}
}
public
String
getLobCompressionAlgorithm
(
int
type
)
{
public
String
getLobCompressionAlgorithm
(
int
type
)
{
throw
new
Error
();
throw
new
Assertion
Error
();
}
}
public
Object
getLobSyncObject
()
{
public
Object
getLobSyncObject
()
{
...
...
h2/src/test/org/h2/test/unit/TestIntIntHashMap.java
浏览文件 @
7d7fbc8d
...
@@ -46,7 +46,7 @@ public class TestIntIntHashMap extends TestBase {
...
@@ -46,7 +46,7 @@ public class TestIntIntHashMap extends TestBase {
}
}
for
(
int
i
=
0
;
i
<
len
;
i
++)
{
for
(
int
i
=
0
;
i
<
len
;
i
++)
{
if
(
map
.
get
(
x
[
i
])
!=
i
)
{
if
(
map
.
get
(
x
[
i
])
!=
i
)
{
throw
new
Error
(
"get "
+
x
[
i
]
+
" = "
+
map
.
get
(
i
)
+
" should be "
+
i
);
throw
new
Assertion
Error
(
"get "
+
x
[
i
]
+
" = "
+
map
.
get
(
i
)
+
" should be "
+
i
);
}
}
}
}
for
(
int
i
=
1
;
i
<
len
;
i
+=
2
)
{
for
(
int
i
=
1
;
i
<
len
;
i
+=
2
)
{
...
@@ -54,7 +54,7 @@ public class TestIntIntHashMap extends TestBase {
...
@@ -54,7 +54,7 @@ public class TestIntIntHashMap extends TestBase {
}
}
for
(
int
i
=
1
;
i
<
len
;
i
+=
2
)
{
for
(
int
i
=
1
;
i
<
len
;
i
+=
2
)
{
if
(
map
.
get
(
x
[
i
])
!=
-
1
)
{
if
(
map
.
get
(
x
[
i
])
!=
-
1
)
{
throw
new
Error
(
"get "
+
x
[
i
]
+
" = "
+
map
.
get
(
i
)
+
" should be <=0"
);
throw
new
Assertion
Error
(
"get "
+
x
[
i
]
+
" = "
+
map
.
get
(
i
)
+
" should be <=0"
);
}
}
}
}
for
(
int
i
=
1
;
i
<
len
;
i
+=
2
)
{
for
(
int
i
=
1
;
i
<
len
;
i
+=
2
)
{
...
@@ -62,7 +62,7 @@ public class TestIntIntHashMap extends TestBase {
...
@@ -62,7 +62,7 @@ public class TestIntIntHashMap extends TestBase {
}
}
for
(
int
i
=
0
;
i
<
len
;
i
++)
{
for
(
int
i
=
0
;
i
<
len
;
i
++)
{
if
(
map
.
get
(
x
[
i
])
!=
i
)
{
if
(
map
.
get
(
x
[
i
])
!=
i
)
{
throw
new
Error
(
"get "
+
x
[
i
]
+
" = "
+
map
.
get
(
i
)
+
" should be "
+
i
);
throw
new
Assertion
Error
(
"get "
+
x
[
i
]
+
" = "
+
map
.
get
(
i
)
+
" should be "
+
i
);
}
}
}
}
}
}
...
...
h2/src/test/org/h2/test/unit/TestSecurity.java
浏览文件 @
7d7fbc8d
...
@@ -93,7 +93,7 @@ public class TestSecurity extends TestBase {
...
@@ -93,7 +93,7 @@ public class TestSecurity extends TestBase {
test
.
encrypt
(
enc
,
0
,
128
);
test
.
encrypt
(
enc
,
0
,
128
);
test
.
decrypt
(
enc
,
0
,
128
);
test
.
decrypt
(
enc
,
0
,
128
);
if
(
ByteUtils
.
compareNotNull
(
in
,
enc
)
!=
0
)
{
if
(
ByteUtils
.
compareNotNull
(
in
,
enc
)
!=
0
)
{
throw
new
Error
(
"hey!"
);
throw
new
AssertionError
(
);
}
}
for
(
int
i
=
0
;
i
<
10
;
i
++)
{
for
(
int
i
=
0
;
i
<
10
;
i
++)
{
...
...
h2/src/test/org/h2/test/unit/TestStringCache.java
浏览文件 @
7d7fbc8d
...
@@ -87,7 +87,7 @@ public class TestStringCache extends TestBase {
...
@@ -87,7 +87,7 @@ public class TestStringCache extends TestBase {
TestBase
.
logError
(
"error"
,
e
);
TestBase
.
logError
(
"error"
,
e
);
}
}
if
(
a
!=
null
&&
a
==
b
&&
a
.
length
()
>
0
)
{
if
(
a
!=
null
&&
a
==
b
&&
a
.
length
()
>
0
)
{
throw
new
Error
(
"a="
+
System
.
identityHashCode
(
a
)
+
" b="
+
System
.
identityHashCode
(
b
));
throw
new
Assertion
Error
(
"a="
+
System
.
identityHashCode
(
a
)
+
" b="
+
System
.
identityHashCode
(
b
));
}
}
}
else
{
}
else
{
String
b
;
String
b
;
...
...
h2/src/test/org/h2/test/unit/TestValueHashMap.java
浏览文件 @
7d7fbc8d
...
@@ -66,7 +66,7 @@ public class TestValueHashMap extends TestBase implements DataHandler {
...
@@ -66,7 +66,7 @@ public class TestValueHashMap extends TestBase implements DataHandler {
try
{
try
{
return
v1
.
compareTo
(
v2
,
compareMode
);
return
v1
.
compareTo
(
v2
,
compareMode
);
}
catch
(
SQLException
e
)
{
}
catch
(
SQLException
e
)
{
throw
new
Error
(
e
);
throw
new
Assertion
Error
(
e
);
}
}
}
}
};
};
...
...
h2/src/test/org/h2/test/unit/TestValueMemory.java
浏览文件 @
7d7fbc8d
...
@@ -161,7 +161,7 @@ public class TestValueMemory extends TestBase implements DataHandler {
...
@@ -161,7 +161,7 @@ public class TestValueMemory extends TestBase implements DataHandler {
case
Value
.
STRING_FIXED
:
case
Value
.
STRING_FIXED
:
return
ValueStringFixed
.
get
(
randomString
(
random
.
nextInt
(
100
)));
return
ValueStringFixed
.
get
(
randomString
(
random
.
nextInt
(
100
)));
default
:
default
:
throw
new
Error
(
"type="
+
type
);
throw
new
Assertion
Error
(
"type="
+
type
);
}
}
}
}
...
...
h2/src/tools/org/h2/build/Build.java
浏览文件 @
7d7fbc8d
...
@@ -124,7 +124,7 @@ public class Build extends BuildBase {
...
@@ -124,7 +124,7 @@ public class Build extends BuildBase {
SwitchSource
.
main
(
"-dir"
,
"src"
,
"-version"
,
version
);
SwitchSource
.
main
(
"-dir"
,
"src"
,
"-version"
,
version
);
}
}
}
catch
(
IOException
e
)
{
}
catch
(
IOException
e
)
{
throw
new
Error
(
e
);
throw
new
RuntimeException
(
e
);
}
}
}
}
...
@@ -325,7 +325,7 @@ public class Build extends BuildBase {
...
@@ -325,7 +325,7 @@ public class Build extends BuildBase {
exclude
(
"*.txt"
);
exclude
(
"*.txt"
);
long
kb
=
jar
(
"bin/h2client"
+
getJarSuffix
(),
files
,
"temp"
);
long
kb
=
jar
(
"bin/h2client"
+
getJarSuffix
(),
files
,
"temp"
);
if
(
kb
<
300
||
kb
>
400
)
{
if
(
kb
<
300
||
kb
>
400
)
{
throw
new
Error
(
"Expected file size 300 - 400 KB, got: "
+
kb
);
throw
new
RuntimeException
(
"Expected file size 300 - 400 KB, got: "
+
kb
);
}
}
}
}
...
@@ -582,7 +582,7 @@ public class Build extends BuildBase {
...
@@ -582,7 +582,7 @@ public class Build extends BuildBase {
public
void
uploadBuild
()
{
public
void
uploadBuild
()
{
String
password
=
System
.
getProperty
(
"h2.ftpPassword"
);
String
password
=
System
.
getProperty
(
"h2.ftpPassword"
);
if
(
password
==
null
)
{
if
(
password
==
null
)
{
throw
new
Error
(
"h2.ftpPassword not set"
);
throw
new
RuntimeException
(
"h2.ftpPassword not set"
);
}
}
String
cp
=
"bin"
+
File
.
pathSeparator
+
"temp"
;
String
cp
=
"bin"
+
File
.
pathSeparator
+
"temp"
;
exec
(
"java"
,
args
(
"-Xmx128m"
,
"-cp"
,
cp
,
exec
(
"java"
,
args
(
"-Xmx128m"
,
"-cp"
,
cp
,
...
...
h2/src/tools/org/h2/build/BuildBase.java
浏览文件 @
7d7fbc8d
...
@@ -129,7 +129,7 @@ public class BuildBase {
...
@@ -129,7 +129,7 @@ public class BuildBase {
pattern
=
pattern
.
substring
(
1
);
pattern
=
pattern
.
substring
(
1
);
}
}
if
(
pattern
.
indexOf
(
'*'
)
>=
0
)
{
if
(
pattern
.
indexOf
(
'*'
)
>=
0
)
{
throw
new
Error
(
"Unsupported pattern, may only start or end with *:"
+
pattern
);
throw
new
RuntimeException
(
"Unsupported pattern, may only start or end with *:"
+
pattern
);
}
}
// normalize / and \
// normalize / and \
pattern
=
replaceAll
(
pattern
,
"/"
,
File
.
separator
);
pattern
=
replaceAll
(
pattern
,
"/"
,
File
.
separator
);
...
@@ -204,8 +204,12 @@ public class BuildBase {
...
@@ -204,8 +204,12 @@ public class BuildBase {
}
catch
(
InvocationTargetException
e
)
{
}
catch
(
InvocationTargetException
e
)
{
throw
e
.
getCause
();
throw
e
.
getCause
();
}
}
}
catch
(
Error
e
)
{
throw
e
;
}
catch
(
RuntimeException
e
)
{
throw
e
;
}
catch
(
Throwable
e
)
{
}
catch
(
Throwable
e
)
{
throw
e
instanceof
Error
?
((
Error
)
e
)
:
new
Error
(
e
);
throw
new
RuntimeException
(
e
);
}
}
}
}
...
@@ -291,7 +295,7 @@ public class BuildBase {
...
@@ -291,7 +295,7 @@ public class BuildBase {
p
.
waitFor
();
p
.
waitFor
();
return
p
.
exitValue
();
return
p
.
exitValue
();
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
throw
new
Error
(
"Error: "
+
e
,
e
);
throw
new
RuntimeException
(
e
);
}
}
}
}
...
@@ -309,7 +313,7 @@ public class BuildBase {
...
@@ -309,7 +313,7 @@ public class BuildBase {
}
}
}
}
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
throw
new
Error
(
"Error: "
+
e
,
e
);
throw
new
RuntimeException
(
e
);
}
}
}
}
}
.
start
();
}
.
start
();
...
@@ -328,7 +332,7 @@ public class BuildBase {
...
@@ -328,7 +332,7 @@ public class BuildBase {
Field
field
=
clazz
.
getField
(
fieldName
);
Field
field
=
clazz
.
getField
(
fieldName
);
return
field
.
get
(
null
).
toString
();
return
field
.
get
(
null
).
toString
();
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
throw
new
Error
(
"Can not read field "
+
className
+
"."
+
fieldName
,
e
);
throw
new
RuntimeException
(
"Can not read field "
+
className
+
"."
+
fieldName
,
e
);
}
}
}
}
...
@@ -345,7 +349,7 @@ public class BuildBase {
...
@@ -345,7 +349,7 @@ public class BuildBase {
Method
method
=
clazz
.
getMethod
(
methodName
);
Method
method
=
clazz
.
getMethod
(
methodName
);
return
method
.
invoke
(
null
).
toString
();
return
method
.
invoke
(
null
).
toString
();
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
throw
new
Error
(
"Can not read value "
+
className
+
"."
+
methodName
+
"()"
,
e
);
throw
new
RuntimeException
(
"Can not read value "
+
className
+
"."
+
methodName
+
"()"
,
e
);
}
}
}
}
...
@@ -436,7 +440,7 @@ public class BuildBase {
...
@@ -436,7 +440,7 @@ public class BuildBase {
System
.
setOut
(
old
);
System
.
setOut
(
old
);
}
}
if
(
result
!=
0
)
{
if
(
result
!=
0
)
{
throw
new
Error
(
"An error occurred"
);
throw
new
RuntimeException
(
"An error occurred, result="
+
result
);
}
}
}
}
...
@@ -462,7 +466,7 @@ public class BuildBase {
...
@@ -462,7 +466,7 @@ public class BuildBase {
md
=
MessageDigest
.
getInstance
(
"SHA-1"
);
md
=
MessageDigest
.
getInstance
(
"SHA-1"
);
return
convertBytesToString
(
md
.
digest
(
data
));
return
convertBytesToString
(
md
.
digest
(
data
));
}
catch
(
NoSuchAlgorithmException
e
)
{
}
catch
(
NoSuchAlgorithmException
e
)
{
throw
new
Error
(
e
);
throw
new
RuntimeException
(
e
);
}
}
}
}
...
@@ -503,7 +507,7 @@ public class BuildBase {
...
@@ -503,7 +507,7 @@ public class BuildBase {
}
}
in
.
close
();
in
.
close
();
}
catch
(
IOException
e
)
{
}
catch
(
IOException
e
)
{
throw
new
Error
(
"Error downloading"
,
e
);
throw
new
RuntimeException
(
"Error downloading"
,
e
);
}
}
byte
[]
data
=
buff
.
toByteArray
();
byte
[]
data
=
buff
.
toByteArray
();
String
got
=
getSHA1
(
data
);
String
got
=
getSHA1
(
data
);
...
@@ -511,7 +515,7 @@ public class BuildBase {
...
@@ -511,7 +515,7 @@ public class BuildBase {
println
(
"SHA1 checksum: "
+
got
);
println
(
"SHA1 checksum: "
+
got
);
}
else
{
}
else
{
if
(!
got
.
equals
(
sha1Checksum
))
{
if
(!
got
.
equals
(
sha1Checksum
))
{
throw
new
Error
(
"SHA1 checksum mismatch"
);
throw
new
RuntimeException
(
"SHA1 checksum mismatch"
);
}
}
}
}
writeFile
(
targetFile
,
data
);
writeFile
(
targetFile
,
data
);
...
@@ -576,7 +580,7 @@ public class BuildBase {
...
@@ -576,7 +580,7 @@ public class BuildBase {
ra
.
setLength
(
data
.
length
);
ra
.
setLength
(
data
.
length
);
ra
.
close
();
ra
.
close
();
}
catch
(
IOException
e
)
{
}
catch
(
IOException
e
)
{
throw
new
Error
(
"Error writing to file "
+
file
,
e
);
throw
new
RuntimeException
(
"Error writing to file "
+
file
,
e
);
}
}
}
}
...
@@ -591,14 +595,14 @@ public class BuildBase {
...
@@ -591,14 +595,14 @@ public class BuildBase {
RandomAccessFile
ra
=
new
RandomAccessFile
(
file
,
"r"
);
RandomAccessFile
ra
=
new
RandomAccessFile
(
file
,
"r"
);
long
len
=
ra
.
length
();
long
len
=
ra
.
length
();
if
(
len
>=
Integer
.
MAX_VALUE
)
{
if
(
len
>=
Integer
.
MAX_VALUE
)
{
throw
new
Error
(
"File "
+
file
.
getPath
()
+
" is too large"
);
throw
new
RuntimeException
(
"File "
+
file
.
getPath
()
+
" is too large"
);
}
}
byte
[]
buffer
=
new
byte
[(
int
)
len
];
byte
[]
buffer
=
new
byte
[(
int
)
len
];
ra
.
readFully
(
buffer
);
ra
.
readFully
(
buffer
);
ra
.
close
();
ra
.
close
();
return
buffer
;
return
buffer
;
}
catch
(
IOException
e
)
{
}
catch
(
IOException
e
)
{
throw
new
Error
(
"Error reading from file "
+
file
,
e
);
throw
new
RuntimeException
(
"Error reading from file "
+
file
,
e
);
}
}
}
}
...
@@ -688,7 +692,7 @@ public class BuildBase {
...
@@ -688,7 +692,7 @@ public class BuildBase {
zipOut
.
close
();
zipOut
.
close
();
return
new
File
(
destFile
).
length
()
/
1024
;
return
new
File
(
destFile
).
length
()
/
1024
;
}
catch
(
IOException
e
)
{
}
catch
(
IOException
e
)
{
throw
new
Error
(
"Error creating file "
+
destFile
,
e
);
throw
new
RuntimeException
(
"Error creating file "
+
destFile
,
e
);
}
}
}
}
...
@@ -740,7 +744,7 @@ public class BuildBase {
...
@@ -740,7 +744,7 @@ public class BuildBase {
System
.
setErr
(
old
);
System
.
setErr
(
old
);
}
}
if
(
result
!=
0
)
{
if
(
result
!=
0
)
{
throw
new
Error
(
"An error occurred"
);
throw
new
RuntimeException
(
"An error occurred"
);
}
}
}
}
...
@@ -757,7 +761,7 @@ public class BuildBase {
...
@@ -757,7 +761,7 @@ public class BuildBase {
Method
main
=
Class
.
forName
(
className
).
getMethod
(
"main"
,
String
[].
class
);
Method
main
=
Class
.
forName
(
className
).
getMethod
(
"main"
,
String
[].
class
);
invoke
(
main
,
null
,
new
Object
[]
{
array
});
invoke
(
main
,
null
,
new
Object
[]
{
array
});
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
throw
new
Error
(
e
);
throw
new
RuntimeException
(
e
);
}
}
}
}
...
@@ -770,7 +774,7 @@ public class BuildBase {
...
@@ -770,7 +774,7 @@ public class BuildBase {
File
f
=
new
File
(
dir
);
File
f
=
new
File
(
dir
);
if
(
f
.
exists
())
{
if
(
f
.
exists
())
{
if
(
f
.
isFile
())
{
if
(
f
.
isFile
())
{
throw
new
Error
(
"Can not create directory "
+
dir
+
" because a file with this name exists"
);
throw
new
RuntimeException
(
"Can not create directory "
+
dir
+
" because a file with this name exists"
);
}
}
}
else
{
}
else
{
mkdirs
(
f
);
mkdirs
(
f
);
...
@@ -780,7 +784,7 @@ public class BuildBase {
...
@@ -780,7 +784,7 @@ public class BuildBase {
private
void
mkdirs
(
File
f
)
{
private
void
mkdirs
(
File
f
)
{
if
(!
f
.
exists
())
{
if
(!
f
.
exists
())
{
if
(!
f
.
mkdirs
())
{
if
(!
f
.
mkdirs
())
{
throw
new
Error
(
"Can not create directory "
+
f
.
getAbsolutePath
());
throw
new
RuntimeException
(
"Can not create directory "
+
f
.
getAbsolutePath
());
}
}
}
}
}
}
...
@@ -815,7 +819,7 @@ public class BuildBase {
...
@@ -815,7 +819,7 @@ public class BuildBase {
}
}
}
}
if
(!
file
.
delete
())
{
if
(!
file
.
delete
())
{
throw
new
Error
(
"Can not delete "
+
file
.
getPath
());
throw
new
RuntimeException
(
"Can not delete "
+
file
.
getPath
());
}
}
}
}
}
}
...
...
h2/src/tools/org/h2/build/code/CheckTextFiles.java
浏览文件 @
7d7fbc8d
...
@@ -98,7 +98,7 @@ public class CheckTextFiles {
...
@@ -98,7 +98,7 @@ public class CheckTextFiles {
}
}
}
}
if
(
ignore
==
check
)
{
if
(
ignore
==
check
)
{
throw
new
Error
(
"Unknown suffix: "
+
suffix
+
" for file: "
+
file
.
getAbsolutePath
());
throw
new
RuntimeException
(
"Unknown suffix: "
+
suffix
+
" for file: "
+
file
.
getAbsolutePath
());
}
}
if
(
check
)
{
if
(
check
)
{
checkOrFixFile
(
file
,
autoFix
,
checkLicense
);
checkOrFixFile
(
file
,
autoFix
,
checkLicense
);
...
@@ -268,7 +268,7 @@ public class CheckTextFiles {
...
@@ -268,7 +268,7 @@ public class CheckTextFiles {
System
.
out
.
println
(
"FAIL at "
+
name
+
" "
+
error
+
" "
+
file
.
getAbsolutePath
());
System
.
out
.
println
(
"FAIL at "
+
name
+
" "
+
error
+
" "
+
file
.
getAbsolutePath
());
hasError
=
true
;
hasError
=
true
;
if
(
failOnError
)
{
if
(
failOnError
)
{
throw
new
Error
(
"FAIL"
);
throw
new
RuntimeException
(
"FAIL"
);
}
}
}
}
...
...
h2/src/tools/org/h2/build/doc/MergeDocs.java
浏览文件 @
7d7fbc8d
...
@@ -68,7 +68,7 @@ public class MergeDocs {
...
@@ -68,7 +68,7 @@ public class MergeDocs {
int
idx
=
text
.
indexOf
(
end
);
int
idx
=
text
.
indexOf
(
end
);
if
(
idx
<
0
)
{
if
(
idx
<
0
)
{
throw
new
Error
(
"Footer not found in file "
+
fileName
);
throw
new
RuntimeException
(
"Footer not found in file "
+
fileName
);
}
}
text
=
text
.
substring
(
0
,
idx
);
text
=
text
.
substring
(
0
,
idx
);
idx
=
text
.
indexOf
(
start
)
+
start
.
length
();
idx
=
text
.
indexOf
(
start
)
+
start
.
length
();
...
...
h2/src/tools/org/h2/build/doc/XMLParser.java
浏览文件 @
7d7fbc8d
...
@@ -124,7 +124,7 @@ public class XMLParser {
...
@@ -124,7 +124,7 @@ public class XMLParser {
}
}
private
void
error
(
String
expected
)
{
private
void
error
(
String
expected
)
{
throw
new
Error
(
"e
xpected: "
+
expected
+
" got: "
+
xml
.
substring
(
index
));
throw
new
RuntimeException
(
"E
xpected: "
+
expected
+
" got: "
+
xml
.
substring
(
index
));
}
}
private
void
read
(
String
chars
)
{
private
void
read
(
String
chars
)
{
...
...
h2/src/tools/org/h2/build/doc/dictionary.txt
浏览文件 @
7d7fbc8d
...
@@ -612,4 +612,4 @@ locals multianewarray icmpne fneg faload ifeq decompiler zeroes forgot
...
@@ -612,4 +612,4 @@ locals multianewarray icmpne fneg faload ifeq decompiler zeroes forgot
modern slight boost characteristics significantly gae vfs centrally ten
modern slight boost characteristics significantly gae vfs centrally ten
approach risky getters suxxess gmb delegate delegating delegates collisions
approach risky getters suxxess gmb delegate delegating delegates collisions
linkage superfluous disallow scoop moebius inputs copilot dmoebius leod jenkov
linkage superfluous disallow scoop moebius inputs copilot dmoebius leod jenkov
jakob poker docware peter
jakob poker docware peter unstable measurable
\ No newline at end of file
\ No newline at end of file
h2/src/tools/org/h2/dev/util/Base64.java
浏览文件 @
7d7fbc8d
...
@@ -40,7 +40,7 @@ public class Base64 {
...
@@ -40,7 +40,7 @@ public class Base64 {
private
static
void
check
(
String
a
,
String
b
)
{
private
static
void
check
(
String
a
,
String
b
)
{
if
(!
a
.
equals
(
b
))
{
if
(!
a
.
equals
(
b
))
{
throw
new
Error
(
"mismatch: "
+
a
+
" <> "
+
b
);
throw
new
RuntimeException
(
"mismatch: "
+
a
+
" <> "
+
b
);
}
}
}
}
...
@@ -89,11 +89,11 @@ public class Base64 {
...
@@ -89,11 +89,11 @@ public class Base64 {
private
static
void
test
(
byte
[]
in
,
byte
[]
out
)
{
private
static
void
test
(
byte
[]
in
,
byte
[]
out
)
{
if
(
in
.
length
!=
out
.
length
)
{
if
(
in
.
length
!=
out
.
length
)
{
throw
new
Error
(
"Length error"
);
throw
new
RuntimeException
(
"Length error"
);
}
}
for
(
int
i
=
0
;
i
<
in
.
length
;
i
++)
{
for
(
int
i
=
0
;
i
<
in
.
length
;
i
++)
{
if
(
in
[
i
]
!=
out
[
i
])
{
if
(
in
[
i
]
!=
out
[
i
])
{
throw
new
Error
(
"Error at "
+
i
);
throw
new
RuntimeException
(
"Error at "
+
i
);
}
}
}
}
}
}
...
...
h2/src/tools/org/h2/jaqu/Db.java
浏览文件 @
7d7fbc8d
...
@@ -51,7 +51,7 @@ public class Db {
...
@@ -51,7 +51,7 @@ public class Db {
try
{
try
{
return
clazz
.
newInstance
();
return
clazz
.
newInstance
();
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
throw
new
Error
(
e
);
throw
new
RuntimeException
(
e
);
}
}
}
}
...
@@ -124,7 +124,7 @@ public class Db {
...
@@ -124,7 +124,7 @@ public class Db {
try
{
try
{
conn
.
close
();
conn
.
close
();
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
throw
new
Error
(
e
);
throw
new
RuntimeException
(
e
);
}
}
}
}
...
...
h2/src/tools/org/h2/jaqu/util/ClassReader.java
浏览文件 @
7d7fbc8d
...
@@ -137,7 +137,7 @@ public class ClassReader {
...
@@ -137,7 +137,7 @@ public class ClassReader {
break
;
break
;
}
}
default
:
default
:
throw
new
Error
(
"Unsupported constant pool tag: "
+
tag
);
throw
new
RuntimeException
(
"Unsupported constant pool tag: "
+
tag
);
}
}
}
}
int
accessFlags
=
readShort
();
int
accessFlags
=
readShort
();
...
@@ -1308,7 +1308,7 @@ public class ClassReader {
...
@@ -1308,7 +1308,7 @@ public class ClassReader {
op
=
"wide ret "
+
readShort
();
op
=
"wide ret "
+
readShort
();
break
;
break
;
default
:
default
:
throw
new
Error
(
"u
nsupported wide opCode "
+
opCode
);
throw
new
RuntimeException
(
"U
nsupported wide opCode "
+
opCode
);
}
}
break
;
break
;
}
}
...
@@ -1338,7 +1338,7 @@ public class ClassReader {
...
@@ -1338,7 +1338,7 @@ public class ClassReader {
op
=
"jsr_w "
+
getAbsolutePos
(
pos
,
readInt
());
op
=
"jsr_w "
+
getAbsolutePos
(
pos
,
readInt
());
break
;
break
;
default
:
default
:
throw
new
Error
(
"u
nsupported opCode "
+
opCode
);
throw
new
RuntimeException
(
"U
nsupported opCode "
+
opCode
);
}
}
debug
(
" "
+
startPos
+
": "
+
op
);
debug
(
" "
+
startPos
+
": "
+
op
);
}
}
...
@@ -1395,7 +1395,7 @@ public class ClassReader {
...
@@ -1395,7 +1395,7 @@ public class ClassReader {
// TODO escape
// TODO escape
return
"\""
+
cpString
[
cpInt
[
constantRef
]]
+
"\""
;
return
"\""
+
cpString
[
cpInt
[
constantRef
]]
+
"\""
;
default
:
default
:
throw
new
Error
(
"n
ot a constant: "
+
constantRef
);
throw
new
RuntimeException
(
"N
ot a constant: "
+
constantRef
);
}
}
}
}
...
...
h2/src/tools/org/h2/jaqu/util/WeakIdentityHashMap.java
浏览文件 @
7d7fbc8d
...
@@ -109,7 +109,7 @@ public class WeakIdentityHashMap<K, V> implements Map<K, V> {
...
@@ -109,7 +109,7 @@ public class WeakIdentityHashMap<K, V> implements Map<K, V> {
}
}
index
=
(
index
+
plus
++)
&
mask
;
index
=
(
index
+
plus
++)
&
mask
;
}
while
(
plus
<=
len
);
}
while
(
plus
<=
len
);
throw
new
Error
(
"h
ashmap is full"
);
throw
new
RuntimeException
(
"H
ashmap is full"
);
}
}
public
V
remove
(
Object
key
)
{
public
V
remove
(
Object
key
)
{
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论