Closed GoogleCodeExporter closed 9 years ago
Might want to have a sanity check also:
private static final int MAX_PRESIZE_ARRAY_SIZE = 200;
List<String> result = Integer.MAX_VALUE == limit ? new ArrayList<String>() :
new ArrayList<String>(Math.min(limit, MAX_PRESIZE_ARRAY_SIZE));
Original comment by rhvar...@gmail.com
on 3 Mar 2014 at 6:23
Sounds reasonable.
Not quite sure I understand why you'd want that "sanity check" that you talk
about in update #1 ?
200 is arbitrary (and so would any value we'd place there). Are you just trying
to protect against someone passing an insanely large number to limit()?
Original comment by kak@google.com
on 3 Mar 2014 at 10:57
Yes, to protect against someone making the limit one billion, for example.
Original comment by rhvar...@gmail.com
on 4 Mar 2014 at 12:37
This issue has been migrated to GitHub.
It can be found at https://github.com/google/guava/issues/<id>
Original comment by cgdecker@google.com
on 1 Nov 2014 at 4:09
Original comment by cgdecker@google.com
on 1 Nov 2014 at 4:17
Original comment by cgdecker@google.com
on 3 Nov 2014 at 9:07
Original issue reported on code.google.com by
rhvar...@gmail.com
on 3 Mar 2014 at 6:21