From dca19b1a16dfd9e1f4438418240176fd8b810a73 Mon Sep 17 00:00:00 2001 From: Mike Drob Date: Fri, 2 Feb 2018 15:59:52 -0600 Subject: [PATCH] HBASE-19922 remove ProtobufUtil::PRIMITIVES --- .../org/apache/hadoop/hbase/protobuf/ProtobufUtil.java | 15 --------------- .../apache/hadoop/hbase/shaded/protobuf/ProtobufUtil.java | 15 --------------- 2 files changed, 30 deletions(-) diff --git a/hbase-client/src/main/java/org/apache/hadoop/hbase/protobuf/ProtobufUtil.java b/hbase-client/src/main/java/org/apache/hadoop/hbase/protobuf/ProtobufUtil.java index eed911a5d9..417cfa5f6b 100644 --- a/hbase-client/src/main/java/org/apache/hadoop/hbase/protobuf/ProtobufUtil.java +++ b/hbase-client/src/main/java/org/apache/hadoop/hbase/protobuf/ProtobufUtil.java @@ -122,11 +122,6 @@ public final class ProtobufUtil { private ProtobufUtil() { } - /** - * Primitive type to class mapping. - */ - private final static Map> PRIMITIVES = new HashMap<>(); - /** * Many results are simple: no cell, exists true or false. To save on object creations, * we reuse them across calls. @@ -183,16 +178,6 @@ public final class ProtobufUtil { ClassLoader parent = ProtobufUtil.class.getClassLoader(); Configuration conf = HBaseConfiguration.create(); CLASS_LOADER = new DynamicClassLoader(conf, parent); - - PRIMITIVES.put(Boolean.TYPE.getName(), Boolean.TYPE); - PRIMITIVES.put(Byte.TYPE.getName(), Byte.TYPE); - PRIMITIVES.put(Character.TYPE.getName(), Character.TYPE); - PRIMITIVES.put(Short.TYPE.getName(), Short.TYPE); - PRIMITIVES.put(Integer.TYPE.getName(), Integer.TYPE); - PRIMITIVES.put(Long.TYPE.getName(), Long.TYPE); - PRIMITIVES.put(Float.TYPE.getName(), Float.TYPE); - PRIMITIVES.put(Double.TYPE.getName(), Double.TYPE); - PRIMITIVES.put(Void.TYPE.getName(), Void.TYPE); } /** diff --git a/hbase-client/src/main/java/org/apache/hadoop/hbase/shaded/protobuf/ProtobufUtil.java b/hbase-client/src/main/java/org/apache/hadoop/hbase/shaded/protobuf/ProtobufUtil.java index 06d9a3cd95..bd9ac98fc0 100644 --- a/hbase-client/src/main/java/org/apache/hadoop/hbase/shaded/protobuf/ProtobufUtil.java +++ b/hbase-client/src/main/java/org/apache/hadoop/hbase/shaded/protobuf/ProtobufUtil.java @@ -200,11 +200,6 @@ public final class ProtobufUtil { private ProtobufUtil() { } - /** - * Primitive type to class mapping. - */ - private final static Map> PRIMITIVES = new HashMap<>(); - /** * Many results are simple: no cell, exists true or false. To save on object creations, * we reuse them across calls. @@ -260,16 +255,6 @@ public final class ProtobufUtil { ClassLoader parent = ProtobufUtil.class.getClassLoader(); Configuration conf = HBaseConfiguration.create(); CLASS_LOADER = new DynamicClassLoader(conf, parent); - - PRIMITIVES.put(Boolean.TYPE.getName(), Boolean.TYPE); - PRIMITIVES.put(Byte.TYPE.getName(), Byte.TYPE); - PRIMITIVES.put(Character.TYPE.getName(), Character.TYPE); - PRIMITIVES.put(Short.TYPE.getName(), Short.TYPE); - PRIMITIVES.put(Integer.TYPE.getName(), Integer.TYPE); - PRIMITIVES.put(Long.TYPE.getName(), Long.TYPE); - PRIMITIVES.put(Float.TYPE.getName(), Float.TYPE); - PRIMITIVES.put(Double.TYPE.getName(), Double.TYPE); - PRIMITIVES.put(Void.TYPE.getName(), Void.TYPE); } /** -- 2.15.1