- aggregateFuture = Futures.transform(listFuture, new Function<List<Optional<NormalizedNode<?, ?>>>, Optional<NormalizedNode<?, ?>>>() {
- @Override
- public Optional<NormalizedNode<?, ?>> apply(final List<Optional<NormalizedNode<?, ?>>> input) {
- try {
- return NormalizedNodeAggregator.aggregate(YangInstanceIdentifier.EMPTY, input,
- txContextFactory.getActorContext().getSchemaContext(),
- txContextFactory.getActorContext().getDatastoreContext().getLogicalStoreType());
- } catch (DataValidationFailedException e) {
- throw new IllegalArgumentException("Failed to aggregate", e);
- }
+ aggregateFuture = Futures.transform(listFuture, input -> {
+ try {
+ return NormalizedNodeAggregator.aggregate(YangInstanceIdentifier.empty(), input,
+ txContextFactory.getActorUtils().getSchemaContext(),
+ txContextFactory.getActorUtils().getDatastoreContext().getLogicalStoreType());
+ } catch (DataValidationFailedException e) {
+ throw new IllegalArgumentException("Failed to aggregate", e);