commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Michele Vivoda (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (JXPATH-180) BeanPointer.isLeaf calls JXPathIntrospector.getBeanInfo but already has the BeanInfo
Date Mon, 03 Aug 2015 13:12:05 GMT

     [ 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)

Mime
View raw message