@Test(expectedExceptions = IllegalStateException.class) public void simpleEncoderNullPointer() { ModelUtils.urlencode(null, "Some", "values"); }
public static String urlencode(String format, String... args) { try { return URLEncoder.encode(String.format(format, args), "UTF-8"); } catch (UnsupportedEncodingException | NullPointerException e) { throw new IllegalStateException("UTF-8 not supported."); } }
ModelUtils { public static String urlencode(String format, String... args) { try { return URLEncoder.encode(String.format(format, args), "UTF-8"); } catch (UnsupportedEncodingException | NullPointerException e) { throw new IllegalStateException("UTF-8 not supported."); } } }
ModelUtils { public static String urlencode(String format, String... args) { try { return URLEncoder.encode(String.format(format, args), "UTF-8"); } catch (UnsupportedEncodingException | NullPointerException e) { throw new IllegalStateException("UTF-8 not supported."); } }  }
ModelUtils { public static String urlencode(String format, String... args) { try { return URLEncoder.encode(String.format(format, args), "UTF-8"); } catch (UnsupportedEncodingException | NullPointerException e) { throw new IllegalStateException("UTF-8 not supported."); } }  static String urlencode(String format, String... args); static String urldecode(String string); }
ModelUtils { public static String urlencode(String format, String... args) { try { return URLEncoder.encode(String.format(format, args), "UTF-8"); } catch (UnsupportedEncodingException | NullPointerException e) { throw new IllegalStateException("UTF-8 not supported."); } }  static String urlencode(String format, String... args); static String urldecode(String string);  }