Skip to content

Commit dcdd17d

Browse files
Merge pull request TheAlgorithms#1433 from abhijaykumar/Development
Added LinkedHashMap cache type params to avoid build error
2 parents 84914c8 + dd3b2d2 commit dcdd17d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/main/java/com/caching/LRUCache.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ public LRUCache(int capacity) {
3636
*
3737
* @param accessOrder - Set to true if ordering mode is specified (removeEldestEntry).
3838
*/
39-
this.cache = new LinkedHashMap<>(capacity, 1.0f, true) {
39+
this.cache = new LinkedHashMap<Integer, T>(capacity, 1.0f, true) {
4040
/**
4141
* @param eldest - The least recently accessed entry This is the entry that will
4242
* be removed if the method returns {@code true}.

0 commit comments

Comments
 (0)