From c5af559686ab3984d43c59a8d6289b99229961e1 Mon Sep 17 00:00:00 2001 From: Artur Signell Date: Sun, 24 Feb 2013 18:20:37 +0200 Subject: 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 --- uitest/src/com/vaadin/launcher/DevelopmentServerLauncher.java | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'uitest/src/com/vaadin/launcher') diff --git a/uitest/src/com/vaadin/launcher/DevelopmentServerLauncher.java b/uitest/src/com/vaadin/launcher/DevelopmentServerLauncher.java index 381091206a..444a70348c 100644 --- a/uitest/src/com/vaadin/launcher/DevelopmentServerLauncher.java +++ b/uitest/src/com/vaadin/launcher/DevelopmentServerLauncher.java @@ -58,9 +58,11 @@ public class DevelopmentServerLauncher { // Pass-through of arguments for Jetty final Map 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) { -- cgit v1.2.3