Skip to content

Commit

Permalink
(yegor256#1169) Undo wild-cards for varargs
Browse files Browse the repository at this point in the history
  • Loading branch information
andreoss committed Sep 29, 2020
1 parent 3be51d9 commit f52b991
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 6 deletions.
3 changes: 1 addition & 2 deletions src/main/java/org/cactoos/list/ListOf.java
Original file line number Diff line number Diff line change
Expand Up @@ -41,10 +41,9 @@ public final class ListOf<T> extends ListEnvelope<T> {
* Ctor.
*
* @param array An array of some elements
* @param <Z> Sub-type of T
*/
@SafeVarargs
public <Z extends T> ListOf(final Z... array) {
public ListOf(final T... array) {
this(new IterableOf<>(array));
}

Expand Down
3 changes: 1 addition & 2 deletions src/main/java/org/cactoos/set/SetOf.java
Original file line number Diff line number Diff line change
Expand Up @@ -41,10 +41,9 @@ public final class SetOf<T> extends SetEnvelope<T> {
* Ctor.
*
* @param array An array of some elements
* @param <Z> Sub-type of T
*/
@SafeVarargs
public <Z extends T> SetOf(final Z... array) {
public SetOf(final T... array) {
this(new IterableOf<>(array));
}

Expand Down
3 changes: 1 addition & 2 deletions src/main/java/org/cactoos/set/Sorted.java
Original file line number Diff line number Diff line change
Expand Up @@ -42,10 +42,9 @@ public final class Sorted<T> extends SortedSetEnvelope<T> {
* Ctor.
* @param cmp Comparator
* @param array An array of some elements
* @param <Z> Sub-type of T
*/
@SafeVarargs
public <Z extends T> Sorted(final Comparator<T> cmp, final Z... array) {
public Sorted(final Comparator<T> cmp, final T... array) {
this(cmp, new IterableOf<>(array));
}

Expand Down

0 comments on commit f52b991

Please sign in to comment.