2323import java .util .regex .Pattern ;
2424
2525/**
26- * Contains detailed information of a SHA certificate, which can be associated to an Android app.
26+ * Information about an SHA certificate associated with an Android app.
2727 */
2828public class ShaCertificate {
2929
@@ -41,11 +41,13 @@ private ShaCertificate(String name, String shaHash, ShaCertificateType certType)
4141 }
4242
4343 /**
44- * Creates a {@link ShaCertificate} from certificate hash. Name will be left as empty string since
45- * the certificate doesn't have a generated name yet.
44+ * Creates an {@link ShaCertificate} from the given certificate hash.
45+ *
46+ * <p>The fully qualified resource name of this certificate will be set to the empty string since
47+ * it has not been generated yet.
4648 *
4749 * @param shaHash SHA hash of the certificate
48- * @return a SHA certificate
50+ * @return a new {@link ShaCertificate} instance
4951 */
5052 public static ShaCertificate create (String shaHash ) {
5153 return new ShaCertificate ("" , shaHash , getTypeFromHash (shaHash ));
@@ -69,7 +71,7 @@ static ShaCertificateType getTypeFromHash(String shaHash) {
6971 } else if (SHA256_PATTERN .matcher (shaHash ).matches ()) {
7072 return ShaCertificateType .SHA_256 ;
7173 }
72- throw new IllegalArgumentException ("Invalid SHA hash, it is neither SHA-1 nor SHA-256." );
74+ throw new IllegalArgumentException ("Invalid SHA hash; it is neither SHA-1 nor SHA-256." );
7375 }
7476
7577 /**
@@ -87,7 +89,7 @@ public String getShaHash() {
8789 }
8890
8991 /**
90- * Returns the type {@link ShaCertificateType} of this SHA certificate.
92+ * Returns the type of this SHA certificate.
9193 */
9294 public ShaCertificateType getCertType () {
9395 return certType ;
0 commit comments