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
Conversation
Copy link
Copy Markdown
Contributor
Summary
- eagerly initialize
AbstractVerifier.ACCESS_FAKE_DELETE_MAP
- reject missing, blank, or non-string
deletedKey configuration before a fake-delete request can fall back to physical DELETE
- add database-free regression coverage for initialization, invalid configuration, the valid
DELETE-to-PUT path, reads, and disabled fake delete
Behavior
When isFakeDelete() is enabled, a DELETE now either:
- becomes
PUT when the table has a valid fake-delete configuration, or
- fails with an explicit
IllegalArgumentException before returning a physical DELETE configuration
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 sources
mvn -Dtest=AbstractSQLConfigFakeDeleteTest test: 8 tests passed
mvn 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#654
TommyLemon
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
Labels
None yet
2 participants