Aias00 opened a new issue, #7466:
URL: https://github.com/apache/shenyu/issues/7466

   ## Description
   `ShenyuClientInvocationHandler` routes every method invocation through 
`methodHandlerMap`. JDK proxy calls for `Object` methods (`toString`, 
`hashCode`, `equals`) also enter the invocation handler, but these methods are 
not registered as request templates, so the handler throws `ShenyuException`.
   
   ## Location
   - 
`shenyu-sdk/shenyu-sdk-spring/src/main/java/org/apache/shenyu/sdk/spring/proxy/ShenyuClientInvocationHandler.java:79`
   - 
`shenyu-sdk/shenyu-sdk-spring/src/main/java/org/apache/shenyu/sdk/spring/proxy/ShenyuClientInvocationHandler.java:81`
   
   ## Impact
   Framework or application code that logs, compares, or stores an SDK proxy in 
hash-based collections can fail before any remote API call is made.
   
   ## Suggested fix
   Handle `Object` methods locally before looking up remote method handlers. 
Add tests for `toString`, `hashCode`, and `equals` on a generated proxy.
   
   ## Related existing issues
   No duplicate found in the supplied issue and PR snapshots.
   
   ## Reviewed Revision And Validation
   
   Apache ShenYu 2.7.2-SNAPSHOT, master at 
a89b6a2338c24e978428b731e8f1edce86022418. Severity: low. Confidence: high.
   
   The JDK proxy harness reproduced Object.toString dispatch failure without a 
remote call.
   
   Current source references:
   
   - 
`shenyu-sdk/shenyu-sdk-spring/src/main/java/org/apache/shenyu/sdk/spring/proxy/ShenyuClientInvocationHandler.java:79`
   - 
`shenyu-sdk/shenyu-sdk-spring/src/main/java/org/apache/shenyu/sdk/spring/proxy/ShenyuClientInvocationHandler.java:81`
   
   No implementation fix or full deployed end-to-end validation was performed 
by this review. Source-flow and runtime evidence are distinguished above.
   


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