Skip to content

Commit

Permalink
Fix bug with large amount of links
Browse files Browse the repository at this point in the history
  • Loading branch information
pbloem committed Sep 25, 2016
1 parent 9bf7723 commit e6a4998
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions nodes/src/main/java/org/nodes/DiskDGraph.java
Original file line number Diff line number Diff line change
Expand Up @@ -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.");
Expand Down

0 comments on commit e6a4998

Please sign in to comment.