X-Git-Url: https://gerrit.simantics.org/r/gitweb?a=blobdiff_plain;f=bundles%2Forg.simantics.g2d%2Fsrc%2Forg%2Fsimantics%2Fg2d%2Fsvg%2FSVGImage.java;h=e8d2456c1127d2c21810263d8997d73f94e01d74;hb=4f38bc070c3e1e40d02bd8da64cc93a798c9aace;hp=54ceeec4185547aebf86f304659d31895777295c;hpb=ba85c75dd6893c597f4befa3d2c9f32bee2fc85d;p=simantics%2Fplatform.git diff --git a/bundles/org.simantics.g2d/src/org/simantics/g2d/svg/SVGImage.java b/bundles/org.simantics.g2d/src/org/simantics/g2d/svg/SVGImage.java index 54ceeec41..e8d2456c1 100644 --- a/bundles/org.simantics.g2d/src/org/simantics/g2d/svg/SVGImage.java +++ b/bundles/org.simantics.g2d/src/org/simantics/g2d/svg/SVGImage.java @@ -36,16 +36,13 @@ public class SVGImage implements Image { static EnumSet caps = EnumSet.of(Feature.Vector); private Rectangle2D bounds; - private final String nodeIdentifier; - private final String svgDocument; - private Point targetSize; + protected final String nodeIdentifier; + protected final String svgDocument; + protected Point targetSize; public static SVGImage loadFromURL(String nodeIdentifier, URL url) throws IOException { - InputStream in = url.openStream(); - try { + try (InputStream in = url.openStream()) { return new SVGImage(nodeIdentifier, in); - } finally { - in.close(); } }