Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
为 GitLab 提交贡献
登录/注册
切换导航
H
h2database
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分枝图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
计划
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
分枝图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
Administrator
h2database
Commits
969f44a9
Unverified
提交
969f44a9
authored
1月 14, 2018
作者:
Noel Grandin
提交者:
GitHub
1月 14, 2018
浏览文件
操作
浏览文件
下载
差异文件
Merge pull request #760 from katzyn/misc
Assorted minor optimizations
上级
5866dfcf
d1303928
显示空白字符变更
内嵌
并排
正在显示
21 个修改的文件
包含
33 行增加
和
33 行删除
+33
-33
DropView.java
h2/src/main/org/h2/command/ddl/DropView.java
+1
-1
Database.java
h2/src/main/org/h2/engine/Database.java
+2
-2
Session.java
h2/src/main/org/h2/engine/Session.java
+1
-1
MVTableEngine.java
h2/src/main/org/h2/mvstore/db/MVTableEngine.java
+1
-1
WebApp.java
h2/src/main/org/h2/server/web/WebApp.java
+2
-2
WebThread.java
h2/src/main/org/h2/server/web/WebThread.java
+1
-1
FilePathNioMem.java
h2/src/main/org/h2/store/fs/FilePathNioMem.java
+3
-3
TableView.java
h2/src/main/org/h2/table/TableView.java
+2
-2
NetUtils.java
h2/src/main/org/h2/util/NetUtils.java
+1
-1
ToChar.java
h2/src/main/org/h2/util/ToChar.java
+1
-1
Database.java
h2/src/test/org/h2/test/bench/Database.java
+1
-1
Coverage.java
h2/src/test/org/h2/test/coverage/Coverage.java
+1
-1
TestCsv.java
h2/src/test/org/h2/test/db/TestCsv.java
+1
-1
TestAutoServer.java
h2/src/test/org/h2/test/server/TestAutoServer.java
+1
-1
WebClient.java
h2/src/test/org/h2/test/server/WebClient.java
+1
-1
CheckJavadoc.java
h2/src/tools/org/h2/build/code/CheckJavadoc.java
+1
-1
GenerateDoc.java
h2/src/tools/org/h2/build/doc/GenerateDoc.java
+2
-2
LinkChecker.java
h2/src/tools/org/h2/build/doc/LinkChecker.java
+6
-6
WebSite.java
h2/src/tools/org/h2/build/doc/WebSite.java
+1
-1
FtpControl.java
h2/src/tools/org/h2/dev/ftp/server/FtpControl.java
+1
-1
Railroads.java
h2/src/tools/org/h2/jcr/Railroads.java
+2
-2
没有找到文件。
h2/src/main/org/h2/command/ddl/DropView.java
浏览文件 @
969f44a9
...
@@ -73,7 +73,7 @@ public class DropView extends SchemaCommand {
...
@@ -73,7 +73,7 @@ public class DropView extends SchemaCommand {
// supported from imported keys - but not for dependent db objects
// supported from imported keys - but not for dependent db objects
TableView
tableView
=
(
TableView
)
view
;
TableView
tableView
=
(
TableView
)
view
;
ArrayList
<
Table
>
copyOfDependencies
=
new
ArrayList
<
Table
>(
tableView
.
getTables
());
ArrayList
<
Table
>
copyOfDependencies
=
new
ArrayList
<>(
tableView
.
getTables
());
view
.
lock
(
session
,
true
,
true
);
view
.
lock
(
session
,
true
,
true
);
session
.
getDatabase
().
removeSchemaObject
(
session
,
view
);
session
.
getDatabase
().
removeSchemaObject
(
session
,
view
);
...
...
h2/src/main/org/h2/engine/Database.java
浏览文件 @
969f44a9
...
@@ -92,8 +92,8 @@ public class Database implements DataHandler {
...
@@ -92,8 +92,8 @@ public class Database implements DataHandler {
private
static
int
initialPowerOffCount
;
private
static
int
initialPowerOffCount
;
private
static
final
ThreadLocal
<
Session
>
META_LOCK_DEBUGGING
=
new
ThreadLocal
<
Session
>();
private
static
final
ThreadLocal
<
Session
>
META_LOCK_DEBUGGING
=
new
ThreadLocal
<>();
private
static
final
ThreadLocal
<
Throwable
>
META_LOCK_DEBUGGING_STACK
=
new
ThreadLocal
<
Throwable
>();
private
static
final
ThreadLocal
<
Throwable
>
META_LOCK_DEBUGGING_STACK
=
new
ThreadLocal
<>();
/**
/**
* The default name of the system user. This name is only used as long as
* The default name of the system user. This name is only used as long as
...
...
h2/src/main/org/h2/engine/Session.java
浏览文件 @
969f44a9
...
@@ -123,7 +123,7 @@ public class Session extends SessionWithState {
...
@@ -123,7 +123,7 @@ public class Session extends SessionWithState {
private
long
modificationMetaID
=
-
1
;
private
long
modificationMetaID
=
-
1
;
private
SubQueryInfo
subQueryInfo
;
private
SubQueryInfo
subQueryInfo
;
private
int
parsingView
;
private
int
parsingView
;
private
Deque
<
String
>
viewNameStack
=
new
ArrayDeque
<
String
>();
private
Deque
<
String
>
viewNameStack
=
new
ArrayDeque
<>();
private
int
preparingQueryExpression
;
private
int
preparingQueryExpression
;
private
volatile
SmallLRUCache
<
Object
,
ViewIndex
>
viewIndexCache
;
private
volatile
SmallLRUCache
<
Object
,
ViewIndex
>
viewIndexCache
;
private
HashMap
<
Object
,
ViewIndex
>
subQueryIndexCache
;
private
HashMap
<
Object
,
ViewIndex
>
subQueryIndexCache
;
...
...
h2/src/main/org/h2/mvstore/db/MVTableEngine.java
浏览文件 @
969f44a9
...
@@ -269,7 +269,7 @@ public class MVTableEngine implements TableEngine {
...
@@ -269,7 +269,7 @@ public class MVTableEngine implements TableEngine {
MVMap
<?,
?>
map
=
store
.
openMap
(
mapName
);
MVMap
<?,
?>
map
=
store
.
openMap
(
mapName
);
store
.
removeMap
(
map
);
store
.
removeMap
(
map
);
}
else
if
(
mapName
.
startsWith
(
"table."
)
||
mapName
.
startsWith
(
"index."
))
{
}
else
if
(
mapName
.
startsWith
(
"table."
)
||
mapName
.
startsWith
(
"index."
))
{
int
id
=
Integer
.
parseInt
(
mapName
.
substring
(
1
+
mapName
.
indexOf
(
"."
)));
int
id
=
Integer
.
parseInt
(
mapName
.
substring
(
1
+
mapName
.
indexOf
(
'.'
)));
if
(!
objectIds
.
get
(
id
))
{
if
(!
objectIds
.
get
(
id
))
{
ValueDataType
keyType
=
new
ValueDataType
(
null
,
null
,
null
);
ValueDataType
keyType
=
new
ValueDataType
(
null
,
null
,
null
);
ValueDataType
valueType
=
new
ValueDataType
(
null
,
null
,
null
);
ValueDataType
valueType
=
new
ValueDataType
(
null
,
null
,
null
);
...
...
h2/src/main/org/h2/server/web/WebApp.java
浏览文件 @
969f44a9
...
@@ -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
);
...
...
h2/src/main/org/h2/server/web/WebThread.java
浏览文件 @
969f44a9
...
@@ -120,7 +120,7 @@ class WebThread extends WebApp implements Runnable {
...
@@ -120,7 +120,7 @@ class WebThread extends WebApp implements Runnable {
trace
(
head
+
": "
+
file
);
trace
(
head
+
": "
+
file
);
file
=
getAllowedFile
(
file
);
file
=
getAllowedFile
(
file
);
attributes
=
new
Properties
();
attributes
=
new
Properties
();
int
paramIndex
=
file
.
indexOf
(
"?"
);
int
paramIndex
=
file
.
indexOf
(
'?'
);
session
=
null
;
session
=
null
;
if
(
paramIndex
>=
0
)
{
if
(
paramIndex
>=
0
)
{
String
attrib
=
file
.
substring
(
paramIndex
+
1
);
String
attrib
=
file
.
substring
(
paramIndex
+
1
);
...
...
h2/src/main/org/h2/store/fs/FilePathNioMem.java
浏览文件 @
969f44a9
...
@@ -248,8 +248,8 @@ class FilePathNioMemLZF extends FilePathNioMem {
...
@@ -248,8 +248,8 @@ class FilePathNioMemLZF extends FilePathNioMem {
throw
new
IllegalArgumentException
(
path
+
throw
new
IllegalArgumentException
(
path
+
" doesn't start with "
+
getScheme
());
" doesn't start with "
+
getScheme
());
}
}
int
idx1
=
path
.
indexOf
(
":"
);
int
idx1
=
path
.
indexOf
(
':'
);
int
idx2
=
path
.
lastIndexOf
(
":"
);
int
idx2
=
path
.
lastIndexOf
(
':'
);
final
FilePathNioMemLZF
p
=
new
FilePathNioMemLZF
();
final
FilePathNioMemLZF
p
=
new
FilePathNioMemLZF
();
if
(
idx1
!=
-
1
&&
idx1
!=
idx2
)
{
if
(
idx1
!=
-
1
&&
idx1
!=
idx2
)
{
p
.
compressLaterCachePercent
=
Float
.
parseFloat
(
path
.
substring
(
idx1
+
1
,
idx2
));
p
.
compressLaterCachePercent
=
Float
.
parseFloat
(
path
.
substring
(
idx1
+
1
,
idx2
));
...
@@ -260,7 +260,7 @@ class FilePathNioMemLZF extends FilePathNioMem {
...
@@ -260,7 +260,7 @@ class FilePathNioMemLZF extends FilePathNioMem {
@Override
@Override
protected
boolean
isRoot
()
{
protected
boolean
isRoot
()
{
return
name
.
lastIndexOf
(
":"
)
==
name
.
length
()
-
1
;
return
name
.
lastIndexOf
(
':'
)
==
name
.
length
()
-
1
;
}
}
@Override
@Override
...
...
h2/src/main/org/h2/table/TableView.java
浏览文件 @
969f44a9
...
@@ -725,7 +725,7 @@ public class TableView extends Table {
...
@@ -725,7 +725,7 @@ public class TableView extends Table {
List
<
Column
>
columnTemplateList
;
List
<
Column
>
columnTemplateList
;
String
[]
querySQLOutput
=
new
String
[]{
null
};
String
[]
querySQLOutput
=
new
String
[]{
null
};
ArrayList
<
String
>
columnNames
=
new
ArrayList
<
String
>();
ArrayList
<
String
>
columnNames
=
new
ArrayList
<>();
for
(
Column
columnTemplate:
columnTemplates
)
{
for
(
Column
columnTemplate:
columnTemplates
)
{
columnNames
.
add
(
columnTemplate
.
getName
());
columnNames
.
add
(
columnTemplate
.
getName
());
}
}
...
@@ -811,7 +811,7 @@ public class TableView extends Table {
...
@@ -811,7 +811,7 @@ public class TableView extends Table {
// create table data object
// create table data object
CreateTableData
recursiveTableData
=
new
CreateTableData
();
CreateTableData
recursiveTableData
=
new
CreateTableData
();
recursiveTableData
.
id
=
db
.
allocateObjectId
();
recursiveTableData
.
id
=
db
.
allocateObjectId
();
recursiveTableData
.
columns
=
new
ArrayList
<
Column
>(
columns
);
recursiveTableData
.
columns
=
new
ArrayList
<>(
columns
);
recursiveTableData
.
tableName
=
cteViewName
;
recursiveTableData
.
tableName
=
cteViewName
;
recursiveTableData
.
temporary
=
!
isPersistent
;
recursiveTableData
.
temporary
=
!
isPersistent
;
recursiveTableData
.
persistData
=
true
;
recursiveTableData
.
persistData
=
true
;
...
...
h2/src/main/org/h2/util/NetUtils.java
浏览文件 @
969f44a9
...
@@ -260,7 +260,7 @@ public class NetUtils {
...
@@ -260,7 +260,7 @@ public class NetUtils {
}
else
{
}
else
{
address
=
bind
.
getHostAddress
();
address
=
bind
.
getHostAddress
();
if
(
bind
instanceof
Inet6Address
)
{
if
(
bind
instanceof
Inet6Address
)
{
if
(
address
.
indexOf
(
"%"
)
>=
0
)
{
if
(
address
.
indexOf
(
'%'
)
>=
0
)
{
address
=
"localhost"
;
address
=
"localhost"
;
}
else
if
(
address
.
indexOf
(
':'
)
>=
0
&&
!
address
.
startsWith
(
"["
))
{
}
else
if
(
address
.
indexOf
(
':'
)
>=
0
&&
!
address
.
startsWith
(
"["
))
{
// adds'[' and ']' if required for
// adds'[' and ']' if required for
...
...
h2/src/main/org/h2/util/ToChar.java
浏览文件 @
969f44a9
...
@@ -178,7 +178,7 @@ public class ToChar {
...
@@ -178,7 +178,7 @@ public class ToChar {
format
=
format
.
substring
(
0
,
format
.
length
()
-
2
);
format
=
format
.
substring
(
0
,
format
.
length
()
-
2
);
}
}
int
v
=
formatUp
.
indexOf
(
"V"
);
int
v
=
formatUp
.
indexOf
(
'V'
);
if
(
v
>=
0
)
{
if
(
v
>=
0
)
{
int
digits
=
0
;
int
digits
=
0
;
for
(
int
i
=
v
+
1
;
i
<
format
.
length
();
i
++)
{
for
(
int
i
=
v
+
1
;
i
<
format
.
length
();
i
++)
{
...
...
h2/src/test/org/h2/test/bench/Database.java
浏览文件 @
969f44a9
...
@@ -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
});
...
...
h2/src/test/org/h2/test/coverage/Coverage.java
浏览文件 @
969f44a9
...
@@ -500,7 +500,7 @@ public class Coverage {
...
@@ -500,7 +500,7 @@ public class Coverage {
private
void
nextDebug
()
throws
IOException
{
private
void
nextDebug
()
throws
IOException
{
if
(
perFunction
)
{
if
(
perFunction
)
{
int
i
=
function
.
indexOf
(
"("
);
int
i
=
function
.
indexOf
(
'('
);
String
func
=
i
<
0
?
function
:
function
.
substring
(
0
,
i
);
String
func
=
i
<
0
?
function
:
function
.
substring
(
0
,
i
);
String
fileLine
=
file
+
"."
+
func
+
"("
;
String
fileLine
=
file
+
"."
+
func
+
"("
;
i
=
file
.
lastIndexOf
(
'.'
);
i
=
file
.
lastIndexOf
(
'.'
);
...
...
h2/src/test/org/h2/test/db/TestCsv.java
浏览文件 @
969f44a9
...
@@ -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, '|', '')"
);
...
...
h2/src/test/org/h2/test/server/TestAutoServer.java
浏览文件 @
969f44a9
...
@@ -80,7 +80,7 @@ public class TestAutoServer extends TestBase {
...
@@ -80,7 +80,7 @@ public class TestAutoServer extends TestBase {
String
key
=
prop
.
getProperty
(
"id"
);
String
key
=
prop
.
getProperty
(
"id"
);
String
server
=
prop
.
getProperty
(
"server"
);
String
server
=
prop
.
getProperty
(
"server"
);
if
(
server
!=
null
)
{
if
(
server
!=
null
)
{
String
u2
=
url
.
substring
(
url
.
indexOf
(
";"
));
String
u2
=
url
.
substring
(
url
.
indexOf
(
';'
));
u2
=
"jdbc:h2:tcp://"
+
server
+
"/"
+
key
+
u2
;
u2
=
"jdbc:h2:tcp://"
+
server
+
"/"
+
key
+
u2
;
Connection
conn
=
DriverManager
.
getConnection
(
u2
,
user
,
password
);
Connection
conn
=
DriverManager
.
getConnection
(
u2
,
user
,
password
);
conn
.
close
();
conn
.
close
();
...
...
h2/src/test/org/h2/test/server/WebClient.java
浏览文件 @
969f44a9
...
@@ -143,7 +143,7 @@ public class WebClient {
...
@@ -143,7 +143,7 @@ public class WebClient {
*/
*/
String
getBaseUrl
(
String
url
)
{
String
getBaseUrl
(
String
url
)
{
int
idx
=
url
.
indexOf
(
"//"
);
int
idx
=
url
.
indexOf
(
"//"
);
idx
=
url
.
indexOf
(
"/"
,
idx
+
2
);
idx
=
url
.
indexOf
(
'/'
,
idx
+
2
);
if
(
idx
>=
0
)
{
if
(
idx
>=
0
)
{
return
url
.
substring
(
0
,
idx
);
return
url
.
substring
(
0
,
idx
);
}
}
...
...
h2/src/tools/org/h2/build/code/CheckJavadoc.java
浏览文件 @
969f44a9
...
@@ -85,7 +85,7 @@ public class CheckJavadoc {
...
@@ -85,7 +85,7 @@ public class CheckJavadoc {
int
lineNumber
=
1
;
int
lineNumber
=
1
;
boolean
inComment
=
false
;
boolean
inComment
=
false
;
while
(
true
)
{
while
(
true
)
{
int
next
=
text
.
indexOf
(
"\n"
,
pos
);
int
next
=
text
.
indexOf
(
'\n'
,
pos
);
if
(
next
<
0
)
{
if
(
next
<
0
)
{
break
;
break
;
}
}
...
...
h2/src/tools/org/h2/build/doc/GenerateDoc.java
浏览文件 @
969f44a9
...
@@ -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
);
...
...
h2/src/tools/org/h2/build/doc/LinkChecker.java
浏览文件 @
969f44a9
...
@@ -181,7 +181,7 @@ public class LinkChecker {
...
@@ -181,7 +181,7 @@ public class LinkChecker {
break
;
break
;
}
}
int
start
=
idx
+
" id=\""
.
length
();
int
start
=
idx
+
" id=\""
.
length
();
int
end
=
html
.
indexOf
(
"\""
,
start
);
int
end
=
html
.
indexOf
(
'"'
,
start
);
if
(
end
<
0
)
{
if
(
end
<
0
)
{
error
(
fileName
,
"Expected \" after id= "
+
html
.
substring
(
idx
,
idx
+
100
));
error
(
fileName
,
"Expected \" after id= "
+
html
.
substring
(
idx
,
idx
+
100
));
}
}
...
@@ -196,11 +196,11 @@ public class LinkChecker {
...
@@ -196,11 +196,11 @@ public class LinkChecker {
if
(
idx
<
0
)
{
if
(
idx
<
0
)
{
break
;
break
;
}
}
int
start
=
html
.
indexOf
(
"\""
,
idx
);
int
start
=
html
.
indexOf
(
'"'
,
idx
);
if
(
start
<
0
)
{
if
(
start
<
0
)
{
error
(
fileName
,
"Expected \" after href= at "
+
html
.
substring
(
idx
,
idx
+
100
));
error
(
fileName
,
"Expected \" after href= at "
+
html
.
substring
(
idx
,
idx
+
100
));
}
}
int
end
=
html
.
indexOf
(
"\""
,
start
+
1
);
int
end
=
html
.
indexOf
(
'"'
,
start
+
1
);
if
(
end
<
0
)
{
if
(
end
<
0
)
{
error
(
fileName
,
"Expected \" after href= at "
+
html
.
substring
(
idx
,
idx
+
100
));
error
(
fileName
,
"Expected \" after href= at "
+
html
.
substring
(
idx
,
idx
+
100
));
}
}
...
@@ -237,16 +237,16 @@ public class LinkChecker {
...
@@ -237,16 +237,16 @@ public class LinkChecker {
if
(
idx
<
0
)
{
if
(
idx
<
0
)
{
break
;
break
;
}
}
int
equals
=
html
.
indexOf
(
"="
,
idx
);
int
equals
=
html
.
indexOf
(
'='
,
idx
);
if
(
equals
<
0
)
{
if
(
equals
<
0
)
{
error
(
fileName
,
"Expected = after <a at "
+
html
.
substring
(
idx
,
idx
+
100
));
error
(
fileName
,
"Expected = after <a at "
+
html
.
substring
(
idx
,
idx
+
100
));
}
}
String
type
=
html
.
substring
(
idx
+
2
,
equals
).
trim
();
String
type
=
html
.
substring
(
idx
+
2
,
equals
).
trim
();
int
start
=
html
.
indexOf
(
"\""
,
idx
);
int
start
=
html
.
indexOf
(
'"'
,
idx
);
if
(
start
<
0
)
{
if
(
start
<
0
)
{
error
(
fileName
,
"Expected \" after <a at "
+
html
.
substring
(
idx
,
idx
+
100
));
error
(
fileName
,
"Expected \" after <a at "
+
html
.
substring
(
idx
,
idx
+
100
));
}
}
int
end
=
html
.
indexOf
(
"\""
,
start
+
1
);
int
end
=
html
.
indexOf
(
'"'
,
start
+
1
);
if
(
end
<
0
)
{
if
(
end
<
0
)
{
error
(
fileName
,
"Expected \" after <a at "
+
html
.
substring
(
idx
,
idx
+
100
));
error
(
fileName
,
"Expected \" after <a at "
+
html
.
substring
(
idx
,
idx
+
100
));
}
}
...
...
h2/src/tools/org/h2/build/doc/WebSite.java
浏览文件 @
969f44a9
...
@@ -77,7 +77,7 @@ public class WebSite {
...
@@ -77,7 +77,7 @@ public class WebSite {
return
page
;
return
page
;
}
}
String
language
=
""
;
String
language
=
""
;
int
index
=
fileName
.
indexOf
(
"_"
);
int
index
=
fileName
.
indexOf
(
'_'
);
if
(
index
>=
0
)
{
if
(
index
>=
0
)
{
int
end
=
fileName
.
indexOf
(
'.'
);
int
end
=
fileName
.
indexOf
(
'.'
);
language
=
fileName
.
substring
(
index
,
end
);
language
=
fileName
.
substring
(
index
,
end
);
...
...
h2/src/tools/org/h2/dev/ftp/server/FtpControl.java
浏览文件 @
969f44a9
...
@@ -160,7 +160,7 @@ public class FtpControl extends Thread {
...
@@ -160,7 +160,7 @@ public class FtpControl extends Thread {
}
}
}
else
if
(
"CDUP"
.
equals
(
command
))
{
}
else
if
(
"CDUP"
.
equals
(
command
))
{
if
(
currentDir
.
length
()
>
1
)
{
if
(
currentDir
.
length
()
>
1
)
{
int
idx
=
currentDir
.
lastIndexOf
(
"/"
,
currentDir
.
length
()
-
2
);
int
idx
=
currentDir
.
lastIndexOf
(
'/'
,
currentDir
.
length
()
-
2
);
currentDir
=
currentDir
.
substring
(
0
,
idx
+
1
);
currentDir
=
currentDir
.
substring
(
0
,
idx
+
1
);
reply
(
250
,
"Ok"
);
reply
(
250
,
"Ok"
);
}
else
{
}
else
{
...
...
h2/src/tools/org/h2/jcr/Railroads.java
浏览文件 @
969f44a9
...
@@ -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
);
}
}
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论