Merge
This commit is contained in:
commit
7822b9d3db
@ -361,22 +361,22 @@ public class JavacState {
|
|||||||
// Silently create a new javac_state file.
|
// Silently create a new javac_state file.
|
||||||
noFileFound = true;
|
noFileFound = true;
|
||||||
} catch (IOException e) {
|
} catch (IOException e) {
|
||||||
Log.info("Dropping old javac_state because of errors when reading it.");
|
Log.warn("Dropping old javac_state because of errors when reading it.");
|
||||||
db = new JavacState(options, true);
|
db = new JavacState(options, true);
|
||||||
foundCorrectVerNr = true;
|
foundCorrectVerNr = true;
|
||||||
newCommandLine = false;
|
newCommandLine = false;
|
||||||
syntaxError = false;
|
syntaxError = false;
|
||||||
}
|
}
|
||||||
if (foundCorrectVerNr == false && !noFileFound) {
|
if (foundCorrectVerNr == false && !noFileFound) {
|
||||||
Log.info("Dropping old javac_state since it is of an old version.");
|
Log.debug("Dropping old javac_state since it is of an old version.");
|
||||||
db = new JavacState(options, true);
|
db = new JavacState(options, true);
|
||||||
} else
|
} else
|
||||||
if (newCommandLine == true && !noFileFound) {
|
if (newCommandLine == true && !noFileFound) {
|
||||||
Log.info("Dropping old javac_state since a new command line is used!");
|
Log.debug("Dropping old javac_state since a new command line is used!");
|
||||||
db = new JavacState(options, true);
|
db = new JavacState(options, true);
|
||||||
} else
|
} else
|
||||||
if (syntaxError == true) {
|
if (syntaxError == true) {
|
||||||
Log.info("Dropping old javac_state since it contains syntax errors.");
|
Log.warn("Dropping old javac_state since it contains syntax errors.");
|
||||||
db = new JavacState(options, true);
|
db = new JavacState(options, true);
|
||||||
}
|
}
|
||||||
db.prev.calculateDependents();
|
db.prev.calculateDependents();
|
||||||
@ -868,7 +868,7 @@ public class JavacState {
|
|||||||
// This is an incremental compile! The pubapi
|
// This is an incremental compile! The pubapi
|
||||||
// did change. Trigger recompilation of dependents.
|
// did change. Trigger recompilation of dependents.
|
||||||
packagesWithChangedPublicApis.add(pkg);
|
packagesWithChangedPublicApis.add(pkg);
|
||||||
Log.info("The API of " + Util.justPackageName(pkg) + " has changed!");
|
Log.debug("The API of " + Util.justPackageName(pkg) + " has changed!");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -172,7 +172,7 @@ public class SjavacClient implements Sjavac {
|
|||||||
makeSureServerIsRunning(portFile);
|
makeSureServerIsRunning(portFile);
|
||||||
int attempt = 0;
|
int attempt = 0;
|
||||||
while (true) {
|
while (true) {
|
||||||
Log.info("Trying to connect. Attempt " + (++attempt) + " of " + MAX_CONNECT_ATTEMPTS);
|
Log.debug("Trying to connect. Attempt " + (++attempt) + " of " + MAX_CONNECT_ATTEMPTS);
|
||||||
try {
|
try {
|
||||||
return makeConnectionAttempt();
|
return makeConnectionAttempt();
|
||||||
} catch (IOException ex) {
|
} catch (IOException ex) {
|
||||||
@ -191,7 +191,7 @@ public class SjavacClient implements Sjavac {
|
|||||||
InetAddress localhost = InetAddress.getByName(null);
|
InetAddress localhost = InetAddress.getByName(null);
|
||||||
InetSocketAddress address = new InetSocketAddress(localhost, portFile.getPort());
|
InetSocketAddress address = new InetSocketAddress(localhost, portFile.getPort());
|
||||||
socket.connect(address, CONNECTION_TIMEOUT);
|
socket.connect(address, CONNECTION_TIMEOUT);
|
||||||
Log.info("Connected");
|
Log.debug("Connected");
|
||||||
return socket;
|
return socket;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -238,7 +238,7 @@ public class SjavacClient implements Sjavac {
|
|||||||
+ ",keepalive="+ keepalive);
|
+ ",keepalive="+ keepalive);
|
||||||
|
|
||||||
Process serverProcess;
|
Process serverProcess;
|
||||||
Log.info("Starting server. Command: " + String.join(" ", cmd));
|
Log.debug("Starting server. Command: " + String.join(" ", cmd));
|
||||||
try {
|
try {
|
||||||
// If the cmd for some reason can't be executed (file is not found,
|
// If the cmd for some reason can't be executed (file is not found,
|
||||||
// or is not executable for instance) this will throw an
|
// or is not executable for instance) this will throw an
|
||||||
|
@ -165,7 +165,7 @@ public class SjavacServer implements Terminable {
|
|||||||
portFile.lock();
|
portFile.lock();
|
||||||
portFile.getValues();
|
portFile.getValues();
|
||||||
if (portFile.containsPortInfo()) {
|
if (portFile.containsPortInfo()) {
|
||||||
Log.info("Javac server not started because portfile exists!");
|
Log.debug("Javac server not started because portfile exists!");
|
||||||
portFile.unlock();
|
portFile.unlock();
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
@ -192,10 +192,10 @@ public class SjavacServer implements Terminable {
|
|||||||
portFileMonitor = new PortFileMonitor(portFile, this);
|
portFileMonitor = new PortFileMonitor(portFile, this);
|
||||||
portFileMonitor.start();
|
portFileMonitor.start();
|
||||||
|
|
||||||
Log.info("Sjavac server started. Accepting connections...");
|
Log.debug("Sjavac server started. Accepting connections...");
|
||||||
Log.info(" port: " + getPort());
|
Log.debug(" port: " + getPort());
|
||||||
Log.info(" time: " + new java.util.Date());
|
Log.debug(" time: " + new java.util.Date());
|
||||||
Log.info(" poolsize: " + poolsize);
|
Log.debug(" poolsize: " + poolsize);
|
||||||
|
|
||||||
|
|
||||||
keepAcceptingRequests.set(true);
|
keepAcceptingRequests.set(true);
|
||||||
@ -208,7 +208,7 @@ public class SjavacServer implements Terminable {
|
|||||||
}
|
}
|
||||||
} while (keepAcceptingRequests.get());
|
} while (keepAcceptingRequests.get());
|
||||||
|
|
||||||
Log.info("Shutting down.");
|
Log.debug("Shutting down.");
|
||||||
|
|
||||||
// No more connections accepted. If any client managed to connect after
|
// No more connections accepted. If any client managed to connect after
|
||||||
// the accept() was interrupted but before the server socket is closed
|
// the accept() was interrupted but before the server socket is closed
|
||||||
@ -216,7 +216,7 @@ public class SjavacServer implements Terminable {
|
|||||||
// IOException on the client side.
|
// IOException on the client side.
|
||||||
|
|
||||||
long realTime = System.currentTimeMillis() - serverStart;
|
long realTime = System.currentTimeMillis() - serverStart;
|
||||||
Log.info("Total wall clock time " + realTime + "ms build time " + totalBuildTime + "ms");
|
Log.debug("Total wall clock time " + realTime + "ms build time " + totalBuildTime + "ms");
|
||||||
|
|
||||||
// Shut down
|
// Shut down
|
||||||
sjavac.shutdown();
|
sjavac.shutdown();
|
||||||
@ -231,7 +231,7 @@ public class SjavacServer implements Terminable {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
Log.info("Quitting: " + quitMsg);
|
Log.debug("Quitting: " + quitMsg);
|
||||||
|
|
||||||
portFileMonitor.shutdown(); // No longer any need to monitor port file
|
portFileMonitor.shutdown(); // No longer any need to monitor port file
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user