HBASE-19922 remove ProtobufUtil::PRIMITIVES

This commit is contained in:
Mike Drob 2018-02-02 15:59:52 -06:00
parent 7723a3d60d
commit e69c1fd7a0
2 changed files with 0 additions and 32 deletions

View File

@ -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;
@ -121,11 +120,6 @@ public final class ProtobufUtil {
private 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);
}
/**

View File

@ -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;
@ -199,11 +198,6 @@ public final class ProtobufUtil {
private 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);
}
/**