Fop
  1. Fop
  2. FOP-2078

[PATCH] o.a.f.fo.properties.CondLengthProperty.equals() uses object identity

    Details

    • Type: Bug Bug
    • Status: Closed
    • Resolution: Fixed
    • Affects Version/s: trunk
    • Fix Version/s: None
    • Component/s: fo tree
    • Labels:
      None
    • Environment:
      Operating System: All
      Platform: All
    • External issue ID:
      53412

      Description

      Due to the usage of object identity to compare two objects for equality, the org.apache.fop.fo.properties.PropertyCache is not working effectively. This applies to instances of CondLengthProperty and CommonBorderPaddingBackground instances that use it.

      The test case was provided by Ron Vandenbranden, see
      http://markmail.org/message/vvr2k4cii3273fos

      Before applying the patch, transforming the attached FO to PDF logs the messages:
      INFO: 10 hashCode() collisions for org.apache.fop.fo.properties.CondLengthProperty
      Jun 14, 2012 1:12:27 AM org.apache.fop.fo.properties.PropertyCache fetch
      INFO: 10 hashCode() collisions for org.apache.fop.fo.properties.CommonBorderPaddingBackground

      After applying the patch, there should be no log messages related to hashCode() collisions.

      1. hashCode_anon.fo
        69 kB
        Alexios Giotis
      2. CondLengthProperty.patch
        1 kB
        Alexios Giotis

        Activity

        No work has yet been logged on this issue.

          People

          • Assignee:
            fop-dev
            Reporter:
            Alexios Giotis
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development