From b8094529af8c9377e94c274a1641e63827723bac Mon Sep 17 00:00:00 2001 From: yegor256 Date: Wed, 21 Jun 2017 15:20:36 +0200 Subject: [PATCH] #loops: warnings off --- src/main/java/org/cactoos/list/ArrayAsIterable.java | 1 - src/main/java/org/cactoos/list/ConcatIterable.java | 1 - src/main/java/org/cactoos/list/ConcatIterator.java | 1 - src/main/java/org/cactoos/list/IterableAsList.java | 1 - src/main/java/org/cactoos/list/IterableAsMap.java | 1 - src/main/java/org/cactoos/list/SortedIterable.java | 2 -- src/main/java/org/cactoos/list/StickyList.java | 1 - src/main/java/org/cactoos/list/StickyMap.java | 1 - src/test/java/org/cactoos/list/StickyMapTest.java | 12 ++++++++++++ 9 files changed, 12 insertions(+), 9 deletions(-) diff --git a/src/main/java/org/cactoos/list/ArrayAsIterable.java b/src/main/java/org/cactoos/list/ArrayAsIterable.java index 5ceb323499..adfad62b9c 100644 --- a/src/main/java/org/cactoos/list/ArrayAsIterable.java +++ b/src/main/java/org/cactoos/list/ArrayAsIterable.java @@ -48,7 +48,6 @@ public final class ArrayAsIterable implements Iterable { * @param items The array */ @SafeVarargs - @SuppressWarnings("varargs") public ArrayAsIterable(final X... items) { this.array = items; } diff --git a/src/main/java/org/cactoos/list/ConcatIterable.java b/src/main/java/org/cactoos/list/ConcatIterable.java index 616f5f1cbf..606be04b31 100644 --- a/src/main/java/org/cactoos/list/ConcatIterable.java +++ b/src/main/java/org/cactoos/list/ConcatIterable.java @@ -48,7 +48,6 @@ public final class ConcatIterable implements Iterable { * @param items Items to concatenate */ @SafeVarargs - @SuppressWarnings("varargs") public ConcatIterable(final Iterable... items) { this(new IterableAsList<>(items)); } diff --git a/src/main/java/org/cactoos/list/ConcatIterator.java b/src/main/java/org/cactoos/list/ConcatIterator.java index c8578749b9..49a7eef18d 100644 --- a/src/main/java/org/cactoos/list/ConcatIterator.java +++ b/src/main/java/org/cactoos/list/ConcatIterator.java @@ -47,7 +47,6 @@ public final class ConcatIterator implements Iterator { * @param items Items to concatenate */ @SafeVarargs - @SuppressWarnings("varargs") public ConcatIterator(final Iterator... items) { this(new IterableAsList<>(items)); } diff --git a/src/main/java/org/cactoos/list/IterableAsList.java b/src/main/java/org/cactoos/list/IterableAsList.java index 918f3049e2..6928da5621 100644 --- a/src/main/java/org/cactoos/list/IterableAsList.java +++ b/src/main/java/org/cactoos/list/IterableAsList.java @@ -64,7 +64,6 @@ public final class IterableAsList implements List { * @param array An array of some elements */ @SafeVarargs - @SuppressWarnings("varargs") public IterableAsList(final T... array) { this(new ArrayAsIterable<>(array)); } diff --git a/src/main/java/org/cactoos/list/IterableAsMap.java b/src/main/java/org/cactoos/list/IterableAsMap.java index 791f7c25d0..f36724c0b0 100644 --- a/src/main/java/org/cactoos/list/IterableAsMap.java +++ b/src/main/java/org/cactoos/list/IterableAsMap.java @@ -61,7 +61,6 @@ public final class IterableAsMap implements Map { * @param list List of entries */ @SafeVarargs - @SuppressWarnings("varargs") public IterableAsMap(final Map.Entry... list) { this(new ArrayAsIterable<>(list)); } diff --git a/src/main/java/org/cactoos/list/SortedIterable.java b/src/main/java/org/cactoos/list/SortedIterable.java index 29aaeccd76..96f487fa55 100644 --- a/src/main/java/org/cactoos/list/SortedIterable.java +++ b/src/main/java/org/cactoos/list/SortedIterable.java @@ -55,7 +55,6 @@ * @param src The underlying iterable */ @SafeVarargs - @SuppressWarnings("varargs") public SortedIterable(final T... src) { this(new ArrayAsIterable<>(src)); } @@ -74,7 +73,6 @@ public SortedIterable(final Iterable src) { * @param cmp The comparator */ @SafeVarargs - @SuppressWarnings("varargs") public SortedIterable(final Comparator cmp, final T... src) { this(cmp, new ArrayAsIterable<>(src)); } diff --git a/src/main/java/org/cactoos/list/StickyList.java b/src/main/java/org/cactoos/list/StickyList.java index fe96759d05..1927fc4769 100644 --- a/src/main/java/org/cactoos/list/StickyList.java +++ b/src/main/java/org/cactoos/list/StickyList.java @@ -54,7 +54,6 @@ public final class StickyList implements List { * @param items The array */ @SafeVarargs - @SuppressWarnings("varargs") public StickyList(final X... items) { this(new ArrayAsIterable<>(items)); } diff --git a/src/main/java/org/cactoos/list/StickyMap.java b/src/main/java/org/cactoos/list/StickyMap.java index 503677ba19..ef8bd880ff 100644 --- a/src/main/java/org/cactoos/list/StickyMap.java +++ b/src/main/java/org/cactoos/list/StickyMap.java @@ -53,7 +53,6 @@ public final class StickyMap implements Map { * @param list List of entries */ @SafeVarargs - @SuppressWarnings("varargs") public StickyMap(final Map.Entry... list) { this(new ArrayAsIterable<>(list)); } diff --git a/src/test/java/org/cactoos/list/StickyMapTest.java b/src/test/java/org/cactoos/list/StickyMapTest.java index 47198e916b..17692a16df 100644 --- a/src/test/java/org/cactoos/list/StickyMapTest.java +++ b/src/test/java/org/cactoos/list/StickyMapTest.java @@ -62,4 +62,16 @@ public void ignoresChangesInMap() throws Exception { ); } + @Test + public void decoratesEntries() throws Exception { + MatcherAssert.assertThat( + "Can't decorate a list of entries", + new StickyMap<>( + new AbstractMap.SimpleEntry<>("first", "Jeffrey"), + new AbstractMap.SimpleEntry<>("last", "Lebowski") + ), + Matchers.hasValue(Matchers.endsWith("ski")) + ); + } + }