@Test public void convertFromNull() throws Exception { expectedException.expect(ParameterException.class); expectedException.expectMessage("Couldn't convert value \"null\" to a map of strings."); new StringMapConverter().convertFrom(null); }
@Override public Map<String, String> convertFrom(String value) { if (value == null) { throw new ParameterException("Couldn't convert value \"null\" to a map of strings."); } try { return Splitter.on(SEPARATOR) .omitEmptyStrings() .trimResults() .withKeyValueSeparator(KEY_VALUE_SEPARATOR) .split(value); } catch (Exception e) { throw new ParameterException(e.getMessage(), e); } }
StringMapConverter implements Converter<Map<String, String>> { @Override public Map<String, String> convertFrom(String value) { if (value == null) { throw new ParameterException("Couldn't convert value \"null\" to a map of strings."); } try { return Splitter.on(SEPARATOR) .omitEmptyStrings() .trimResults() .withKeyValueSeparator(KEY_VALUE_SEPARATOR) .split(value); } catch (Exception e) { throw new ParameterException(e.getMessage(), e); } } }
StringMapConverter implements Converter<Map<String, String>> { @Override public Map<String, String> convertFrom(String value) { if (value == null) { throw new ParameterException("Couldn't convert value \"null\" to a map of strings."); } try { return Splitter.on(SEPARATOR) .omitEmptyStrings() .trimResults() .withKeyValueSeparator(KEY_VALUE_SEPARATOR) .split(value); } catch (Exception e) { throw new ParameterException(e.getMessage(), e); } }  }
StringMapConverter implements Converter<Map<String, String>> { @Override public Map<String, String> convertFrom(String value) { if (value == null) { throw new ParameterException("Couldn't convert value \"null\" to a map of strings."); } try { return Splitter.on(SEPARATOR) .omitEmptyStrings() .trimResults() .withKeyValueSeparator(KEY_VALUE_SEPARATOR) .split(value); } catch (Exception e) { throw new ParameterException(e.getMessage(), e); } }  @Override Map<String, String> convertFrom(String value); @Override String convertTo(Map<String, String> value); }
StringMapConverter implements Converter<Map<String, String>> { @Override public Map<String, String> convertFrom(String value) { if (value == null) { throw new ParameterException("Couldn't convert value \"null\" to a map of strings."); } try { return Splitter.on(SEPARATOR) .omitEmptyStrings() .trimResults() .withKeyValueSeparator(KEY_VALUE_SEPARATOR) .split(value); } catch (Exception e) { throw new ParameterException(e.getMessage(), e); } }  @Override Map<String, String> convertFrom(String value); @Override String convertTo(Map<String, String> value);  }