@Test public void testGetHexAttr_null() { Integer res = SVGParser.getHexAttr("someColor", new AttributesMock()); assertThat(res, is(nullValue())); }
protected static Integer getHexAttr(String name, Attributes attributes) { String v = getStringAttr(name, attributes); if (v == null) { return null; } else { try { return Integer.parseInt(v.substring(1), 16); } catch (NumberFormatException nfe) { return null; } } }
SVGParser { protected static Integer getHexAttr(String name, Attributes attributes) { String v = getStringAttr(name, attributes); if (v == null) { return null; } else { try { return Integer.parseInt(v.substring(1), 16); } catch (NumberFormatException nfe) { return null; } } } }
SVGParser { protected static Integer getHexAttr(String name, Attributes attributes) { String v = getStringAttr(name, attributes); if (v == null) { return null; } else { try { return Integer.parseInt(v.substring(1), 16); } catch (NumberFormatException nfe) { return null; } } }  }
SVGParser { protected static Integer getHexAttr(String name, Attributes attributes) { String v = getStringAttr(name, attributes); if (v == null) { return null; } else { try { return Integer.parseInt(v.substring(1), 16); } catch (NumberFormatException nfe) { return null; } } }  static SVG getSVGFromInputStream(InputStream svgData); static SVG getSVGFromInputStream(InputStream svgData, int targetWidth, int targetHeight); static SVG getSVGFromResource(Resources resources, int resId); static SVG getSVGFromAsset(AssetManager assetMngr, String svgPath); static SVG getSVGFromInputStream(InputStream svgData, int searchColor, int replaceColor,
                                            int targetWidth, int targetHeight); static SVG getSVGFromString(String svgData, int searchColor, int replaceColor); static SVG getSVGFromResource(Resources resources, int resId, int searchColor, int replaceColor); static SVG getSVGFromAsset(AssetManager assetMngr, String svgPath, int searchColor, int replaceColor); static Path parsePath(String pathString); }
SVGParser { protected static Integer getHexAttr(String name, Attributes attributes) { String v = getStringAttr(name, attributes); if (v == null) { return null; } else { try { return Integer.parseInt(v.substring(1), 16); } catch (NumberFormatException nfe) { return null; } } }  static SVG getSVGFromInputStream(InputStream svgData); static SVG getSVGFromInputStream(InputStream svgData, int targetWidth, int targetHeight); static SVG getSVGFromResource(Resources resources, int resId); static SVG getSVGFromAsset(AssetManager assetMngr, String svgPath); static SVG getSVGFromInputStream(InputStream svgData, int searchColor, int replaceColor,
                                            int targetWidth, int targetHeight); static SVG getSVGFromString(String svgData, int searchColor, int replaceColor); static SVG getSVGFromResource(Resources resources, int resId, int searchColor, int replaceColor); static SVG getSVGFromAsset(AssetManager assetMngr, String svgPath, int searchColor, int replaceColor); static Path parsePath(String pathString);  }