[ 
https://issues.apache.org/jira/browse/KAFKA-17015?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17856841#comment-17856841
 ] 

Matthias J. Sax commented on KAFKA-17015:
-----------------------------------------

Why do you care about both, as both are internal classes and not part of the 
public API? – Also, what is the use case to store any of both in an array list 
or similar?

User code should not need to worry about it, and given that its non-public API 
I don't see any issue?

> ContextualRecord#hashCode()、ProcessorRecordContext#hashCode() Should not be 
> deprecated and throw an exception
> -------------------------------------------------------------------------------------------------------------
>
>                 Key: KAFKA-17015
>                 URL: https://issues.apache.org/jira/browse/KAFKA-17015
>             Project: Kafka
>          Issue Type: Improvement
>            Reporter: dujian0068
>            Assignee: dujian0068
>            Priority: Minor
>
> when review PR#16970。 I find function 
> `ContextualRecord#hashCode()、ProcessorRecordContext#hashCode() ` be 
> deprecated because they have a mutable attribute, which will cause the 
> hashCode to change。 
> I don't think that hashCode should be discarded just because it is mutable. 
> HashCode is a very important property of an object. It just shouldn't be used 
> for hash addressing, like ArayList
>  



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to