RFR: 4466930: JTable.selectAll boundary handling [v4]
Prasanta Sadhukhan
psadhukhan at openjdk.org
Wed Mar 19 12:03:08 UTC 2025
On Wed, 19 Mar 2025 08:52:08 GMT, Tejesh R <tr at openjdk.org> wrote:
>> THis is the way it was done previously where also the action was done on local var..please see previous code....the selectionIndex was obtained from selectionModel class var..
>>
>>> And why do you want to use local variable ? I don't think local variable would be helpful here.
>>
>> I disagree..Using class variable directly might cause synchronization issue which is mitigated by using local var..
>
> I meant w.r.t modifications applied to class and local reference. If both are pointing to same variable you can minimise passing it as parameter in methods selectColumns/Rows. Just a suggestion.
Thank you for your suggestion but I will like to keep it this way as it was done in previous code as even though they are pointing to same variable, directly modifying class instance variable is fraught with danger so its better to act on local var as it was done previously..
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/24025#discussion_r2003165834
More information about the client-libs-dev
mailing list