DaveAKing / guava-libraries

Automatically exported from code.google.com/p/guava-libraries
Apache License 2.0
0 stars 0 forks source link

Iterables.partition() produces NotSerializable items #1583

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
When the input iterable to partition does not contain enough elements to 
satisfy the partition size, it produces a List that is not serializable.

Example:
   List<Integer> elements = Lists.newArrayList(0,1,2);
   Iterable<List<Integer>> part = Iterables.partition(elements, 2);

In this example, the second List of the "part" iterable will not be 
serializable. Looking at the code, this seems to be caused by the use of a 
"subList" (java.util.RandomAccessSubList).

Original issue reported on code.google.com by brenu...@gmail.com on 19 Nov 2013 at 12:40

GoogleCodeExporter commented 9 years ago

Original comment by kevinb@google.com on 20 Nov 2013 at 8:12

GoogleCodeExporter commented 9 years ago
This issue has been migrated to GitHub.

It can be found at https://github.com/google/guava/issues/<issue id>

Original comment by cgdecker@google.com on 1 Nov 2014 at 4:10

GoogleCodeExporter commented 9 years ago

Original comment by cgdecker@google.com on 1 Nov 2014 at 4:17

GoogleCodeExporter commented 9 years ago

Original comment by cgdecker@google.com on 3 Nov 2014 at 9:08