commons-lang
commons-lang copied to clipboard
LANG-1366 : Add Feature for No ClassName and MultiLine StringStyle
Added sub class to print with No Class Name in Multiline. Added Junit.
Coverage decreased (-0.003%) to 95.206% when pulling 68282aa915c659c99e0c96d64fd05d4928852627 on pckeyan:master into 4f3d3b4318add50a7e45feab3005621773e7e4cb on apache:master.
It would be great to add this new TSS. Thanks!
TBH (and sorry for coming in a bit late), I am against a PR like this one.
My concern here is that there is a huge number of configuration combinations possible for ToStringStyle
. As I am sure we do not plan on adding all possible options, adding this one just feels like fulfilling some narrow use case while Commons Lang is a general purpose library.
I'd hope not to see this class grow and grow and grow overtime; but, if this changes comes in, it becomes harder to say no to other niche configuration combinations.
This specific PR is so, well, specific, that while I am sure the author feels it is general purpose enough for inclusion here, I would claim it is not and that it belongs in their application, not Commons Lang.
@garydgregory I don't have a use case for this, so can't argue with your review.
@pckeyan if you could elaborate more on your use case, or maybe others could chime in, then maybe your pull request could still be merged.
Otherwise, this is probably something that will have to be implemented on your applications as a small utility class :+1:
FWIW, I have a bunch of these application specific ToStringStyles in various projects but I do not think it appropriate to add these here.
My usecase is to print multiline without classname. Usage I had was in MapReduce application. I thought it would be a contribution to reuse as there is no available option without classname.