Skip to content

Commit

Permalink
(#1415) Portable cast
Browse files Browse the repository at this point in the history
Java 8 does not require cast, but Java 11 & 14 do
  • Loading branch information
andreoss committed Oct 30, 2020
1 parent a8e0dab commit 823c854
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/main/java/org/cactoos/iterator/TailOf.java
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,10 @@ public final class TailOf<T> extends IteratorEnvelope<T> {
* @param num Number of tail elements
* @param iterator Decorated iterator
*/
@SuppressWarnings({ "unchecked", "cast" })
public TailOf(final int num, final Iterator<? extends T> iterator) {
super(
new Reversed<>(
(Iterator<T>) new Reversed<>(
new HeadOf<>(
num,
new Reversed<>(
Expand Down

0 comments on commit 823c854

Please sign in to comment.