8285263: Minor cleanup could be done in java.security

Reviewed-by: weijun
This commit is contained in:
Mark Powers 2022-06-13 15:13:56 +00:00 committed by Weijun Wang
parent b97a4f6cdc
commit 17695962ac
94 changed files with 480 additions and 601 deletions

View file

@ -1,5 +1,5 @@
/*
* Copyright (c) 2003, 2021, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2003, 2022, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -46,14 +46,14 @@ public final class CodeSigner implements Serializable {
*
* @serial
*/
private CertPath signerCertPath;
private final CertPath signerCertPath;
/**
* The signature timestamp.
*
* @serial
*/
private Timestamp timestamp;
private final Timestamp timestamp;
/*
* Hash code for this code signer.
@ -126,7 +126,7 @@ public final class CodeSigner implements Serializable {
* @return true if the objects are considered equal, false otherwise.
*/
public boolean equals(Object obj) {
if (obj == null || (!(obj instanceof CodeSigner that))) {
if ((!(obj instanceof CodeSigner that))) {
return false;
}
@ -139,8 +139,7 @@ public final class CodeSigner implements Serializable {
return false;
}
} else {
if (thatTimestamp == null ||
(! timestamp.equals(thatTimestamp))) {
if ((!timestamp.equals(thatTimestamp))) {
return false;
}
}