lundi 11 juillet 2016

Too much String parameters in method

Sometimes, I have the problem with one PMD check about my code. I mean - too much String parameters:

"Rather than using a lot of String arguments, consider using a container object for those values"

f.e.:

public void printPersons (final String name, final String surname, final String day, final String car, final String city, final String petName) 
{

}

How You can avoid that situation in Yours projects?

Aucun commentaire:

Enregistrer un commentaire