what's wrong with this code. cant get the last condition.
package com.codegym.task.task37.task3707;
import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
import java.util.HashMap;
public class HashMapReflectionHelper {
public static <T> T callHiddenMethod(HashMap map, String methodName) {
try {
Method method = map.getClass().getDeclaredMethod(methodName);
method.setAccessible(true);
return (T) method.invoke(map);
} catch (NoSuchMethodException | InvocationTargetException | IllegalAccessException ignored) {
}
return null;
}
}