File tree 2 files changed +9
-2
lines changed
src/test/java/com/github/underscore
2 files changed +9
-2
lines changed Original file line number Diff line number Diff line change @@ -266,6 +266,7 @@ class Test {}
266
266
267
267
@ Test
268
268
void cloneError2 () {
269
+ @ SuppressWarnings ("java:S1172" )
269
270
class Test implements Cloneable {
270
271
public Object clone (String arg ) {
271
272
return null ;
Original file line number Diff line number Diff line change @@ -463,7 +463,10 @@ public Integer next() {
463
463
return array [index ++];
464
464
}
465
465
466
- public void remove () {}
466
+ @ Override
467
+ public void remove () {
468
+ // ignored
469
+ }
467
470
};
468
471
final Optional <Integer > result = Underscore .findLast (iterable , item -> item % 2 == 0 );
469
472
assertEquals ("Optional[6]" , result .toString ());
@@ -501,7 +504,9 @@ public T next() {
501
504
}
502
505
503
506
@ Override
504
- public void remove () {}
507
+ public void remove () {
508
+ // ignored
509
+ }
505
510
};
506
511
}
507
512
}
@@ -541,6 +546,7 @@ void optional() {
541
546
Optional .empty ().get ();
542
547
fail ("IllegalStateException expected" );
543
548
} catch (NoSuchElementException ignored ) {
549
+ // ignored
544
550
}
545
551
assertFalse (Optional .<Integer >empty ().filter (arg -> true ).isPresent ());
546
552
assertTrue (Optional .<Integer >empty ().filter (arg -> false ).isEmpty ());
You can’t perform that action at this time.
0 commit comments