From 12ad63d7232ca72be9eff5680d974fc16999aac3 Mon Sep 17 00:00:00 2001 From: Mingliang Liu Date: Mon, 15 Aug 2016 20:13:20 -0700 Subject: [PATCH] HDFS-10725. Caller context should always be constructed by a builder. (Contributed by Mingliang Liu) --- .../src/main/java/org/apache/hadoop/ipc/CallerContext.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/ipc/CallerContext.java b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/ipc/CallerContext.java index b197575e052..3d21bfe28af 100644 --- a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/ipc/CallerContext.java +++ b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/ipc/CallerContext.java @@ -35,7 +35,7 @@ import java.util.Arrays; @InterfaceAudience.LimitedPrivate({"HBase", "HDFS", "Hive", "MapReduce", "Pig", "YARN"}) @InterfaceStability.Evolving -public class CallerContext { +public final class CallerContext { public static final Charset SIGNATURE_ENCODING = StandardCharsets.UTF_8; /** The caller context. * @@ -54,7 +54,7 @@ public class CallerContext { */ private final byte[] signature; - public CallerContext(Builder builder) { + private CallerContext(Builder builder) { this.context = builder.context; this.signature = builder.signature; }