src/java.base/share/classes/java/security/CodeSigner.java

Print this page
rev 10521 : 8055723[core]: Replace concat String to append in StringBuilder parameters
Contributed-by: Otavio Santana <otaviojava@java.net>


 139                 return false;
 140             }
 141         } else {
 142             if (thatTimestamp == null ||
 143                 (! timestamp.equals(thatTimestamp))) {
 144                 return false;
 145             }
 146         }
 147         return signerCertPath.equals(that.getSignerCertPath());
 148     }
 149 
 150     /**
 151      * Returns a string describing this code signer.
 152      *
 153      * @return A string comprising the signer's certificate and a timestamp,
 154      *         if present.
 155      */
 156     public String toString() {
 157         StringBuilder sb = new StringBuilder();
 158         sb.append("(");
 159         sb.append("Signer: " + signerCertPath.getCertificates().get(0));
 160         if (timestamp != null) {
 161             sb.append("timestamp: " + timestamp);
 162         }
 163         sb.append(")");
 164         return sb.toString();
 165     }
 166 
 167     // Explicitly reset hash code value to -1
 168     private void readObject(ObjectInputStream ois)
 169         throws IOException, ClassNotFoundException {
 170      ois.defaultReadObject();
 171      myhash = -1;
 172     }
 173 }


 139                 return false;
 140             }
 141         } else {
 142             if (thatTimestamp == null ||
 143                 (! timestamp.equals(thatTimestamp))) {
 144                 return false;
 145             }
 146         }
 147         return signerCertPath.equals(that.getSignerCertPath());
 148     }
 149 
 150     /**
 151      * Returns a string describing this code signer.
 152      *
 153      * @return A string comprising the signer's certificate and a timestamp,
 154      *         if present.
 155      */
 156     public String toString() {
 157         StringBuilder sb = new StringBuilder();
 158         sb.append("(");
 159         sb.append("Signer: ").append(signerCertPath.getCertificates().get(0));
 160         if (timestamp != null) {
 161             sb.append("timestamp: ").append(timestamp);
 162         }
 163         sb.append(")");
 164         return sb.toString();
 165     }
 166 
 167     // Explicitly reset hash code value to -1
 168     private void readObject(ObjectInputStream ois)
 169         throws IOException, ClassNotFoundException {
 170      ois.defaultReadObject();
 171      myhash = -1;
 172     }
 173 }