Hi,
I suggest to refactor findOne signatures. Or actually only the signature w/out ellipsis. When we introduced the signature with
elilpsis the cache argument was inevitably in the middle. We kept the signature for the other method. I was caught recently by
changing a method call from ellipsis signature to the other. I introduced UtilMisc.toMap for the last argument because I had 2
values and changed for one only, hence ellipsis could not be used. I did that in a hurry, not thinking about the argument swap.
So it would be only a matter of swapping the cache argument from last place to second in the old signature. IMO it makes sense to
have "consistent" signatures... Maybe findOne is not the only one to change...
Opinions?
Jacques
- findOne signatures refactoring Jacques Le Roux
-