How to solve this Java type safety warning? (Struts2)
- by Nicolas Raoul
Map session = ActionContext.getContext().getSession();
session.put("user", user);
This code generates a warning: Type safety: The method put(Object, Object) belongs to the raw type Map. References to generic type Map should be parameterized.
Map<String, Serializable> session = (Map<String,…