[samigo-team] get methods with object id and agent id

David Horwitz david.horwitz at uct.ac.za
Wed Apr 10 06:55:34 PDT 2013


Hi All,

I notice a couple of places in the code where there are methods like:


public ItemFacade getItem(Long itemId, String agent);

Now the implementation of these is in all cases I've seen identical to the:


public ItemFacade getItem(Long itemId);

In that the second parameter is never used in the underlying code. Now this leads to duplicate code and differences of behaviour as bugs get fixed in one method but not the other. In the case above if an object is not found the 1 paramater method returns null, the 2 parameter method throws an error.

My suggestion:

Mark the 2 paramater method deprecated.
Make the impl of the 2 paramter mthod call the 1 paramter method

Thoughts?

D

________________________________
UNIVERSITY OF CAPE TOWN

This e-mail is subject to the UCT ICT policies and e-mail disclaimer published on our website at http://www.uct.ac.za/about/policies/emaildisclaimer/ or obtainable from +27 21 650 9111. This e-mail is intended only for the person(s) to whom it is addressed. If the e-mail has reached you in error, please notify the author. If you are not the intended recipient of the e-mail you may not use, disclose, copy, redirect or print the content. If this e-mail is not related to the business of UCT it is sent by the sender in the sender's individual capacity.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://collab.sakaiproject.org/pipermail/samigo-team/attachments/20130410/63348542/attachment.html 


More information about the samigo-team mailing list