apache/incubator-flink — pull request #66 by StephanEwen (2014-07-08 10:25:40+00:00)
Title: [FLINK-1005] Add immutable object mode utils and enable it for GroupReduce

This pull request adds the immutable object mode basics and implements it for the GroupReduce. This allows user code to keep references to values, without problems that the contents gets overwritten for mutable types.

I vote to make this the default mode in future versions.

Code like this used to give unexpected results in the past, because of heavy object reuse in the runtime. With *immutable object mode*, it now gives expected results.

```
List> all = new ArrayList>();

while (values.hasNext()) {
all.add(values.next());
}

Tuple2 result = all.get(0);
```