Return-Path: Delivered-To: apmail-jackrabbit-dev-archive@www.apache.org Received: (qmail 5982 invoked from network); 23 Sep 2008 20:18:37 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 23 Sep 2008 20:18:37 -0000 Received: (qmail 60318 invoked by uid 500); 23 Sep 2008 20:18:32 -0000 Delivered-To: apmail-jackrabbit-dev-archive@jackrabbit.apache.org Received: (qmail 60280 invoked by uid 500); 23 Sep 2008 20:18:32 -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 60267 invoked by uid 99); 23 Sep 2008 20:18:32 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 23 Sep 2008 13:18:32 -0700 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.140] (HELO brutus.apache.org) (140.211.11.140) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 23 Sep 2008 20:17:41 +0000 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 710D7234C1E4 for ; Tue, 23 Sep 2008 13:17:44 -0700 (PDT) Message-ID: <1881101474.1222201064462.JavaMail.jira@brutus> Date: Tue, 23 Sep 2008 13:17:44 -0700 (PDT) From: "Christophe Lombart (JIRA)" To: dev@jackrabbit.apache.org Subject: [jira] Resolved: (JCR-1758) Improvement to UndefinedTypeConverterImpl to map super types effectively In-Reply-To: <1422458693.1222183544216.JavaMail.jira@brutus> 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-1758?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Christophe Lombart resolved JCR-1758. ------------------------------------- Resolution: Fixed the patch has been applied. Unit tests are working here. Thanks for the improvement. Let me know if something is wrong. > Improvement to UndefinedTypeConverterImpl to map super types effectively > ------------------------------------------------------------------------ > > Key: JCR-1758 > URL: https://issues.apache.org/jira/browse/JCR-1758 > Project: Jackrabbit > Issue Type: Improvement > Components: jackrabbit-ocm > Environment: Any Java Version. > Reporter: Boni Gopalan > Assignee: Christophe Lombart > Priority: Minor > Fix For: 1.5 > > Attachments: UndefinedTypeConverterImpl.java > > Original Estimate: 1h > Remaining Estimate: 1h > > Improvement to org.apache.jackrabbit.ocm.manager.atomictypeconverter.impl.UndefinedTypeConverterImpl's implementation of > public Value getValue(ValueFactory valueFactory, Object propValue) , used equality check of class names to decide whether Object propValue is worthy of any attempt to map to an apropriate property. Since the purpose of the class is to provide a 'best effort' attempt to map an Object of type java.lang.Object it will be better to use 'instanceof'. This approach will convert the specific class as well as any inherited objects. For example using instanceof will let us map a BufferedInputStream, and any other sub classes of InputStream to a Binary Property. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.