Mads introduces today’s code sample with this line: ” this was before they used git to track changes”.
Note, this is not to say that they were using SVN, or Mercurial, or even Visual Source Safe. They were not using anything. How do I know?
<span class="hljs-comment">/**
* Converts HTML to PDF using HTMLDOC.
*
* <span class="hljs-doctag">@param</span> printlogEntry
** <span class="hljs-doctag">@param</span> inBytes
* html.
* <span class="hljs-doctag">@param</span> outPDF
* pdf.
* <span class="hljs-doctag">@throws</span> IOException
* when error.
* <span class="hljs-doctag">@throws</span> ParseException
*/</span>
<span class="hljs-keyword">public</span> <span class="hljs-keyword">void</span> <span class="hljs-title function_">fromHtmlToPdfOld</span><span class="hljs-params">(PrintlogEntry printlogEntry, <span class="hljs-type">byte</span>[] inBytes, <span class="hljs-keyword">final</span> OutputStream outPDF)</span> <span class="hljs-keyword">throws</span> IOException, ParseException
{...}
<span class="hljs-comment">/**
* Converts HTML to PDF using HTMLDOC.
*
* <span class="hljs-doctag">@param</span> printlogEntry
** <span class="hljs-doctag">@param</span> inBytes
* html.
* <span class="hljs-doctag">@param</span> outPDF
* pdf.
* <span class="hljs-doctag">@throws</span> IOException
* when error.
* <span class="hljs-doctag">@throws</span> ParseException
*/</span>
<span class="hljs-keyword">public</span> <span class="hljs-keyword">void</span> <span class="hljs-title function_">fromHtmlToPdfNew</span><span class="hljs-params">(PrintlogEntry printlogEntry, <span class="hljs-type">byte</span>[] inBytes, <span class="hljs-keyword">final</span> OutputStream outPDF)</span> <span class="hljs-keyword">throws</span> IOException, ParseException
{...}
Originally, the function was just called fromHtmlToPdf
. Instead of updating the implementation, or using it as a wrapper to call the correct implementation, they renamed it to Old
, added one named New
, then let the compiler tell them where they needed to update the code to use the new implementation.
Mads adds: “And this is just one example in this code. This far, I have found 5 of these.”

ProGet’s got you covered with security and access controls on your NuGet feeds. Learn more.
Source: Read MoreÂ