Fix of commented test. - Fixes
@@ -25,7 +25,6 @@ import java.io.ObjectOutput;
import java.io.Serializable;
import java.lang.reflect.Field;
import java.lang.reflect.InvocationHandler;
-import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
import java.lang.reflect.Proxy;
import java.math.BigDecimal;
@@ -1509,24 +1508,13 @@ public class BinaryMarshallerSelfTest extends GridCommonAbstractTest {
/**
* @throws Exception If failed.
*/
- public void _testDefaultMapping() throws Exception {
+ public void testDefaultMapping() throws Exception {
BinaryTypeConfiguration customMappingType =
new BinaryTypeConfiguration(TestBinary.class.getName());
customMappingType.setIdMapper(new BinaryIdMapper() {
@Override public int typeId(String clsName) {
- String typeName;
-
- try {
- Method mtd = BinaryContext.class.getDeclaredMethod("typeName", String.class);
-
- mtd.setAccessible(true);
-
- typeName = (String)mtd.invoke(null, clsName);
- }
- catch (NoSuchMethodException | InvocationTargetException | IllegalAccessException e) {
- throw new RuntimeException(e);
- }
+ String typeName = BinaryContext.SIMPLE_NAME_LOWER_CASE_MAPPER.typeName(clsName);
return typeName.toLowerCase().hashCode();
}
