@Test public void unquoteShouldNotUnquoteUnquotedQuotes() { assertThat(ParserUtils.unquote("a")).isEqualTo("a"); }
public static String unquote(String quoted) { String result = quoted; if (quoted != null) { if (quoted.startsWith("\"") && quoted.endsWith("\"")) { result = quoted.substring(1, quoted.length() - 1); } else if (quoted.startsWith("'") && quoted.endsWith("'")) { result = quoted.substring(1, quoted.length() - 1); } } return result; }
ParserUtils { public static String unquote(String quoted) { String result = quoted; if (quoted != null) { if (quoted.startsWith("\"") && quoted.endsWith("\"")) { result = quoted.substring(1, quoted.length() - 1); } else if (quoted.startsWith("'") && quoted.endsWith("'")) { result = quoted.substring(1, quoted.length() - 1); } } return result; } }
ParserUtils { public static String unquote(String quoted) { String result = quoted; if (quoted != null) { if (quoted.startsWith("\"") && quoted.endsWith("\"")) { result = quoted.substring(1, quoted.length() - 1); } else if (quoted.startsWith("'") && quoted.endsWith("'")) { result = quoted.substring(1, quoted.length() - 1); } } return result; }  }
ParserUtils { public static String unquote(String quoted) { String result = quoted; if (quoted != null) { if (quoted.startsWith("\"") && quoted.endsWith("\"")) { result = quoted.substring(1, quoted.length() - 1); } else if (quoted.startsWith("'") && quoted.endsWith("'")) { result = quoted.substring(1, quoted.length() - 1); } } return result; }  static long getSize(String args); static String unquote(String quoted); }
ParserUtils { public static String unquote(String quoted) { String result = quoted; if (quoted != null) { if (quoted.startsWith("\"") && quoted.endsWith("\"")) { result = quoted.substring(1, quoted.length() - 1); } else if (quoted.startsWith("'") && quoted.endsWith("'")) { result = quoted.substring(1, quoted.length() - 1); } } return result; }  static long getSize(String args); static String unquote(String quoted);  }