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 {
...
@@ -2030,11 +2030,9 @@ public class Function extends Expression implements FunctionCall {
return
ValueString
.
get
(
isInPostgreSqlMode
&&
(
regexpMode
==
null
||
regexpMode
.
indexOf
(
'g'
)
<
0
)
?
return
ValueString
.
get
(
isInPostgreSqlMode
&&
(
regexpMode
==
null
||
regexpMode
.
indexOf
(
'g'
)
<
0
)
?
matcher
.
replaceFirst
(
replacement
)
:
matcher
.
replaceAll
(
replacement
),
matcher
.
replaceFirst
(
replacement
)
:
matcher
.
replaceAll
(
replacement
),
mode
.
treatEmptyStringsAsNull
);
mode
.
treatEmptyStringsAsNull
);
}
catch
(
StringIndexOutOfBoundsException
e
)
{
throw
DbException
.
get
(
ErrorCode
.
LIKE_ESCAPE_ERROR_1
,
e
,
replacement
);
}
catch
(
PatternSyntaxException
e
)
{
}
catch
(
PatternSyntaxException
e
)
{
throw
DbException
.
get
(
ErrorCode
.
LIKE_ESCAPE_ERROR_1
,
e
,
regexp
);
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
);
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 {
...
@@ -88,9 +88,7 @@ public class DbException extends RuntimeException {
}
}
}
}
}
}
}
catch
(
OutOfMemoryError
e
)
{
}
catch
(
OutOfMemoryError
|
IOException
e
)
{
DbException
.
traceThrowable
(
e
);
}
catch
(
IOException
e
)
{
DbException
.
traceThrowable
(
e
);
DbException
.
traceThrowable
(
e
);
}
}
}
}
...
...
h2/src/main/org/h2/server/web/WebServlet.java
浏览文件 @
a80c1338
...
@@ -63,12 +63,10 @@ public class WebServlet extends HttpServlet {
...
@@ -63,12 +63,10 @@ public class WebServlet extends HttpServlet {
try
{
try
{
InetAddress
address
=
InetAddress
.
getByName
(
addr
);
InetAddress
address
=
InetAddress
.
getByName
(
addr
);
return
address
.
isLoopbackAddress
();
return
address
.
isLoopbackAddress
();
}
catch
(
UnknownHostException
e
)
{
}
catch
(
UnknownHostException
|
NoClassDefFoundError
e
)
{
return
false
;
return
false
;
}
catch
(
NoClassDefFoundError
e
)
{
}
// Google App Engine does not allow java.net.InetAddress
// Google App Engine does not allow java.net.InetAddress
return
false
;
}
}
}
private
String
getAllowedFile
(
HttpServletRequest
req
,
String
requestedFile
)
{
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 {
...
@@ -486,11 +486,7 @@ public class FileLock implements Runnable {
save
();
save
();
}
}
Thread
.
sleep
(
sleep
);
Thread
.
sleep
(
sleep
);
}
catch
(
OutOfMemoryError
e
)
{
}
catch
(
OutOfMemoryError
|
NullPointerException
|
InterruptedException
e
)
{
// ignore
}
catch
(
InterruptedException
e
)
{
// ignore
}
catch
(
NullPointerException
e
)
{
// ignore
// ignore
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
trace
.
debug
(
e
,
"watchdog"
);
trace
.
debug
(
e
,
"watchdog"
);
...
...
h2/src/main/org/h2/store/fs/FilePathNioMapped.java
浏览文件 @
a80c1338
...
@@ -170,11 +170,7 @@ class FileNioMapped extends FileBase {
...
@@ -170,11 +170,7 @@ class FileNioMapped extends FileBase {
dst
.
position
(
dst
.
position
()
+
len
);
dst
.
position
(
dst
.
position
()
+
len
);
pos
+=
len
;
pos
+=
len
;
return
len
;
return
len
;
}
catch
(
IllegalArgumentException
e
)
{
}
catch
(
IllegalArgumentException
|
BufferUnderflowException
e
)
{
EOFException
e2
=
new
EOFException
(
"EOF"
);
e2
.
initCause
(
e
);
throw
e2
;
}
catch
(
BufferUnderflowException
e
)
{
EOFException
e2
=
new
EOFException
(
"EOF"
);
EOFException
e2
=
new
EOFException
(
"EOF"
);
e2
.
initCause
(
e
);
e2
.
initCause
(
e
);
throw
e2
;
throw
e2
;
...
...
h2/src/test/org/h2/test/db/TestFullText.java
浏览文件 @
a80c1338
...
@@ -77,10 +77,7 @@ public class TestFullText extends TestDb {
...
@@ -77,10 +77,7 @@ public class TestFullText extends TestDb {
testPerformance
(
true
);
testPerformance
(
true
);
testReopen
(
true
);
testReopen
(
true
);
testDropIndex
(
true
);
testDropIndex
(
true
);
}
catch
(
ClassNotFoundException
e
)
{
}
catch
(
ClassNotFoundException
|
NoClassDefFoundError
e
)
{
println
(
"Class not found, not tested: "
+
LUCENE_FULLTEXT_CLASS_NAME
);
// ok
}
catch
(
NoClassDefFoundError
e
)
{
println
(
"Class not found, not tested: "
+
LUCENE_FULLTEXT_CLASS_NAME
);
println
(
"Class not found, not tested: "
+
LUCENE_FULLTEXT_CLASS_NAME
);
// ok
// ok
}
}
...
...
h2/src/test/org/h2/test/store/TestRandomMapOps.java
浏览文件 @
a80c1338
...
@@ -51,9 +51,7 @@ public class TestRandomMapOps extends TestBase {
...
@@ -51,9 +51,7 @@ public class TestRandomMapOps extends TestBase {
try
{
try
{
testOps
(
fileName
,
size
,
seed
);
testOps
(
fileName
,
size
,
seed
);
continue
;
continue
;
}
catch
(
Exception
e
)
{
}
catch
(
Exception
|
AssertionError
e
)
{
ex
=
e
;
}
catch
(
AssertionError
e
)
{
ex
=
e
;
ex
=
e
;
}
}
if
(
op
<
best
)
{
if
(
op
<
best
)
{
...
...
h2/src/test/org/h2/test/synth/TestCrashAPI.java
浏览文件 @
a80c1338
...
@@ -393,9 +393,7 @@ public class TestCrashAPI extends TestDb implements Runnable {
...
@@ -393,9 +393,7 @@ public class TestCrashAPI extends TestDb implements Runnable {
try
{
try
{
callCount
++;
callCount
++;
result
=
m
.
invoke
(
o
,
params
);
result
=
m
.
invoke
(
o
,
params
);
}
catch
(
IllegalArgumentException
e
)
{
}
catch
(
IllegalArgumentException
|
IllegalAccessException
e
)
{
TestBase
.
logError
(
"error"
,
e
);
}
catch
(
IllegalAccessException
e
)
{
TestBase
.
logError
(
"error"
,
e
);
TestBase
.
logError
(
"error"
,
e
);
}
catch
(
InvocationTargetException
e
)
{
}
catch
(
InvocationTargetException
e
)
{
Throwable
t
=
e
.
getTargetException
();
Throwable
t
=
e
.
getTargetException
();
...
...
h2/src/test/org/h2/test/trace/Statement.java
浏览文件 @
a80c1338
...
@@ -80,9 +80,7 @@ class Statement {
...
@@ -80,9 +80,7 @@ class Statement {
player
.
assign
(
assignVariable
,
obj
);
player
.
assign
(
assignVariable
,
obj
);
}
}
return
obj
;
return
obj
;
}
catch
(
IllegalArgumentException
e
)
{
}
catch
(
IllegalArgumentException
|
IllegalAccessException
e
)
{
e
.
printStackTrace
();
}
catch
(
IllegalAccessException
e
)
{
e
.
printStackTrace
();
e
.
printStackTrace
();
}
catch
(
InvocationTargetException
e
)
{
}
catch
(
InvocationTargetException
e
)
{
Throwable
t
=
e
.
getTargetException
();
Throwable
t
=
e
.
getTargetException
();
...
...
h2/src/test/org/h2/test/unit/TestClassLoaderLeak.java
浏览文件 @
a80c1338
...
@@ -114,9 +114,7 @@ public class TestClassLoaderLeak extends TestBase {
...
@@ -114,9 +114,7 @@ public class TestClassLoaderLeak extends TestBase {
if
(
c
==
null
)
{
if
(
c
==
null
)
{
try
{
try
{
c
=
findClass
(
name
);
c
=
findClass
(
name
);
}
catch
(
SecurityException
e
)
{
}
catch
(
SecurityException
|
ClassNotFoundException
e
)
{
return
super
.
loadClass
(
name
,
resolve
);
}
catch
(
ClassNotFoundException
e
)
{
return
super
.
loadClass
(
name
,
resolve
);
return
super
.
loadClass
(
name
,
resolve
);
}
}
if
(
resolve
)
{
if
(
resolve
)
{
...
...
h2/src/test/org/h2/test/unit/TestFileSystem.java
浏览文件 @
a80c1338
...
@@ -102,10 +102,7 @@ public class TestFileSystem extends TestDb {
...
@@ -102,10 +102,7 @@ public class TestFileSystem extends TestDb {
testFileSystem
(
"split:"
+
getBaseDir
()
+
"/fs"
);
testFileSystem
(
"split:"
+
getBaseDir
()
+
"/fs"
);
testFileSystem
(
"split:nioMapped:"
+
getBaseDir
()
+
"/fs"
);
testFileSystem
(
"split:nioMapped:"
+
getBaseDir
()
+
"/fs"
);
}
}
}
catch
(
Exception
e
)
{
}
catch
(
Exception
|
Error
e
)
{
e
.
printStackTrace
();
throw
e
;
}
catch
(
Error
e
)
{
e
.
printStackTrace
();
e
.
printStackTrace
();
throw
e
;
throw
e
;
}
finally
{
}
finally
{
...
...
h2/src/tools/org/h2/build/BuildBase.java
浏览文件 @
a80c1338
...
@@ -274,9 +274,7 @@ public class BuildBase {
...
@@ -274,9 +274,7 @@ public class BuildBase {
}
catch
(
InvocationTargetException
e
)
{
}
catch
(
InvocationTargetException
e
)
{
throw
e
.
getCause
();
throw
e
.
getCause
();
}
}
}
catch
(
Error
e
)
{
}
catch
(
Error
|
RuntimeException
e
)
{
throw
e
;
}
catch
(
RuntimeException
e
)
{
throw
e
;
throw
e
;
}
catch
(
Throwable
e
)
{
}
catch
(
Throwable
e
)
{
throw
new
RuntimeException
(
e
);
throw
new
RuntimeException
(
e
);
...
...
h2/src/tools/org/h2/dev/hash/MinimalPerfectHash.java
浏览文件 @
a80c1338
...
@@ -499,9 +499,7 @@ public class MinimalPerfectHash<K> {
...
@@ -499,9 +499,7 @@ public class MinimalPerfectHash<K> {
for
(
ByteArrayOutputStream
temp
:
outList
)
{
for
(
ByteArrayOutputStream
temp
:
outList
)
{
out
.
write
(
temp
.
toByteArray
());
out
.
write
(
temp
.
toByteArray
());
}
}
}
catch
(
InterruptedException
e
)
{
}
catch
(
InterruptedException
|
IOException
e
)
{
throw
new
RuntimeException
(
e
);
}
catch
(
IOException
e
)
{
throw
new
RuntimeException
(
e
);
throw
new
RuntimeException
(
e
);
}
}
}
}
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论