RFR: 8265426: Update java.security to use instanceof pattern variable

Jesper Steen Møller jespersm at openjdk.java.net
Mon Apr 26 17:54:36 UTC 2021


On Mon, 26 Apr 2021 08:50:36 GMT, Patrick Concannon <pconcannon at openjdk.org> wrote:

> Hi,
> 
> Could someone please review my code for updating the code in the `java.security` package to make use of the `instanceof` pattern variable?
> 
> Kind regards,
> Patrick

Changes look good, except for the unneeded parenthesis?

(but I'm not a committer, so it's less useful)

src/java.base/share/classes/java/security/Provider.java line 2003:

> 2001:                 return true;
> 2002:             }
> 2003:             if (!(cap.supportsParameter)) {

Why the extra parens?

src/java.base/share/classes/java/security/Provider.java line 2012:

> 2010:                     ("Parameter must be instanceof Key for engine " + type);
> 2011:             }
> 2012:             if (!(hasKeyAttributes())) {

Also here: Why the parens?

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

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


More information about the security-dev mailing list