Skip to content

Commit b8e58f8

Browse files
Change the position of the finally block
1 parent 4b43426 commit b8e58f8

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

gxcloudstorage-awss3-v1/src/main/java/com/genexus/db/driver/ExternalProviderS3V1.java

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -187,16 +187,16 @@ public void download(String externalFileName, String localFile, ResourceAccessCo
187187
while ((read = objectData.read(bytes)) != -1) {
188188
outputStream.write(bytes, 0, read);
189189
}
190-
} finally {
191-
try {
192-
if (objectData != null)
193-
objectData.close();
194-
} catch (IOException ioe) {logger.error("Error while draining the S3ObjectInputStream", ioe);}
195190
}
196191
} catch (FileNotFoundException ex) {
197192
logger.error("Error while downloading file to the external provider", ex);
198193
} catch (IOException ex) {
199194
logger.error("Error while downloading file to the external provider", ex);
195+
} finally {
196+
try {
197+
if (objectData != null)
198+
objectData.close();
199+
} catch (IOException ioe) {logger.error("Error while draining the S3ObjectInputStream", ioe);}
200200
}
201201
}
202202

0 commit comments

Comments
 (0)