From a1b07be29685426e13911771b45210f0f6ae33e0 Mon Sep 17 00:00:00 2001 From: Karsten Loesing Date: Tue, 21 Aug 2018 12:07:50 +0200 Subject: [PATCH] Remove redundant string operation. --- .../java/org/torproject/descriptor/impl/RelayDirectoryImpl.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/org/torproject/descriptor/impl/RelayDirectoryImpl.java b/src/main/java/org/torproject/descriptor/impl/RelayDirectoryImpl.java index 5eb5b6f..6370e87 100644 --- a/src/main/java/org/torproject/descriptor/impl/RelayDirectoryImpl.java +++ b/src/main/java/org/torproject/descriptor/impl/RelayDirectoryImpl.java @@ -264,7 +264,7 @@ public class RelayDirectoryImpl extends DescriptorImpl sb.append("-----BEGIN RSA PUBLIC KEY-----\n"); String keyString = partsNoOpt[1]; while (keyString.length() > 64) { - sb.append(keyString.substring(0, 64)).append(NL); + sb.append(keyString, 0, 64).append(NL); keyString = keyString.substring(64); } if (keyString.length() > 0) {