@Test public void parseDoesNotRemoveCommasFromStringValuesInTheArray() { String input = "[\"value1\", \"value2 123, test\"]"; String expectedValue = "value1 value2 123, test"; StringListParser instance = new StringListParser(" "); String value = instance.parse(input); assertThat(value, is(equalTo(expectedValue))); }
@Override public String parse(String value) { if (value == null) { return null; } try { List<String> readValue = objectMapper.readValue(value, new TypeReference<List<String>>() {}); return Joiner.on(separator).join(readValue); } catch (IOException e) { LOG.error("Coud not parse {} to List of Strings", value); e.printStackTrace(); return null; } }
StringListParser implements PropertyParser { @Override public String parse(String value) { if (value == null) { return null; } try { List<String> readValue = objectMapper.readValue(value, new TypeReference<List<String>>() {}); return Joiner.on(separator).join(readValue); } catch (IOException e) { LOG.error("Coud not parse {} to List of Strings", value); e.printStackTrace(); return null; } } }
StringListParser implements PropertyParser { @Override public String parse(String value) { if (value == null) { return null; } try { List<String> readValue = objectMapper.readValue(value, new TypeReference<List<String>>() {}); return Joiner.on(separator).join(readValue); } catch (IOException e) { LOG.error("Coud not parse {} to List of Strings", value); e.printStackTrace(); return null; } } StringListParser(String seperator);  StringListParser(); }
StringListParser implements PropertyParser { @Override public String parse(String value) { if (value == null) { return null; } try { List<String> readValue = objectMapper.readValue(value, new TypeReference<List<String>>() {}); return Joiner.on(separator).join(readValue); } catch (IOException e) { LOG.error("Coud not parse {} to List of Strings", value); e.printStackTrace(); return null; } } StringListParser(String seperator);  StringListParser(); @Override String parse(String value); @Override Comparable<?> parseForSort(String value); }
StringListParser implements PropertyParser { @Override public String parse(String value) { if (value == null) { return null; } try { List<String> readValue = objectMapper.readValue(value, new TypeReference<List<String>>() {}); return Joiner.on(separator).join(readValue); } catch (IOException e) { LOG.error("Coud not parse {} to List of Strings", value); e.printStackTrace(); return null; } } StringListParser(String seperator);  StringListParser(); @Override String parse(String value); @Override Comparable<?> parseForSort(String value);  }