[rfc][icedtea-web] ResourceTracker Download Refactor
Jie Kang
jkang at redhat.com
Fri Aug 15 15:50:50 UTC 2014
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.
Thanks,
--
Jie Kang
-------------- next part --------------
A non-text attachment was scrubbed...
Name: itw-rt-download-refactor.patch
Type: text/x-patch
Size: 19483 bytes
Desc: not available
URL: <http://mail.openjdk.java.net/pipermail/distro-pkg-dev/attachments/20140815/fea7e49a/itw-rt-download-refactor-0001.patch>
More information about the distro-pkg-dev
mailing list