提交 2409c63b authored 作者: Thomas Mueller's avatar Thomas Mueller

--no commit message

--no commit message
上级 0dca9d2e
......@@ -10,7 +10,7 @@ mkdir ..\h2web
rmdir /s /q bin 2>nul
rmdir /s /q temp 2>nul
call java14 >nul 2>nul
call java15 >nul 2>nul
call build -quiet
call java16 >nul 2>nul
......
......@@ -6,8 +6,8 @@ mkdir ../h2web
rm -rf bin
rm -rf temp
JAVA_HOME=$JAVA14
PATH=$JAVA14/bin:$PATH
JAVA_HOME=$JAVA15
PATH=$JAVA15/bin:$PATH
./build.sh -quiet
JAVA_HOME=$JAVA16
......
......@@ -44,10 +44,9 @@ public class CheckJavadoc {
if (name.equals("CVS") || name.equals(".svn")) {
return 0;
}
File[] list = file.listFiles();
boolean foundPackageHtml = false, foundJava = false;
for (int i = 0; i < list.length; i++) {
int type = check(list[i]);
for (File f : file.listFiles()) {
int type = check(f);
if (type == 1) {
foundJava = true;
} else if (type == 2) {
......
......@@ -60,9 +60,8 @@ public class CheckTextFiles {
if (name.equals("CVS") || name.equals(".svn")) {
return;
}
File[] list = file.listFiles();
for (int i = 0; i < list.length; i++) {
check(list[i]);
for (File f : file.listFiles()) {
check(f);
}
} else {
String suffix = "";
......@@ -71,8 +70,8 @@ public class CheckTextFiles {
suffix = name.substring(lastDot + 1);
}
boolean check = false, ignore = false;
for (int i = 0; i < SUFFIX_CHECK.length; i++) {
if (suffix.equals(SUFFIX_CHECK[i])) {
for (String s : SUFFIX_CHECK) {
if (suffix.equals(s)) {
check = true;
}
}
......@@ -86,14 +85,13 @@ public class CheckTextFiles {
check = false;
ignore = true;
}
for (int i = 0; i < SUFFIX_IGNORE.length; i++) {
if (suffix.equals(SUFFIX_IGNORE[i])) {
for (String s : SUFFIX_IGNORE) {
if (suffix.equals(s)) {
ignore = true;
}
}
boolean checkLicense = true;
for (int i = 0; i < suffixIgnoreLicense.length; i++) {
String ig = suffixIgnoreLicense[i];
for (String ig : suffixIgnoreLicense) {
if (suffix.equals(ig) || name.endsWith(ig)) {
checkLicense = false;
break;
......
......@@ -18,8 +18,8 @@ import java.util.ArrayList;
*/
public class SwitchSource {
private ArrayList enable = new ArrayList();
private ArrayList disable = new ArrayList();
private ArrayList<String> enable = new ArrayList<String>();
private ArrayList<String> disable = new ArrayList<String>();
/**
* This method is called when executing this application from the command
......@@ -101,9 +101,8 @@ public class SwitchSource {
} else if (name.endsWith(".java")) {
processFile(f);
} else if (f.isDirectory()) {
File[] files = f.listFiles();
for (int i = 0; i < files.length; i++) {
process(files[i]);
for (File file : f.listFiles()) {
process(file);
}
}
}
......@@ -135,13 +134,11 @@ public class SwitchSource {
String source = new String(buffer);
String target = source;
target = replaceAll(target, "//##", "//##");
for (int i = 0; i < enable.size(); i++) {
String x = (String) enable.get(i);
for (String x : enable) {
target = replaceAll(target, "/*## " + x + " begin ##", "//## " + x + " begin ##");
target = replaceAll(target, "## " + x + " end ##*/", "//## " + x + " end ##");
}
for (int i = 0; i < disable.size(); i++) {
String x = (String) disable.get(i);
for (String x : disable) {
target = replaceAll(target, "//## " + x + " begin ##", "/*## " + x + " begin ##");
target = replaceAll(target, "//## " + x + " end ##", "## " + x + " end ##*/");
}
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论