Skip to content

Commit

Permalink
Merge faf27f6 into 13ba1cc
Browse files Browse the repository at this point in the history
  • Loading branch information
sfuhrm committed Jun 9, 2018
2 parents 13ba1cc + faf27f6 commit 61eb539
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
Expand Up @@ -688,7 +688,7 @@ public List<T> get(final int index) {

@Override
public int size() {
return (list.size() + size - 1) / size;
return (int)Math.ceil((double)list.size() / (double)size);
}

@Override
Expand Down
Expand Up @@ -425,6 +425,10 @@ public void testPartition() {
fail("failed to check for size argument");
} catch (final IllegalArgumentException e) {}

List<List<Integer>> partitionMax = ListUtils.partition(strings, Integer.MAX_VALUE);
assertEquals(1, partitionMax.size());
assertEquals(strings.size(), partitionMax.get(0).size());
assertEquals(strings, partitionMax.get(0));
}

private static Predicate<Number> EQUALS_TWO = new Predicate<Number>() {
Expand Down

0 comments on commit 61eb539

Please sign in to comment.