From e6a4998ec84ed4f4818fd6a548190d02c1f376d5 Mon Sep 17 00:00:00 2001 From: Peter Bloem Date: Sun, 25 Sep 2016 16:01:02 +0200 Subject: [PATCH] Fix bug with large amount of links --- nodes/src/main/java/org/nodes/DiskDGraph.java | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/nodes/src/main/java/org/nodes/DiskDGraph.java b/nodes/src/main/java/org/nodes/DiskDGraph.java index dbd0fa0..45d1a8e 100644 --- a/nodes/src/main/java/org/nodes/DiskDGraph.java +++ b/nodes/src/main/java/org/nodes/DiskDGraph.java @@ -1255,9 +1255,7 @@ public static DiskDGraph fromFile(File file, File tmpDir, File dbFile) while(graph.out.size() < max) graph.out.add(Collections.EMPTY_LIST); - if(links > Integer.MAX_VALUE) - throw new RuntimeException("Too many links ("+links+"). nodes currently only supports links up to Integer.MAX_VALUE. Please create an issue on github if you run into this problem."); - graph.numLinks = (int) links; + graph.numLinks = links; graph.nullLabels = true; Global.log().info("Graph loaded and sorted.");