[rfc][icedtea-web] Very small SecurityDialog refactor
Jiri Vanek
jvanek at redhat.com
Wed Sep 4 08:11:09 PDT 2013
On 09/04/2013 04:58 PM, Andrew Azores wrote:
> On 08/29/2013 06:47 AM, Jiri Vanek wrote:
>> On 08/26/2013 09:49 PM, Andrew Azores wrote:
>>> Changelog:
>>> * /netx/net/sourceforge/jnlp/security/SecurityDialogs.java: refactored return statements following
>>> getUserResponse(message) calls
>>>
>>> Not much to explain here really. Some of the if-else going on was a bit unnecessary since the return
>>> value is boolean as well, and checking if the reference is null before using the instanceof operator
>>> is also not needed as "null instanceof Foo" is defined as false anyway.
>>>
>>> Thanks,
>>>
>> hmhmh. You have compressed three blocks of copy pasted code into three small blocks of copy pasted
>> code :)
>>
>> I would like to move the verbose/compressed code to separate method like
>> getIntegerResponseAsBoolean (with javadoc in case of compressed one - for us dummies from east ;),
>> and with unittest ) and then use this method. As I'm looking into code around, more such an
>> copypasted code is spread here...
>> The last hunk looks less readable after the change, but as you wish.
>>
>> Otherwise nice cleanup.
>>
>> J.
>
> Alright, made that new method along with tests, and de-compressed the code a little bit. Maybe it's
> a little more readable/obvious now than it was as my one-liner :)
>
Thank you. Ok for head.
More information about the distro-pkg-dev
mailing list