I use the following code to read the card type HashMap<String, String
> with the premise:
in.readHashMap(HashMap.class.getClassLoader());
Everything seems to be working fine, but I get a warning:
Type safety: The expression of type HashMap needs unchecked conversion to conform to Map<String,String>
Is there a βrightβ way to do this, use a different classloader? Or should I just go with @SuppressWarnings("unchecked"
)?
hdort source share