Skip to content

Commit

Permalink
AddonRegistryImpl now reuses LockManager provided by Forge
Browse files Browse the repository at this point in the history
  • Loading branch information
gastaldi committed Apr 22, 2013
1 parent edb4f71 commit a1f8f33
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ public ForgeImpl()
logger.warning("Could not detect Forge runtime version - " +
"loading all addons, but failures may occur if versions are not compatible.");

registry = new AddonRegistryImpl(this, lock);
registry = new AddonRegistryImpl(this);
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,13 +66,13 @@ public class AddonRegistryImpl implements AddonRegistry

private AddonModuleLoader loader;

public AddonRegistryImpl(Forge forge, LockManager lock)
public AddonRegistryImpl(Forge forge)
{
Assert.notNull(forge, "Forge instance must not be null.");
Assert.notNull(lock, "LockManager must not be null.");
Assert.notNull(forge.getLockManager(), "LockManager must not be null.");

this.forge = forge;
this.lock = lock;
this.lock = forge.getLockManager();
this.tree = new AddonTree(lock);

logger.log(Level.FINE, "Instantiated AddonRegistryImpl: " + this);
Expand Down

1 comment on commit a1f8f33

@lincolnthree
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1 good call.

Please sign in to comment.