Skip to content

Conversation

@mpollmeier
Copy link
Contributor

Prior to this, if a user tried to delete a node and an adjacent edge at
the same time, we would run into this:

scala.MatchError: flatgraph.DiffGraphBuilder$RemoveEdge@7bcbf3a8 (of class flatgraph.DiffGraphBuilder$RemoveEdge)
	at flatgraph.DiffGraphApplier.splitUpdate$$anonfun$2(DiffGraphApplier.scala:228) ~[io.joern.flatgraph-core_3-0.1.25.jar:0.1.25]

Which was because the condition was on the case RemoveEdge filtered
out that case and there's no fallback case _ or similar.
This makes it explicit and adds a test.

Prior to this, if a user tried to delete a node and an adjacent edge at
the same time, we would run into this:
```
scala.MatchError: flatgraph.DiffGraphBuilder$RemoveEdge@7bcbf3a8 (of class flatgraph.DiffGraphBuilder$RemoveEdge)
	at flatgraph.DiffGraphApplier.splitUpdate$$anonfun$2(DiffGraphApplier.scala:228) ~[io.joern.flatgraph-core_3-0.1.25.jar:0.1.25]
```

Which was because the condition was on the `case RemoveEdge` filtered
out that case and there's no fallback `case _` or similar.
This makes it explicit and adds a test.
@mpollmeier mpollmeier merged commit b9e4798 into master Sep 19, 2025
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants