Parcourir la source

Automatically listen to shutdown port and not not enforce -ea (#9998)

Relaxed requirement to enable assertions with DevelopmentServerLauncher to make it easier to get started.
Changed default to automatically listen to shutdown port 8889. Can be turned of by specifying port -1.

Change-Id: Id088b97fb9e8b5e7d9aa3cef874a8d2c02a6ca58
tags/7.1.0.beta1
Artur Signell il y a 11 ans
Parent
révision
c5af559686

+ 5
- 3
uitest/src/com/vaadin/launcher/DevelopmentServerLauncher.java Voir le fichier

@@ -58,9 +58,11 @@ public class DevelopmentServerLauncher {

// Pass-through of arguments for Jetty
final Map<String, String> serverArgs = parseArguments(args);
if (!serverArgs.containsKey("shutdownPort"))
serverArgs.put("shutdownPort", "8889");

if (serverArgs.containsKey("shutdownPort")) {
int port = Integer.parseInt(serverArgs.get("shutdownPort"));
int port = Integer.parseInt(serverArgs.get("shutdownPort"));
if (port > 0) {
try {
// Try to notify another instance that it's time to close
Socket socket = new Socket((String) null, port);
@@ -94,7 +96,7 @@ public class DevelopmentServerLauncher {
try {
assert false;

throw new RuntimeException("You should run "
System.err.println("You should run "
+ DevelopmentServerLauncher.class.getSimpleName()
+ " with assertions enabled. Add -ea as a VM argument.");
} catch (AssertionError e) {

Chargement…
Annuler
Enregistrer