Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit d141305f authored by Gil Dobjanschi's avatar Gil Dobjanschi
Browse files

Fix: FileInputStream not closed after parsing XML file

Change-Id: I8ea69738d5ba1e91c9c759f76c49a8a324c24b88
parent c7481cd5
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -750,7 +750,8 @@ public class VideoEditorTestImpl implements VideoEditor {
        final File file = new File(mProjectPath, PROJECT_FILENAME);
        // Load the metadata
        final XmlPullParser parser = Xml.newPullParser();
        parser.setInput(new FileInputStream(file), "UTF-8");
        final FileInputStream fis = new FileInputStream(file);
        parser.setInput(fis, "UTF-8");
        int eventType = parser.getEventType();
        String name;
        MediaItem currentMediaItem = null;
@@ -860,6 +861,7 @@ public class VideoEditorTestImpl implements VideoEditor {
            eventType = parser.next();
        }

        fis.close();
        computeTimelineDuration();
    }