Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
为 GitLab 提交贡献
登录/注册
切换导航
H
h2database
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分枝图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
计划
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
分枝图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
Administrator
h2database
Commits
a80c1338
提交
a80c1338
authored
12月 08, 2018
作者:
igor-suhorukov
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Use multi-catch java 7 language construction to simplify code
上级
ba4dbc05
显示空白字符变更
内嵌
并排
正在显示
13 个修改的文件
包含
15 行增加
和
47 行删除
+15
-47
Function.java
h2/src/main/org/h2/expression/function/Function.java
+1
-3
DbException.java
h2/src/main/org/h2/message/DbException.java
+1
-3
WebServlet.java
h2/src/main/org/h2/server/web/WebServlet.java
+3
-5
FileLock.java
h2/src/main/org/h2/store/FileLock.java
+1
-5
FilePathNioMapped.java
h2/src/main/org/h2/store/fs/FilePathNioMapped.java
+1
-5
TestFullText.java
h2/src/test/org/h2/test/db/TestFullText.java
+1
-4
TestRandomMapOps.java
h2/src/test/org/h2/test/store/TestRandomMapOps.java
+1
-3
TestCrashAPI.java
h2/src/test/org/h2/test/synth/TestCrashAPI.java
+1
-3
Statement.java
h2/src/test/org/h2/test/trace/Statement.java
+1
-3
TestClassLoaderLeak.java
h2/src/test/org/h2/test/unit/TestClassLoaderLeak.java
+1
-3
TestFileSystem.java
h2/src/test/org/h2/test/unit/TestFileSystem.java
+1
-4
BuildBase.java
h2/src/tools/org/h2/build/BuildBase.java
+1
-3
MinimalPerfectHash.java
h2/src/tools/org/h2/dev/hash/MinimalPerfectHash.java
+1
-3
没有找到文件。
h2/src/main/org/h2/expression/function/Function.java
浏览文件 @
a80c1338
...
...
@@ -2030,11 +2030,9 @@ public class Function extends Expression implements FunctionCall {
return
ValueString
.
get
(
isInPostgreSqlMode
&&
(
regexpMode
==
null
||
regexpMode
.
indexOf
(
'g'
)
<
0
)
?
matcher
.
replaceFirst
(
replacement
)
:
matcher
.
replaceAll
(
replacement
),
mode
.
treatEmptyStringsAsNull
);
}
catch
(
StringIndexOutOfBoundsException
e
)
{
throw
DbException
.
get
(
ErrorCode
.
LIKE_ESCAPE_ERROR_1
,
e
,
replacement
);
}
catch
(
PatternSyntaxException
e
)
{
throw
DbException
.
get
(
ErrorCode
.
LIKE_ESCAPE_ERROR_1
,
e
,
regexp
);
}
catch
(
IllegalArgumentException
e
)
{
}
catch
(
StringIndexOutOfBoundsException
|
IllegalArgumentException
e
)
{
throw
DbException
.
get
(
ErrorCode
.
LIKE_ESCAPE_ERROR_1
,
e
,
replacement
);
}
}
...
...
h2/src/main/org/h2/message/DbException.java
浏览文件 @
a80c1338
...
...
@@ -88,9 +88,7 @@ public class DbException extends RuntimeException {
}
}
}
}
catch
(
OutOfMemoryError
e
)
{
DbException
.
traceThrowable
(
e
);
}
catch
(
IOException
e
)
{
}
catch
(
OutOfMemoryError
|
IOException
e
)
{
DbException
.
traceThrowable
(
e
);
}
}
...
...
h2/src/main/org/h2/server/web/WebServlet.java
浏览文件 @
a80c1338
...
...
@@ -63,12 +63,10 @@ public class WebServlet extends HttpServlet {
try
{
InetAddress
address
=
InetAddress
.
getByName
(
addr
);
return
address
.
isLoopbackAddress
();
}
catch
(
UnknownHostException
e
)
{
}
catch
(
UnknownHostException
|
NoClassDefFoundError
e
)
{
return
false
;
}
catch
(
NoClassDefFoundError
e
)
{
// Google App Engine does not allow java.net.InetAddress
return
false
;
}
}
// Google App Engine does not allow java.net.InetAddress
}
private
String
getAllowedFile
(
HttpServletRequest
req
,
String
requestedFile
)
{
...
...
h2/src/main/org/h2/store/FileLock.java
浏览文件 @
a80c1338
...
...
@@ -486,11 +486,7 @@ public class FileLock implements Runnable {
save
();
}
Thread
.
sleep
(
sleep
);
}
catch
(
OutOfMemoryError
e
)
{
// ignore
}
catch
(
InterruptedException
e
)
{
// ignore
}
catch
(
NullPointerException
e
)
{
}
catch
(
OutOfMemoryError
|
NullPointerException
|
InterruptedException
e
)
{
// ignore
}
catch
(
Exception
e
)
{
trace
.
debug
(
e
,
"watchdog"
);
...
...
h2/src/main/org/h2/store/fs/FilePathNioMapped.java
浏览文件 @
a80c1338
...
...
@@ -170,11 +170,7 @@ class FileNioMapped extends FileBase {
dst
.
position
(
dst
.
position
()
+
len
);
pos
+=
len
;
return
len
;
}
catch
(
IllegalArgumentException
e
)
{
EOFException
e2
=
new
EOFException
(
"EOF"
);
e2
.
initCause
(
e
);
throw
e2
;
}
catch
(
BufferUnderflowException
e
)
{
}
catch
(
IllegalArgumentException
|
BufferUnderflowException
e
)
{
EOFException
e2
=
new
EOFException
(
"EOF"
);
e2
.
initCause
(
e
);
throw
e2
;
...
...
h2/src/test/org/h2/test/db/TestFullText.java
浏览文件 @
a80c1338
...
...
@@ -77,10 +77,7 @@ public class TestFullText extends TestDb {
testPerformance
(
true
);
testReopen
(
true
);
testDropIndex
(
true
);
}
catch
(
ClassNotFoundException
e
)
{
println
(
"Class not found, not tested: "
+
LUCENE_FULLTEXT_CLASS_NAME
);
// ok
}
catch
(
NoClassDefFoundError
e
)
{
}
catch
(
ClassNotFoundException
|
NoClassDefFoundError
e
)
{
println
(
"Class not found, not tested: "
+
LUCENE_FULLTEXT_CLASS_NAME
);
// ok
}
...
...
h2/src/test/org/h2/test/store/TestRandomMapOps.java
浏览文件 @
a80c1338
...
...
@@ -51,9 +51,7 @@ public class TestRandomMapOps extends TestBase {
try
{
testOps
(
fileName
,
size
,
seed
);
continue
;
}
catch
(
Exception
e
)
{
ex
=
e
;
}
catch
(
AssertionError
e
)
{
}
catch
(
Exception
|
AssertionError
e
)
{
ex
=
e
;
}
if
(
op
<
best
)
{
...
...
h2/src/test/org/h2/test/synth/TestCrashAPI.java
浏览文件 @
a80c1338
...
...
@@ -393,9 +393,7 @@ public class TestCrashAPI extends TestDb implements Runnable {
try
{
callCount
++;
result
=
m
.
invoke
(
o
,
params
);
}
catch
(
IllegalArgumentException
e
)
{
TestBase
.
logError
(
"error"
,
e
);
}
catch
(
IllegalAccessException
e
)
{
}
catch
(
IllegalArgumentException
|
IllegalAccessException
e
)
{
TestBase
.
logError
(
"error"
,
e
);
}
catch
(
InvocationTargetException
e
)
{
Throwable
t
=
e
.
getTargetException
();
...
...
h2/src/test/org/h2/test/trace/Statement.java
浏览文件 @
a80c1338
...
...
@@ -80,9 +80,7 @@ class Statement {
player
.
assign
(
assignVariable
,
obj
);
}
return
obj
;
}
catch
(
IllegalArgumentException
e
)
{
e
.
printStackTrace
();
}
catch
(
IllegalAccessException
e
)
{
}
catch
(
IllegalArgumentException
|
IllegalAccessException
e
)
{
e
.
printStackTrace
();
}
catch
(
InvocationTargetException
e
)
{
Throwable
t
=
e
.
getTargetException
();
...
...
h2/src/test/org/h2/test/unit/TestClassLoaderLeak.java
浏览文件 @
a80c1338
...
...
@@ -114,9 +114,7 @@ public class TestClassLoaderLeak extends TestBase {
if
(
c
==
null
)
{
try
{
c
=
findClass
(
name
);
}
catch
(
SecurityException
e
)
{
return
super
.
loadClass
(
name
,
resolve
);
}
catch
(
ClassNotFoundException
e
)
{
}
catch
(
SecurityException
|
ClassNotFoundException
e
)
{
return
super
.
loadClass
(
name
,
resolve
);
}
if
(
resolve
)
{
...
...
h2/src/test/org/h2/test/unit/TestFileSystem.java
浏览文件 @
a80c1338
...
...
@@ -102,10 +102,7 @@ public class TestFileSystem extends TestDb {
testFileSystem
(
"split:"
+
getBaseDir
()
+
"/fs"
);
testFileSystem
(
"split:nioMapped:"
+
getBaseDir
()
+
"/fs"
);
}
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
throw
e
;
}
catch
(
Error
e
)
{
}
catch
(
Exception
|
Error
e
)
{
e
.
printStackTrace
();
throw
e
;
}
finally
{
...
...
h2/src/tools/org/h2/build/BuildBase.java
浏览文件 @
a80c1338
...
...
@@ -274,9 +274,7 @@ public class BuildBase {
}
catch
(
InvocationTargetException
e
)
{
throw
e
.
getCause
();
}
}
catch
(
Error
e
)
{
throw
e
;
}
catch
(
RuntimeException
e
)
{
}
catch
(
Error
|
RuntimeException
e
)
{
throw
e
;
}
catch
(
Throwable
e
)
{
throw
new
RuntimeException
(
e
);
...
...
h2/src/tools/org/h2/dev/hash/MinimalPerfectHash.java
浏览文件 @
a80c1338
...
...
@@ -499,9 +499,7 @@ public class MinimalPerfectHash<K> {
for
(
ByteArrayOutputStream
temp
:
outList
)
{
out
.
write
(
temp
.
toByteArray
());
}
}
catch
(
InterruptedException
e
)
{
throw
new
RuntimeException
(
e
);
}
catch
(
IOException
e
)
{
}
catch
(
InterruptedException
|
IOException
e
)
{
throw
new
RuntimeException
(
e
);
}
}
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论