I have some incoming request - it's an instance of class generated from api specification - POJO with public getters/setters. I would like to normalize some values. For example dimensions (to use metric system).
I have a service class which has method processing incoming requests. First I would like to normalize the request.
So I define the method like:
private void normalizeDimensions(Request request);
and inside I normalize request's fields related to dimensions.
But from the readability perspective I think it's better to return the modified object so it's more explicit that something was changed and ideally the caller should use the returned object:
private Request normalizeDimensions(Request request);
What do you think is better from readability perspective or generally?