Return-Path: X-Original-To: apmail-commons-issues-archive@minotaur.apache.org Delivered-To: apmail-commons-issues-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 7B9F21801B for ; Sat, 28 Nov 2015 22:52:11 +0000 (UTC) Received: (qmail 64834 invoked by uid 500); 28 Nov 2015 22:52:11 -0000 Delivered-To: apmail-commons-issues-archive@commons.apache.org Received: (qmail 64739 invoked by uid 500); 28 Nov 2015 22:52:11 -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 64727 invoked by uid 99); 28 Nov 2015 22:52:11 -0000 Received: from arcas.apache.org (HELO arcas) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 28 Nov 2015 22:52:11 +0000 Received: from arcas.apache.org (localhost [127.0.0.1]) by arcas (Postfix) with ESMTP id 0ABD02C14FB for ; Sat, 28 Nov 2015 22:52:11 +0000 (UTC) Date: Sat, 28 Nov 2015 22:52:10 +0000 (UTC) From: "Michele Vivoda (JIRA)" To: issues@commons.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (JXPATH-180) BeanPointer.isLeaf calls JXPathIntrospector.getBeanInfo but already has the BeanInfo MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/JXPATH-180?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15030685#comment-15030685 ] Michele Vivoda commented on JXPATH-180: --------------------------------------- I did a pull request https://github.com/apache/commons-jxpath/pull/11 > BeanPointer.isLeaf calls JXPathIntrospector.getBeanInfo but already has the BeanInfo > ------------------------------------------------------------------------------------ > > Key: JXPATH-180 > URL: https://issues.apache.org/jira/browse/JXPATH-180 > Project: Commons JXPath > Issue Type: Improvement > Reporter: Michele Vivoda > Priority: Minor > Labels: locking, performance > Original Estimate: 1h > Remaining Estimate: 1h > > BeanPointer.isLeaf() calls JXPathIntrospector.getBeanInfo to get the BeanInfo for the managed class but already has the BeanInfo as a field, passed in constructor. Constructor callers (2) obtain it in the same way as done in isLeaf(). > So this code: > return value == null || JXPathIntrospector.getBeanInfo(value.getClass()).isAtomic(); > should be > return value == null || this.beanInfo.isAtomic() > https://github.com/apache/commons-jxpath/blob/trunk/src/java/org/apache/commons/jxpath/ri/model/beans/BeanPointer.java#L103 -- This message was sent by Atlassian JIRA (v6.3.4#6332)