Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
为 GitLab 提交贡献
登录/注册
切换导航
H
h2database
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分枝图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
计划
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
分枝图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
Administrator
h2database
Commits
713b55c8
提交
713b55c8
authored
5月 27, 2008
作者:
Thomas Mueller
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
stricter checkstyle settings
上级
612d32f0
隐藏空白字符变更
内嵌
并排
正在显示
13 个修改的文件
包含
72 行增加
和
39 行删除
+72
-39
CheckJavadoc.java
h2/src/tools/org/h2/build/code/CheckJavadoc.java
+1
-1
CheckTextFiles.java
h2/src/tools/org/h2/build/code/CheckTextFiles.java
+15
-12
GenerateDoc.java
h2/src/tools/org/h2/build/doc/GenerateDoc.java
+4
-4
LinkChecker.java
h2/src/tools/org/h2/build/doc/LinkChecker.java
+3
-3
SpellChecker.java
h2/src/tools/org/h2/build/doc/SpellChecker.java
+13
-6
WebSite.java
h2/src/tools/org/h2/build/doc/WebSite.java
+4
-4
dictionary.txt
h2/src/tools/org/h2/build/doc/dictionary.txt
+3
-1
PropertiesToUTF8.java
h2/src/tools/org/h2/build/i18n/PropertiesToUTF8.java
+4
-0
HtmlConverter.java
h2/src/tools/org/h2/build/indexer/HtmlConverter.java
+5
-0
Indexer.java
h2/src/tools/org/h2/build/indexer/Indexer.java
+3
-3
PgTcpRedirect.java
h2/src/tools/org/h2/dev/net/PgTcpRedirect.java
+8
-4
SecureKeyStoreBuilder.java
h2/src/tools/org/h2/dev/security/SecureKeyStoreBuilder.java
+4
-0
Base64.java
h2/src/tools/org/h2/dev/util/Base64.java
+5
-1
没有找到文件。
h2/src/tools/org/h2/build/code/CheckJavadoc.java
浏览文件 @
713b55c8
...
...
@@ -17,8 +17,8 @@ import java.io.RandomAccessFile;
*/
public
class
CheckJavadoc
{
private
int
errorCount
;
private
static
final
int
MAX_COMMENT_LINE_SIZE
=
80
;
private
int
errorCount
;
public
static
void
main
(
String
[]
args
)
throws
Exception
{
new
CheckJavadoc
().
run
();
...
...
h2/src/tools/org/h2/build/code/CheckTextFiles.java
浏览文件 @
713b55c8
...
...
@@ -18,25 +18,28 @@ import org.h2.util.ByteUtils;
* removes trailing spaces.
*/
public
class
CheckTextFiles
{
public
static
void
main
(
String
[]
args
)
throws
Exception
{
new
CheckTextFiles
().
run
();
}
// must contain "+" otherwise this here counts as well
private
static
final
String
COPYRIGHT
=
"Copyright 2004-2008 "
+
"H2 Group."
;
private
static
final
String
LICENSE
=
"Multiple-Licensed "
+
"under the H2 License"
;
String
[]
suffixCheck
=
new
String
[]
{
"html"
,
"jsp"
,
"js"
,
"css"
,
"bat"
,
"nsi"
,
private
static
final
String
[]
SUFFIX_CHECK
=
new
String
[]
{
"html"
,
"jsp"
,
"js"
,
"css"
,
"bat"
,
"nsi"
,
"java"
,
"txt"
,
"properties"
,
"sql"
,
"xml"
,
"csv"
,
"Driver"
};
String
[]
suffixIgnore
=
new
String
[]
{
"gif"
,
"png"
,
"odg"
,
"ico"
,
"sxd"
,
private
static
final
String
[]
SUFFIX_IGNORE
=
new
String
[]
{
"gif"
,
"png"
,
"odg"
,
"ico"
,
"sxd"
,
"layout"
,
"res"
,
"win"
,
"jar"
,
"task"
,
"svg"
,
"MF"
,
"sh"
};
boolean
failOnError
;
boolean
allowTab
,
allowCR
=
true
,
allowTrailingSpaces
=
true
;
int
spacesPerTab
=
4
;
boolean
autoFix
=
true
;
boolean
useCRLF
=
true
;
// must contain "+" otherwise this here counts as well
static
final
String
COPYRIGHT
=
"Copyright 2004-2008 "
+
"H2 Group."
;
static
final
String
LICENSE
=
"Multiple-Licensed "
+
"under the H2 License"
;
String
[]
suffixIgnoreLicense
=
new
String
[]
{
"bat"
,
"nsi"
,
"txt"
,
"properties"
,
"xml"
,
"java.sql.Driver"
,
"task"
,
"sh"
};
boolean
hasError
;
public
static
void
main
(
String
[]
args
)
throws
Exception
{
new
CheckTextFiles
().
run
();
}
void
run
()
throws
Exception
{
String
baseDir
=
"src"
;
check
(
new
File
(
baseDir
));
...
...
@@ -62,8 +65,8 @@ public class CheckTextFiles {
suffix
=
name
.
substring
(
lastDot
+
1
);
}
boolean
check
=
false
,
ignore
=
false
;
for
(
int
i
=
0
;
i
<
suffixCheck
.
length
;
i
++)
{
if
(
suffix
.
equals
(
suffixCheck
[
i
]))
{
for
(
int
i
=
0
;
i
<
SUFFIX_CHECK
.
length
;
i
++)
{
if
(
suffix
.
equals
(
SUFFIX_CHECK
[
i
]))
{
check
=
true
;
}
}
...
...
@@ -77,8 +80,8 @@ public class CheckTextFiles {
check
=
false
;
ignore
=
true
;
}
for
(
int
i
=
0
;
i
<
suffixIgnore
.
length
;
i
++)
{
if
(
suffix
.
equals
(
suffixIgnore
[
i
]))
{
for
(
int
i
=
0
;
i
<
SUFFIX_IGNORE
.
length
;
i
++)
{
if
(
suffix
.
equals
(
SUFFIX_IGNORE
[
i
]))
{
ignore
=
true
;
}
}
...
...
h2/src/tools/org/h2/build/doc/GenerateDoc.java
浏览文件 @
713b55c8
...
...
@@ -30,16 +30,16 @@ import org.h2.util.StringUtils;
*/
public
class
GenerateDoc
{
public
static
void
main
(
String
[]
args
)
throws
Exception
{
new
GenerateDoc
().
run
(
args
);
}
String
inDir
=
"src/docsrc/html"
;
String
outDir
=
"docs/html"
;
Connection
conn
;
HashMap
session
=
new
HashMap
();
Bnf
bnf
;
public
static
void
main
(
String
[]
args
)
throws
Exception
{
new
GenerateDoc
().
run
(
args
);
}
void
run
(
String
[]
args
)
throws
Exception
{
for
(
int
i
=
0
;
i
<
args
.
length
;
i
++)
{
if
(
args
[
i
].
equals
(
"-in"
))
{
...
...
h2/src/tools/org/h2/build/doc/LinkChecker.java
浏览文件 @
713b55c8
...
...
@@ -27,14 +27,14 @@ public class LinkChecker {
private
static
final
String
[]
IGNORE_MISSING_LINKS_TO
=
new
String
[]{
"SysProperties"
,
"ErrorCode"
};
private
HashMap
targets
=
new
HashMap
();
private
HashMap
links
=
new
HashMap
();
public
static
void
main
(
String
[]
args
)
throws
Exception
{
new
LinkChecker
().
run
(
args
);
}
private
HashMap
targets
=
new
HashMap
();
private
HashMap
links
=
new
HashMap
();
private
void
run
(
String
[]
args
)
throws
Exception
{
String
dir
=
"docs"
;
for
(
int
i
=
0
;
i
<
args
.
length
;
i
++)
{
...
...
h2/src/tools/org/h2/build/doc/SpellChecker.java
浏览文件 @
713b55c8
...
...
@@ -24,19 +24,21 @@ import org.h2.build.BuildBase;
*/
public
class
SpellChecker
{
private
HashSet
dictionary
=
new
HashSet
();
private
HashSet
used
=
new
HashSet
();
private
HashMap
unknown
=
new
HashMap
();
private
boolean
debug
;
private
boolean
printDictionary
=
false
;
private
boolean
addToDictionary
;
private
static
final
String
[]
SUFFIX
=
new
String
[]
{
"html"
,
"java"
,
"sql"
,
"txt"
,
"xml"
,
"jsp"
,
"css"
,
"bat"
,
"csv"
,
"xml"
,
"js"
,
"Driver"
,
"properties"
,
"task"
,
"MF"
,
"sh"
,
""
};
private
static
final
String
[]
IGNORE
=
new
String
[]
{
"dev"
,
"nsi"
,
"gif"
,
"png"
,
"odg"
,
"ico"
,
"sxd"
,
"zip"
,
"bz2"
,
"rc"
,
"layout"
,
"res"
,
"dll"
,
"jar"
,
"svg"
};
private
static
final
String
PREFIX_IGNORE
=
"abc"
;
private
static
final
String
IGNORE_FILE
=
"mainWeb.html"
;
private
HashSet
dictionary
=
new
HashSet
();
private
HashSet
used
=
new
HashSet
();
private
HashMap
unknown
=
new
HashMap
();
private
boolean
debug
;
private
boolean
printDictionary
;
private
boolean
addToDictionary
;
private
int
errorCount
;
private
int
contextCount
;
public
static
void
main
(
String
[]
args
)
throws
IOException
{
String
dir
=
"src"
;
...
...
@@ -220,6 +222,10 @@ public class SpellChecker {
if
(
token
.
length
()
<
3
)
{
return
;
}
if
(
contextCount
>
0
)
{
// System.out.println(token);
contextCount
--;
}
while
(
true
)
{
char
last
=
token
.
charAt
(
token
.
length
()
-
1
);
if
(!
Character
.
isDigit
(
last
))
{
...
...
@@ -258,6 +264,7 @@ public class SpellChecker {
Integer
value
=
(
Integer
)
map
.
get
(
key
);
value
=
new
Integer
(
value
==
null
?
0
:
value
.
intValue
()
+
1
);
map
.
put
(
key
,
value
);
contextCount
=
10
;
}
}
h2/src/tools/org/h2/build/doc/WebSite.java
浏览文件 @
713b55c8
...
...
@@ -23,14 +23,14 @@ import org.h2.util.StringUtils;
*/
public
class
WebSite
{
String
sourceDir
=
"docs"
;
String
targetDir
=
"dataWeb"
;
private
static
final
String
ANALYTICS_TAG
=
"<!-- analytics -->"
;
private
static
final
String
ANALYTICS_SCRIPT
=
"<script src=\"http://www.google-analytics.com/ga.js\" type=\"text/javascript\"></script>\n"
+
"<script type=\"text/javascript\">var pageTracker=_gat._getTracker(\"UA-2351060-1\");pageTracker._initData();pageTracker._trackPageview();</script>"
;
String
sourceDir
=
"docs"
;
String
targetDir
=
"dataWeb"
;
public
static
void
main
(
String
[]
args
)
throws
Exception
{
new
WebSite
().
run
();
}
...
...
h2/src/tools/org/h2/build/doc/dictionary.txt
浏览文件 @
713b55c8
...
...
@@ -512,5 +512,7 @@ intentional knowing jcl plug facade deployment logback confusion visited
pickle associate subtraction negation multiplication visitors sharp connector
derbynet ado happy derbyclient unspecified federated sysadmin lengths doing
gives clunky cooperative paged conflicts ontology freely regards standards
placing refer informational unlocks
placing refer informational unlocks memo unlimited unmounted keeping hints
hides heterogeneous construction rutema prepending rowscn overrides jconsole
mbean explicit directs leaves printing holds covariant redirector
h2/src/tools/org/h2/build/i18n/PropertiesToUTF8.java
浏览文件 @
713b55c8
...
...
@@ -34,6 +34,10 @@ import org.h2.util.StringUtils;
* a properties file and vice versa.
*/
public
class
PropertiesToUTF8
{
private
PropertiesToUTF8
()
{
// utility class
}
public
static
void
main
(
String
[]
args
)
throws
Exception
{
convert
(
"bin/org/h2/res"
);
...
...
h2/src/tools/org/h2/build/indexer/HtmlConverter.java
浏览文件 @
713b55c8
...
...
@@ -13,6 +13,7 @@ import java.util.HashMap;
* character and vice versa.
*/
public
class
HtmlConverter
{
private
static
HashMap
charMap
=
new
HashMap
();
private
static
HashMap
codeMap
=
new
HashMap
();
...
...
@@ -49,6 +50,10 @@ public class HtmlConverter {
"rdquo:8221"
,
"bdquo:8222"
,
"dagger:8224"
,
"Dagger:8225"
,
"hellip:8230"
,
"permil:8240"
,
"lsaquo:8249"
,
"rsaquo:8250"
};
private
HtmlConverter
()
{
// utility class
}
static
{
for
(
int
i
=
0
;
i
<
CHARS
.
length
;
i
++)
{
String
token
=
CHARS
[
i
];
...
...
h2/src/tools/org/h2/build/indexer/Indexer.java
浏览文件 @
713b55c8
...
...
@@ -26,6 +26,9 @@ import org.h2.util.StringUtils;
*/
public
class
Indexer
{
private
static
final
int
MIN_WORD_SIZE
=
3
;
private
static
final
int
MAX_RELATIONS
=
20
;
ArrayList
pages
=
new
ArrayList
();
HashMap
words
=
new
HashMap
();
HashSet
noIndex
=
new
HashSet
();
...
...
@@ -37,9 +40,6 @@ public class Indexer {
boolean
title
;
boolean
heading
;
private
static
final
int
MIN_WORD_SIZE
=
3
;
private
static
final
int
MAX_RELATIONS
=
20
;
public
static
void
main
(
String
[]
args
)
throws
Exception
{
new
Indexer
().
run
(
args
);
}
...
...
h2/src/tools/org/h2/dev/net/PgTcpRedirect.java
浏览文件 @
713b55c8
...
...
@@ -33,8 +33,10 @@ public class PgTcpRedirect {
// http://developer.postgresql.org/pgdocs/postgres/protocol.html
// int portServer = 9083, portClient = 9084;
// int portServer = 3306, portClient = 3307;
// int portServer = 5435, portClient = 5433; // H2 PgServer
int
portServer
=
5432
,
portClient
=
5433
;
// PostgreSQL
// H2 PgServer
// int portServer = 5435, portClient = 5433;
// PostgreSQL
int
portServer
=
5432
,
portClient
=
5433
;
for
(
int
i
=
0
;
i
<
args
.
length
;
i
++)
{
if
(
"-client"
.
equals
(
args
[
i
]))
{
...
...
@@ -54,14 +56,16 @@ public class PgTcpRedirect {
}
}
/**
* This is the working thread of the TCP redirector.
*/
private
class
TcpRedirectThread
implements
Runnable
{
private
static
final
int
STATE_INIT_CLIENT
=
0
,
STATE_REGULAR
=
1
;
private
Socket
read
,
write
;
private
int
state
;
private
boolean
client
;
private
static
final
int
STATE_INIT_CLIENT
=
0
,
STATE_REGULAR
=
1
;
TcpRedirectThread
(
Socket
read
,
Socket
write
,
boolean
client
)
{
this
.
read
=
read
;
this
.
write
=
write
;
...
...
h2/src/tools/org/h2/dev/security/SecureKeyStoreBuilder.java
浏览文件 @
713b55c8
...
...
@@ -29,6 +29,10 @@ import org.h2.util.ByteUtils;
* in the function SecureSocketFactory.getKeyStore as specified
*/
public
class
SecureKeyStoreBuilder
{
private
SecureKeyStoreBuilder
()
{
// utility class
}
public
static
void
main
(
String
[]
a
)
throws
Exception
{
String
password
=
SecureSocketFactory
.
KEYSTORE_PASSWORD
;
...
...
h2/src/tools/org/h2/dev/util/Base64.java
浏览文件 @
713b55c8
...
...
@@ -12,9 +12,13 @@ import java.util.Random;
* This class converts binary to base64 and vice versa.
*/
public
class
Base64
{
private
static
final
byte
[]
CODE
=
new
byte
[
64
];
private
static
final
byte
[]
REV
=
new
byte
[
256
];
private
Base64
()
{
// utility class
}
static
{
for
(
int
i
=
'A'
;
i
<=
'Z'
;
i
++)
{
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论