Skip to content

Commit

Permalink
Moved several more util classes from opennms-util into core/lib.
Browse files Browse the repository at this point in the history
  • Loading branch information
soleger committed May 2, 2014
1 parent d2cb8dc commit bdde79a
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,6 @@

package org.opennms.core.utils;

import org.apache.commons.io.IOUtils;

import java.io.File;
import java.io.FileInputStream;
import java.io.FileOutputStream;
Expand Down Expand Up @@ -80,7 +78,13 @@ private Properties read() throws IOException {
}
return prop;
} finally {
IOUtils.closeQuietly(in);
if (in != null) {
try {
in.close();
} catch (IOException e) {
// Ignore this exception
}
}
}
}

Expand All @@ -91,7 +95,13 @@ private void write() throws IOException {
out = new FileOutputStream(m_file);
m_properties.store(out, null);
} finally {
IOUtils.closeQuietly(out);
if (out != null) {
try {
out.close();
} catch (IOException e) {
// Ignore this exception
}
}
}
}

Expand Down

0 comments on commit bdde79a

Please sign in to comment.