Replace redundant StringBuilder append String.subString with append CharSequence
This commit is contained in:
@@ -69,7 +69,7 @@ public class CacheUploader implements Runnable
|
||||
archive.setHash(hash);
|
||||
|
||||
String path = new StringBuilder()
|
||||
.append(hashStr.substring(0, 2))
|
||||
.append(hashStr, 0, 2)
|
||||
.append('/')
|
||||
.append(hashStr.substring(2))
|
||||
.toString();
|
||||
|
||||
@@ -104,7 +104,7 @@ public class CacheService
|
||||
{
|
||||
String hashStr = BaseEncoding.base16().encode(archiveEntry.getHash());
|
||||
String path = new StringBuilder()
|
||||
.append(hashStr.substring(0, 2))
|
||||
.append(hashStr, 0, 2)
|
||||
.append('/')
|
||||
.append(hashStr.substring(2))
|
||||
.toString();
|
||||
|
||||
Reference in New Issue
Block a user