Changeset 4875


Ignore:
Timestamp:
Apr 2, 2009, 1:59:59 PM (13 years ago)
Author:
Nicklas Nordborg
Message:

Fixes #1287: Make it possible to update an extension to another extension point

Moving to another extension point is considered as one de-registration and one new registration.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/core/net/sf/basedb/util/extensions/Registry.java

    r4870 r4875  
    359359   
    360360    RegisteredExtension<A> rext = (RegisteredExtension<A>)extensions.get(extension.getId());
     361    if (rext != null && !rext.getId().equals(extensionPointId))
     362    {
     363      // This extension was previously registered under another extension point
     364      // Unregister it and re-register it as a new extension
     365      unregisterExtension(id);
     366      rext = null;
     367    }
    361368    if (rext == null)
    362369    {
Note: See TracChangeset for help on using the changeset viewer.