/* -*- Mode: Java; c-basic-offset: 4; tab-width: 20; indent-tabs-mode: nil; -*-
 * This Source Code Form is subject to the terms of the Mozilla Public
 * License, v. 2.0. If a copy of the MPL was not distributed with this
 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */

package org.mozilla.focus.utils;

import android.content.Context;

import org.json.JSONException;
import org.json.JSONObject;

import java.io.BufferedReader;
import java.io.Closeable;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;

public class IOUtils {
    public static void safeClose(Closeable stream) {
        try {
            if (stream != null) {
                stream.close();
            }
        } catch (IOException ignored) { }
    }

    public static JSONObject readAsset(Context context, String fileName) throws IOException {
        try (final BufferedReader reader =
                     new BufferedReader(new InputStreamReader(context.getAssets().open(fileName)))){
            final StringBuilder builder = new StringBuilder();
            String line;

            while ((line = reader.readLine()) != null) {
                builder.append(line);
            }

            return new JSONObject(builder.toString());
        } catch (JSONException e) {
            throw new AssertionError("Corrupt JSON asset (" + fileName + ")", e);
        }
    }
}

@@ -581,204 +581,8 @@
 s %7B%0A
-    public static void safeClose(Closeable stream) %7B%0A        try %7B%0A            if (stream != null) %7B%0A                stream.close();%0A            %7D%0A        %7D catch (IOException ignored) %7B %7D%0A    %7D%0A%0A
     

Remove now-unused safeClose