Return-Path: Delivered-To: apmail-commons-issues-archive@minotaur.apache.org Received: (qmail 40514 invoked from network); 19 Jun 2010 19:42:48 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 19 Jun 2010 19:42:48 -0000 Received: (qmail 11928 invoked by uid 500); 19 Jun 2010 19:42:47 -0000 Delivered-To: apmail-commons-issues-archive@commons.apache.org Received: (qmail 11856 invoked by uid 500); 19 Jun 2010 19:42:47 -0000 Mailing-List: contact issues-help@commons.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: issues@commons.apache.org Delivered-To: mailing list issues@commons.apache.org Received: (qmail 11848 invoked by uid 99); 19 Jun 2010 19:42:47 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 19 Jun 2010 19:42:47 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.22] (HELO thor.apache.org) (140.211.11.22) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 19 Jun 2010 19:42:44 +0000 Received: from thor (localhost [127.0.0.1]) by thor.apache.org (8.13.8+Sun/8.13.8) with ESMTP id o5JJgNf7009076 for ; Sat, 19 Jun 2010 19:42:23 GMT Message-ID: <24258590.96131276976542987.JavaMail.jira@thor> Date: Sat, 19 Jun 2010 15:42:22 -0400 (EDT) From: "Henri Yandell (JIRA)" To: issues@commons.apache.org Subject: [jira] Closed: (COLLECTIONS-346) SetUniqueList.decorate throws exceptions that is not documented In-Reply-To: <1656472483.1259104779566.JavaMail.jira@brutus> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/COLLECTIONS-346?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Henri Yandell closed COLLECTIONS-346. ------------------------------------- Resolution: Won't Fix Agreed, but it should be javadoc'd in java.util.Arrays.asList as that's the location that is throwing the UnsupportedOperationException. SetUniqueList.decorate() isn't the one making the decision here; the coder is as they've chosen to pass in an unmodifiable list (though Arrays.asList doesn't make that clear, at least in the 1.5 javadoc). Resolving as nothing for us to do. > SetUniqueList.decorate throws exceptions that is not documented > --------------------------------------------------------------- > > Key: COLLECTIONS-346 > URL: https://issues.apache.org/jira/browse/COLLECTIONS-346 > Project: Commons Collections > Issue Type: Bug > Components: List > Affects Versions: 3.2 > Reporter: Jimmy Shi > > public static void main(String[] args) { > List testList=Arrays.asList("a","b","c","a","b","c","e"); > SetUniqueList decoratedList = SetUniqueList.decorate(testList); > System.out.println(decoratedList); > } > > throws below exception: > Exception in thread "main" java.lang.UnsupportedOperationException > at java.util.AbstractList.remove(AbstractList.java:172) > at java.util.AbstractList$Itr.remove(AbstractList.java:437) > at java.util.AbstractList.removeRange(AbstractList.java:662) > at java.util.AbstractList.clear(AbstractList.java:258) > at org.apache.commons.collections.list.SetUniqueList.decorate(SetUniqueList.java:80) > caused by the list to decorate is unmodifiable. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.