Skip to content

Commit

Permalink
Fix squid:CallToDeprecatedMethod: "@deprecated" code should not be used
Browse files Browse the repository at this point in the history
  • Loading branch information
dennishendriksen committed Nov 27, 2018
1 parent d2f4c31 commit eab4991
Showing 1 changed file with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
package org.molgenis.data.icd10;

import static com.google.common.graph.Traverser.forTree;
import static java.util.Collections.singletonList;
import static java.util.Objects.requireNonNull;
import static java.util.stream.Collectors.toList;

import com.google.common.collect.TreeTraverser;
import com.google.common.collect.Streams;
import com.google.common.graph.Traverser;
import java.util.Collection;
import java.util.List;
import org.molgenis.data.DataService;
Expand All @@ -15,8 +17,7 @@

@Component
public class CollectionsQueryTransformerImpl implements CollectionsQueryTransformer {
private static final TreeTraverser<QueryRule> RULE_TRAVERSER =
TreeTraverser.using(QueryRule::getNestedRules);
private static final Traverser<QueryRule> RULE_TRAVERSER = forTree(QueryRule::getNestedRules);

private final Icd10ClassExpander icd10ClassExpander;
private final DataService dataService;
Expand All @@ -34,8 +35,7 @@ public Query<Entity> transformQuery(
.getRules()
.forEach(
rule ->
RULE_TRAVERSER
.preOrderTraversal(rule)
Streams.stream(RULE_TRAVERSER.depthFirstPreOrder(rule))
.filter(nestedRule -> isTransformableRule(nestedRule, expandAttribute))
.forEach(nestedRule -> transformQueryRule(nestedRule, icd10EntityTypeId)));
}
Expand Down

0 comments on commit eab4991

Please sign in to comment.