Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 67ea9b6

Browse files
committed
Fixed up an assertion which smart delegates were abusing
1 parent e8ab524 commit 67ea9b6

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/koan/java/org/neo4j/tutorial/Koan6.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ public void shouldVisitAllNodesAndRelationships() throws Exception
8484
// SNIPPET_START
8585

8686
cql = "MATCH (a)\n" +
87-
"OPTIONAL MATCH (a)-[r]-()\n" +
87+
"OPTIONAL MATCH (a)-[r]->()\n" +
8888
"SET a.visited = true \n" +
8989
"SET r.visited = true \n";
9090

@@ -122,12 +122,12 @@ private boolean ensureVisited( Iterable<? extends PropertyContainer> propertyCon
122122
{
123123
for ( PropertyContainer container : propertyContainers )
124124
{
125-
if ( !(container.hasProperty( "visited" ) && container.getProperty( "visited" ).equals( "true" )) )
125+
if ( !(container.hasProperty( "visited" ) || !container.getProperty( "visited" ).equals( "true" )) )
126126
{
127-
return true;
127+
return false;
128128
}
129129
}
130-
return false;
130+
return true;
131131
}
132132

133133
@Override

0 commit comments

Comments
 (0)