AccountCreator: Use StandardCharsets.US_ASCII constant

Instead of the literal string "ASCII".

Change-Id: I3467ead005d67592182af34908b6e5f2b2480d13
This commit is contained in:
David Pursehouse
2016-03-16 18:48:48 +09:00
parent b5a7399239
commit 3c3f01e80e

View File

@@ -15,6 +15,7 @@
package com.google.gerrit.acceptance;
import static com.google.common.base.Preconditions.checkNotNull;
import static java.nio.charset.StandardCharsets.US_ASCII;
import com.google.gerrit.common.TimeUtil;
import com.google.gerrit.reviewdb.client.Account;
@@ -168,6 +169,6 @@ public class AccountCreator {
throws UnsupportedEncodingException {
ByteArrayOutputStream out = new ByteArrayOutputStream();
sshKey.writePublicKey(out, comment);
return out.toString("ASCII");
return out.toString(US_ASCII.name());
}
}