Skip to content

Commit

Permalink
minor
Browse files Browse the repository at this point in the history
  • Loading branch information
teosarca committed May 14, 2017
1 parent 68860a4 commit 4ea149a
Showing 1 changed file with 9 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@
import de.metas.event.Topic;
import de.metas.event.Type;
import de.metas.logging.LogManager;
import lombok.NonNull;

/**
* Adempiere Cache Management
Expand Down Expand Up @@ -561,15 +562,20 @@ private int resetNoFail(final CacheInterface cacheInstance)
public void addCacheResetListener(final String tableName, final ICacheResetListener cacheResetListener)
{
final Boolean registerWeak = Boolean.FALSE;
register(new CacheResetListener2CacheInterface(tableName, cacheResetListener), registerWeak);
register(CacheResetListener2CacheInterface.of(tableName, cacheResetListener), registerWeak);
}

private static final class CacheResetListener2CacheInterface implements ITableAwareCacheInterface
{
public static final CacheResetListener2CacheInterface of(@NonNull final String tableName, @NonNull final ICacheResetListener listener)
{
return new CacheResetListener2CacheInterface(tableName, listener);
}

private final String tableName;
private final ICacheResetListener listener;

public CacheResetListener2CacheInterface(final String tableName, final ICacheResetListener listener)
private CacheResetListener2CacheInterface(final String tableName, final ICacheResetListener listener)
{
super();
Check.assumeNotEmpty(tableName, "tableName not empty");
Expand Down

0 comments on commit 4ea149a

Please sign in to comment.