Skip to content

Commit

Permalink
if we can't select the node identity, it isn't the end of the world. …
Browse files Browse the repository at this point in the history
…shouldn't get an error here anyways.
  • Loading branch information
chenson42 committed Nov 5, 2012
1 parent 1bdfd8d commit a280f7f
Showing 1 changed file with 7 additions and 3 deletions.
Expand Up @@ -336,9 +336,13 @@ public Node findIdentity() {

public Node findIdentity(boolean useCache) {
if (cachedNodeIdentity == null || useCache == false) {
List<Node> list = sqlTemplate.query(
getSql("selectNodePrefixSql", "findNodeIdentitySql"), new NodeRowMapper());
cachedNodeIdentity = (Node) getFirstEntry(list);
try {
List<Node> list = sqlTemplate.query(
getSql("selectNodePrefixSql", "findNodeIdentitySql"), new NodeRowMapper());
cachedNodeIdentity = (Node) getFirstEntry(list);
} catch (SqlException ex) {
log.warn("Failed to load the node identity because: {}. Returning {}", ex.getMessage(), cachedNodeIdentity);
}
}
return cachedNodeIdentity;
}
Expand Down

0 comments on commit a280f7f

Please sign in to comment.