Skip to content

Commit f0f4953

Browse files
committed
string concatenation in a loop 😓
1 parent a738b4b commit f0f4953

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

src/test/java/com/bettercloud/vault/SSLTests.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -173,13 +173,13 @@ public void testSslPem_UTF8() throws Exception {
173173

174174
final BufferedReader in = new BufferedReader(new InputStreamReader(this.getClass().getResourceAsStream("/cert.pem")));
175175
final StringBuilder builder = new StringBuilder();
176-
String utf8 = "";
176+
StringBuilder utf8 = new StringBuilder();
177177
String str;
178178
while ((str = in.readLine()) != null) {
179-
utf8 += str + System.lineSeparator();//NOPMD
179+
utf8.append(str).append(System.lineSeparator());//NOPMD
180180
}
181181
in.close();
182-
final String pemUTF8 = utf8;
182+
final String pemUTF8 = utf8.toString();
183183

184184
final VaultConfig vaultConfig = new VaultConfig()
185185
.address("https://127.0.0.1:9998")

0 commit comments

Comments
 (0)