Revision 8304
Added by Matt Jones over 10 years ago
DBAdmin.java | ||
---|---|---|
65 | 65 |
import edu.ucsb.nceas.utilities.GeneralPropertyException; |
66 | 66 |
import edu.ucsb.nceas.utilities.PropertyNotFoundException; |
67 | 67 |
|
68 |
import org.apache.commons.io.IOUtils; |
|
68 | 69 |
import org.apache.log4j.Logger; |
69 | 70 |
|
70 | 71 |
/** |
... | ... | |
976 | 977 |
} while ((fileLine = reader.readLine()) != null); |
977 | 978 |
} |
978 | 979 |
} |
980 |
fin.close(); |
|
979 | 981 |
} finally { |
980 |
// Close our input stream |
|
981 |
fin.close(); |
|
982 |
IOUtils.closeQuietly(fin); |
|
982 | 983 |
} |
983 | 984 |
|
984 | 985 |
return sqlCommands; |
Also available in: Unified diff
Reviewed code for all uses of FileInputStream, checking to see if the method should be closing the stream, and if so, closing it in the method as well as in the finally clause to ensure we don't leak file descriptors.