GeoTools
  1. GeoTools
  2. GEOT-2378

Fix ComplexTypeImpl iteration order / equals / hashCode

    Details

    • Type: Bug Bug
    • Status: Closed Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 2.6-M2
    • Component/s: main
    • Labels:
      None

      Description

      Refactor ComplexTypeImpl, FeatureTypeImpl, and SimpleFeatureTypeImpl so that property iteration order preserves the order of the schema provided at construction, and equals and hashCode respect this order.

      Once this patch is applied I will also reformat these three classes to conform to the GeoTools convention. This will be a separate reformatting-only commit.

        Issue Links

          Activity

          Hide
          Ben Caradoc-Davies added a comment -
          Looks like GEOT-2338 did not go far enough. Justin and I have discovered that ComplexTypeImpl causes problems because it does not respect iteration order. We also expect equals/hashCode to disregard order. I intend to move the changes made to SimpleFeatureTypeImpl in GEOT-2338 into ComplexTypeImpl. This removes the need for several overrides and makes the implementation cleaner.
          Show
          Ben Caradoc-Davies added a comment - Looks like GEOT-2338 did not go far enough. Justin and I have discovered that ComplexTypeImpl causes problems because it does not respect iteration order. We also expect equals/hashCode to disregard order. I intend to move the changes made to SimpleFeatureTypeImpl in GEOT-2338 into ComplexTypeImpl. This removes the need for several overrides and makes the implementation cleaner.
          Hide
          Ben Caradoc-Davies added a comment -
          Show
          Ben Caradoc-Davies added a comment - And here is the discussion: http://n2.nabble.com/ComplexTypeImpl-td2392501.html
          Hide
          Ben Caradoc-Davies added a comment -
          Attached patch for ComplexTypeImpl, FeatureTypeImpl, SimpleFeatureTypeImpl.
          Show
          Ben Caradoc-Davies added a comment - Attached patch for ComplexTypeImpl, FeatureTypeImpl, SimpleFeatureTypeImpl.
          Hide
          Ben Caradoc-Davies added a comment -
          OK, reformatting is not very popular. Reviewers please indicate your preference for how the bad formatting in these files should be handled:
          (1) Eclipse reformat to GeoTools conventions.
          (2) Eclipse fix indentation (Ctrl-A Ctrl-I).
          (3) Do nothing.
          Show
          Ben Caradoc-Davies added a comment - OK, reformatting is not very popular. Reviewers please indicate your preference for how the bad formatting in these files should be handled: (1) Eclipse reformat to GeoTools conventions. (2) Eclipse fix indentation (Ctrl-A Ctrl-I). (3) Do nothing.
          Hide
          Justin Deoliveira added a comment -
          Patch looks good.
          Show
          Justin Deoliveira added a comment - Patch looks good.
          Hide
          Ben Caradoc-Davies added a comment -
          Patch committed as r32623.
          Show
          Ben Caradoc-Davies added a comment - Patch committed as r32623.
          Hide
          Ben Caradoc-Davies added a comment -
          There was no consensus on how or whether to reformat these files, so no reformatting was performed.
          Show
          Ben Caradoc-Davies added a comment - There was no consensus on how or whether to reformat these files, so no reformatting was performed.
          Hide
          Ben Caradoc-Davies added a comment -
          Fixed on trunk.
          Show
          Ben Caradoc-Davies added a comment - Fixed on trunk.
          Hide
          Andrea Aime added a comment -
          Mass closing all issues that have been in "resolved" state for 2 months or more without any feedback or update
          Show
          Andrea Aime added a comment - Mass closing all issues that have been in "resolved" state for 2 months or more without any feedback or update

            People

            • Assignee:
              Ben Caradoc-Davies
              Reporter:
              Ben Caradoc-Davies
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: