Minor cleanup

This commit is contained in:
coach88 2015-09-30 13:01:37 +03:00
parent bddddbd090
commit 8442e3c496
1 changed files with 10 additions and 10 deletions

View File

@ -57,13 +57,13 @@ public class GridFSIntegrationTest {
inputStream = new FileInputStream("src/main/resources/test.png");
id = gridFsTemplate.store(inputStream, "test.png", "image/png", metaData).getId().toString();
} catch (FileNotFoundException ex) {
logger.error("", ex);
logger.error("File not found", ex);
} finally {
if (inputStream != null) {
try {
inputStream.close();
} catch (IOException ex) {
logger.error("", ex);
logger.error("Failed to close", ex);
}
}
}
@ -81,13 +81,13 @@ public class GridFSIntegrationTest {
inputStream = new FileInputStream("src/main/resources/test.png");
id = gridFsTemplate.store(inputStream, "test.png", "image/png", metaData).getId().toString();
} catch (FileNotFoundException ex) {
logger.error("", ex);
logger.error("File not found", ex);
} finally {
if (inputStream != null) {
try {
inputStream.close();
} catch (IOException ex) {
logger.error("", ex);
logger.error("Failed to close", ex);
}
}
}
@ -110,13 +110,13 @@ public class GridFSIntegrationTest {
gridFsTemplate.store(inputStream, "test.png", "image/png", metaData);
gridFsTemplate.store(inputStream, "test.png", "image/png", metaData);
} catch (FileNotFoundException ex) {
logger.error("", ex);
logger.error("File not found", ex);
} finally {
if (inputStream != null) {
try {
inputStream.close();
} catch (IOException ex) {
logger.error("", ex);
logger.error("Failed to close", ex);
}
}
}
@ -137,13 +137,13 @@ public class GridFSIntegrationTest {
inputStream = new FileInputStream("src/main/resources/test.png");
id = gridFsTemplate.store(inputStream, "test.png", "image/png", metaData).getId().toString();
} catch (FileNotFoundException ex) {
logger.error("", ex);
logger.error("File not found", ex);
} finally {
if (inputStream != null) {
try {
inputStream.close();
} catch (IOException ex) {
logger.error("", ex);
logger.error("Failed to close", ex);
}
}
}
@ -163,13 +163,13 @@ public class GridFSIntegrationTest {
inputStream = new FileInputStream("src/main/resources/test.png");
id = gridFsTemplate.store(inputStream, "test.png", "image/png", metaData).getId().toString();
} catch (FileNotFoundException ex) {
logger.error("", ex);
logger.error("File not found", ex);
} finally {
if (inputStream != null) {
try {
inputStream.close();
} catch (IOException ex) {
logger.error("", ex);
logger.error("Failed to close", ex);
}
}
}