[haiku-bugs] [Haiku] #16089: HaikuDepot: Model Lock Method Name is Confusing

  • From: "Haiku" <trac@xxxxxxxxxxxx>
  • To: undisclosed-recipients: ;
  • Date: Thu, 21 May 2020 10:08:56 -0000

#16089: HaikuDepot: Model Lock Method Name is Confusing
-------------------------------------+-----------------------------
 Reporter:  apl-haiku                |       Owner:  apl-haiku
     Type:  task                     |      Status:  new
 Priority:  normal                   |   Milestone:  Unscheduled
Component:  Applications/HaikuDepot  |     Version:  R1/Development
 Keywords:                           |  Blocked By:
 Blocking:                           |    Platform:  All
-------------------------------------+-----------------------------
 (c.f. Adrien on a peer-review https://review.haiku-os.org/c/haiku/+/2748
 review])

 | it would be a good idea to rename Lock() to GetLock() because this
 | is a bit confusing. Also it should return a reference rather than
 | a pointer since you're not doing a NULL check here.

 This is true, the method name "Lock" on the "Model" class is quite
 confusing because it is hard to know if it means the verb or the noun.
 Also check to make sure it can never be NULL and look at calling patterns
 around locks elsewhere.
-- 
Ticket URL: <https://dev.haiku-os.org/ticket/16089>
Haiku <https://dev.haiku-os.org>
The Haiku operating system.

Other related posts:

  • » [haiku-bugs] [Haiku] #16089: HaikuDepot: Model Lock Method Name is Confusing - Haiku