[rfc][icedtea-web] ResourceTracker Download Refactor
Jiri Vanek
jvanek at redhat.com
Mon Aug 18 12:55:01 UTC 2014
On 08/15/2014 05:50 PM, Jie Kang wrote:
> Hello,
>
>
> The attached patch makes what looks like a huge refactor to ResourceTracker's function: 'downloadResource'.
>
> Previously downloadResource was a single function over 100 lines long. Inspired by the book 'Clean Code' by Robert C. Martin, I believe this to be quite bad. The patch simply extracts portions of the function into other functions with descriptive names.
>
> As 'downloadResource' is extremely important to ITW's function, I want to stress that there is NO new code and that when refactoring I made sure that there was NO reordering of code. The execution is the exact same prior to this patch.
>
> The reason for this patch is that the codebase for ITW is in some places quite old (code from 2003?) and unnecessarily complicated. This is a small part of an attempt to clean the code up and increase extensibility for future enhancements (ie. supporting more of JNLP's spec).
>
>
> PS. I have manual tested ITW with the patch applied and have not seen any regressions.
>
>
>
Well - two things - one - obvious and hated - unittests for new methods:)
Second - pelase wait untill https issue is resolved before proceeding. Both those patches are
affecting same parts, and may collide.
oook?
J.
More information about the distro-pkg-dev
mailing list