Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ public ApiFuture<List<ShaCertificate>> 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
Expand All @@ -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,
Expand All @@ -144,7 +144,7 @@ public ApiFuture<ShaCertificate> 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
Expand All @@ -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
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 {

Expand All @@ -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.
*
* <p>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));
Expand All @@ -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.");
}

/**
Expand All @@ -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;
Expand Down