Change "OutboxTable outboxes" to "OutboxTable outboxTable"
This makes the variable type clearer.
Change-Id: I6a2a6de8536357630a727c30e578daeb8a22835d
diff --git a/dev/codeserver/java/com/google/gwt/dev/codeserver/CodeServer.java b/dev/codeserver/java/com/google/gwt/dev/codeserver/CodeServer.java
index b18c568..ab3c996 100644
--- a/dev/codeserver/java/com/google/gwt/dev/codeserver/CodeServer.java
+++ b/dev/codeserver/java/com/google/gwt/dev/codeserver/CodeServer.java
@@ -62,7 +62,7 @@
PrintWriterTreeLogger logger = new PrintWriterTreeLogger();
logger.setMaxDetail(options.getLogLevel());
- OutboxTable outboxes;
+ OutboxTable outboxTable;
try {
File baseCacheDir =
@@ -70,7 +70,7 @@
UnitCache unitCache = UnitCacheSingleton.get(logger, null, baseCacheDir);
MinimalRebuildCacheManager minimalRebuildCacheManager =
new MinimalRebuildCacheManager(logger, baseCacheDir);
- outboxes = makeOutboxes(options, logger, unitCache, minimalRebuildCacheManager);
+ outboxTable = makeOutboxTable(options, logger, unitCache, minimalRebuildCacheManager);
} catch (Throwable t) {
t.printStackTrace();
System.out.println("FAIL");
@@ -84,7 +84,7 @@
try {
// TODO: actually test recompiling here.
// (This is just running precompiles repeatedly.)
- outboxes.defaultCompileAll(logger);
+ outboxTable.defaultCompileAll(logger);
} catch (Throwable t) {
t.printStackTrace();
System.out.println("FAIL");
@@ -129,17 +129,17 @@
UnitCache unitCache = UnitCacheSingleton.get(startupLogger, null, baseCacheDir);
MinimalRebuildCacheManager minimalRebuildCacheManager =
new MinimalRebuildCacheManager(topLogger, baseCacheDir);
- OutboxTable outboxes =
- makeOutboxes(options, startupLogger, unitCache, minimalRebuildCacheManager);
+ OutboxTable outboxTable =
+ makeOutboxTable(options, startupLogger, unitCache, minimalRebuildCacheManager);
JobEventTable eventTable = new JobEventTable();
JobRunner runner = new JobRunner(eventTable, minimalRebuildCacheManager);
- JsonExporter exporter = new JsonExporter(options, outboxes);
+ JsonExporter exporter = new JsonExporter(options, outboxTable);
- SourceHandler sourceHandler = new SourceHandler(outboxes, exporter);
- SymbolMapHandler symbolMapHandler = new SymbolMapHandler(outboxes);
- WebServer webServer = new WebServer(sourceHandler, symbolMapHandler, exporter, outboxes,
+ SourceHandler sourceHandler = new SourceHandler(outboxTable, exporter);
+ SymbolMapHandler symbolMapHandler = new SymbolMapHandler(outboxTable);
+ WebServer webServer = new WebServer(sourceHandler, symbolMapHandler, exporter, outboxTable,
runner, eventTable, options.getBindAddress(), options.getPort());
webServer.start(topLogger);
@@ -149,7 +149,7 @@
/**
* Configures and compiles all the modules (unless {@link Options#getNoPrecompile} is false).
*/
- private static OutboxTable makeOutboxes(Options options, TreeLogger logger,
+ private static OutboxTable makeOutboxTable(Options options, TreeLogger logger,
UnitCache unitCache, MinimalRebuildCacheManager minimalRebuildCacheManager)
throws IOException, UnableToCompleteException {
@@ -159,7 +159,7 @@
LauncherDir launcherDir = LauncherDir.maybeCreate(options);
int nextOutboxId = 1;
- OutboxTable outboxes = new OutboxTable();
+ OutboxTable outboxTable = new OutboxTable();
for (String moduleName : options.getModuleNames()) {
OutboxDir outboxDir = OutboxDir.create(new File(workDir, moduleName), logger);
@@ -171,9 +171,9 @@
String outboxId = moduleName + "_" + nextOutboxId;
nextOutboxId++;
- outboxes.addOutbox(new Outbox(outboxId, recompiler, options, logger));
+ outboxTable.addOutbox(new Outbox(outboxId, recompiler, options, logger));
}
- return outboxes;
+ return outboxTable;
}
/**
diff --git a/dev/codeserver/java/com/google/gwt/dev/codeserver/JsonExporter.java b/dev/codeserver/java/com/google/gwt/dev/codeserver/JsonExporter.java
index 9e4152d..1cb39e7 100644
--- a/dev/codeserver/java/com/google/gwt/dev/codeserver/JsonExporter.java
+++ b/dev/codeserver/java/com/google/gwt/dev/codeserver/JsonExporter.java
@@ -30,11 +30,11 @@
*/
class JsonExporter {
private final Options options;
- private final OutboxTable outboxes;
+ private final OutboxTable outboxTable;
- JsonExporter(Options options, OutboxTable outboxes) {
+ JsonExporter(Options options, OutboxTable outboxTable) {
this.options = options;
- this.outboxes = outboxes;
+ this.outboxTable = outboxTable;
}
// === API responses ===
@@ -164,7 +164,7 @@
private JsonArray exportOutputModuleNames() {
JsonArray moduleNames = new JsonArray();
- for (String module : outboxes.getOutputModuleNames()) {
+ for (String module : outboxTable.getOutputModuleNames()) {
moduleNames.add(module);
}
return moduleNames;
diff --git a/dev/codeserver/java/com/google/gwt/dev/codeserver/SourceHandler.java b/dev/codeserver/java/com/google/gwt/dev/codeserver/SourceHandler.java
index 0adb6f5..cc3b07b 100644
--- a/dev/codeserver/java/com/google/gwt/dev/codeserver/SourceHandler.java
+++ b/dev/codeserver/java/com/google/gwt/dev/codeserver/SourceHandler.java
@@ -74,11 +74,11 @@
static final String SOURCEROOT_TEMPLATE_VARIABLE = "$sourceroot_goes_here$";
- private final OutboxTable outboxes;
+ private final OutboxTable outboxTable;
private final JsonExporter exporter;
- SourceHandler(OutboxTable outboxes, JsonExporter exporter) {
- this.outboxes = outboxes;
+ SourceHandler(OutboxTable outboxTable, JsonExporter exporter) {
+ this.outboxTable = outboxTable;
this.exporter = exporter;
}
@@ -101,7 +101,7 @@
throw new RuntimeException("invalid request (shouldn't happen): " + target);
}
- Outbox box = outboxes.findByOutputModuleName(moduleName);
+ Outbox box = outboxTable.findByOutputModuleName(moduleName);
if (box == null) {
return new ErrorPage("No such module: " + moduleName);
} else if (box.containsStubCompile()) {
diff --git a/dev/codeserver/java/com/google/gwt/dev/codeserver/SymbolMapHandler.java b/dev/codeserver/java/com/google/gwt/dev/codeserver/SymbolMapHandler.java
index e5dc74a..db2fe45 100644
--- a/dev/codeserver/java/com/google/gwt/dev/codeserver/SymbolMapHandler.java
+++ b/dev/codeserver/java/com/google/gwt/dev/codeserver/SymbolMapHandler.java
@@ -52,10 +52,10 @@
private static final Pattern SYMBOLMAP_MODULE_PATTERN = Pattern.compile(
"^" + SYMBOLMAP_PATH + "([^/]+)/");
- private final OutboxTable outboxes;
+ private final OutboxTable outboxTable;
- SymbolMapHandler(OutboxTable outboxes) {
- this.outboxes = outboxes;
+ SymbolMapHandler(OutboxTable outboxTable) {
+ this.outboxTable = outboxTable;
}
static boolean isSymbolMapRequest(String target) {
@@ -68,7 +68,7 @@
throw new RuntimeException("invalid request (shouldn't happen): " + target);
}
- Outbox box = outboxes.findByOutputModuleName(moduleName);
+ Outbox box = outboxTable.findByOutputModuleName(moduleName);
if (box == null) {
return new ErrorPage("No such module: " + moduleName);
} else if (box.containsStubCompile()) {
diff --git a/dev/codeserver/java/com/google/gwt/dev/codeserver/WebServer.java b/dev/codeserver/java/com/google/gwt/dev/codeserver/WebServer.java
index 7af168f..2b91969 100644
--- a/dev/codeserver/java/com/google/gwt/dev/codeserver/WebServer.java
+++ b/dev/codeserver/java/com/google/gwt/dev/codeserver/WebServer.java
@@ -94,7 +94,7 @@
private final SourceHandler sourceHandler;
private final SymbolMapHandler symbolMapHandler;
private final JsonExporter jsonExporter;
- private final OutboxTable outboxes;
+ private final OutboxTable outboxTable;
private final JobRunner runner;
private final JobEventTable eventTable;
@@ -104,12 +104,12 @@
private Server server;
WebServer(SourceHandler handler, SymbolMapHandler symbolMapHandler, JsonExporter jsonExporter,
- OutboxTable outboxes, JobRunner runner, JobEventTable eventTable, String bindAddress,
+ OutboxTable outboxTable, JobRunner runner, JobEventTable eventTable, String bindAddress,
int port) {
this.sourceHandler = handler;
this.symbolMapHandler = symbolMapHandler;
this.jsonExporter = jsonExporter;
- this.outboxes = outboxes;
+ this.outboxTable = outboxTable;
this.runner = runner;
this.eventTable = eventTable;
this.bindAddress = bindAddress;
@@ -160,7 +160,7 @@
* @param outputModuleName the module name that the GWT compiler used in its output.
*/
public File getCurrentWarDir(String outputModuleName) {
- return outboxes.findByOutputModuleName(outputModuleName).getWarDir();
+ return outboxTable.findByOutputModuleName(outputModuleName).getWarDir();
}
private void handleRequest(String target, HttpServletRequest request,
@@ -211,7 +211,7 @@
// This is a GET because a bookmarklet can call it from a different origin (JSONP).
if (target.startsWith("/recompile/")) {
String moduleName = target.substring("/recompile/".length());
- Outbox box = outboxes.findByOutputModuleName(moduleName);
+ Outbox box = outboxTable.findByOutputModuleName(moduleName);
if (box == null) {
return new ErrorPage("No such module: " + moduleName);
}
@@ -232,7 +232,7 @@
if (target.startsWith("/clean")) {
JsonObject json = null;
try {
- runner.clean(logger, outboxes);
+ runner.clean(logger, outboxTable);
json = jsonExporter.exportOk("Cleaned disk caches.");
} catch (ExecutionException e) {
json = jsonExporter.exportError(e.getMessage());
@@ -243,7 +243,7 @@
// GET the Js that knows how to request the specific permutation recompile.
if (target.startsWith("/recompile-requester/")) {
String moduleName = target.substring("/recompile-requester/".length());
- Outbox box = outboxes.findByOutputModuleName(moduleName);
+ Outbox box = outboxTable.findByOutputModuleName(moduleName);
if (box == null) {
return new ErrorPage("No such module: " + moduleName);
}
@@ -259,7 +259,7 @@
if (target.startsWith("/log/")) {
String moduleName = target.substring("/log/".length());
- Outbox box = outboxes.findByOutputModuleName(moduleName);
+ Outbox box = outboxTable.findByOutputModuleName(moduleName);
if (box == null) {
return new ErrorPage("No such module: " + moduleName);
} else if (box.containsStubCompile()) {
@@ -332,7 +332,7 @@
int secondSlash = target.indexOf('/', 1);
String moduleName = target.substring(1, secondSlash);
- Outbox box = outboxes.findByOutputModuleName(moduleName);
+ Outbox box = outboxTable.findByOutputModuleName(moduleName);
if (box == null) {
return new ErrorPage("No such module: " + moduleName);
}
@@ -391,7 +391,7 @@
}
private Response makeModulePage(String moduleName) {
- Outbox box = outboxes.findByOutputModuleName(moduleName);
+ Outbox box = outboxTable.findByOutputModuleName(moduleName);
if (box == null) {
return new ErrorPage("No such module: " + moduleName);
}
@@ -419,7 +419,7 @@
out.startTag("h1").text("Policy Files").endTag("h1").nl();
- for (Outbox box : outboxes.getOutboxes()) {
+ for (Outbox box : outboxTable.getOutboxes()) {
List<PolicyFile> policies = box.readRpcPolicyManifest();
if (!policies.isEmpty()) {
out.startTag("h2").text(box.getOutputModuleName()).endTag("h2").nl();
@@ -469,7 +469,7 @@
return new ErrorPage("invalid name for policy file: " + rest);
}
- File fileToSend = outboxes.findPolicyFile(rest);
+ File fileToSend = outboxTable.findPolicyFile(rest);
if (fileToSend == null) {
return new ErrorPage("Policy file not found: " + rest);
}
diff --git a/dev/codeserver/javatests/com/google/gwt/dev/codeserver/RecompilerTest.java b/dev/codeserver/javatests/com/google/gwt/dev/codeserver/RecompilerTest.java
index 1be56e7..737030e 100644
--- a/dev/codeserver/javatests/com/google/gwt/dev/codeserver/RecompilerTest.java
+++ b/dev/codeserver/javatests/com/google/gwt/dev/codeserver/RecompilerTest.java
@@ -180,8 +180,8 @@
Recompiler recompiler = new Recompiler(OutboxDir.create(Files.createTempDir(), logger), null,
"com.foo.SimpleModule", options, unitCache, minimalRebuildCacheManager);
Outbox outbox = new Outbox("Transactional Cache", recompiler, options, logger);
- OutboxTable outboxes = new OutboxTable();
- outboxes.addOutbox(outbox);
+ OutboxTable outboxTable = new OutboxTable();
+ outboxTable.addOutbox(outbox);
JobRunner runner = new JobRunner(new JobEventTable(), minimalRebuildCacheManager);
// Perform a first compile. This should pass since all resources are valid.
@@ -226,8 +226,8 @@
Recompiler recompiler = new Recompiler(OutboxDir.create(Files.createTempDir(), logger), null,
"com.foo.PropertyModule", options, unitCache, minimalRebuildCacheManager);
Outbox outbox = new Outbox("Transactional Cache", recompiler, options, logger);
- OutboxTable outboxes = new OutboxTable();
- outboxes.addOutbox(outbox);
+ OutboxTable outboxTable = new OutboxTable();
+ outboxTable.addOutbox(outbox);
JobRunner runner = new JobRunner(new JobEventTable(), minimalRebuildCacheManager);
// Perform a first compile with configuration to rebind Bar to Foo.