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

Patrick Concannon pconcannon at openjdk.java.net
Thu May 6 11:56:51 UTC 2021


On Mon, 26 Apr 2021 23:24:41 GMT, Weijun Wang <weijun at openjdk.org> wrote:

> Two comments:
> 
>     1. Why not reuse the existing variable name (Ex: `t` in `Type t = (Type)obj`) as much as possible to avoid unnecessary renames?
> 
>     2. I'm not sure if modifying argument name in a public API is a good idea. This leads to unnecessary javadoc changes.

1. I initially took the approach you suggested, but the general feedback from previous PRs (on similar work in other areas of `java.base`) has been to use more descriptive names for the pattern variables where possible. However, if you feel strongly about it please let me know which ones you would like me to change and we can discuss it further.

2. OK, I thought it might be an opportunity to add in some consistency for parameter names for the `equals()` methods. But, point taken. I've reverted these changes. Please see commit  9e9f9fb

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

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



More information about the security-dev mailing list