diff options
author | Martin Fietz <martin.fietz@gmail.com> | 2018-01-21 13:13:23 +0100 |
---|---|---|
committer | Martin Fietz <martin.fietz@gmail.com> | 2018-01-21 13:13:23 +0100 |
commit | b4d8868e9dabdd505960259229358b7424778178 (patch) | |
tree | 071038dc61e93e52acbf9b4410ce5631c41c0132 /app/src/androidTest | |
parent | 2a792c3c7536a3e8b4f84b1652b30d85163cd9f8 (diff) | |
download | AntennaPod-b4d8868e9dabdd505960259229358b7424778178.zip |
Revert "Use StringBuilder for string concatenation in loop"
This reverts commit 919ee63c3c2cc68ca4a3d63b6f314f472f2e6e78.
Diffstat (limited to 'app/src/androidTest')
-rw-r--r-- | app/src/androidTest/java/de/test/antennapod/util/service/download/NanoHTTPD.java | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/app/src/androidTest/java/de/test/antennapod/util/service/download/NanoHTTPD.java b/app/src/androidTest/java/de/test/antennapod/util/service/download/NanoHTTPD.java index 2c56cbfee..995f53988 100644 --- a/app/src/androidTest/java/de/test/antennapod/util/service/download/NanoHTTPD.java +++ b/app/src/androidTest/java/de/test/antennapod/util/service/download/NanoHTTPD.java @@ -1136,16 +1136,16 @@ public abstract class NanoHTTPD { String pname = disposition.get("name"); pname = pname.substring(1, pname.length() - 1); - StringBuilder value = new StringBuilder(); + String value = ""; if (item.get("content-type") == null) { while (mpline != null && !mpline.contains(boundary)) { mpline = in.readLine(); if (mpline != null) { int d = mpline.indexOf(boundary); if (d == -1) { - value.append(mpline); + value += mpline; } else { - value.append(mpline.substring(0, d - 2)); + value += mpline.substring(0, d - 2); } } } @@ -1156,13 +1156,13 @@ public abstract class NanoHTTPD { int offset = stripMultipartHeaders(fbuf, bpositions[boundarycount - 2]); String path = saveTmpFile(fbuf, offset, bpositions[boundarycount - 1] - offset - 4); files.put(pname, path); - value = new StringBuilder(disposition.get("filename")); - value = new StringBuilder(value.substring(1, value.length() - 1)); + value = disposition.get("filename"); + value = value.substring(1, value.length() - 1); do { mpline = in.readLine(); } while (mpline != null && !mpline.contains(boundary)); } - parms.put(pname, value.toString()); + parms.put(pname, value); } } } catch (IOException ioe) { |