How may one fix this problem?
The error lies @ scrollPane and map.
scrollPane error: the final local variable cannot be assigned, since it was defined in an enclosing type
map error suggestion: initialise variable.
final Map<ItemType, JScrollPane> viewScrollPanes = new HashMap<ItemType, JScrollPane>();
final JScrollPane scrollPane;
final Map<ItemType, JScrollPane> map;
this.viewList.forEach((type, list) -> {
list.setSelectionMode(0);
list.setVisibleRowCount(5);
list.putClientProperty("type", type);
list.setCellRenderer(this.itemRenderer);
list.setName(String.valueOf(type.toString()) + "List");
scrollPane = new JScrollPane(list);
scrollPane.setMinimumSize(new Dimension(0, 110));
scrollPane.setName(type.toString());
map.put(type, scrollPane);
return;
});