I have a bug using Java Collections in JDK 1.7: I got this exception on this line: the Stats.addAll clause (getAllSubmittedStatuses ())
java.lang.UnsupportedOperationException at java.util.AbstractList.add(Unknown Source) at java.util.AbstractList.add(Unknown Source) at java.util.AbstractCollection.addAll(Unknown Source)
trying to add a collection to the list
private Collection<ProposalStatus> getAllSubmittedStatuses() { return Arrays.asList( ProposalStatus.SAVED_TO_IOS , ProposalStatus.SENDED_TO_IOS_IN_PROGRESS ); } private Collection<ProposalStatus> getAllReceivedStatuses() { Collection<ProposalStatus> proposalStatuses = Arrays.asList( ProposalStatus.RECEIVED_BY_IOS , ProposalStatus.SUBMITTED_TO_IOS , ProposalStatus.RECEIVED_IOS ); proposalStatuses.addAll(getAllSubmittedStatuses()); return proposalStatuses; }
source share