Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
为 GitLab 提交贡献
登录/注册
切换导航
H
h2database
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分枝图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
计划
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
分枝图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
Administrator
h2database
Commits
12c3cf9a
提交
12c3cf9a
authored
15 年前
作者:
Thomas Mueller
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Don't throw Error
上级
2bc833a3
隐藏空白字符变更
内嵌
并排
正在显示
6 个修改的文件
包含
12 行增加
和
12 行删除
+12
-12
Bnf.java
h2/src/main/org/h2/bnf/Bnf.java
+3
-3
RuleElement.java
h2/src/main/org/h2/bnf/RuleElement.java
+2
-2
RuleFixed.java
h2/src/main/org/h2/bnf/RuleFixed.java
+4
-4
RuleList.java
h2/src/main/org/h2/bnf/RuleList.java
+1
-1
JdbcBatchUpdateException.java
h2/src/main/org/h2/jdbc/JdbcBatchUpdateException.java
+1
-1
JdbcSQLException.java
h2/src/main/org/h2/jdbc/JdbcSQLException.java
+1
-1
没有找到文件。
h2/src/main/org/h2/bnf/Bnf.java
浏览文件 @
12c3cf9a
...
@@ -69,7 +69,7 @@ public class Bnf {
...
@@ -69,7 +69,7 @@ public class Bnf {
private
RuleHead
addRule
(
String
topic
,
String
section
,
Rule
rule
)
{
private
RuleHead
addRule
(
String
topic
,
String
section
,
Rule
rule
)
{
RuleHead
head
=
new
RuleHead
(
section
,
topic
,
rule
);
RuleHead
head
=
new
RuleHead
(
section
,
topic
,
rule
);
if
(
ruleMap
.
get
(
StringUtils
.
toLowerEnglish
(
topic
))
!=
null
)
{
if
(
ruleMap
.
get
(
StringUtils
.
toLowerEnglish
(
topic
))
!=
null
)
{
throw
new
Error
(
"already exists: "
+
topic
);
throw
new
Assertion
Error
(
"already exists: "
+
topic
);
}
}
ruleMap
.
put
(
StringUtils
.
toLowerEnglish
(
topic
),
head
);
ruleMap
.
put
(
StringUtils
.
toLowerEnglish
(
topic
),
head
);
return
head
;
return
head
;
...
@@ -206,13 +206,13 @@ public class Bnf {
...
@@ -206,13 +206,13 @@ public class Bnf {
Rule
r2
=
parseOr
();
Rule
r2
=
parseOr
();
r
=
new
RuleOptional
(
r2
);
r
=
new
RuleOptional
(
r2
);
if
(
firstChar
!=
']'
)
{
if
(
firstChar
!=
']'
)
{
throw
new
Error
(
"expected ], got "
+
currentToken
+
" syntax:"
+
syntax
);
throw
new
Assertion
Error
(
"expected ], got "
+
currentToken
+
" syntax:"
+
syntax
);
}
}
}
else
if
(
firstChar
==
'{'
)
{
}
else
if
(
firstChar
==
'{'
)
{
read
();
read
();
r
=
parseOr
();
r
=
parseOr
();
if
(
firstChar
!=
'}'
)
{
if
(
firstChar
!=
'}'
)
{
throw
new
Error
(
"expected }, got "
+
currentToken
+
" syntax:"
+
syntax
);
throw
new
Assertion
Error
(
"expected }, got "
+
currentToken
+
" syntax:"
+
syntax
);
}
}
}
else
if
(
"@commaDots@"
.
equals
(
currentToken
))
{
}
else
if
(
"@commaDots@"
.
equals
(
currentToken
))
{
r
=
new
RuleList
(
new
RuleElement
(
","
,
currentTopic
),
lastRepeat
,
false
);
r
=
new
RuleList
(
new
RuleElement
(
","
,
currentTopic
),
lastRepeat
,
false
);
...
...
This diff is collapsed.
Click to expand it.
h2/src/main/org/h2/bnf/RuleElement.java
浏览文件 @
12c3cf9a
...
@@ -40,7 +40,7 @@ public class RuleElement implements Rule {
...
@@ -40,7 +40,7 @@ public class RuleElement implements Rule {
if
(
link
!=
null
)
{
if
(
link
!=
null
)
{
return
link
.
random
(
config
,
level
+
1
);
return
link
.
random
(
config
,
level
+
1
);
}
}
throw
new
Error
(
name
);
throw
new
Assertion
Error
(
name
);
}
}
public
String
name
()
{
public
String
name
()
{
...
@@ -76,7 +76,7 @@ public class RuleElement implements Rule {
...
@@ -76,7 +76,7 @@ public class RuleElement implements Rule {
return
;
return
;
}
}
}
}
throw
new
Error
(
"Unknown "
+
name
+
"/"
+
test
);
throw
new
Assertion
Error
(
"Unknown "
+
name
+
"/"
+
test
);
}
}
public
boolean
matchRemove
(
Sentence
sentence
)
{
public
boolean
matchRemove
(
Sentence
sentence
)
{
...
...
This diff is collapsed.
Click to expand it.
h2/src/main/org/h2/bnf/RuleFixed.java
浏览文件 @
12c3cf9a
...
@@ -55,7 +55,7 @@ public class RuleFixed implements Rule {
...
@@ -55,7 +55,7 @@ public class RuleFixed implements Rule {
case
DIGIT:
case
DIGIT:
return
"0"
;
return
"0"
;
default
:
default
:
throw
new
Error
(
"type="
+
type
);
throw
new
Assertion
Error
(
"type="
+
type
);
}
}
}
}
...
@@ -92,7 +92,7 @@ public class RuleFixed implements Rule {
...
@@ -92,7 +92,7 @@ public class RuleFixed implements Rule {
case
DIGIT:
case
DIGIT:
return
""
+
(
char
)
(
'0'
+
r
.
nextInt
(
10
));
return
""
+
(
char
)
(
'0'
+
r
.
nextInt
(
10
));
default
:
default
:
throw
new
Error
(
"type="
+
type
);
throw
new
Assertion
Error
(
"type="
+
type
);
}
}
}
}
...
@@ -213,7 +213,7 @@ public class RuleFixed implements Rule {
...
@@ -213,7 +213,7 @@ public class RuleFixed implements Rule {
}
}
break
;
break
;
default
:
default
:
throw
new
Error
(
"type="
+
type
);
throw
new
Assertion
Error
(
"type="
+
type
);
}
}
if
(
s
.
equals
(
query
))
{
if
(
s
.
equals
(
query
))
{
return
false
;
return
false
;
...
@@ -292,7 +292,7 @@ public class RuleFixed implements Rule {
...
@@ -292,7 +292,7 @@ public class RuleFixed implements Rule {
}
}
break
;
break
;
default
:
default
:
throw
new
Error
(
"type="
+
type
);
throw
new
Assertion
Error
(
"type="
+
type
);
}
}
}
}
...
...
This diff is collapsed.
Click to expand it.
h2/src/main/org/h2/bnf/RuleList.java
浏览文件 @
12c3cf9a
...
@@ -58,7 +58,7 @@ public class RuleList implements Rule {
...
@@ -58,7 +58,7 @@ public class RuleList implements Rule {
if
(
level
>
10
)
{
if
(
level
>
10
)
{
if
(
level
>
1000
)
{
if
(
level
>
1000
)
{
// better than stack overflow
// better than stack overflow
throw
new
Error
();
throw
new
Assertion
Error
();
}
}
return
get
(
0
).
random
(
config
,
level
);
return
get
(
0
).
random
(
config
,
level
);
}
}
...
...
This diff is collapsed.
Click to expand it.
h2/src/main/org/h2/jdbc/JdbcBatchUpdateException.java
浏览文件 @
12c3cf9a
...
@@ -16,7 +16,7 @@ import java.sql.SQLException;
...
@@ -16,7 +16,7 @@ import java.sql.SQLException;
*/
*/
public
class
JdbcBatchUpdateException
extends
BatchUpdateException
{
public
class
JdbcBatchUpdateException
extends
BatchUpdateException
{
private
static
final
long
serialVersionUID
=
9006432914018679675
L
;
private
static
final
long
serialVersionUID
=
1
L
;
/**
/**
* INTERNAL
* INTERNAL
...
...
This diff is collapsed.
Click to expand it.
h2/src/main/org/h2/jdbc/JdbcSQLException.java
浏览文件 @
12c3cf9a
...
@@ -17,7 +17,7 @@ import org.h2.engine.Constants;
...
@@ -17,7 +17,7 @@ import org.h2.engine.Constants;
*/
*/
public
class
JdbcSQLException
extends
SQLException
{
public
class
JdbcSQLException
extends
SQLException
{
private
static
final
long
serialVersionUID
=
-
820082178822695415
1L
;
private
static
final
long
serialVersionUID
=
1L
;
private
final
String
originalMessage
;
private
final
String
originalMessage
;
private
final
Throwable
cause
;
private
final
Throwable
cause
;
private
final
String
stackTrace
;
private
final
String
stackTrace
;
...
...
This diff is collapsed.
Click to expand it.
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论