Error Unchecked call to 'put(K, V)' as a member of raw type 'java.util.HashMap'
Looks like you are missing the types.
Something like
new HashMap<Type1,Type2>().put(K,V)
should work.
For anonymous use:
new HashMap<Type1,Type2>().put(K,V);
For initializing a variable:
HashMap<Type1,Type2> hashMap = new HashMap<>();
hashMap.put(K,V);