Merge branches 'hotfix/close-unclosed-resources-mage-client', 'hotfix/close-streams-in-updater', 'hotfix/fix-non-closed-scanner' and 'hotfix/manapiechart-potential-zero-division' into feature/SonarqubeFixes

This commit is contained in:
Marc Zwart 2018-03-20 13:03:28 +01:00
6 changed files with 61 additions and 19 deletions

View file

@ -1,5 +1,7 @@
package mage.client.util.object;
import mage.utils.StreamUtils;
import java.io.File;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
@ -61,10 +63,9 @@ public final class SaveObjectUtil {
oos.writeObject(object);
oos.close();
} catch (FileNotFoundException e) {
return;
} catch (IOException io) {
return;
} catch (Exception e) {
} finally {
StreamUtils.closeQuietly(oos);
}
}
}