QDox

JavaClass.getBeanProperties(true) does not return properties in a predictable order

Details

  • Type: Bug Bug
  • Status: Closed Closed
  • Priority: Major Major
  • Resolution: Fixed
  • Affects Version/s: None
  • Fix Version/s: 1.8
  • Component/s: None
  • Labels:
    None
  • Environment:
    (am using a 1.6-SNAPSHOT)
  • Number of attachments :
    0

Description

While the private getBeanPropertyMap method uses an OrderedMap and thus can problably be trusted, I suspect the culprit lies in the getMethods(boolean) method, which uses an HashSet to store method sigs...

Activity

Hide
Dennis Lundberg added a comment -

The major problem is that
private Map getBeanPropertyMap(boolean)
returns a Map, which is unordered.
For the order to be preserved it'd need to return an OrderedMap.

Show
Dennis Lundberg added a comment - The major problem is that private Map getBeanPropertyMap(boolean) returns a Map, which is unordered. For the order to be preserved it'd need to return an OrderedMap.
Hide
Paul Hammant added a comment -

Don't know when, but the code is now using OrderedMap in this method

Show
Paul Hammant added a comment - Don't know when, but the code is now using OrderedMap in this method

People

Vote (0)
Watch (0)

Dates

  • Created:
    Updated:
    Resolved: