mirror of
https://gitlab.com/oeffi/public-transport-enabler.git
synced 2025-07-06 15:18:49 +00:00
VrsProviderLiveTest: Replace String concatenation in a loop with usage of a StringBuilder.
This commit is contained in:
parent
9c92d75353
commit
2cb344495e
1 changed files with 2 additions and 2 deletions
|
@ -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 + " => ");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue