Uploaded image for project: 'Commons JXPath'
  1. Commons JXPath
  2. JXPATH-180

BeanPointer.isLeaf calls JXPathIntrospector.getBeanInfo but already has the BeanInfo

    XMLWordPrintableJSON

    Details

    • Type: Improvement
    • Status: Open
    • Priority: Minor
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: None

      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

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                vivodamichele@hotmail.com Michele Vivoda
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:

                  Time Tracking

                  Estimated:
                  Original Estimate - 1h
                  1h
                  Remaining:
                  Time Spent - 10m Remaining Estimate - 50m
                  50m
                  Logged:
                  Time Spent - 10m Remaining Estimate - 50m
                  10m