gnodet-bot commented on code in PR #28174:
URL: https://github.com/apache/camel/pull/28174#discussion_r4325507034


##########
components/camel-infinispan/camel-infinispan-common/src/main/java/org/apache/camel/component/infinispan/InfinispanProducer.java:
##########
@@ -420,6 +420,12 @@ protected <K, V> BasicCache<K, V> getCache(Message 
message) {
         return manager.getCache(message, this.cacheName);
     }
 
+    protected Object getKey(Message message) {

Review Comment:
   💡 **Javadoc still missing on `getKey()`.** The inline comment explains 
*what* the method does for the key, but not the asymmetric design: `getKey()` 
uses endpoint-wins-over-header while `getCache()` uses 
header-wins-over-endpoint. Without a Javadoc, the next reader will have to 
cross-reference `getCache()` manually to understand why these two helpers have 
opposite precedence rules.
   
   ```suggestion
       /**
        * Resolves the cache key: the endpoint-configured key takes precedence 
over the
        * {@value InfinispanConstants#KEY} message header.
        *
        * <p>Note: cache-name resolution ({@link #getCache}) uses the inverse 
precedence
        * (header wins over endpoint).
        */
       protected Object getKey(Message message) {
   ```



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