Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
为 GitLab 提交贡献
登录/注册
切换导航
H
h2database
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分枝图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
计划
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
分枝图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
Administrator
h2database
Commits
d1303928
提交
d1303928
authored
7 年前
作者:
Evgenij Ryazanov
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Use String.replace(char, char) instead of StringUtils.replaceAll(String, String) where possible
上级
731abc26
无相关合并请求
显示空白字符变更
内嵌
并排
正在显示
5 个修改的文件
包含
8 行增加
和
8 行删除
+8
-8
WebApp.java
h2/src/main/org/h2/server/web/WebApp.java
+2
-2
Database.java
h2/src/test/org/h2/test/bench/Database.java
+1
-1
TestCsv.java
h2/src/test/org/h2/test/db/TestCsv.java
+1
-1
GenerateDoc.java
h2/src/tools/org/h2/build/doc/GenerateDoc.java
+2
-2
Railroads.java
h2/src/tools/org/h2/jcr/Railroads.java
+2
-2
没有找到文件。
h2/src/main/org/h2/server/web/WebApp.java
浏览文件 @
d1303928
...
@@ -314,9 +314,9 @@ public class WebApp {
...
@@ -314,9 +314,9 @@ public class WebApp {
value
=
space
+
value
;
value
=
space
+
value
;
}
}
key
=
StringUtils
.
urlEncode
(
key
);
key
=
StringUtils
.
urlEncode
(
key
);
key
=
StringUtils
.
replaceAll
(
key
,
"+"
,
" "
);
key
=
key
.
replace
(
'+'
,
' '
);
value
=
StringUtils
.
urlEncode
(
value
);
value
=
StringUtils
.
urlEncode
(
value
);
value
=
StringUtils
.
replaceAll
(
value
,
"+"
,
" "
);
value
=
value
.
replace
(
'+'
,
' '
);
list
.
add
(
type
+
"#"
+
key
+
"#"
+
value
);
list
.
add
(
type
+
"#"
+
key
+
"#"
+
value
);
}
}
Collections
.
sort
(
list
);
Collections
.
sort
(
list
);
...
...
This diff is collapsed.
Click to expand it.
h2/src/test/org/h2/test/bench/Database.java
浏览文件 @
d1303928
...
@@ -247,7 +247,7 @@ class Database {
...
@@ -247,7 +247,7 @@ class Database {
String
key
=
(
String
)
k
;
String
key
=
(
String
)
k
;
if
(
key
.
startsWith
(
databaseType
+
"."
))
{
if
(
key
.
startsWith
(
databaseType
+
"."
))
{
String
pattern
=
key
.
substring
(
databaseType
.
length
()
+
1
);
String
pattern
=
key
.
substring
(
databaseType
.
length
()
+
1
);
pattern
=
StringUtils
.
replaceAll
(
pattern
,
"_"
,
" "
);
pattern
=
pattern
.
replace
(
'_'
,
' '
);
pattern
=
StringUtils
.
toUpperEnglish
(
pattern
);
pattern
=
StringUtils
.
toUpperEnglish
(
pattern
);
String
replacement
=
prop
.
getProperty
(
key
);
String
replacement
=
prop
.
getProperty
(
key
);
replace
.
add
(
new
String
[]{
pattern
,
replacement
});
replace
.
add
(
new
String
[]{
pattern
,
replacement
});
...
...
This diff is collapsed.
Click to expand it.
h2/src/test/org/h2/test/db/TestCsv.java
浏览文件 @
d1303928
...
@@ -402,7 +402,7 @@ public class TestCsv extends TestBase {
...
@@ -402,7 +402,7 @@ public class TestCsv extends TestBase {
InputStreamReader
reader
=
new
InputStreamReader
(
InputStreamReader
reader
=
new
InputStreamReader
(
FileUtils
.
newInputStream
(
fileName
));
FileUtils
.
newInputStream
(
fileName
));
String
text
=
IOUtils
.
readStringAndClose
(
reader
,
-
1
).
trim
();
String
text
=
IOUtils
.
readStringAndClose
(
reader
,
-
1
).
trim
();
text
=
StringUtils
.
replaceAll
(
text
,
"\n"
,
" "
);
text
=
text
.
replace
(
'\n'
,
' '
);
assertEquals
(
"ID|NAME 1|Hello"
,
text
);
assertEquals
(
"ID|NAME 1|Hello"
,
text
);
ResultSet
rs
=
stat
.
executeQuery
(
"select * from csvread('"
+
ResultSet
rs
=
stat
.
executeQuery
(
"select * from csvread('"
+
fileName
+
"', null, null, '|', '')"
);
fileName
+
"', null, null, '|', '')"
);
...
...
This diff is collapsed.
Click to expand it.
h2/src/tools/org/h2/build/doc/GenerateDoc.java
浏览文件 @
d1303928
...
@@ -176,9 +176,9 @@ public class GenerateDoc {
...
@@ -176,9 +176,9 @@ public class GenerateDoc {
}
}
String
link
=
topic
.
toLowerCase
();
String
link
=
topic
.
toLowerCase
();
link
=
StringUtils
.
replaceAll
(
link
,
" "
,
"_"
);
link
=
link
.
replace
(
' '
,
'_'
);
// link = StringUtils.replaceAll(link, "_", "");
// link = StringUtils.replaceAll(link, "_", "");
link
=
StringUtils
.
replaceAll
(
link
,
"@"
,
"_"
);
link
=
link
.
replace
(
'@'
,
'_'
);
map
.
put
(
"link"
,
StringUtils
.
urlEncode
(
link
));
map
.
put
(
"link"
,
StringUtils
.
urlEncode
(
link
));
list
.
add
(
map
);
list
.
add
(
map
);
...
...
This diff is collapsed.
Click to expand it.
h2/src/tools/org/h2/jcr/Railroads.java
浏览文件 @
d1303928
...
@@ -109,9 +109,9 @@ public class Railroads {
...
@@ -109,9 +109,9 @@ public class Railroads {
}
}
String
link
=
topic
.
toLowerCase
();
String
link
=
topic
.
toLowerCase
();
link
=
StringUtils
.
replaceAll
(
link
,
" "
,
"_"
);
link
=
link
.
replace
(
' '
,
'_'
);
// link = StringUtils.replaceAll(link, "_", "");
// link = StringUtils.replaceAll(link, "_", "");
link
=
StringUtils
.
replaceAll
(
link
,
"@"
,
"_"
);
link
=
link
.
replace
(
'@'
,
'_'
);
map
.
put
(
"link"
,
StringUtils
.
urlEncode
(
link
));
map
.
put
(
"link"
,
StringUtils
.
urlEncode
(
link
));
list
.
add
(
map
);
list
.
add
(
map
);
}
}
...
...
This diff is collapsed.
Click to expand it.
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论