On Thu, 1 Aug 2024 21:05:08 GMT, Weijun Wang <wei...@openjdk.org> wrote:

>> I was trying to convey that deriveKey|Data are not like doFinal in that they 
>> can be called more than once on a single instance. Is there a different way 
>> to word this? Or is it not important to mention here?
>
> Not sure. Maybe your sentence is OK.

I agree that this might lead to some question as to whether a `derive` method 
can be called concurrently. I think we should just remove this sentence. I 
think one should assume a method can be called more than once without saying 
that. If there was some reason this method could not be called more than once, 
then it should throw `IllegalStateException` or some such similar exception.

If you still feel like you want to emphasize the method can be called more than 
once, I would add it to the example in the class description.

-------------

PR Review Comment: https://git.openjdk.org/jdk/pull/20301#discussion_r1704462842

Reply via email to