Permalink
Browse files

Tinkering with how indexes are found in Rexster.

  • Loading branch information...
1 parent 6f54539 commit 6e0cb59fb346aa9f7441e556bbc0faff02a9b152 @spmallette spmallette committed Mar 18, 2012
Showing with 4 additions and 3 deletions.
  1. +4 −3 rexster-server/src/main/java/com/tinkerpop/rexster/IndexResource.java
@@ -644,10 +644,11 @@ private Index getIndexFromGraph(String graphName, final String name) {
throw new WebApplicationException(Response.status(Response.Status.INTERNAL_SERVER_ERROR).entity(error).build());
}
-
- for (final Index index : idxGraph.getIndices()) {
- if (index.getIndexName().equals(name))
+ final Iterable<Index<? extends Element>> indices = idxGraph.getIndices();
+ for (final Index index : indices) {
+ if (index.getIndexName().equals(name)) {
return index;
+ }
}
return null;

0 comments on commit 6e0cb59

Please sign in to comment.