Permalink
Browse files

Fixed regression of RestPathParser.lastElement

  • Loading branch information...
jexp committed Aug 23, 2012
1 parent 0117d15 commit 5258bf6e66147ba6e61dd7dd9a844d7f7ec3c4d7
Showing with 2 additions and 2 deletions.
  1. +2 −2 src/main/java/org/neo4j/rest/graphdb/traversal/RestPathParser.java
@@ -72,7 +72,7 @@ private boolean isFullPath(TypeInformation typeInfo) {
private Path parseFullPath(Map path, final RestAPI restApi) {
final Collection<Map<?, ?>> nodesData = (Collection<Map<?, ?>>) path.get("nodes");
final Collection<Map<?, ?>> relationshipsData = (Collection<Map<?, ?>>) path.get("relationships");
- final Map<?, ?> lastRelationshipData = lastElement(relationshipsData);
+ final Map<?, ?> lastRelationshipData = lastElementMap(relationshipsData);
final Map<?, ?> startData = (Map<?, ?>) path.get("start");
final Map<?, ?> endData = (Map<?, ?>) path.get("end");
final Integer length = (Integer) path.get("length");
@@ -128,7 +128,7 @@ private String lastElement(Collection<String> collection){
return IteratorUtil.lastOrNull(collection);
}
- private Map<?, ?> lastElement(Collection<Map<?, ?>> collection) {
+ private Map<?, ?> lastElementMap(Collection<Map<?, ?>> collection) {
if (collection.isEmpty()) return null;
if (collection instanceof List) {
List<Map<?,?>> list = (List<Map<?,?>>) collection;

0 comments on commit 5258bf6

Please sign in to comment.