@Test public void applySystemPropertiesShouldConvertOptsToSystemProps() { System.setProperty("c", ""); Map<String, String> opts = new HashMap<>(); opts.put("a", "1"); opts.put("-Dc", "2"); CoffeeHouseApp.applySystemProperties(opts); assertThat(System.getProperty("c")).isEqualTo("2"); }
static void applySystemProperties(final Map<String, String> opts) { opts.forEach((key, value) -> { if (key.startsWith("-D")) System.setProperty(key.substring(2), value); }); }
CoffeeHouseApp implements Terminal { static void applySystemProperties(final Map<String, String> opts) { opts.forEach((key, value) -> { if (key.startsWith("-D")) System.setProperty(key.substring(2), value); }); } }
CoffeeHouseApp implements Terminal { static void applySystemProperties(final Map<String, String> opts) { opts.forEach((key, value) -> { if (key.startsWith("-D")) System.setProperty(key.substring(2), value); }); } CoffeeHouseApp(final ActorSystem system); }
CoffeeHouseApp implements Terminal { static void applySystemProperties(final Map<String, String> opts) { opts.forEach((key, value) -> { if (key.startsWith("-D")) System.setProperty(key.substring(2), value); }); } CoffeeHouseApp(final ActorSystem system); static void main(final String[] args); }
CoffeeHouseApp implements Terminal { static void applySystemProperties(final Map<String, String> opts) { opts.forEach((key, value) -> { if (key.startsWith("-D")) System.setProperty(key.substring(2), value); }); } CoffeeHouseApp(final ActorSystem system); static void main(final String[] args);  }