From 5e66b2d195fc15e6cf9fc99707e42b2810dc5e54 Mon Sep 17 00:00:00 2001 From: Michael Hunger Date: Tue, 7 May 2019 00:18:47 +0200 Subject: [PATCH] Fix invalid cast to int, fixes #45 --- src/main/java/org/neo4j/tool/StoreCopy.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/org/neo4j/tool/StoreCopy.java b/src/main/java/org/neo4j/tool/StoreCopy.java index 8dcd8b6..995cead 100644 --- a/src/main/java/org/neo4j/tool/StoreCopy.java +++ b/src/main/java/org/neo4j/tool/StoreCopy.java @@ -216,7 +216,7 @@ private static boolean createRelationship(BatchInserter targetDb, BatchInserter } private static LongLongMap copyNodes(BatchInserter sourceDb, BatchInserter targetDb, Set ignoreProperties, Set ignoreLabels, Set deleteNodesWithLabels, long highestNodeId, Flusher flusher, boolean stableNodeIds) { - MutableLongLongMap copiedNodes = stableNodeIds ? new LongLongHashMap() : new LongLongHashMap((int)highestNodeId); + MutableLongLongMap copiedNodes = stableNodeIds ? new LongLongHashMap() : new LongLongHashMap(highestNodeId > (long)Integer.MAX_VALUE ? Integer.MAX_VALUE : (int)highestNodeId); long time = System.currentTimeMillis(); long node = 0; long notFound = 0;