From 8442e3c496019bfe10773520b96718f7d0375342 Mon Sep 17 00:00:00 2001 From: coach88 Date: Wed, 30 Sep 2015 13:01:37 +0300 Subject: [PATCH] Minor cleanup --- .../gridfs/GridFSIntegrationTest.java | 20 +++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/spring-data-mongodb/src/test/java/org/baeldung/gridfs/GridFSIntegrationTest.java b/spring-data-mongodb/src/test/java/org/baeldung/gridfs/GridFSIntegrationTest.java index c6a4855957..2a8e2e121b 100644 --- a/spring-data-mongodb/src/test/java/org/baeldung/gridfs/GridFSIntegrationTest.java +++ b/spring-data-mongodb/src/test/java/org/baeldung/gridfs/GridFSIntegrationTest.java @@ -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); } } }