Why am I getting an unchecked cast warning in Java?

Use ApplicationContext#getBean with Generics (Best Practice) Spring supports generic type inference with this method: private Map<String, String> someMap = getApplicationContext().getBean(“someMap”, Map.class);

:white_check_mark: Why?

Eliminates unchecked cast warnings without suppression.