diff --git a/bundles/org.eclipse.emf.emfstore.server/src/org/eclipse/emf/emfstore/internal/server/connection/xmlrpc/util/FileTransferInformationParser.java b/bundles/org.eclipse.emf.emfstore.server/src/org/eclipse/emf/emfstore/internal/server/connection/xmlrpc/util/FileTransferInformationParser.java index 0615cf207..0b36bda3e 100644 --- a/bundles/org.eclipse.emf.emfstore.server/src/org/eclipse/emf/emfstore/internal/server/connection/xmlrpc/util/FileTransferInformationParser.java +++ b/bundles/org.eclipse.emf.emfstore.server/src/org/eclipse/emf/emfstore/internal/server/connection/xmlrpc/util/FileTransferInformationParser.java @@ -44,7 +44,18 @@ protected java.lang.Class resolveClass(java.io.ObjectStreamClass desc) throw new IllegalArgumentException("Deserialzation is not supported"); //$NON-NLS-1$ } }; - return ois.readObject(); + final Object object = ois.readObject(); + try { + ois.close(); + } catch (final IOException ex) { + /* silent */ + } + try { + bais.close(); + } catch (final IOException ex) { + /* silent */ + } + return object; } catch (final IOException e) { throw new XmlRpcException("Failed to read result object: " + e.getMessage(), e); //$NON-NLS-1$ } catch (final ClassNotFoundException e) { diff --git a/bundles/org.eclipse.emf.emfstore.server/src/org/eclipse/emf/emfstore/internal/server/connection/xmlrpc/util/FileTransferInformationSerializer.java b/bundles/org.eclipse.emf.emfstore.server/src/org/eclipse/emf/emfstore/internal/server/connection/xmlrpc/util/FileTransferInformationSerializer.java index 6e4759eaa..18308ae57 100644 --- a/bundles/org.eclipse.emf.emfstore.server/src/org/eclipse/emf/emfstore/internal/server/connection/xmlrpc/util/FileTransferInformationSerializer.java +++ b/bundles/org.eclipse.emf.emfstore.server/src/org/eclipse/emf/emfstore/internal/server/connection/xmlrpc/util/FileTransferInformationSerializer.java @@ -38,7 +38,16 @@ public void write(final ContentHandler pHandler, Object pObject) throws SAXExcep final OutputStream ostream = new EncoderOutputStream(encoder); final ObjectOutputStream oos = new ObjectOutputStream(ostream); oos.writeObject(pObject); - oos.close(); + try { + oos.close(); + } catch (final IOException ex) { + /* silent */ + } + try { + ostream.close(); + } catch (final IOException ex) { + /* silent */ + } } catch (final Base64.SAXIOException e) { throw e.getSAXException(); } catch (final IOException e) {