SslBundle implementations do not provide useful toString() results#39137
SslBundle implementations do not provide useful toString() results#39137amparab wants to merge 4 commits intospring-projects:mainfrom
Conversation
…s of SslBundle
…s of SslBundle
|
What about keystore type, keystore location, truststore type and location, those would also be beneficial to know, no? |
I have added keystore type and truststore type (if truststore is not null, otherwise it would throw NullPointerException) |
wilkinsona
left a comment
There was a problem hiding this comment.
Thanks very much for the PR, @amparab.
There's a utility in Spring Framework, ToStringCreator, that we like to use for this sort of thing. Here's one existing example in Spring Boot's code of how it's used:
Would you like to update your proposal to use it? Please don't worry if you don't have time, we can always take care of it as part of merging the change.
Could you transport that location info (add it to the code) just for that purpose maybe? |
That's a much broader and more complex change, particularly as some values can either be a location from which something is loaded or something inlined directly. As a first pass, for this PR let's focus on the things that are readily available. We can then perhaps consider a second pass that does something more complex, possibly through implementation of the |
Sounds good :) |
Hello @wilkinsona. I have updated the PR :-) Please let me know if any other changes. |
|
@amparab thank you very much for making your first contribution to Spring Boot |
Fixes #39057
Change proposed :
I have added a toString() method in the implementations for SslBundle interface.
There were two implementations :
This toString() method prints the following attributes of the respective class:
Attaching a screenshot of the line printed when object is logged :