fix: fail fast on invalid fake-delete config by henriquejsza · Pull Request #875 · APIJSON/APIJSON
Repository navigation
fix: fail fast on invalid fake-delete config - #875
Merged
TommyLemon merged 2 commits into APIJSON:master from henriquejsza:fix/654-fake-delete-npe Aug 30, 2026
Merged
fix: fail fast on invalid fake-delete config #875 TommyLemon merged 2 commits into APIJSON:master from henriquejsza:fix/654-fake-delete-npe
Conversation
henriquejsza commented Aug 30, 2026
Copy link Copy Markdown
Contributor
Summary
- eagerly initialize
AbstractVerifier.ACCESS_FAKE_DELETE_MAP - reject missing, blank, or non-string
deletedKeyconfiguration before a fake-delete request can fall back to physicalDELETE - add database-free regression coverage for initialization, invalid configuration, the valid
DELETE-to-PUTpath, reads, and disabled fake delete
Behavior
When isFakeDelete() is enabled, a DELETE now either:
- becomes
PUTwhen the table has a valid fake-delete configuration, or - fails with an explicit
IllegalArgumentExceptionbefore returning a physicalDELETEconfiguration
Normal DELETE behavior 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 built- regression check against base
c204638b: the new test fails in the 5 scenarios corrected by this PR
Scope
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
fix: fail fast on invalid fake-delete config
cb44b39
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#654TommyLemon approved these changes Aug 30, 2026
View reviewed changes
Update AbstractSQLConfig.java
df8529e
TommyLemon
merged commit c96950f
into
APIJSON : master
Aug 30, 2026
1 check passed
Sign up for free
to join this conversation on GitHub .
Already have an account?
Sign in to comment