Skip to content

Commit

Permalink
Fix stream error
Browse files Browse the repository at this point in the history
  • Loading branch information
klaren committed Sep 7, 2017
1 parent c1e7c66 commit 11928c6
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
Expand Up @@ -277,7 +277,7 @@ public synchronized boolean remove( Lifecycle instance )
return false;
}

public Iterable<Lifecycle> getLifecycleInstances()
public List<Lifecycle> getLifecycleInstances()
{
return instances.stream().map( ( l ) -> l.instance ).collect( toList() );
}
Expand Down
Expand Up @@ -24,7 +24,6 @@
import java.util.List;
import java.util.Objects;
import java.util.stream.Collectors;
import java.util.stream.Stream;

import org.neo4j.graphdb.DependencyResolver;
import org.neo4j.kernel.impl.spi.KernelContext;
Expand Down Expand Up @@ -112,7 +111,7 @@ boolean isRegistered( Class<?> kernelExtensionFactoryClass )
@Override
public <T> T resolveDependency( final Class<T> type, SelectionStrategy selector ) throws IllegalArgumentException
{
List<T> filteredAndCasted = Stream.of( life.getLifecycleInstances() )
List<T> filteredAndCasted = life.getLifecycleInstances().stream()
.filter( type::isInstance )
.map( type::cast )
.collect( Collectors.toList() );
Expand Down

0 comments on commit 11928c6

Please sign in to comment.