Here you can find the source of copyMap(Object object)
@Deprecated public static Map<String, Object> copyMap(Object object)
//package com.java2s; //License from project: LGPL import java.util.HashMap; import java.util.Map; public class Main { /**//from ww w. ja va2 s .com * @deprecated 20160907 hsilva: not seeing any method using it, so it will be * removed soon */ @Deprecated public static Map<String, Object> copyMap(Object object) { if (!(object instanceof Map)) { return null; } Map<?, ?> map = (Map<?, ?>) object; Map<String, Object> temp = new HashMap<>(); for (Map.Entry<?, ?> entry : map.entrySet()) { if (entry.getKey() instanceof String) { temp.put((String) entry.getKey(), entry.getValue()); } else { return null; } } return temp; } }