]> gerrit.simantics Code Review - simantics/platform.git/blobdiff - bundles/org.simantics.g2d/src/org/simantics/g2d/svg/SVGImage.java
Editing of texts inside SVG elements
[simantics/platform.git] / bundles / org.simantics.g2d / src / org / simantics / g2d / svg / SVGImage.java
index 54ceeec4185547aebf86f304659d31895777295c..e8d2456c1127d2c21810263d8997d73f94e01d74 100644 (file)
@@ -36,16 +36,13 @@ public class SVGImage implements Image {
     static EnumSet<Feature> 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();
         }
     }