Suppress an Eclipse warning about unsafe varargs

Nothing we can do about this statically, due to Java limitations about
non-reifiable types.
This commit is contained in:
Ben Liblit 2017-03-15 01:30:21 -05:00
parent e56686ddf5
commit ab5aa90114
1 changed files with 1 additions and 0 deletions

View File

@ -29,6 +29,7 @@ public class OperatorUtil {
this.operators = operators.toArray(new UnaryOperator[operators.size()]);
}
@SafeVarargs
public UnaryOperatorSequence(UnaryOperator<T>... operators) {
if (operators.length == 0 ) throw new IllegalArgumentException("Empty Operator-Sequence");
this.operators = Arrays.copyOf(operators, operators.length);