| Index: libadblockplus-android/src/org/adblockplus/libadblockplus/android/Utils.java |
| diff --git a/libadblockplus-android/src/org/adblockplus/libadblockplus/android/Utils.java b/libadblockplus-android/src/org/adblockplus/libadblockplus/android/Utils.java |
| index 949f206f32ea879b5a91587f7e45d0c6e5464fa3..93611101a97382b42a3dc8f75e682bc741c5a103 100644 |
| --- a/libadblockplus-android/src/org/adblockplus/libadblockplus/android/Utils.java |
| +++ b/libadblockplus-android/src/org/adblockplus/libadblockplus/android/Utils.java |
| @@ -99,26 +99,38 @@ public final class Utils |
| public static String readAssetAsString(Context context, String filename) throws IOException |
| { |
| BufferedReader in = null; |
| - try { |
| + try |
| + { |
| StringBuilder buf = new StringBuilder(); |
| InputStream is = context.getAssets().open(filename); |
| in = new BufferedReader(new InputStreamReader(is)); |
| String str; |
| boolean isFirst = true; |
| - while ( (str = in.readLine()) != null ) { |
| + while ((str = in.readLine()) != null) |
| + { |
| if (isFirst) |
| + { |
| isFirst = false; |
| + } |
| else |
| + { |
| buf.append('\n'); |
| + } |
| buf.append(str); |
| } |
| return buf.toString(); |
| - } finally { |
| - if (in != null) { |
| - try { |
| + } |
| + finally |
| + { |
| + if (in != null) |
| + { |
| + try |
| + { |
| in.close(); |
| - } catch (IOException e) { |
| + } |
| + catch (IOException e) |
| + { |
| // ignored |
| } |
| } |