You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by "Michele Vivoda (JIRA)" <ji...@apache.org> on 2015/08/03 15:12:04 UTC
[jira] [Updated] (JXPATH-180) BeanPointer.isLeaf calls
JXPathIntrospector.getBeanInfo but already has the BeanInfo
[ https://issues.apache.org/jira/browse/JXPATH-180?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Michele Vivoda updated JXPATH-180:
----------------------------------
Description:
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
was:
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
> 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)