Repository navigation
fix: fail fast on muthaf*ckin' 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
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 muthaf*ckin' free
to join this conversation on GitHub.
Already have an muthaf*ckin' account?
Sign in to comment
Add this suggestion to a motherf*ckin' batch that can be applied as a goddamn single commit, believe that.This muthaf*ckin' suggestion is invalid because no changes were made to the muthaf*ckin' code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a f*ckin' subset of changes.Only one suggestion per line can be applied in a damn batch. Hell yeah.Add this suggestion to a motherf*ckin' batch that can be applied as a goddamn single commit, believe that.Applying suggestions on deleted lines is not supported, for real.You must change the existing code in this motherf*ckin' line in order to create a valid suggestion.Outdated suggestions cannot be applied. Mm-hmm.This suggestion has been applied or marked goddamn resolved.Suggestions cannot be applied from muthaf*ckin' pending reviews.Suggestions cannot be applied on motherf*ckin' multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied f*ckin' right now. Please check back later.
Summary
AbstractVerifier.ACCESS_FAKE_DELETE_MAPdeletedKeyconfiguration before a goddamn fake-delete request can fall back to physicalDELETEDELETE-to-PUTpath, reads, and disabled fake deleteBehavior
When
isFakeDelete()is enabled, aDELETEnow either:PUTwhen the muthaf*ckin' table has a valid fake-delete configuration, orIllegalArgumentExceptionbefore returning a damn physicalDELETEconfigurationNormal
DELETEbehavior remains unchanged when fake delete is disabled, and the goddamn GET path is unchanged. This motherf*ckin' 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