Skip to content

Commit

Permalink
fixed files form Math #8
Browse files Browse the repository at this point in the history
  • Loading branch information
tdurieux committed Mar 7, 2017
1 parent 08363ee commit 80970d3
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -178,13 +178,13 @@ public T sample() {
* @throws NotStrictlyPositiveException if {@code sampleSize} is not
* positive.
*/
public T[] sample(int sampleSize) throws NotStrictlyPositiveException {
public Object[] sample(int sampleSize) throws NotStrictlyPositiveException {
if (sampleSize <= 0) {
throw new NotStrictlyPositiveException(LocalizedFormats.NUMBER_OF_SAMPLES,
sampleSize);
}

final T[]out = (T[]) java.lang.reflect.Array.newInstance(singletons.get(0).getClass(), sampleSize);
final Object[] out = new Object[sampleSize];

for (int i = 0; i < sampleSize; i++) {
out[i] = sample();
Expand Down

0 comments on commit 80970d3

Please sign in to comment.