@Test public void testAlreadyQuotedClasspathWithSpaces() { final String quotedClasspathWithSpaces = "\"c:\\Program Files\\OpenWebStart\\javaws.jar\""; final String expected = "\"c:\\Program Files\\OpenWebStart\\javaws.jar\""; final String transformed = PathQuoteUtil.quoteIfRequired(quotedClasspathWithSpaces); Assertions.assertEquals(expected, transformed); }
public static String quoteIfRequired(final String original) { if (LauncherUtil.isWindows() && original != null && original.contains(WHITESPACE) && !original.startsWith(DOUBLE_QUOTE)) { return DOUBLE_QUOTE + original + DOUBLE_QUOTE; } return original; }
PathQuoteUtil { public static String quoteIfRequired(final String original) { if (LauncherUtil.isWindows() && original != null && original.contains(WHITESPACE) && !original.startsWith(DOUBLE_QUOTE)) { return DOUBLE_QUOTE + original + DOUBLE_QUOTE; } return original; } }
PathQuoteUtil { public static String quoteIfRequired(final String original) { if (LauncherUtil.isWindows() && original != null && original.contains(WHITESPACE) && !original.startsWith(DOUBLE_QUOTE)) { return DOUBLE_QUOTE + original + DOUBLE_QUOTE; } return original; }  }
PathQuoteUtil { public static String quoteIfRequired(final String original) { if (LauncherUtil.isWindows() && original != null && original.contains(WHITESPACE) && !original.startsWith(DOUBLE_QUOTE)) { return DOUBLE_QUOTE + original + DOUBLE_QUOTE; } return original; }  static String quoteIfRequired(final String original); }
PathQuoteUtil { public static String quoteIfRequired(final String original) { if (LauncherUtil.isWindows() && original != null && original.contains(WHITESPACE) && !original.startsWith(DOUBLE_QUOTE)) { return DOUBLE_QUOTE + original + DOUBLE_QUOTE; } return original; }  static String quoteIfRequired(final String original);  }