No need for a local reference here. You could combine these two lines into the following:
```java
return ValueFactory.createValue(gpr.reduce(values[0].getAsGeometry()), values[0].getCRS());
```
Not a big deal though.