Skip to content

Commit

Permalink
WW-5355 Fix interface and unit test bug
Browse files Browse the repository at this point in the history
  • Loading branch information
kusalk committed Oct 15, 2023
1 parent 4700dca commit 7463e1d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -35,14 +35,10 @@ default OgnlCache<Key, Value> buildOgnlCache(int evictionLimit,
int initialCapacity,
float loadFactor,
boolean lruCache) {
if (lruCache) {
return buildOgnlCache(evictionLimit, initialCapacity, loadFactor, CacheType.SYNC_LINKED_LRU);
} else {
return buildOgnlCache(evictionLimit,
initialCapacity,
loadFactor,
lruCache ? CacheType.SYNC_LINKED_LRU : getDefaultCacheType());
}
return buildOgnlCache(evictionLimit,
initialCapacity,
loadFactor,
lruCache ? CacheType.SYNC_LINKED_LRU : getDefaultCacheType());
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1870,7 +1870,7 @@ public void testOgnlDefaultCacheFactoryCoverage() {
ognlCache = defaultOgnlCacheFactory.buildOgnlCache();
assertNotNull("No param build method result null ?", ognlCache);
assertEquals("Eviction limit for cache mismatches limit for factory ?", 30, ognlCache.getEvictionLimit());
ognlCache = defaultOgnlCacheFactory.buildOgnlCache(15, 15, 0.75f, false);
ognlCache = defaultOgnlCacheFactory.buildOgnlCache(15, 15, 0.75f, true);
assertNotNull("No param build method result null ?", ognlCache);
assertEquals("Eviction limit for cache mismatches limit for factory ?", 15, ognlCache.getEvictionLimit());
}
Expand Down

0 comments on commit 7463e1d

Please sign in to comment.