From 09331780b368c976fa5b97ed34c41dcd0b3cada7 Mon Sep 17 00:00:00 2001 From: Lode Hoste Date: Sun, 12 Apr 2015 23:24:44 +0200 Subject: [PATCH] Cache line separator --- .../com/nutomic/syncthingandroid/activities/LogActivity.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/main/java/com/nutomic/syncthingandroid/activities/LogActivity.java b/src/main/java/com/nutomic/syncthingandroid/activities/LogActivity.java index 12f2ae00..d5aa9af1 100644 --- a/src/main/java/com/nutomic/syncthingandroid/activities/LogActivity.java +++ b/src/main/java/com/nutomic/syncthingandroid/activities/LogActivity.java @@ -142,9 +142,10 @@ public class LogActivity extends SyncthingActivity { new InputStreamReader(process.getInputStream()), 8192); StringBuilder log = new StringBuilder(); String line = ""; + String sep = System.getProperty("line.separator"); while ((line = bufferedReader.readLine()) != null) { log.append(line); - log.append(System.getProperty("line.separator")); + log.append(sep); } return log.toString(); } catch (IOException e) {