Commons Configuration
  1. Commons Configuration
  2. CONFIGURATION-315

CombinedConfiguration fire EVENT_COMBINED_INVALIDATE even before the contained configuration is updated

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 1.5
    • Fix Version/s: 1.6
    • Component/s: Events & Notifications
    • Labels:
      None
    • Environment:

      Any

      Description

      CombinedConfiguration.configurationChanged doesn't check the !event.isBeforeUpdate() and trigger the invalidate call. The invalidate call fire the EVENT_COMBINED_INVALIDATE. so now when a contained config is changed, EVENT_COMBINED_INVALIDATE is fired twice by the CombinedConfiguration. However it should only fire it after the contained FileConfiguration is updated.

        Activity

        Andy Yeung created issue -
        Hide
        Andy Yeung added a comment -

        I also found that the missing checking of isBeforeUpdate in CombinedConfiguration.configurationChanged sometimes mess up the detailEvents in XMLConfiguration contained in CombinedConfiguration. This would prevent !isBeforeUpdate event to sent out to CombinedConfiguration listener, when XMLConfiguration receive the event from its delegate in some cases. (this cases not always occur but happen occasionally). The detailEvents is -1 in that cases.

        Show
        Andy Yeung added a comment - I also found that the missing checking of isBeforeUpdate in CombinedConfiguration.configurationChanged sometimes mess up the detailEvents in XMLConfiguration contained in CombinedConfiguration. This would prevent !isBeforeUpdate event to sent out to CombinedConfiguration listener, when XMLConfiguration receive the event from its delegate in some cases. (this cases not always occur but happen occasionally). The detailEvents is -1 in that cases.
        Emmanuel Bourg made changes -
        Field Original Value New Value
        Fix Version/s 1.6 [ 12312450 ]
        Oliver Heger made changes -
        Assignee Oliver Heger [ oliver.heger@t-online.de ]
        Hide
        Oliver Heger added a comment -

        You are right: sending two events per change is an inconsistent behavior.

        I have applied a fix. The isBeforeUpdate() property of the change event is now taken into account.

        Thanks.

        Show
        Oliver Heger added a comment - You are right: sending two events per change is an inconsistent behavior. I have applied a fix. The isBeforeUpdate() property of the change event is now taken into account. Thanks.
        Oliver Heger made changes -
        Resolution Fixed [ 1 ]
        Status Open [ 1 ] Resolved [ 5 ]
        Oliver Heger made changes -
        Status Resolved [ 5 ] Closed [ 6 ]
        Transition Time In Source Status Execution Times Last Executer Last Execution Date
        Open Open Resolved Resolved
        4d 14h 16m 1 Oliver Heger 02/Mar/08 21:09
        Resolved Resolved Closed Closed
        537d 22h 27m 1 Oliver Heger 22/Aug/09 20:36

          People

          • Assignee:
            Oliver Heger
            Reporter:
            Andy Yeung
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development