Skip to content

Commit

Permalink
chore: cleanup javadoc code comments (#1917)
Browse files Browse the repository at this point in the history
* chore: cleanup javadoc code comments

* 🦉 Updates from OwlBot

See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md

* fix checkstyle errors

* 🦉 Updates from OwlBot

See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md

Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
  • Loading branch information
eaball35 and gcf-owl-bot[bot] committed Nov 30, 2021
1 parent 8972f81 commit 2d25655
Show file tree
Hide file tree
Showing 41 changed files with 752 additions and 751 deletions.
Expand Up @@ -26,18 +26,16 @@
* <p>Use {@link #getConnectionStatusCode()} to display the error dialog. Alternatively, use {@link
* #getCause()} to get the wrapped {@link GooglePlayServicesAvailabilityException}. Example usage:
*
* <pre>
* <pre>{@code
* } catch (final GooglePlayServicesAvailabilityIOException availabilityException) {
* myActivity.runOnUiThread(new Runnable() {
* public void run() {
* Dialog dialog = GooglePlayServicesUtil.getErrorDialog(
* availabilityException.getConnectionStatusCode(),
* myActivity,
* MyActivity.REQUEST_GOOGLE_PLAY_SERVICES);
* dialog.show();
* myActivity.runOnUiThread(new Runnable() {
* public void run() {
* Dialog dialog = GooglePlayServicesUtil.getErrorDialog(
* availabilityException.getConnectionStatusCode(),
* myActivity, MyActivity.REQUEST_GOOGLE_PLAY_SERVICES);
* dialog.show();
* }
* });
* </pre>
* }</pre>
*
* @since 1.12
* @author Yaniv Inbar
Expand Down
Expand Up @@ -26,12 +26,12 @@
* <p>Use {@link #getIntent()} to allow user interaction to recover. Alternatively, use {@link
* #getCause()} to get the wrapped {@link UserRecoverableAuthException}. Example usage:
*
* <pre>
* <pre>{@code
* } catch (UserRecoverableAuthIOException userRecoverableException) {
* myActivity.startActivityForResult(
* userRecoverableException.getIntent(), MyActivity.REQUEST_AUTHORIZATION);
* myActivity.startActivityForResult(
* userRecoverableException.getIntent(), MyActivity.REQUEST_AUTHORIZATION);
* }
* </pre>
* }</pre>
*
* @since 1.12
* @author Yaniv Inbar
Expand Down
Expand Up @@ -41,13 +41,13 @@
*
* <p>Sample usage:
*
* <pre>
* public static HttpRequestFactory createRequestFactory(
* HttpTransport transport, JsonFactory jsonFactory, TokenResponse tokenResponse) {
* return transport.createRequestFactory(
* new AppIdentityCredential("https://www.googleapis.com/auth/urlshortener"));
* <pre>{@code
* public static HttpRequestFactory createRequestFactory(HttpTransport transport,
* JsonFactory jsonFactory, TokenResponse tokenResponse) {
* return transport.createRequestFactory(
* new AppIdentityCredential("https://www.googleapis.com/auth/urlshortener"));
* }
* </pre>
* }</pre>
*
* <p>Implementation is immutable and thread-safe.
*
Expand Down
Expand Up @@ -37,7 +37,7 @@
* alternatively call that method instead from your {@link HttpServlet#doPost} with no loss of
* functionality. <b>Sample web.xml setup:</b>
*
* <pre>
* <pre>{@code
* {@literal <}servlet{@literal >}
* {@literal <}servlet-name{@literal >}AppEngineNotificationServlet{@literal <}/servlet-name{@literal >}
* {@literal <}servlet-class{@literal >}com.google.api.client.googleapis.extensions.appengine.notifications.AppEngineNotificationServlet{@literal <}/servlet-class{@literal >}
Expand All @@ -46,7 +46,7 @@
* {@literal <}servlet-name{@literal >}AppEngineNotificationServlet{@literal <}/servlet-name{@literal >}
* {@literal <}url-pattern{@literal >}/notifications{@literal <}/url-pattern{@literal >}
* {@literal <}/servlet-mapping{@literal >}
* </pre>
* }</pre>
*
* @author Yaniv Inbar
* @since 1.16
Expand Down
Expand Up @@ -29,32 +29,32 @@
*
* <p>Implementation should be thread-safe. <b>Example usage:</b>
*
* <pre>
* <pre>{@code
* static class MyNotificationCallback
* extends GsonNotificationCallback{@literal <}ListResponse{@literal >} {
* extends GsonNotificationCallback{@literal <}ListResponse{@literal >} {
*
* private static final long serialVersionUID = 1L;
* private static final long serialVersionUID = 1L;
*
* {@literal @}Override
* protected void onNotification(
* StoredChannel channel, TypedNotification{@literal <}ListResponse{@literal >} notification) {
* ListResponse content = notification.getContent();
* switch (notification.getResourceState()) {
* case ResourceStates.SYNC:
* break;
* case ResourceStates.EXISTS:
* break;
* case ResourceStates.NOT_EXISTS:
* break;
* }
* }
* {@literal @}Override
* protected void onNotification(StoredChannel channel,
* TypedNotification{@literal <}ListResponse{@literal >} notification) {
* ListResponse content = notification.getContent();
* switch (notification.getResourceState()) {
* case ResourceStates.SYNC:
* break;
* case ResourceStates.EXISTS:
* break;
* case ResourceStates.NOT_EXISTS:
* break;
* }
* }
*
* {@literal @}Override
* protected Class{@literal <}ListResponse{@literal >} getDataClass() throws IOException {
* return ListResponse.class;
* }
* {@literal @}Override
* protected Class{@literal <}ListResponse{@literal >} getDataClass() throws IOException {
* return ListResponse.class;
* }
* }
* </pre>
* }</pre>
*
* @param <T> Type of the data contained within a notification
* @author Yaniv Inbar
Expand Down
Expand Up @@ -29,32 +29,32 @@
*
* <p>Implementation should be thread-safe. <b>Example usage:</b>
*
* <pre>
* <pre>{@code
* static class MyNotificationCallback
* extends JacksonNotificationCallback{@literal <}ListResponse{@literal >} {
* extends JacksonNotificationCallback{@literal <}ListResponse{@literal >} {
*
* private static final long serialVersionUID = 1L;
* private static final long serialVersionUID = 1L;
*
* {@literal @}Override
* protected void onNotification(
* StoredChannel channel, TypedNotification{@literal <}ListResponse{@literal >} notification) {
* ListResponse content = notification.getContent();
* switch (notification.getResourceState()) {
* case ResourceStates.SYNC:
* break;
* case ResourceStates.EXISTS:
* break;
* case ResourceStates.NOT_EXISTS:
* break;
* }
* }
* {@literal @}Override
* protected void onNotification(StoredChannel channel,
* TypedNotification{@literal <}ListResponse{@literal >} notification) {
* ListResponse content = notification.getContent();
* switch (notification.getResourceState()) {
* case ResourceStates.SYNC:
* break;
* case ResourceStates.EXISTS:
* break;
* case ResourceStates.NOT_EXISTS:
* break;
* }
* }
*
* {@literal @}Override
* protected Class{@literal <}ListResponse{@literal >} getDataClass() throws IOException {
* return ListResponse.class;
* }
* {@literal @}Override
* protected Class{@literal <}ListResponse{@literal >} getDataClass() throws IOException {
* return ListResponse.class;
* }
* }
* </pre>
* }</pre>
*
* @param <T> Type of the data contained within a notification
* @author Yaniv Inbar
Expand Down
Expand Up @@ -87,19 +87,18 @@ public AbstractGoogleProtoClientRequest<T> setRequestHeaders(HttpHeaders headers
*
* <p>Example usage:
*
* <pre>
*
* <pre>{@code
* request.queue(batchRequest, new BatchCallback{@literal <}SomeResponseType, Void{@literal >}() {
*
* public void onSuccess(SomeResponseType content, HttpHeaders responseHeaders) {
* log("Success");
* }
* public void onSuccess(SomeResponseType content, HttpHeaders responseHeaders) {
* log("Success");
* }
*
* public void onFailure(Void unused, HttpHeaders responseHeaders) {
* log(e.getMessage());
* }
* public void onFailure(Void unused, HttpHeaders responseHeaders) {
* log(e.getMessage());
* }
* });
* </pre>
* }</pre>
*
* @param batchRequest batch request container
* @param callback batch callback
Expand Down
Expand Up @@ -26,47 +26,47 @@
*
* <p>The simplest usage is to use it to set the key parameter:
*
* <pre>
* <pre>{@code
* public static final GoogleClientRequestInitializer KEY_INITIALIZER =
* new CommonGoogleProtoClientRequestInitializer(KEY);
* </pre>
* new CommonGoogleProtoClientRequestInitializer(KEY);
* }</pre>
*
* <p>There is also a constructor to set both the key and userIp parameters:
*
* <pre>
* <pre>{@code
* public static final GoogleClientRequestInitializer INITIALIZER =
* new CommonGoogleProtoClientRequestInitializer(KEY, USER_IP);
* </pre>
* new CommonGoogleProtoClientRequestInitializer(KEY, USER_IP);
* }</pre>
*
* <p>If you want to implement custom logic, extend it like this:
*
* <pre>
* <pre>{@code
* public static class MyRequestInitializer extends CommonGoogleProtoClientRequestInitializer {
*
* {@literal @}Override
* public void initialize(AbstractGoogleProtoClientRequest{@literal <}?{@literal >} request)
* throws IOException {
* // custom logic
* {@literal @}Override
* public void initialize(AbstractGoogleProtoClientRequest{@literal <}?{@literal >} request)
* throws IOException {
* // custom logic
* }
* }
* }
* </pre>
* }</pre>
*
* <p>Finally, to set the key and userIp parameters and insert custom logic, extend it like this:
*
* <pre>
* <pre>{@code
* public static class MyKeyRequestInitializer extends CommonGoogleProtoClientRequestInitializer {
*
* public MyKeyRequestInitializer() {
* super(KEY, USER_IP);
* }
* public MyKeyRequestInitializer() {
* super(KEY, USER_IP);
* }
*
* {@literal @}Override
* public void initializeProtoRequest(
* AbstractGoogleProtoClientRequest{@literal <}?{@literal >} request) throws IOException {
* // custom logic
* }
* {@literal @}Override
* public void initializeProtoRequest(
* AbstractGoogleProtoClientRequest{@literal <}?{@literal >} request) throws IOException {
* // custom logic
* }
* }
* </pre>
* }</pre>
*
* <p>Subclasses should be thread-safe.
*
Expand Down
Expand Up @@ -36,20 +36,20 @@
* may alternatively call that method instead from your {@link HttpServlet#doPost} with no loss of
* functionality. <b>Example usage:</b>
*
* <pre>
* <pre>{@code
* public class MyNotificationServlet extends NotificationServlet {
*
* private static final long serialVersionUID = 1L;
* private static final long serialVersionUID = 1L;
*
* public MyNotificationServlet() throws IOException {
* super(new SomeDataStoreFactory());
* public MyNotificationServlet() throws IOException {
* super(new SomeDataStoreFactory());
* }
* }
* }
* </pre>
* }</pre>
*
* <b>Sample web.xml setup:</b>
*
* <pre>
* <pre>{@code
* {@literal <}servlet{@literal >}
* {@literal <}servlet-name{@literal >}MyNotificationServlet{@literal <}/servlet-name{@literal >}
* {@literal <}servlet-class{@literal >}com.mypackage.MyNotificationServlet{@literal <}/servlet-class{@literal >}
Expand All @@ -58,15 +58,15 @@
* {@literal <}servlet-name{@literal >}MyNotificationServlet{@literal <}/servlet-name{@literal >}
* {@literal <}url-pattern{@literal >}/notifications{@literal <}/url-pattern{@literal >}
* {@literal <}/servlet-mapping{@literal >}
* </pre>
* }</pre>
*
* <p>WARNING: by default it uses {@link MemoryDataStoreFactory#getDefaultInstance()} which means it
* will NOT persist the notification channels when the servlet process dies, so it is a BAD CHOICE
* for a production application. But it is a convenient choice when testing locally, in which case
* you don't need to override it, and can simply reference it directly in your web.xml file. For
* example:
*
* <pre>
* <pre>{@code
* {@literal <}servlet{@literal >}
* {@literal <}servlet-name{@literal >}NotificationServlet{@literal <}/servlet-name{@literal >}
* {@literal <}servlet-class{@literal >}com.google.api.client.googleapis.extensions.servlet.notificationsNotificationServlet{@literal <}/servlet-class{@literal >}
Expand All @@ -75,7 +75,7 @@
* {@literal <}servlet-name{@literal >}NotificationServlet{@literal <}/servlet-name{@literal >}
* {@literal <}url-pattern{@literal >}/notifications{@literal <}/url-pattern{@literal >}
* {@literal <}/servlet-mapping{@literal >}
* </pre>
* }</pre>
*
* @author Yaniv Inbar
* @since 1.16
Expand Down
Expand Up @@ -29,14 +29,12 @@
*
* <p>Sample usage:
*
* <pre>
* <code>
* <pre>{@code
* static void setContent(
* HttpRequest request, XmlNamespaceDictionary namespaceDictionary, Object patchEntry) {
* request.setContent(new AtomPatchContent(namespaceDictionary, patchEntry));
* HttpRequest request, XmlNamespaceDictionary namespaceDictionary, Object patchEntry) {
* request.setContent(new AtomPatchContent(namespaceDictionary, patchEntry));
* }
* </code>
* </pre>
* }</pre>
*
* <p>Implementation is not thread-safe.
*
Expand Down
Expand Up @@ -31,15 +31,14 @@
*
* <p>Sample usage:
*
* <pre>
* <code>
* static void setContent(HttpRequest request, XmlNamespaceDictionary namespaceDictionary,
* Object originalEntry, Object patchedEntry) {
* request.setContent(
* new AtomPatchRelativeToOriginalContent(namespaceDictionary, originalEntry, patchedEntry));
* <pre>{@code
* static void setContent(HttpRequest request,
* XmlNamespaceDictionary namespaceDictionary,
* Object originalEntry, Object patchedEntry) {
* request.setContent(new AtomPatchRelativeToOriginalContent(
* namespaceDictionary, originalEntry, patchedEntry));
* }
* </code>
* </pre>
* }</pre>
*
* @since 1.0
* @author Yaniv Inbar
Expand Down

0 comments on commit 2d25655

Please sign in to comment.