diff --git a/src/main/java/cokr/xit/fims/rent/web/Rent04Controller.java b/src/main/java/cokr/xit/fims/rent/web/Rent04Controller.java index beff33ad..151482aa 100644 --- a/src/main/java/cokr/xit/fims/rent/web/Rent04Controller.java +++ b/src/main/java/cokr/xit/fims/rent/web/Rent04Controller.java @@ -96,6 +96,11 @@ public class Rent04Controller extends ApplicationController { byte[] bytesOfFile = file.getBytes(); InputStream in = new ByteArrayInputStream(bytesOfFile); XSSFWorkbook workbook = new XSSFWorkbook(in); + + try { + + + in.close(); int rowNo = 0; @@ -224,6 +229,9 @@ public class Rent04Controller extends ApplicationController { mav.addObject("data", result); mav.addObject("saved", true); + } catch(Exception e) { + workbook.close(); + } return mav; }