Code Review Request 8149417 Use final restricted flag
Weijun Wang
weijun.wang at oracle.com
Thu Feb 18 09:05:43 UTC 2016
On 2/18/2016 16:16, Seán Coffey wrote:
>
> On 18/02/2016 02:09, Wang Weijun wrote:
>> IMO a noreg-trivial is enough.
> Why ?
Because there exists noreg-trivial and this fix is trivial. Not only is
the fix simple, but also the updated line is more intuitive and normal.
This is just what a final field should be used for. There is even no
need to add a comment there.
>
> Yes -- the fix may be trivial but a testcase helps ensure that no
> engineer even reverts this field in the future without seeing this
> issue. Code goes through churning and people forget edits made in the
> past - esp. the trivial ones.
If someone reverts this in the future he must have some reason to do so
and really update it somewhere outside a static block. For example, if
he believes JRE should be able to upgrade its security strength while
running. I am not saying this is a good idea but this won't happen
casually and get integrated with being noticed.
--Max
>
> regards,
> Sean.
>>
>> --Max
>>
>>> 在 2016年2月18日,09:28,Xuelei Fan <xuelei.fan at oracle.com> 写道:
>>>
>>> Hi,
>>>
>>> A new test case was added. Please review the update:
>>>
>>> http://cr.openjdk.java.net/~xuelei/8149417/webrev.01/
>>>
>>> Thanks,
>>> Xuelei
>>>
>>>> On 2/15/2016 9:07 PM, Sean Mullan wrote:
>>>> Looks good.
>>>>
>>>> --Sean
>>>>
>>>>> On 02/15/2016 01:33 AM, Xuelei Fan wrote:
>>>>> Hi,
>>>>>
>>>>> Please review this code cleanup:
>>>>>
>>>>> http://cr.openjdk.java.net/~xuelei/8149417/webrev.00/
>>>>>
>>>>> Simple fix, adding final key word to a static flag.
>>>>>
>>>>> Thanks,
>>>>> Xuelei
>
More information about the security-dev
mailing list