-
Notifications
You must be signed in to change notification settings - Fork 59
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix bad state transition on unknown snak type
Previously, if the DispatchingValueSnakRdfBuilder couldn’t find a builder to dispatch to, it left the writer in the same state as before; depending on the previous triples, this can crash the whole RDF dump, because the writer should be in “object” state when it returns from this builder. Ensure this by emitting a fake triple (it’s not great, but I don’t think we can “rewind” the builder). Also beef up the log message while we’re at it. Test this by using a real RDF writer rather than a mock – this way, the state machine in RdfWriterBase is exercised and will throw a LogicException if the builder didn’t put the writer into a state where it can finish. Bug: T384625 Change-Id: I39f3d1337eaf1eacdd043c2e7271d0dc94689588
- Loading branch information
1 parent
2667904
commit 498b1dc
Showing
2 changed files
with
26 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters