List.addAll throwing UnsupportedOperationException
when trying to add another list.
List<String> supportedTypes = Arrays.asList("6500", "7600"};
and in loop I am doing,
supportedTypes.addAll(Arrays.asList(supportTypes.split(","))); //line 2
reading supportTypes from a file.
But line 2 throws a UnsupportedOperationException
, but I am not able to determine why?
I am adding another list to a list, then why this operation is unsupported?