Implement spring Conduit bean registry and lots of cleanup
[jpim.git] / src / de / j32 / pimstuff / conduit / FritzAddressbookImporter.java
index 6a65a88..5330cc6 100644 (file)
@@ -9,6 +9,7 @@ import org.xml.sax.SAXException;
 
 import de.j32.pimstuff.data.Entry;
 import de.j32.pimstuff.data.EntryConsumer;
+import de.j32.util.Util;
 import de.j32.util.XmlUtil;
 
 public class FritzAddressbookImporter
@@ -19,7 +20,14 @@ public class FritzAddressbookImporter
        public FritzAddressbookImporter(InputStream is)
                throws SAXException, IOException
        {
-               xml_ = XmlUtil.parse(is);
+               try {
+                       xml_ = XmlUtil.parse(is);
+                       is.close();
+                       is = null;
+               }
+               finally {
+                       Util.nothrowClose(is);
+               }
        }
        
        @Override