From b738cb148cb2a15e72a5c27200eca2d4b383bf9c Mon Sep 17 00:00:00 2001 From: Steve Loughran Date: Wed, 17 Oct 2018 10:29:09 +0100 Subject: [PATCH] HADOOP-15854. AuthToken Use StringBuilder instead of StringBuffer. Contributed by Beluga Behr. --- .../apache/hadoop/security/authentication/util/AuthToken.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hadoop-common-project/hadoop-auth/src/main/java/org/apache/hadoop/security/authentication/util/AuthToken.java b/hadoop-common-project/hadoop-auth/src/main/java/org/apache/hadoop/security/authentication/util/AuthToken.java index e959f65b0b..844501c678 100644 --- a/hadoop-common-project/hadoop-auth/src/main/java/org/apache/hadoop/security/authentication/util/AuthToken.java +++ b/hadoop-common-project/hadoop-auth/src/main/java/org/apache/hadoop/security/authentication/util/AuthToken.java @@ -128,7 +128,7 @@ public boolean isExpired() { * Generates the token. */ private void generateToken() { - StringBuffer sb = new StringBuffer(); + StringBuilder sb = new StringBuilder(); sb.append(USER_NAME).append("=").append(getUserName()).append(ATTR_SEPARATOR); sb.append(PRINCIPAL).append("=").append(getName()).append(ATTR_SEPARATOR); sb.append(TYPE).append("=").append(getType()).append(ATTR_SEPARATOR);