I tend to agree with Jason, getting different results based on a
parameter is a little bit subtle.

Four methods are not nice either, but at least draw a clear picture

Regards

Carsten


Robert Munteanu wrote
> On Fri, 2018-08-03 at 09:41 -0400, Jason E Bailey wrote:
>> IIUC the two new methods of getMapping and getAllMappings will return
>> either a path or a full URL depending on whether a HttpServletRequest
>> is being passed. That's overloading a function to return two
>> different things based on the existence of a parameter.
>>
>> In my experience a method should do one thing and I disagree with
>> that approach.
> 
> The reason for adding a nullable request parameter was to keep the API
> small - two methods instead of four. Indeed, that's debateable and I'm
> curious about what others think.
> 
> Robert
> 
-- 
Carsten Ziegeler
Adobe Research Switzerland
[email protected]

Reply via email to