A list object containing a Map<String, String> objects need to pass as argument having parameter of type List<Map<String, Object>>.
I need to cast it like this -
List<Map<String, Object>> objectList = (List<Map<String, Object>>) (Object) strList;
Is there any better approach here? Is it good idea to cast like given above? Will Java 8 Stream be a better option for conversion?
Object? Why are you casting it to anObjectin the first place? etc.List<Map<String, ?>>?List<? extends Map<String, ?>>