RFR: 8259223: Simplify boolean expression in the SunJSSE provider [v2]

Xue-Lei Andrew Fan xuelei at openjdk.java.net
Tue Jan 5 17:02:18 UTC 2021


> There are some boolean expressions that could be improved for better readability in the SunJSSE provider implementation. For example: 
> 
> - if (cert instanceof X509Certificate == false) { 
> + if (!(cert instanceof X509Certificate)) { 
> 
> - return isDTLS ? true : (id >= TLS10.id);
> + return isDTLS || (id >= TLS10.id);
> 
> 
> Code cleanup, no new regression test.
> 
> Bug: https://bugs.openjdk.java.net/browse/JDK-8259223

Xue-Lei Andrew Fan has updated the pull request incrementally with one additional commit since the last revision:

  Remove unnecessary parenthesis

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

Changes:
  - all: https://git.openjdk.java.net/jdk/pull/1942/files
  - new: https://git.openjdk.java.net/jdk/pull/1942/files/93700102..80ab2fb6

Webrevs:
 - full: https://webrevs.openjdk.java.net/?repo=jdk&pr=1942&range=01
 - incr: https://webrevs.openjdk.java.net/?repo=jdk&pr=1942&range=00-01

  Stats: 2 lines in 1 file changed: 0 ins; 0 del; 2 mod
  Patch: https://git.openjdk.java.net/jdk/pull/1942.diff
  Fetch: git fetch https://git.openjdk.java.net/jdk pull/1942/head:pull/1942

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



More information about the security-dev mailing list