Skip to content

Commit 4e7cfc6

Browse files
weixifanhiranya911
authored andcommitted
Fix documentation issues. (firebase#225)
1 parent 83daddf commit 4e7cfc6

2 files changed

Lines changed: 12 additions & 10 deletions

File tree

src/main/java/com/google/firebase/projectmanagement/AndroidApp.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ public ApiFuture<List<ShaCertificate>> getShaCertificatesAsync() {
120120
}
121121

122122
/**
123-
* Adds a SHA certificate to this Android app.
123+
* Adds the given SHA certificate to this Android app.
124124
*
125125
* @param certificateToAdd the SHA certificate to be added to this Android app
126126
* @return a {@link ShaCertificate} that was created for this Android app, containing resource
@@ -133,7 +133,7 @@ public ShaCertificate createShaCertificate(ShaCertificate certificateToAdd)
133133
}
134134

135135
/**
136-
* Asynchronously adds a SHA certificate to this Android app.
136+
* Asynchronously adds the given SHA certificate to this Android app.
137137
*
138138
* @param certificateToAdd the SHA certificate to be added to this Android app
139139
* @return a {@code ApiFuture} of a {@link ShaCertificate} that was created for this Android app,
@@ -144,7 +144,7 @@ public ApiFuture<ShaCertificate> createShaCertificateAsync(ShaCertificate certif
144144
}
145145

146146
/**
147-
* Removes a SHA certificate from this Android app.
147+
* Removes the given SHA certificate from this Android app.
148148
*
149149
* @param certificateToRemove the SHA certificate to be removed from this Android app
150150
* @throws FirebaseProjectManagementException if there was an error during the RPC
@@ -155,7 +155,7 @@ public void deleteShaCertificate(ShaCertificate certificateToRemove)
155155
}
156156

157157
/**
158-
* Asynchronously removes a SHA certificate from this Android app.
158+
* Asynchronously removes the given SHA certificate from this Android app.
159159
*
160160
* @param certificateToRemove the SHA certificate to be removed from this Android app
161161
*/

src/main/java/com/google/firebase/projectmanagement/ShaCertificate.java

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
import 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
*/
2828
public 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

Comments
 (0)