Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
为 GitLab 提交贡献
登录/注册
切换导航
H
h2database
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分枝图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
计划
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
分枝图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
Administrator
h2database
Commits
576c7efd
提交
576c7efd
authored
3月 15, 2018
作者:
Jacek Ławrynowicz
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
cleanup - use contains instead of indexOf
上级
d8d0d1f9
显示空白字符变更
内嵌
并排
正在显示
6 个修改的文件
包含
7 行增加
和
12 行删除
+7
-12
ConnectionInfo.java
h2/src/main/org/h2/engine/ConnectionInfo.java
+1
-4
Session.java
h2/src/main/org/h2/engine/Session.java
+1
-1
CipherFactory.java
h2/src/main/org/h2/security/CipherFactory.java
+2
-4
FilePathNioMapped.java
h2/src/main/org/h2/store/fs/FilePathNioMapped.java
+1
-1
Table.java
h2/src/main/org/h2/table/Table.java
+1
-1
Console.java
h2/src/main/org/h2/tools/Console.java
+1
-1
没有找到文件。
h2/src/main/org/h2/engine/ConnectionInfo.java
浏览文件 @
576c7efd
...
@@ -376,10 +376,7 @@ public class ConnectionInfo implements Cloneable {
...
@@ -376,10 +376,7 @@ public class ConnectionInfo implements Cloneable {
if
(
nameNormalized
==
null
)
{
if
(
nameNormalized
==
null
)
{
if
(!
SysProperties
.
IMPLICIT_RELATIVE_PATH
)
{
if
(!
SysProperties
.
IMPLICIT_RELATIVE_PATH
)
{
if
(!
FileUtils
.
isAbsolute
(
name
))
{
if
(!
FileUtils
.
isAbsolute
(
name
))
{
if
(
name
.
indexOf
(
"./"
)
<
0
&&
if
(!
name
.
contains
(
"./"
)
&&
!
name
.
contains
(
".\\"
)
&&
!
name
.
contains
(
":/"
)
&&
!
name
.
contains
(
":\\"
))
{
name
.
indexOf
(
".\\"
)
<
0
&&
name
.
indexOf
(
":/"
)
<
0
&&
name
.
indexOf
(
":\\"
)
<
0
)
{
// the name could start with "./", or
// the name could start with "./", or
// it could start with a prefix such as "nio:./"
// it could start with a prefix such as "nio:./"
// for Windows, the path "\test" is not considered
// for Windows, the path "\test" is not considered
...
...
h2/src/main/org/h2/engine/Session.java
浏览文件 @
576c7efd
...
@@ -930,7 +930,7 @@ public class Session extends SessionWithState {
...
@@ -930,7 +930,7 @@ public class Session extends SessionWithState {
if
(
lockMode
!=
Constants
.
LOCK_MODE_OFF
&&
if
(
lockMode
!=
Constants
.
LOCK_MODE_OFF
&&
!
database
.
isMultiVersion
())
{
!
database
.
isMultiVersion
())
{
TableType
tableType
=
log
.
getTable
().
getTableType
();
TableType
tableType
=
log
.
getTable
().
getTableType
();
if
(
locks
.
indexOf
(
log
.
getTable
())
<
0
if
(
!
locks
.
contains
(
log
.
getTable
())
&&
TableType
.
TABLE_LINK
!=
tableType
&&
TableType
.
TABLE_LINK
!=
tableType
&&
TableType
.
EXTERNAL_TABLE_ENGINE
!=
tableType
)
{
&&
TableType
.
EXTERNAL_TABLE_ENGINE
!=
tableType
)
{
DbException
.
throwInternalError
(
""
+
tableType
);
DbException
.
throwInternalError
(
""
+
tableType
);
...
...
h2/src/main/org/h2/security/CipherFactory.java
浏览文件 @
576c7efd
...
@@ -389,10 +389,8 @@ public class CipherFactory {
...
@@ -389,10 +389,8 @@ public class CipherFactory {
private
static
String
[]
enableAnonymous
(
String
[]
enabled
,
String
[]
supported
)
{
private
static
String
[]
enableAnonymous
(
String
[]
enabled
,
String
[]
supported
)
{
LinkedHashSet
<
String
>
set
=
new
LinkedHashSet
<>();
LinkedHashSet
<
String
>
set
=
new
LinkedHashSet
<>();
for
(
String
x
:
supported
)
{
for
(
String
x
:
supported
)
{
if
(!
x
.
startsWith
(
"SSL"
)
&&
if
(!
x
.
startsWith
(
"SSL"
)
&&
x
.
contains
(
"_anon_"
)
&&
x
.
indexOf
(
"_anon_"
)
>=
0
&&
(
x
.
contains
(
"_AES_"
)
||
x
.
contains
(
"_3DES_"
))
&&
x
.
contains
(
"_SHA"
))
{
(
x
.
indexOf
(
"_AES_"
)
>=
0
||
x
.
indexOf
(
"_3DES_"
)
>=
0
)
&&
x
.
indexOf
(
"_SHA"
)
>=
0
)
{
set
.
add
(
x
);
set
.
add
(
x
);
}
}
}
}
...
...
h2/src/main/org/h2/store/fs/FilePathNioMapped.java
浏览文件 @
576c7efd
...
@@ -223,7 +223,7 @@ class FileNioMapped extends FileBase {
...
@@ -223,7 +223,7 @@ class FileNioMapped extends FileBase {
file
.
setLength
(
newLength
);
file
.
setLength
(
newLength
);
break
;
break
;
}
catch
(
IOException
e
)
{
}
catch
(
IOException
e
)
{
if
(
i
>
16
||
e
.
toString
().
indexOf
(
"user-mapped section open"
)
<
0
)
{
if
(
i
>
16
||
!
e
.
toString
().
contains
(
"user-mapped section open"
)
)
{
throw
e
;
throw
e
;
}
}
}
}
...
...
h2/src/main/org/h2/table/Table.java
浏览文件 @
576c7efd
...
@@ -901,7 +901,7 @@ public abstract class Table extends SchemaObjectBase {
...
@@ -901,7 +901,7 @@ public abstract class Table extends SchemaObjectBase {
* @param constraint the constraint to add
* @param constraint the constraint to add
*/
*/
public
void
addConstraint
(
Constraint
constraint
)
{
public
void
addConstraint
(
Constraint
constraint
)
{
if
(
constraints
==
null
||
constraints
.
indexOf
(
constraint
)
<
0
)
{
if
(
constraints
==
null
||
!
constraints
.
contains
(
constraint
)
)
{
constraints
=
add
(
constraints
,
constraint
);
constraints
=
add
(
constraints
,
constraint
);
}
}
}
}
...
...
h2/src/main/org/h2/tools/Console.java
浏览文件 @
576c7efd
...
@@ -356,7 +356,7 @@ ShutdownHandler {
...
@@ -356,7 +356,7 @@ ShutdownHandler {
System
.
gc
();
System
.
gc
();
// Mac OS X: Console tool process did not stop on exit
// Mac OS X: Console tool process did not stop on exit
String
os
=
System
.
getProperty
(
"os.name"
,
"generic"
).
toLowerCase
(
Locale
.
ENGLISH
);
String
os
=
System
.
getProperty
(
"os.name"
,
"generic"
).
toLowerCase
(
Locale
.
ENGLISH
);
if
(
os
.
indexOf
(
"mac"
)
>=
0
)
{
if
(
os
.
contains
(
"mac"
)
)
{
for
(
Thread
t
:
Thread
.
getAllStackTraces
().
keySet
())
{
for
(
Thread
t
:
Thread
.
getAllStackTraces
().
keySet
())
{
if
(
t
.
getName
().
startsWith
(
"AWT-"
))
{
if
(
t
.
getName
().
startsWith
(
"AWT-"
))
{
t
.
interrupt
();
t
.
interrupt
();
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论