diff options
author | Artur Signell <artur@vaadin.com> | 2013-02-24 18:20:37 +0200 |
---|---|---|
committer | Artur Signell <artur@vaadin.com> | 2013-02-25 11:36:55 +0200 |
commit | c5af559686ab3984d43c59a8d6289b99229961e1 (patch) | |
tree | 411b6399466c356ec0801d99a89913143a6593cf /uitest/src/com/vaadin/launcher | |
parent | 5e6f1bf03e4eb23592f9c3ba29fd0dc68512088e (diff) | |
download | vaadin-framework-c5af559686ab3984d43c59a8d6289b99229961e1.tar.gz vaadin-framework-c5af559686ab3984d43c59a8d6289b99229961e1.zip |
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
Diffstat (limited to 'uitest/src/com/vaadin/launcher')
-rw-r--r-- | uitest/src/com/vaadin/launcher/DevelopmentServerLauncher.java | 8 |
1 files changed, 5 insertions, 3 deletions
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<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) { |