@Test public void testDecodingFailure() { assertDecodingFailes(""); assertDecodingFailes(null); assertDecodingFailes(" "); assertDecodingFailes("Hello World"); Assert.assertNull(ColorUtils.decodeRGBSilently("")); Assert.assertNull(ColorUtils.decodeRGBSilently(null)); Assert.assertNull(ColorUtils.decodeRGBSilently(" ")); Assert.assertNull(ColorUtils.decodeRGBSilently("Hello World")); }
public static Color decodeRGBSilently(String colorString) { try { return decodeRGB(colorString); } catch (IllegalArgumentException e) { LOGGER.error("Decoding the color string '{}' failed.", colorString, e); } return null; }
ColorUtils { public static Color decodeRGBSilently(String colorString) { try { return decodeRGB(colorString); } catch (IllegalArgumentException e) { LOGGER.error("Decoding the color string '{}' failed.", colorString, e); } return null; } }
ColorUtils { public static Color decodeRGBSilently(String colorString) { try { return decodeRGB(colorString); } catch (IllegalArgumentException e) { LOGGER.error("Decoding the color string '{}' failed.", colorString, e); } return null; } private  ColorUtils(); }
ColorUtils { public static Color decodeRGBSilently(String colorString) { try { return decodeRGB(colorString); } catch (IllegalArgumentException e) { LOGGER.error("Decoding the color string '{}' failed.", colorString, e); } return null; } private  ColorUtils(); static Color decodeRGB(String colorString); static Color decodeRGBSilently(String colorString); static String encodeRGBHexString(Color color, boolean withAlpha); static String encodeRGBIntString(Color color, boolean withAlpha); }
ColorUtils { public static Color decodeRGBSilently(String colorString) { try { return decodeRGB(colorString); } catch (IllegalArgumentException e) { LOGGER.error("Decoding the color string '{}' failed.", colorString, e); } return null; } private  ColorUtils(); static Color decodeRGB(String colorString); static Color decodeRGBSilently(String colorString); static String encodeRGBHexString(Color color, boolean withAlpha); static String encodeRGBIntString(Color color, boolean withAlpha);  }