Skip to content

Commit 14da500

Browse files
authored
Fixed SonarCloud warnings
1 parent c28bf85 commit 14da500

File tree

2 files changed

+9
-2
lines changed

2 files changed

+9
-2
lines changed

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

+1
Original file line numberDiff line numberDiff line change
@@ -266,6 +266,7 @@ class Test {}
266266

267267
@Test
268268
void cloneError2() {
269+
@SuppressWarnings("java:S1172")
269270
class Test implements Cloneable {
270271
public Object clone(String arg) {
271272
return null;

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

+8-2
Original file line numberDiff line numberDiff line change
@@ -463,7 +463,10 @@ public Integer next() {
463463
return array[index++];
464464
}
465465

466-
public void remove() {}
466+
@Override
467+
public void remove() {
468+
// ignored
469+
}
467470
};
468471
final Optional<Integer> result = Underscore.findLast(iterable, item -> item % 2 == 0);
469472
assertEquals("Optional[6]", result.toString());
@@ -501,7 +504,9 @@ public T next() {
501504
}
502505

503506
@Override
504-
public void remove() {}
507+
public void remove() {
508+
// ignored
509+
}
505510
};
506511
}
507512
}
@@ -541,6 +546,7 @@ void optional() {
541546
Optional.empty().get();
542547
fail("IllegalStateException expected");
543548
} catch (NoSuchElementException ignored) {
549+
// ignored
544550
}
545551
assertFalse(Optional.<Integer>empty().filter(arg -> true).isPresent());
546552
assertTrue(Optional.<Integer>empty().filter(arg -> false).isEmpty());

0 commit comments

Comments
 (0)