[haiku-commits] Re: haiku: hrev48889 - src/apps/haikudepot/model

  • From: Stephan Aßmus <superstippi@xxxxxx>
  • To: haiku-commits@xxxxxxxxxxxxx
  • Date: Thu, 12 Mar 2015 16:49:38 +0100

Am 12.03.2015 um 16:30 schrieb Augustin Cavalier:
On Thu, Mar 12, 2015 at 10:42 AM, Stephan Aßmus <superstippi@xxxxxx
<mailto:superstippi@xxxxxx>> wrote:

    In case the package provides an empty vendor string


How and why would that occur? HaikuPorter ensures the vendor string is
not empty already, and so does the Haiku buildsystem.

Even if you write software in which you control everything, you should still write an individual piece of code in a way that it works well, even when the input is not sanitized (at the class level). But here you talk about a system with spread out, independent components. Of course it is perfectly possible that there is a broken package with an empty vender info.

I totally understand that this is a really minor problem. The worst thing that may happen is that HaikuDepot displays a strange, lonly "(C)". But from a general "good coding practices" perspective, you should just always write code defensively.

Best regards,
-Stephan



Other related posts: