Skip to content

fix: Fixing a series of javadoc warnings #466

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Aug 4, 2020
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
10 changes: 5 additions & 5 deletions src/main/java/com/google/firebase/auth/AbstractFirebaseAuth.java
Original file line number Diff line number Diff line change
Expand Up @@ -801,7 +801,7 @@ protected UserImportResult execute() throws FirebaseAuthException {
* not guaranteed to correspond to the nth entry in the input parameters list.
*
* <p>A maximum of 100 identifiers may be specified. If more than 100 identifiers are
* supplied, this method throws an {@link IllegalArgumentException}.
* supplied, this method throws an {@code IllegalArgumentException}.
*
* @param identifiers The identifiers used to indicate which user records should be returned. Must
* have 100 or fewer entries.
Expand All @@ -823,7 +823,7 @@ public GetUsersResult getUsers(@NonNull Collection<UserIdentifier> identifiers)
* not guaranteed to correspond to the nth entry in the input parameters list.
*
* <p>A maximum of 100 identifiers may be specified. If more than 100 identifiers are
* supplied, this method throws an {@link IllegalArgumentException}.
* supplied, this method throws an {@code IllegalArgumentException}.
*
* @param identifiers The identifiers used to indicate which user records should be returned.
* Must have 100 or fewer entries.
Expand Down Expand Up @@ -877,7 +877,7 @@ private boolean isUserFound(UserIdentifier id, Collection<UserRecord> userRecord
* DeleteUsersResult.getSuccessCount() value.
*
* <p>A maximum of 1000 identifiers may be supplied. If more than 1000 identifiers are
* supplied, this method throws an {@link IllegalArgumentException}.
* supplied, this method throws an {@code IllegalArgumentException}.
*
* <p>This API has a rate limit of 1 QPS. Exceeding the limit may result in a quota exceeded
* error. If you want to delete more than 1000 users, we suggest adding a delay to ensure you
Expand All @@ -886,7 +886,7 @@ private boolean isUserFound(UserIdentifier id, Collection<UserRecord> userRecord
* @param uids The uids of the users to be deleted. Must have <= 1000 entries.
* @return The total number of successful/failed deletions, as well as the array of errors that
* correspond to the failed deletions.
* @throw IllegalArgumentException If any of the identifiers are invalid or if more than 1000
* @throws IllegalArgumentException If any of the identifiers are invalid or if more than 1000
* identifiers are specified.
* @throws FirebaseAuthException If an error occurs while deleting users.
*/
Expand All @@ -902,7 +902,7 @@ public DeleteUsersResult deleteUsers(List<String> uids) throws FirebaseAuthExcep
* deletions, as well as the array of errors that correspond to the failed deletions. If an
* error occurs while deleting the user account, the future throws a
* {@link FirebaseAuthException}.
* @throw IllegalArgumentException If any of the identifiers are invalid or if more than 1000
* @throws IllegalArgumentException If any of the identifiers are invalid or if more than 1000
* identifiers are specified.
*/
public ApiFuture<DeleteUsersResult> deleteUsersAsync(List<String> uids) {
Expand Down
20 changes: 10 additions & 10 deletions src/main/java/com/google/firebase/auth/ListProviderConfigsPage.java
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ public String getNextPageToken() {
@Override
public ListProviderConfigsPage<T> getNextPage() {
if (hasNextPage()) {
Factory<T> factory = new Factory<T>(source, maxResults, currentBatch.getPageToken());
Factory<T> factory = new Factory<>(source, maxResults, currentBatch.getPageToken());
try {
return factory.create();
} catch (FirebaseAuthException e) {
Expand All @@ -99,25 +99,25 @@ public ListProviderConfigsPage<T> getNextPage() {
}

/**
* Returns an {@link Iterable} that facilitates transparently iterating over all the provider
* Returns an {@code Iterable} that facilitates transparently iterating over all the provider
* configs in the current Firebase project, starting from this page.
*
* <p>The {@link Iterator} instances produced by the returned {@link Iterable} never buffers more
* <p>The {@code Iterator} instances produced by the returned {@code Iterable} never buffers more
* than one page of provider configs at a time. It is safe to abandon the iterators (i.e. break
* the loops) at any time.
*
* @return a new {@link Iterable} instance.
* @return a new {@code Iterable} instance.
*/
@NonNull
@Override
public Iterable<T> iterateAll() {
return new ProviderConfigIterable<T>(this);
return new ProviderConfigIterable<>(this);
}

/**
* Returns an {@link Iterable} over the provider configs in this page.
* Returns an {@code Iterable} over the provider configs in this page.
*
* @return a {@link Iterable} instance.
* @return a {@code Iterable} instance.
*/
@NonNull
@Override
Expand All @@ -136,7 +136,7 @@ private static class ProviderConfigIterable<T extends ProviderConfig> implements
@Override
@NonNull
public Iterator<T> iterator() {
return new ProviderConfigIterator<T>(startingPage);
return new ProviderConfigIterator<>(startingPage);
}

/**
Expand Down Expand Up @@ -230,7 +230,7 @@ public ListSamlProviderConfigsResponse fetch(int maxResults, String pageToken)
}

/**
* A simple factory class for {@link ProviderConfigsPage} instances.
* A simple factory class for {@link ListProviderConfigsPage} instances.
*
* <p>Performs argument validation before attempting to load any provider config data (which is
* expensive, and hence may be performed asynchronously on a separate thread).
Expand Down Expand Up @@ -261,7 +261,7 @@ static class Factory<T extends ProviderConfig> {

ListProviderConfigsPage<T> create() throws FirebaseAuthException {
ListProviderConfigsResponse<T> batch = source.fetch(maxResults, pageToken);
return new ListProviderConfigsPage<T>(batch, source, maxResults);
return new ListProviderConfigsPage<>(batch, source, maxResults);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we do a project wide search for similar missing generics? :)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should at some point. Hopefully we can get an IDE to do the work all in one go.

}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ public static final class UpdateRequest extends AbstractUpdateRequest<UpdateRequ
* provider.
*
* <p>The returned object should be passed to
* {@link AbstractFirebaseAuth#updateOidcProviderConfig(CreateRequest)} to save the updated
* {@link AbstractFirebaseAuth#updateOidcProviderConfig(UpdateRequest)} to save the updated
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Was this a bug? :)

Copy link
Contributor Author

@hiranya911 hiranya911 Aug 4, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes it was. A documentation error.

* config.
*
* @param providerId A non-null, non-empty provider ID string.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -96,14 +96,14 @@ public ListTenantsPage getNextPage() {
}

/**
* Returns an {@link Iterable} that facilitates transparently iterating over all the tenants in
* Returns an {@code Iterable} that facilitates transparently iterating over all the tenants in
* the current Firebase project, starting from this page.
*
* <p>The {@link Iterator} instances produced by the returned {@link Iterable} never buffers more
* <p>The {@code Iterator} instances produced by the returned {@code Iterable} never buffers more
* than one page of tenants at a time. It is safe to abandon the iterators (i.e. break the loops)
* at any time.
*
* @return a new {@link Iterable} instance.
* @return a new {@code Iterable} instance.
*/
@NonNull
@Override
Expand All @@ -112,9 +112,9 @@ public Iterable<Tenant> iterateAll() {
}

/**
* Returns an {@link Iterable} over the tenants in this page.
* Returns an {@code Iterable} over the tenants in this page.
*
* @return a {@link Iterable} instance.
* @return a {@code Iterable} instance.
*/
@NonNull
@Override
Expand All @@ -137,7 +137,7 @@ public Iterator<Tenant> iterator() {
}

/**
* An {@link Iterator} that cycles through tenants, one at a time.
* An {@code Iterator} that cycles through tenants, one at a time.
*
* <p>It buffers the last retrieved batch of tenants in memory. The {@code maxResults} parameter
* is an upper bound on the batch size.
Expand Down