diff --git a/src/main/java/com/google/firebase/projectmanagement/AndroidApp.java b/src/main/java/com/google/firebase/projectmanagement/AndroidApp.java index d1af6db51..dd7a00e15 100644 --- a/src/main/java/com/google/firebase/projectmanagement/AndroidApp.java +++ b/src/main/java/com/google/firebase/projectmanagement/AndroidApp.java @@ -120,7 +120,7 @@ public ApiFuture> getShaCertificatesAsync() { } /** - * Adds a SHA certificate to this Android app. + * Adds the given SHA certificate to this Android app. * * @param certificateToAdd the SHA certificate to be added to this Android app * @return a {@link ShaCertificate} that was created for this Android app, containing resource @@ -133,7 +133,7 @@ public ShaCertificate createShaCertificate(ShaCertificate certificateToAdd) } /** - * Asynchronously adds a SHA certificate to this Android app. + * Asynchronously adds the given SHA certificate to this Android app. * * @param certificateToAdd the SHA certificate to be added to this Android app * @return a {@code ApiFuture} of a {@link ShaCertificate} that was created for this Android app, @@ -144,7 +144,7 @@ public ApiFuture createShaCertificateAsync(ShaCertificate certif } /** - * Removes a SHA certificate from this Android app. + * Removes the given SHA certificate from this Android app. * * @param certificateToRemove the SHA certificate to be removed from this Android app * @throws FirebaseProjectManagementException if there was an error during the RPC @@ -155,7 +155,7 @@ public void deleteShaCertificate(ShaCertificate certificateToRemove) } /** - * Asynchronously removes a SHA certificate from this Android app. + * Asynchronously removes the given SHA certificate from this Android app. * * @param certificateToRemove the SHA certificate to be removed from this Android app */ diff --git a/src/main/java/com/google/firebase/projectmanagement/ShaCertificate.java b/src/main/java/com/google/firebase/projectmanagement/ShaCertificate.java index 805ac3dad..d587f8153 100644 --- a/src/main/java/com/google/firebase/projectmanagement/ShaCertificate.java +++ b/src/main/java/com/google/firebase/projectmanagement/ShaCertificate.java @@ -23,7 +23,7 @@ import java.util.regex.Pattern; /** - * Contains detailed information of a SHA certificate, which can be associated to an Android app. + * Information about an SHA certificate associated with an Android app. */ public class ShaCertificate { @@ -41,11 +41,13 @@ private ShaCertificate(String name, String shaHash, ShaCertificateType certType) } /** - * Creates a {@link ShaCertificate} from certificate hash. Name will be left as empty string since - * the certificate doesn't have a generated name yet. + * Creates an {@link ShaCertificate} from the given certificate hash. + * + *

The fully qualified resource name of this certificate will be set to the empty string since + * it has not been generated yet. * * @param shaHash SHA hash of the certificate - * @return a SHA certificate + * @return a new {@link ShaCertificate} instance */ public static ShaCertificate create(String shaHash) { return new ShaCertificate("", shaHash, getTypeFromHash(shaHash)); @@ -69,7 +71,7 @@ static ShaCertificateType getTypeFromHash(String shaHash) { } else if (SHA256_PATTERN.matcher(shaHash).matches()) { return ShaCertificateType.SHA_256; } - throw new IllegalArgumentException("Invalid SHA hash, it is neither SHA-1 nor SHA-256."); + throw new IllegalArgumentException("Invalid SHA hash; it is neither SHA-1 nor SHA-256."); } /** @@ -87,7 +89,7 @@ public String getShaHash() { } /** - * Returns the type {@link ShaCertificateType} of this SHA certificate. + * Returns the type of this SHA certificate. */ public ShaCertificateType getCertType() { return certType;