From 2cb344495e2f7045d2c1f93775f583f2b237f7b2 Mon Sep 17 00:00:00 2001 From: Andreas Schildbach Date: Tue, 29 Oct 2019 09:25:59 +0100 Subject: [PATCH] VrsProviderLiveTest: Replace String concatenation in a loop with usage of a StringBuilder. --- test/de/schildbach/pte/live/VrsProviderLiveTest.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/de/schildbach/pte/live/VrsProviderLiveTest.java b/test/de/schildbach/pte/live/VrsProviderLiveTest.java index 07ffb497..86c792f0 100644 --- a/test/de/schildbach/pte/live/VrsProviderLiveTest.java +++ b/test/de/schildbach/pte/live/VrsProviderLiveTest.java @@ -256,11 +256,11 @@ public class VrsProviderLiveTest extends AbstractProviderLiveTest { public void suggestManyLocations() throws Exception { Random rand = new Random(new Date().getTime()); for (int i = 0; i < 10; i++) { - String s = ""; + final StringBuilder s = new StringBuilder(); int len = rand.nextInt(256); for (int j = 0; j < len; j++) { char c = (char) ('a' + rand.nextInt(26)); - s += c; + s.append(c); } final SuggestLocationsResult result = suggestLocations(s); System.out.print(s + " => ");