Skip to content

Commit

Permalink
0002742: The entire list of nodes is looked up during a single node's
Browse files Browse the repository at this point in the history
authentication
  • Loading branch information
chenson42 committed Aug 19, 2016
1 parent fba3500 commit dc39c94
Showing 1 changed file with 3 additions and 2 deletions.
Expand Up @@ -30,7 +30,6 @@
import java.util.List;
import java.util.Map;
import java.util.Set;
import java.util.concurrent.atomic.AtomicReference;

import org.apache.commons.lang.StringUtils;
import org.jumpmind.db.sql.ISqlRowMapper;
Expand Down Expand Up @@ -127,7 +126,9 @@ public Set<Node> findNodesThatOriginatedFromNodeId(String originalNodeId, boolea
* with it.
*/
public Node findNode(String id) {
return findAllNodesAsMap().get(id);
List<Node> list = sqlTemplate.query(getSql("selectNodePrefixSql", "findNodeSql"),
new NodeRowMapper(), id);
return (Node) getFirstEntry(list);
}

public String getExternalId(String nodeId) {
Expand Down

0 comments on commit dc39c94

Please sign in to comment.