Details
-
Improvement
-
Status: Closed
-
Minor
-
Resolution: Fixed
-
2.5.1
-
None
-
None
Description
If IOException is happended, can be catched exception block..
But another excpetion is happended, can't be catched exception block.. also Stream object can't be closed..
try { in = open(qSrc); EnumSet<CreateFlag> createFlag = overwrite ? EnumSet.of( CreateFlag.CREATE, CreateFlag.OVERWRITE) : EnumSet.of(CreateFlag.CREATE); out = create(qDst, createFlag); IOUtils.copyBytes(in, out, conf, true); } catch (IOException e) { IOUtils.closeStream(out); IOUtils.closeStream(in); throw e; }