Skip to content

Commit 2be5c71

Browse files
committed
Fix warning messages.
1 parent 47696a9 commit 2be5c71

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

src/main/java/com/github/underscore/$.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2675,6 +2675,7 @@ public static <T> List<T> reverse(final Iterable<T> iterable) {
26752675
return result;
26762676
}
26772677

2678+
@SuppressWarnings("unchecked")
26782679
public static <T> T[] reverse(final T ... array) {
26792680
T temp;
26802681
final T[] newArray = array.clone();
@@ -2907,6 +2908,7 @@ protected static <K, E> Map<K, E> newLinkedHashMap() {
29072908
return new LinkedHashMap<K, E>();
29082909
}
29092910

2911+
@SuppressWarnings("unchecked")
29102912
public static <T> Predicate<T> and(
29112913
final Predicate<? super T> pred1,
29122914
final Predicate<? super T> pred2,
@@ -2931,6 +2933,7 @@ public boolean test(T value) {
29312933
};
29322934
}
29332935

2936+
@SuppressWarnings("unchecked")
29342937
public static <T> Predicate<T> or(
29352938
final Predicate<? super T> pred1,
29362939
final Predicate<? super T> pred2,

src/main/java/com/github/underscore/lodash/$.java

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -341,14 +341,17 @@ public <F> Chain<F> distinctBy(final Function<T, F> func) {
341341
return new Chain<F>($.newArrayList((Iterable<F>) $.uniq(value(), func)));
342342
}
343343

344+
@SuppressWarnings("unchecked")
344345
public Chain<T> union(final List<T> ... lists) {
345346
return new Chain<T>($.union(value(), lists));
346347
}
347348

349+
@SuppressWarnings("unchecked")
348350
public Chain<T> intersection(final List<T> ... lists) {
349351
return new Chain<T>($.intersection(value(), lists));
350352
}
351353

354+
@SuppressWarnings("unchecked")
352355
public Chain<T> difference(final List<T> ... lists) {
353356
return new Chain<T>($.difference(value(), lists));
354357
}
@@ -369,6 +372,7 @@ public Chain<List<T>> chunk(final int size) {
369372
return new Chain<List<T>>($.chunk(value(), size));
370373
}
371374

375+
@SuppressWarnings("unchecked")
372376
public Chain<T> concat(final List<T> ... lists) {
373377
return new Chain<T>($.concat(value(), lists));
374378
}
@@ -667,6 +671,7 @@ public static <T> Chain<T> chain(final Iterable<T> iterable, int size) {
667671
return new $.Chain<T>(newArrayList(iterable, size));
668672
}
669673

674+
@SuppressWarnings("unchecked")
670675
public static <T> Chain<T> chain(final T ... list) {
671676
return new $.Chain<T>(Arrays.asList(list));
672677
}
@@ -2843,7 +2848,7 @@ public List<String> words() {
28432848
public static class LRUCache<K, V> {
28442849
private static final boolean SORT_BY_ACCESS = true;
28452850
private static final float LOAD_FACTOR = 0.75F;
2846-
private final LinkedHashMap<K, V> lruCacheMap;
2851+
private final Map<K, V> lruCacheMap;
28472852
private final int capacity;
28482853

28492854
public LRUCache(int capacity) {

0 commit comments

Comments
 (0)