From b7673fc48104ffdfb4261ebc130ea2e0c1c5d680 Mon Sep 17 00:00:00 2001 From: Sander Bogaert Date: Sat, 28 Apr 2012 13:50:19 +0200 Subject: [PATCH] Forgot closing a reader. --- .../activity/setup/AccountSetupAutoConfiguration.java | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/com/fsck/k9/activity/setup/AccountSetupAutoConfiguration.java b/src/com/fsck/k9/activity/setup/AccountSetupAutoConfiguration.java index 3a74d3aa5..6ef784a80 100644 --- a/src/com/fsck/k9/activity/setup/AccountSetupAutoConfiguration.java +++ b/src/com/fsck/k9/activity/setup/AccountSetupAutoConfiguration.java @@ -175,12 +175,10 @@ public class AccountSetupAutoConfiguration extends K9Activity implements View.On // get the data String tmp, line; - BufferedReader reader; + BufferedReader reader = new BufferedReader(new InputStreamReader(conn.getInputStream())); tmp = ""; try{ - reader = new BufferedReader(new InputStreamReader(conn.getInputStream())); - while( (line = reader.readLine()) != null) tmp += line; @@ -192,8 +190,10 @@ public class AccountSetupAutoConfiguration extends K9Activity implements View.On catch (ConnectException ex){ // ignore this, it just means the url doesn't exist which happens often, we test for it! } - finally - { conn.disconnect(); } + finally{ + reader.close(); + conn.disconnect(); + } return tmp; }