HBASE-19922 remove ProtobufUtil::PRIMITIVES
Project: http://git-wip-us.apache.org/repos/asf/hbase/repo Commit: http://git-wip-us.apache.org/repos/asf/hbase/commit/e69c1fd7 Tree: http://git-wip-us.apache.org/repos/asf/hbase/tree/e69c1fd7 Diff: http://git-wip-us.apache.org/repos/asf/hbase/diff/e69c1fd7 Branch: refs/heads/branch-2 Commit: e69c1fd7a004c5f1322734170084c2cb1de2299b Parents: 7723a3d Author: Mike Drob <md...@apache.org> Authored: Fri Feb 2 15:59:52 2018 -0600 Committer: Mike Drob <md...@apache.org> Committed: Mon Feb 5 16:55:45 2018 -0600 ---------------------------------------------------------------------- .../apache/hadoop/hbase/protobuf/ProtobufUtil.java | 16 ---------------- .../hadoop/hbase/shaded/protobuf/ProtobufUtil.java | 16 ---------------- 2 files changed, 32 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/hbase/blob/e69c1fd7/hbase-client/src/main/java/org/apache/hadoop/hbase/protobuf/ProtobufUtil.java ---------------------------------------------------------------------- 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 9739254..54837dc 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 @@ -32,7 +32,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 { } /** - * Primitive type to class mapping. - */ - private final static Map<String, Class<?>> PRIMITIVES = new HashMap<>(); - - /** * Many results are simple: no cell, exists true or false. To save on object creations, * we reuse them across calls. */ @@ -182,16 +176,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); } /** http://git-wip-us.apache.org/repos/asf/hbase/blob/e69c1fd7/hbase-client/src/main/java/org/apache/hadoop/hbase/shaded/protobuf/ProtobufUtil.java ---------------------------------------------------------------------- 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 b26802f..3a59492 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 @@ -25,7 +25,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 { } /** - * Primitive type to class mapping. - */ - private final static Map<String, Class<?>> PRIMITIVES = new HashMap<>(); - - /** * Many results are simple: no cell, exists true or false. To save on object creations, * we reuse them across calls. */ @@ -259,16 +253,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); } /**