DO NOT MERGE) ExifInterface: Close the file when an exception happens am: cb17930077

am: 761a1ed3a6

Change-Id: Ia6679d76895a452267f23dd71096c397c5b48c88
This commit is contained in:
Sungsoo
2016-10-18 17:35:20 +00:00
committed by android-build-merger

View File

@@ -1335,8 +1335,9 @@ public class ExifInterface {
for (int i = 0; i < EXIF_TAGS.length; ++i) {
mAttributes[i] = new HashMap();
}
InputStream in = null;
try {
InputStream in = new FileInputStream(mFilename);
in = new FileInputStream(mFilename);
getJpegAttributes(in);
mIsSupportedFile = true;
} catch (IOException e) {
@@ -1349,6 +1350,7 @@ public class ExifInterface {
if (DEBUG) {
printAttributes();
}
IoUtils.closeQuietly(in);
}
}