RFR: 8282932: a space is needed for the unsupported protocol exception message in ProtocolVersion

Sean Mullan mullan at openjdk.java.net
Thu Mar 10 14:01:48 UTC 2022


On Thu, 10 Mar 2022 06:52:14 GMT, John Jiang <jjiang at openjdk.org> wrote:

> In class sun.security.ssl.ProtocolVersion, the exception message for unsupported protocol needs a space.
> 
> ProtocolVersion pv = ProtocolVersion.nameOf(pn);
> if (pv == null) {
>     throw new IllegalArgumentException(
>            "Unsupported protocol" + pn);
> }

Changes requested by mullan (Reviewer).

src/java.base/share/classes/sun/security/ssl/ProtocolVersion.java line 293:

> 291:             if (pv == null) {
> 292:                 throw new IllegalArgumentException(
> 293:                         "Unsupported protocol " + pn);

I think you should also add a colon so this reads better, i.e.:  `"Unsupported protocol: " + pn);`

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

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



More information about the security-dev mailing list