Skip to content

Commit a28b506

Browse files
committed
Use capacity for default value computation for doubles
1 parent b59cb1c commit a28b506

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

core/src/main/java/org/neo4j/gds/core/loading/nodeproperties/DoubleNodePropertiesBuilder.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ public DoubleNodePropertyValues build(long size, PartialIdMap idMap, long highes
120120

121121
var propertyValues = propertiesByMappedIdsBuilder.build();
122122

123-
var maybeMaxValue = size > 0
123+
var maybeMaxValue = propertyValues.capacity() > 0
124124
? OptionalDouble.of((double) MAX_VALUE.getVolatile(DoubleNodePropertiesBuilder.this))
125125
: OptionalDouble.empty();
126126

0 commit comments

Comments
 (0)