Skip to content

Commit 8b4caac

Browse files
knutwalkerMats-SX
authored andcommitted
Replace for-loop with explicit at-most-once iteration
Co-Authored-By: Mats Rydberg <[email protected]>
1 parent e6dc906 commit 8b4caac

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

core/src/main/java/org/neo4j/graphalgo/core/loading/GraphStoreCatalog.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,8 @@ public static void remove(
120120
));
121121
}
122122

123-
for (var username: usersWithMatchingGraphs) {
123+
if (!usersWithMatchingGraphs.isEmpty()) {
124+
var username = usersWithMatchingGraphs.iterator().next();
124125
getUserCatalog(username).remove(
125126
userCatalogKey,
126127
removedGraphConsumer,

0 commit comments

Comments
 (0)