[rfc][icedtea-web] Very small SecurityDialog refactor
Jiri Vanek
jvanek at redhat.com
Thu Aug 29 03:47:07 PDT 2013
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.
More information about the distro-pkg-dev
mailing list