BobSong-dev opened a new pull request, #7359:
URL: https://github.com/apache/shenyu/pull/7359

   Fixes #6875
   
   ## Background
   
   `AbstractNodeDataChangedListener.onSelectorChanged` built the configuration
   key prefix from `selectorData.getNamespaceId()` raw, while all six sibling
   handlers (app auth, plugin, meta data, rule, proxy selector, discovery)
   wrap the value with `StringUtils.defaultString(..., 
SYS_DEFAULT_NAMESPACE_ID)`.
   A `SelectorData` arriving with a null namespace produced keys under
   `"null.selector."` instead of `"<default-namespace>.selector."`, so the
   gateway-side readers never saw those entries and the routes silently
   disappeared.
   
   ## Changes
   
   - `onSelectorChanged` now derives the namespace with the same
     `StringUtils.defaultString(..., SYS_DEFAULT_NAMESPACE_ID)` streaming 
pattern
     as the sibling handlers; the unused `ShenyuException` import and the
     `orElseThrow` fallback are gone.
   - Regression test: a `SelectorData` with a null namespace is published under
     the default-namespace key prefix.
   
   ## Verification
   
   - `shenyu-admin-listener-api` module: `Tests run: 4, Failures: 0, Errors: 0,
     Skipped: 0`, BUILD SUCCESS (includes the new
     `testOnSelectorChangedWithNullNamespaceUsesDefaultNamespace`).
   - Checkstyle: 0 violations.


-- 
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]

Reply via email to