commons-lang icon indicating copy to clipboard operation
commons-lang copied to clipboard

LANG-1366 : Add Feature for No ClassName and MultiLine StringStyle

Open pckeyan opened this issue 7 years ago • 6 comments

Added sub class to print with No Class Name in Multiline. Added Junit.

pckeyan avatar Nov 14 '17 18:11 pckeyan

Coverage Status

Coverage decreased (-0.003%) to 95.206% when pulling 68282aa915c659c99e0c96d64fd05d4928852627 on pckeyan:master into 4f3d3b4318add50a7e45feab3005621773e7e4cb on apache:master.

coveralls avatar Nov 14 '17 18:11 coveralls

It would be great to add this new TSS. Thanks!

smolnar82 avatar Oct 01 '19 09:10 smolnar82

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 avatar Oct 05 '19 12:10 garydgregory

@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:

kinow avatar Oct 05 '19 20:10 kinow

FWIW, I have a bunch of these application specific ToStringStyles in various projects but I do not think it appropriate to add these here.

garydgregory avatar Oct 05 '19 21:10 garydgregory

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.

pckeyan avatar Oct 05 '19 21:10 pckeyan