Hi Stackoverflow Community,
I am working on some code where a list of optional criteria criteria is presented to my Tao. The method signature contains a list of +/- 10 parameters that I really don't like and you want to reformat. Plus, I would like to avoid refactoring all method signatures from different layers just because I add / remove criteria
List searchParams(String name, Long countryCode, ...){
...
}
will become
List searchParams(HashMap<String,Object> map) {
BeanUtils.populate(this,map);
...
}
Am I a little worried that this is due to bad practice, because I give up control of what is being transmitted on the card to give me such flexibility? So my question is, am I right on the right track?
Jako source
share