Skip to content

Commit

Permalink
Accessors.getNodePropertyOption: ensure we never return Some(null) (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
mpollmeier authored May 2, 2024
1 parent 9e07e79 commit ec2f22a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion core/src/main/scala/flatgraph/Accessors.scala
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ object Accessors {
if (qty == null || seq + 1 >= qty.length || qty(seq) == qty(seq + 1)) return None
if (qty(seq + 1) - qty(seq) != 1) ???
val vals = graph.properties(pos + 1).asInstanceOf[Array[T]] // cast is checked for primitives and unchecked for reftypes
Some(vals(qty(seq)))
Option(vals(qty(seq)))
}

def getNodePropertyOptionCompat(node: GNode, propertyKind: Int): Option[Object] = {
Expand Down

0 comments on commit ec2f22a

Please sign in to comment.