From efee9986bd606e232cd547f431d39467dfd8a5e6 Mon Sep 17 00:00:00 2001 From: Jeremias Maerki Date: Fri, 25 Jan 2008 09:59:29 +0000 Subject: [PATCH] Fix exception when closing Source that doesn't have any streams. git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@615164 13f79535-47bb-0310-9956-ffa450edef68 --- lib/xmlgraphics-commons-1.3svn.jar | Bin 498867 -> 498800 bytes .../fop/image/loader/batik/PreloaderSVG.java | 2 +- 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/xmlgraphics-commons-1.3svn.jar b/lib/xmlgraphics-commons-1.3svn.jar index cc3c3c6daa7cc342e3dfa21034d724c70f2e0ad1..75b10615aabda7dc1554fc51ae6340210a48d749 100644 GIT binary patch delta 7463 zcmY+I2|QKX7st8oy~o@&Wy)OWnoA;6LS+mgL*^k<<{_b5h|G#?V}{7Ah@>JzNGL+# z2}P74LnzhbzwbN$=arAk=l5M}@3rtv;9c3-a2=lC0a&X zH&h=hrxz8ryJvjnMa{W@?iTm)?4&?XdA}!WheM;%FKlbU+)Zb{tzjC>U_ys1Zg8G|y1+k*rR!sIe-m15fif+f4$24Ob+= zM;9xan#@s9t<@eaDEvd#Bl^o^V133r`<3GFV$z1Xq08+Y45}|K1Oe82w%4+H-oEpD z)%a~Jqiw?GDP?+_HoO1Wq2$)WE8@QUrx|qZjwtnfN*}VDOLsW=#rNE?NAxL0JWbtM zcPduOl5dedBihTE=JZLL_2bkpuID%RnT-2USz=!ceq;Om!uF;>Zet$FGeynvD=|F3 zc&}CUc*%L1x|aGqHICZ1+H>@(951LGaJwQAhLxrt4BlOi9fN#5C*51;seI(zB)HX2su$#bX@%%)H)+%cdsPh z7!TxXs+=Mja_N}qJ8-bNz9-3^`}DV>Yt+hyecT{6E;=E&<6W!}Yun&c1Mb2YYKwP{ z9E!);c}^HNd>yWdT*|$?#-lFh@v$*Z%3P4!x+nkZ+PS{{2I5{Mxwn$brL+#*G+&Uj zxGgcxVS1{Oz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PreloaderSVG.java b/src/java/org/apache/fop/image/loader/batik/PreloaderSVG.java index db03cbbf2..e59e06b6b 100644 --- a/src/java/org/apache/fop/image/loader/batik/PreloaderSVG.java +++ b/src/java/org/apache/fop/image/loader/batik/PreloaderSVG.java @@ -76,7 +76,7 @@ public class PreloaderSVG extends AbstractImagePreloader { return null; } } - if (info != null && ImageUtil.hasInputStream(src)) { + if (info != null) { ImageUtil.closeQuietly(src); //Image is fully read } return info; -- 2.39.5