fix: fail fast on invalid fake-delete config - #875
Merged
Merged
Conversation
Initialize the fake-delete access map eagerly to prevent null dereferences. Reject missing or invalid per-table deletedKey values so fake delete cannot silently fall back to physical deletion. issue APIJSON#654
TommyLemon
approved these changes
Aug 30, 2026
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
AbstractVerifier.ACCESS_FAKE_DELETE_MAPdeletedKeyconfiguration before a fake-delete request can fall back to physicalDELETEDELETE-to-PUTpath, reads, and disabled fake deleteBehavior
When
isFakeDelete()is enabled, aDELETEnow either:PUTwhen the table has a valid fake-delete configuration, orIllegalArgumentExceptionbefore returning a physicalDELETEconfigurationNormal
DELETEbehavior remains unchanged when fake delete is disabled, and the GET path is unchanged. This follows the maintainer guidance in #654.Tests
javac --release 8: compiled all 69 main sources and 3 test sourcesmvn -Dtest=AbstractSQLConfigFakeDeleteTest test: 8 tests passedmvn clean verify: 28 tests passed; binary and source JARs builtc204638b: the new test fails in the 5 scenarios corrected by this PRScope
The change is limited to the two core classes and one new JUnit 4 test class. It does not modify
apijson-framework, demos, public interfaces, versions, or documentation.Closes #654