From 8de820786ce8d708a6d2fd32b36ab9128bc6fc0f 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 --- .../hadoop/hbase/protobuf/ProtobufUtil.java | 16 ---------------- .../hbase/shaded/protobuf/ProtobufUtil.java | 16 ---------------- 2 files changed, 32 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 eed911a5d9a..29ff2a2a618 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 @@ -34,7 +34,6 @@ import java.io.IOException; import java.lang.reflect.Constructor; import java.lang.reflect.Method; import java.util.ArrayList; -import java.util.HashMap; import java.util.List; import java.util.Map; import java.util.Map.Entry; @@ -122,11 +121,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 +177,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 06d9a3cd956..5bb3b4ba049 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 @@ -27,7 +27,6 @@ import java.lang.reflect.Method; import java.nio.ByteBuffer; import java.util.ArrayList; import java.util.Collections; -import java.util.HashMap; import java.util.List; import java.util.Locale; import java.util.Map; @@ -200,11 +199,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 +254,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); } /**