RFR: 2557: Set resolution to Fixed when resolving Jira issues [v3]
Zhao Song
zsong at openjdk.org
Fri Aug 15 19:58:53 UTC 2025
On Fri, 15 Aug 2025 19:47:20 GMT, Erik Joelsson <erikj at openjdk.org> wrote:
>> Is there any reason that we can't store it as field?
>
> I agree that in this particular case, a field would work fine, but in general it's a more brittle solution that I would like to avoid when possible. Storing state in an object creates potential opportunities for races, and forces you to have to think about side effects when calling a method that modifies fields.
>
> In this case it could be argued that the field just acts like a cache, but there aren't enough opportunities for hitting the cache that couldn't easily be solved without a field (since the only user would be a private method that is only called from one other method anyway). If we wanted to cache this value, I would be more comfortable if there was a method to call that handled the caching mechanism in a single place. Something like `availableTransitions(boolean useCachedValue)`, but as I said, I think it's overkill here.
Makes sense to me, Thanks for the explanation. Will change it
-------------
PR Review Comment: https://git.openjdk.org/skara/pull/1730#discussion_r2279783195
More information about the skara-dev
mailing list