Skip to content

Commit b83cb0b

Browse files
committed
Fix sonarcloud warnings.
1 parent 711bdd4 commit b83cb0b

File tree

2 files changed

+2
-9
lines changed

2 files changed

+2
-9
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2565,7 +2565,7 @@ public boolean test(final Map<K, V> item) {
25652565
/*
25662566
* Documented, #times
25672567
*/
2568-
public static <E> void times(final int count, final Runnable runnable) {
2568+
public static void times(final int count, final Runnable runnable) {
25692569
for (int index = 0; index < count; index += 1) {
25702570
runnable.run();
25712571
}

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

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1019,15 +1019,8 @@ public void sqlru1() {
10191019
assertEquals("[memory, cpu, hdd]", U.keys((Map<String, Object>) U.fromJson(json)).toString());
10201020
}
10211021

1022-
@SuppressWarnings("unchecked")
10231022
@Test
10241023
public void sqlru2() {
1025-
System.out.println(U.countBy(U.words("Маша ищет Мишу а Миша ищет Машу"),
1026-
new Function<String, String>() {
1027-
public String apply(String item) {
1028-
return item;
1029-
}
1030-
}
1031-
).get("ищет"));
1024+
assertEquals(2, U.countBy(U.words("Маша ищет Мишу а Миша ищет Машу")).get("ищет").intValue());
10321025
}
10331026
}

0 commit comments

Comments
 (0)