Skip to content

Commit

Permalink
Add @SafeVarargs, Fix #105
Browse files Browse the repository at this point in the history
  • Loading branch information
minborg committed Nov 30, 2020
1 parent ec5858d commit a6716f1
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -175,6 +175,11 @@ public StreamConfiguration<T> joining(Field<T> field, JoinType joinType) {
throw new UnsupportedOperationException();
}

@Override
public StreamConfiguration<T> select(Field<T> first, Field<T>... other) {
throw new UnsupportedOperationException();
}

@Override
public Optional<Projection<T>> select() {
return Optional.ofNullable(projection);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,13 @@ public Optional<Projection<T>> select() {
return Optional.ofNullable(projection);
}

@SuppressWarnings("varargs")
@SafeVarargs
@Override
public final StreamConfiguration<T> select(Field<T> first, Field<T>... other) {
return select(Projection.select(first, other));
}

@Override
public StreamConfiguration<T> select(Projection<T> projection) {
requireNonNull(projection);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -92,9 +92,7 @@ default StreamConfiguration<T> joining(final Field<T> field) {

Optional<Projection<T>> select();

default StreamConfiguration<T> select(final Field<T> first, final Field<T>... other) {
return select(Projection.select(first, other));
}
StreamConfiguration<T> select(final Field<T> first, final Field<T>... other);

StreamConfiguration<T> select(final Projection<T> projection);

Expand Down

0 comments on commit a6716f1

Please sign in to comment.