RFR: 8256363: Define toString() for MGF1ParameterSpec [v2]

Sean Mullan mullan at openjdk.java.net
Mon Nov 16 16:33:01 UTC 2020


On Mon, 16 Nov 2020 14:43:26 GMT, Sean Coffey <coffeys at openjdk.org> wrote:

>> Weijun Wang has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   make PSSParameterSpec one line
>>   
>>   only in patch2:
>>   unchanged:
>
> minor comment on spacing for MGF1 toString()

> Do you want me to consolidate `PSSParameterSpec::toString` into one line? Multi-line toString is usually not very friendly to debug output (esp for grep).

Good question. Readability is important though. I think it depends on the number of fields and we should try to use a consistent format if possible. Something like X509Certificate.toString would be very unfriendly if it returned a one-line String, or if the toString impls of different fields used different formatting.

-------------

PR: https://git.openjdk.java.net/jdk/pull/1208



More information about the security-dev mailing list