I have a property in my JSF managed bean:
private List<Long> selectedDataSets;
I initialize the list like this within an other method:
ArrayList<Long> longList = new ArrayList<>();
What happens is I get java.lang.ClassCastException: java.lang.String cannot be cast to java.lang.Long
right when it jumps on this foreach:
for (Long CRC : selectedDataSets) { ... }
Which is very odd. Debug shows that selectedDataSets
are full of String
values, but I thought that's not even possible. Please describe me what exactly happened here.