cleanup buf.append(s.substring(a, b)) -> buf.append(s, a, b)

all over, for object churn
This commit is contained in:
zzz
2023-01-31 07:31:02 -05:00
parent 07a796bcf6
commit 1e28557ce2
16 changed files with 25 additions and 25 deletions

View File

@@ -1935,7 +1935,7 @@ public abstract class I2PSessionImpl implements I2PSession, I2CPMessageReader.I2
StringBuilder buf = new StringBuilder(32);
buf.append("Session: ");
if (_myDestination != null)
buf.append(_myDestination.calculateHash().toBase64().substring(0, 4));
buf.append(_myDestination.calculateHash().toBase64(), 0, 4);
else
buf.append("[null dest]");
buf.append(getPrefix());

View File

@@ -935,7 +935,7 @@ public abstract class Addresses {
buf.setLength(0);
int i = 0;
while(true) {
buf.append(as.substring(i, i+4));
buf.append(as, i, i+4);
i += 4;
if (i >= 32)
break;
@@ -1130,7 +1130,7 @@ public abstract class Addresses {
for (String m : _macCache) {
int i = 0;
while(true) {
buf.append(m.substring(i, i+2));
buf.append(m, i, i+2);
i += 2;
if (i >= 12)
break;