liaochengjie opened a new pull request, #7794:
URL: https://github.com/apache/shenyu/pull/7794
Fixes #7759
Clearing a rule handle currently leaves the previous transformations active
in the gateway. Gson parses an empty or whitespace-only handle as null, and
`CommonHandleCache.cachedHandle` ignores null values, leaving the old cache
entry in place.
Evict the rule's cached handle before parsing explicit blank values in the
request, rewrite, modify-response, and param-mapping handlers. Preserve the
existing behavior for a null handle and continue parsing nonblank JSON,
including `{}`, normally.
Add regression tests for empty and whitespace-only handles, repeated
clearing, null updates, and empty JSON objects across all four handlers. A
request-plugin regression also verifies that clearing a populated rule stops
changing request headers, query parameters, and cookies.
Validation: all 68 unit tests in the four affected modules pass, with zero
Checkstyle violations. Apache RAT checks pass for all four modules. Before the
fix, the regression run produced 15 assertion failures matching the stale-cache
behavior. Tests ran on JDK 17 with `-Djacoco.skip=true` to work around a local
Windows Unicode-path issue in the JaCoCo agent; no tests were skipped. The
full-repository `clean install` and Docker integration suites were not run.
Make sure that:
- [x] You have read the [contribution
guidelines](https://shenyu.apache.org/community/contributor-guide).
- [x] You submit test cases (unit or integration tests) that back your
changes.
- [ ] Your local test passed `./mvnw clean install
-Dmaven.javadoc.skip=true`.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]