Review main Merged

18223[BUGFIX] Fix inconsitency of file reference property getters

Helmut Hummel CR +2 V +2 Normal +208 −27 updated 06/03/13, 20:49

Commit message

The FileReference object has the following getters
for getting properties:

getProperties()
getReferenceProperties()
getProperty($key)
getReferenceProperty($key)

The result from these getters is inconsistent:

getReferenceProperty($key)
Returns the value of a property which is only
in the reference properties

getReferenceProperties()
Returns merged properties form the original
file and the reference properties without
respecting overriding of reference properties
if they are not set to NULL

getProperty($key)
Returns the merged value from original file
and reference, respecting the NULL override
handling. But if a property is only available
in the original file an Exception is thrown.

getProperties()
Returns merged properties form the original
file and the reference properties
respecting overriding of reference properties
if they are not set to NULL
Properties only available in the original file
will be available in the resulting array.

Streamline the behaviour so that all getters
starting with "getReference" will only return
the properties of the reference record and all
other will return the merged properties but
respecting the NULL override handling.

Review

  • Code review CR +2
    • Helmut Hummel +2
    • Steffen Ritter +1
  • Verified V +2
    • Helmut Hummel +2
    • Wouter Wolters +1

Issues 1

Files 2

Review log 5

  1. Helmut Hummel commented on patch set 1 V 0 03/05/13, 13:22

    by team member; Looks good to me, approved
  2. Steffen Ritter commented on patch set 1 03/05/13, 13:22

    Looks good to me, but someone else must approve In General I'm fine with that. Although we should carefully review the usages of the getters to ensure the correct behavior at all times.
  3. Mr. Jenkins commented on patch set 1 03/05/13, 13:22

  4. Wouter Wolters commented on patch set 1 V 0 03/05/13, 13:22

    Verified with unit-test
  5. Helmut Hummel merged patch set 2 03/05/13, 13:22