Skip to content

Commit 4a2eb02

Browse files
committed
Fix idea warnings.
1 parent a0a72dd commit 4a2eb02

File tree

4 files changed

+6
-6
lines changed

4 files changed

+6
-6
lines changed

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ public boolean test(final E elem) {
138138
.equals(prop.snd())) {
139139
return false;
140140
}
141-
} catch (Exception e) {
141+
} catch (Exception ignored) {
142142
}
143143
}
144144
}
@@ -969,7 +969,7 @@ public <E extends Comparable<? super E>> List<E> sortWith(final Comparator<E> co
969969
public static <E, T extends Comparable<? super T>> List<E> sortBy(
970970
final Iterable<E> iterable, final Function<E, T> func) {
971971
final List<E> sortedList = newArrayList(iterable);
972-
sortedList.sort(Comparator.comparing(func::apply));
972+
sortedList.sort(Comparator.comparing(func));
973973
return sortedList;
974974
}
975975

@@ -2044,7 +2044,7 @@ public List<T> interposeByList(final Iterable<T> interIter) {
20442044
* Documented, #bind
20452045
*/
20462046
public static <T, F> Function<F, T> bind(final Function<F, T> function) {
2047-
return function::apply;
2047+
return function;
20482048
}
20492049

20502050
/*

src/test/java/com/github/underscore/CollectionsTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -298,7 +298,7 @@ public void reduceWithoutInit() {
298298
assertEquals("6", result.toString());
299299
final Integer resultChain = U.chain(asList(1, 2, 3)).reduce(Integer::sum).item().get();
300300
assertEquals("6", resultChain.toString());
301-
U.reduce(new ArrayList<Integer>(), Integer::sum);
301+
U.reduce(new ArrayList<>(), Integer::sum);
302302
}
303303

304304
/*

src/test/java/com/github/underscore/UnderscoreTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -455,7 +455,7 @@ public void optional() {
455455
try {
456456
Optional.empty().get();
457457
fail("IllegalStateException expected");
458-
} catch (IllegalStateException ex) {
458+
} catch (IllegalStateException ignored) {
459459
}
460460
assertFalse(Optional.<Integer>empty().filter(arg -> true).isPresent());
461461
assertTrue(Optional.<Integer>empty().filter(arg -> false).isEmpty());

src/test/java/com/github/underscore/lodash/LodashTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1178,7 +1178,7 @@ public void main() {
11781178
U.of(new String[] {});
11791179
U.of(new int[] {});
11801180
U.of("");
1181-
U.of(new LinkedHashMap<String, Object>());
1181+
U.of(new LinkedHashMap<>());
11821182
}
11831183

11841184
@SuppressWarnings("unchecked")

0 commit comments

Comments
 (0)