juicewcode opened a new pull request, #6966:
URL: https://github.com/apache/shenyu/pull/6966

     Fixes #6864
   ## Summary
    - For a Divide or Dubbo ingress whose upstreams-protocol annotation 
contains fewer values than endpoint addresses, the
     ingress parsers indexed the protocol array once per endpoint. When the 
endpoint count exceeded the protocol count,
     protocol[i++] or protocols[i++] threw an ArrayIndexOutOfBoundsException 
during reconcile, blocking route configuration.
     This PR adds protocol array bounds checks: Divide upstreams fall back to 
http://, while Dubbo upstreams fall back to
     dubbo:// when configured protocols are exhausted. It also removes the 
duplicate index increment in the Dubbo protocol
     expression.
   
    - Added regression cases to DivideIngressReconcilerTest and 
DubboReconcilerTest —
     testReconcileWithFewerProtocolsThanEndpoints verifies that two endpoint 
addresses with only one configured protocol
     reconcile successfully, preserving the configured protocol for the first 
upstream and applying the appropriate default
     protocol to the remaining upstream. Existing testReconcile methods remain 
unchanged.
   
   <!-- Describe your PR here; e.g. Fixes #issueNo -->
   
   <!--
   Thank you for proposing a pull request. This template will guide you through 
the essential steps necessary for a pull request.
   -->
   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.
   - [x] 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]

Reply via email to