Repository: hbase Updated Branches: refs/heads/branch-2 7723a3d60 -> e69c1fd7a refs/heads/master 6307689a6 -> 8de820786
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/8de82078 Tree: http://git-wip-us.apache.org/repos/asf/hbase/tree/8de82078 Diff: http://git-wip-us.apache.org/repos/asf/hbase/diff/8de82078 Branch: refs/heads/master Commit: 8de820786ce8d708a6d2fd32b36ab9128bc6fc0f Parents: 6307689 Author: Mike Drob <[email protected]> Authored: Fri Feb 2 15:59:52 2018 -0600 Committer: Mike Drob <[email protected]> Committed: Mon Feb 5 15:33:46 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/8de82078/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 eed911a..29ff2a2 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; @@ -123,11 +122,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. */ @@ -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); } /** http://git-wip-us.apache.org/repos/asf/hbase/blob/8de82078/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 06d9a3c..5bb3b4b 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; @@ -201,11 +200,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. */ @@ -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); } /**
