Project

General

Profile

« Previous | Next » 

Revision 8304

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.

View differences:

ReplicationService.java
1258 1258
			// close file input stream
1259 1259
			fin.close();
1260 1260

  
1261
		}//try
1262
		catch (Exception e) {
1261
		} catch (Exception e) {
1263 1262
			logMetacat.error("ReplicationService.handleGetDataFileRequest - " + ReplicationService.METACAT_REPL_ERROR_MSG);                         
1264 1263
			logReplication.error("ReplicationService.handleGetDataFileRequest - error getting data file from MetacatReplication."
1265 1264
					+ "handlGetDataFileRequest " + e.getMessage());
1266 1265
			e.printStackTrace(System.out);
1267
		}//catch
1266
		} finally {
1267
		    IOUtils.closeQuietly(fin);
1268
		}
1268 1269

  
1269 1270
	}
1270 1271

  

Also available in: Unified diff