提交 a9d41543 authored 作者: Thomas Mueller's avatar Thomas Mueller

Spelling, re-order declarations, follow naming conventions

上级 dd184254
......@@ -24,7 +24,7 @@ Change Log
</li><li>Issue 417: H2 Console: the web session timeout didn't work, resulting in a memory leak.
This was only a problem if the H2 Console was run for a long time and many sessions were opened.
</li><li>Issue 412: Running the Server tool with just the option "-browser" will now log a warning.
</li><li>Issue 411: CloseWatcher registration was not concurency-safe.
</li><li>Issue 411: CloseWatcher registration was not concurrency-safe.
</li><li>MySQL compatibility: support for CONCAT_WS.
Thanks a lot to litailang for the patch!
</li><li>PostgreSQL compatibility: support for EXTRACT(WEEK FROM dateColumn).
......
......@@ -262,8 +262,7 @@ Due to using a log structured storage, there is no special case handling for lar
<h3>BLOB Support</h3>
<p>
There is a mechanism that stores BLOBs (large binary objects)
by splitting them into smaller blocks.
There is a mechanism that stores large binary objects by splitting them into smaller blocks.
This allows to store objects that don't fit in memory.
Streaming as well as random access reads on such objects are supported.
This tool is written on top of the store (only using the map interface).
......
......@@ -43,34 +43,34 @@ public class DbContents {
boolean isH2;
/**
* True if this is a H2 database in MySQL mode.
* True if this is a PostgreSQL database.
*/
private boolean isH2ModeMySQL;
boolean isPostgreSQL;
/**
* True if this is a PostgreSQL database.
* True if this is an Apache Derby database.
*/
boolean isPostgreSQL;
boolean isDerby;
/**
* True if this is a MySQL database.
* True if this is an SQLite database.
*/
private boolean isMySQL;
boolean isSQLite;
/**
* True if this is an Apache Derby database.
* True if this is a H2 database in MySQL mode.
*/
boolean isDerby;
private boolean isH2ModeMySQL;
/**
* True if this is a Firebird database.
* True if this is a MySQL database.
*/
private boolean isFirebird;
private boolean isMySQL;
/**
* True if this is an SQLite database.
* True if this is a Firebird database.
*/
boolean isSQLite;
private boolean isFirebird;
/**
* True if this is a MS SQL Server database.
......
......@@ -993,7 +993,7 @@ public class WebApp {
* @param size the number of statements
* @param buff the target buffer
*/
private void query(Connection conn, String s, int i, int size, StringBuilder buff) {
void query(Connection conn, String s, int i, int size, StringBuilder buff) {
if (!(s.startsWith("@") && s.endsWith("."))) {
buff.append(PageParser.escapeHtml(s + ";")).append("<br />");
}
......
......@@ -39,13 +39,13 @@ public class TableFilter implements ColumnResolver {
private static final int BEFORE_FIRST = 0, FOUND = 1, AFTER_LAST = 2, NULL_ROW = 3;
private Session session;
/**
* Whether this is a direct or indirect (nested) outer join
*/
protected boolean joinOuterIndirect;
private Session session;
private final Table table;
private final Select select;
private String alias;
......
......@@ -26,12 +26,13 @@ import org.h2.util.Utils;
*/
public class DbUpgrade {
private static final boolean upgradeClassesPresent;
private static final boolean UPGRADE_CLASSES_PRESENT;
private static boolean scriptInTempDir;
private static boolean deleteOldDb;
static {
upgradeClassesPresent = Utils.isClassPresent("org.h2.upgrade.v1_1.Driver");
UPGRADE_CLASSES_PRESENT = Utils.isClassPresent("org.h2.upgrade.v1_1.Driver");
}
/**
......@@ -45,7 +46,7 @@ public class DbUpgrade {
* @return the connection if connected with the old version (NO_UPGRADE)
*/
public static Connection connectOrUpgrade(String url, Properties info) throws SQLException {
if (!upgradeClassesPresent) {
if (!UPGRADE_CLASSES_PRESENT) {
return null;
}
Properties i2 = new Properties();
......
......@@ -59,11 +59,10 @@ public class Utils {
private static String[] allowedClassNamePrefixes;
static {
String cls = SysProperties.JAVA_OBJECT_SERIALIZER;
if (cls != null) {
String clazz = SysProperties.JAVA_OBJECT_SERIALIZER;
if (clazz != null) {
try {
serializer = (JavaObjectSerializer) loadUserClass(cls).newInstance();
serializer = (JavaObjectSerializer) loadUserClass(clazz).newInstance();
} catch (Exception e) {
throw DbException.convert(e);
}
......
......@@ -36,7 +36,7 @@ public class CompareMode {
private static CompareMode lastUsed;
private static final boolean canUseICU4J;
private static final boolean CAN_USE_ICU4J;
static {
boolean b = false;
......@@ -46,7 +46,7 @@ public class CompareMode {
} catch (Exception e) {
// ignore
}
canUseICU4J = b;
CAN_USE_ICU4J = b;
}
private final String name;
......@@ -86,7 +86,7 @@ public class CompareMode {
useICU4J = false;
name = name.substring(DEFAULT.length());
} else {
useICU4J = canUseICU4J;
useICU4J = CAN_USE_ICU4J;
}
if (useICU4J) {
lastUsed = new CompareModeIcu4J(name, strength);
......
......@@ -33,16 +33,16 @@ public class SpellChecker {
private static final String PREFIX_IGNORE = "abc";
private static final String[] IGNORE_FILES = {"mainWeb.html", "pg_catalog.sql"};
// these are public so we can set them during development testing
public boolean debug;
public boolean printDictionary;
private final HashSet<String> dictionary = new HashSet<String>();
private final HashSet<String> used = new HashSet<String>();
private final HashMap<String, Integer> unknown = new HashMap<String, Integer>();
private boolean addToDictionary;
private int errorCount;
private int contextCount;
// these are public so we can set them during development testing
public boolean debug;
public boolean printDictionary;
/**
* This method is called when executing this application from the command
......
......@@ -714,3 +714,10 @@ derive bounding greatly extreme terribly iterating pruned percentage
apart render cloned costly antialiasing antialias quercus rect mvr retina
sonatype deployed uffff bhat prashant doug lea retained inefficient segments
segment supplemental adjust evenly pick diehard mixes avalanche candidates
edition voytovych intersecting cow absent hickey fluid chen qian liberal
richard viktor structured continuous inherent kyoto contends abba optimised
rollbacks overtaking trivial mutation pitest rectangle uncommon deltas
purely intersection obviously cabinet berkeley configurable modular locality
subsystem persisting pit jdbm bigserial rtree mutationtest serializer feff mvstore
versioning
\ No newline at end of file
......@@ -14,8 +14,8 @@ import java.util.HashMap;
*/
public class HtmlConverter {
private static final HashMap<String, Character> charMap = new HashMap<String, Character>();
private static final HashMap<Character, String> codeMap = new HashMap<Character, String>();
private static final HashMap<String, Character> CHAR_MAP = new HashMap<String, Character>();
private static final HashMap<Character, String> CODE_MAP = new HashMap<Character, String>();
private static final String[] CHARS = { "quot:34", "amp:38", "lt:60", "gt:62", "nbsp:160", "iexcl:161", "cent:162",
"pound:163", "curren:164", "yen:165", "brvbar:166", "sect:167", "uml:168", "copy:169", "ordf:170",
......@@ -60,8 +60,8 @@ public class HtmlConverter {
String key = token.substring(0, idx);
int ch = Integer.parseInt(token.substring(idx + 1));
Character character = Character.valueOf((char) ch);
charMap.put(key, character);
codeMap.put(character, key);
CHAR_MAP.put(key, character);
CODE_MAP.put(character, key);
}
}
......@@ -81,7 +81,7 @@ public class HtmlConverter {
StringBuilder buff = new StringBuilder();
for (int i = 0; i < s.length(); i++) {
char ch = s.charAt(i);
String token = codeMap.get(ch);
String token = CODE_MAP.get(ch);
if (token == null) {
if (ch < 128) {
buff.append(ch);
......@@ -155,7 +155,7 @@ public class HtmlConverter {
}
}
} else {
repl = charMap.get(key);
repl = CHAR_MAP.get(key);
}
if (repl == null) {
buff.append("???" + key + "???");
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论