Return-Path: Delivered-To: apmail-jackrabbit-dev-archive@www.apache.org Received: (qmail 60552 invoked from network); 25 Apr 2007 08:58:16 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 25 Apr 2007 08:58:16 -0000 Received: (qmail 83055 invoked by uid 500); 25 Apr 2007 08:58:08 -0000 Delivered-To: apmail-jackrabbit-dev-archive@jackrabbit.apache.org Received: (qmail 83001 invoked by uid 500); 25 Apr 2007 08:58:08 -0000 Mailing-List: contact dev-help@jackrabbit.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@jackrabbit.apache.org Delivered-To: mailing list dev@jackrabbit.apache.org Received: (qmail 82941 invoked by uid 99); 25 Apr 2007 08:58:08 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 25 Apr 2007 01:58:08 -0700 X-ASF-Spam-Status: No, hits=-100.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO brutus.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 25 Apr 2007 01:57:57 -0700 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 670D771408E for ; Wed, 25 Apr 2007 01:57:18 -0700 (PDT) Message-ID: <21761831.1177491438419.JavaMail.jira@brutus> Date: Wed, 25 Apr 2007 01:57:18 -0700 (PDT) From: "Jukka Zitting (JIRA)" To: dev@jackrabbit.apache.org Subject: [jira] Moved: (JCR-876) ManageableCollectionUtil should not throw "unsupported" JcrMapping exception MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/JCR-876?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Jukka Zitting moved GRFT-99 to JCR-876: --------------------------------------- Component/s: (was: JCR-Mapping) jcr-mapping Affects Version/s: (was: 1.0-a1-dev) Key: JCR-876 (was: GRFT-99) Project: Jackrabbit (was: Graffito) > ManageableCollectionUtil should not throw "unsupported" JcrMapping exception > ---------------------------------------------------------------------------- > > Key: JCR-876 > URL: https://issues.apache.org/jira/browse/JCR-876 > Project: Jackrabbit > Issue Type: Improvement > Components: jcr-mapping > Environment: All > Reporter: Dan Connelly > > Many times, the object model'd code cannot be altered for ocm. > To avoid the "unsupported" exception in almost all such cases, use a delegating wrapper class to encapsulate a Collection. The wrapper class implements MaangeableCollection. > Since delegation is a performance hit, make the test below the last resort for *object* conversion in the method: > public static ManageableCollection getManageableCollection(Object object) > Proposed "catchall" test and program action: > if (object instanceof Collection) { > return new ManageableCollectionImpl((Collection)object); > } -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.