Fix various JSE javadoc documentation bugs

Test: N/A
Change-Id: I32cc9a1ee37a376c16180bfb9c571b79055f2c17
diff --git a/javascriptengine/javascriptengine/src/main/java/androidx/javascriptengine/EvaluationFailedException.java b/javascriptengine/javascriptengine/src/main/java/androidx/javascriptengine/EvaluationFailedException.java
index b42738c..987839a 100644
--- a/javascriptengine/javascriptengine/src/main/java/androidx/javascriptengine/EvaluationFailedException.java
+++ b/javascriptengine/javascriptengine/src/main/java/androidx/javascriptengine/EvaluationFailedException.java
@@ -18,7 +18,9 @@
 
 import androidx.annotation.NonNull;
 
-/** Wrapper for the exception thrown by the JS evaluation engine. */
+/**
+ * Indicates that an evaluation failed due to a syntax error or exception produced by the script.
+ */
 public final class EvaluationFailedException extends JavaScriptException {
     public EvaluationFailedException(@NonNull String error) {
         super(error);
diff --git a/javascriptengine/javascriptengine/src/main/java/androidx/javascriptengine/EvaluationResultSizeLimitExceededException.java b/javascriptengine/javascriptengine/src/main/java/androidx/javascriptengine/EvaluationResultSizeLimitExceededException.java
index e0f04ef..d16c835 100644
--- a/javascriptengine/javascriptengine/src/main/java/androidx/javascriptengine/EvaluationResultSizeLimitExceededException.java
+++ b/javascriptengine/javascriptengine/src/main/java/androidx/javascriptengine/EvaluationResultSizeLimitExceededException.java
@@ -19,9 +19,9 @@
 import androidx.annotation.NonNull;
 
 /**
- * Indicates that a JavaScriptIsolate's evaluation failed due to it returning a oversized result.
+ * Indicates that a JavaScriptIsolate's evaluation failed due to it returning an oversized result.
  * <p>
- * This exception is thrown when exceeding the size limit configured for the isolate via
+ * This exception is produced when exceeding the size limit configured for the isolate via
  * {@link IsolateStartupParameters}, or the default limit.
  * <p>
  * The isolate may continue to be used after this exception has been thrown.
diff --git a/javascriptengine/javascriptengine/src/main/java/androidx/javascriptengine/FileDescriptorIoException.java b/javascriptengine/javascriptengine/src/main/java/androidx/javascriptengine/FileDescriptorIoException.java
index 0fb7570..628569c 100644
--- a/javascriptengine/javascriptengine/src/main/java/androidx/javascriptengine/FileDescriptorIoException.java
+++ b/javascriptengine/javascriptengine/src/main/java/androidx/javascriptengine/FileDescriptorIoException.java
@@ -20,8 +20,8 @@
 
 /**
  * Indicates that streaming JavaScript code into the JS evaluation environment has failed.
- *
- * The JavaScript isolate may continue to be used after this exception has been thrown. The
+ * <p>
+ * The JavaScript isolate may continue to be used after this exception has been produced. The
  * JavaScript evaluation will not proceed if the JavaScript code streaming fails.
  */
 public final class FileDescriptorIoException extends JavaScriptException {
diff --git a/javascriptengine/javascriptengine/src/main/java/androidx/javascriptengine/IsolateStartupParameters.java b/javascriptengine/javascriptengine/src/main/java/androidx/javascriptengine/IsolateStartupParameters.java
index fe7714f..6e5ba95 100644
--- a/javascriptengine/javascriptengine/src/main/java/androidx/javascriptengine/IsolateStartupParameters.java
+++ b/javascriptengine/javascriptengine/src/main/java/androidx/javascriptengine/IsolateStartupParameters.java
@@ -76,7 +76,7 @@
      * {@link IsolateStartupParameters#DEFAULT_MAX_EVALUATION_RETURN_SIZE_BYTES}.
      * <p>
      * If an evaluation exceeds this limit, {@link EvaluationResultSizeLimitExceededException}
-     * is thrown. Errors will be truncated to adhere to this limit.
+     * is produced. Error messages will be truncated to adhere to this limit.
      *
      * @param size max size in bytes
      */
diff --git a/javascriptengine/javascriptengine/src/main/java/androidx/javascriptengine/IsolateState.java b/javascriptengine/javascriptengine/src/main/java/androidx/javascriptengine/IsolateState.java
index 6ef73ba..9538e09 100644
--- a/javascriptengine/javascriptengine/src/main/java/androidx/javascriptengine/IsolateState.java
+++ b/javascriptengine/javascriptengine/src/main/java/androidx/javascriptengine/IsolateState.java
@@ -61,14 +61,14 @@
     /**
      * Check whether the current state is permitted to transition to a dead state
      *
-     * @return true iff a transition to a dead state is permitted.
+     * @return true iff a transition to a dead state is permitted
      */
     boolean canDie();
 
     /**
      * Method to run after this state has been replaced by a dead state.
      *
-     * @param terminationInfo The termination info describing the death.
+     * @param terminationInfo the termination info describing the death
      */
     default void onDied(@NonNull TerminationInfo terminationInfo) {}
 
diff --git a/javascriptengine/javascriptengine/src/main/java/androidx/javascriptengine/IsolateTerminatedException.java b/javascriptengine/javascriptengine/src/main/java/androidx/javascriptengine/IsolateTerminatedException.java
index 84ea3ab..42e30d3 100644
--- a/javascriptengine/javascriptengine/src/main/java/androidx/javascriptengine/IsolateTerminatedException.java
+++ b/javascriptengine/javascriptengine/src/main/java/androidx/javascriptengine/IsolateTerminatedException.java
@@ -22,17 +22,17 @@
 import java.util.concurrent.Executor;
 
 /**
- * Exception thrown when evaluation is terminated due to the {@link JavaScriptIsolate} being closed
- * or due to some crash.
+ * Exception produced when evaluation is terminated due to the {@link JavaScriptIsolate} being
+ * closed or due to some crash.
  * <p>
- * Calling {@link JavaScriptIsolate#close()} will cause this exception to be thrown for all
+ * Calling {@link JavaScriptIsolate#close()} will cause this exception to be produced for all
  * previously requested but pending evaluations.
  * <p>
  * If an isolate has crashed (but not been closed), subsequently requested evaluations will fail
  * immediately with an IsolateTerminatedException (or a subclass) consistent with that
  * used for evaluations submitted before the crash.
  * <p>
- * Note that this exception will not be thrown if the isolate has been explicitly closed before a
+ * Note that this exception will not be produced if the isolate has been explicitly closed before a
  * call to {@link JavaScriptIsolate#evaluateJavaScriptAsync(String)}, which will instead immediately
  * throw an IllegalStateException (and not asynchronously via a future). This applies even if the
  * isolate was closed following a crash.
diff --git a/javascriptengine/javascriptengine/src/main/java/androidx/javascriptengine/IsolateUsableState.java b/javascriptengine/javascriptengine/src/main/java/androidx/javascriptengine/IsolateUsableState.java
index 56ec56f..89a91ef 100644
--- a/javascriptengine/javascriptengine/src/main/java/androidx/javascriptengine/IsolateUsableState.java
+++ b/javascriptengine/javascriptengine/src/main/java/androidx/javascriptengine/IsolateUsableState.java
@@ -478,8 +478,8 @@
 
     /**
      * Kill the sandbox and update state.
-     * @param e The exception causing us to kill the sandbox.
-     * @return TerminationInfo that has been set on the isolate.
+     * @param e the exception causing us to kill the sandbox
+     * @return terminationInfo that has been set on the isolate
      */
     @NonNull
     private TerminationInfo killSandbox(@NonNull Exception e) {
@@ -494,8 +494,8 @@
 
     /**
      * Kill the sandbox, update state, and return a RuntimeException.
-     * @param e The original exception causing us to kill the sandbox.
-     * @return A runtime exception which may optionally be thrown.
+     * @param e the original exception causing us to kill the sandbox
+     * @return a runtime exception which may optionally be thrown
      */
     @NonNull
     private RuntimeException killSandboxAndGetRuntimeException(@NonNull Exception e) {
diff --git a/javascriptengine/javascriptengine/src/main/java/androidx/javascriptengine/JavaScriptConsoleCallback.java b/javascriptengine/javascriptengine/src/main/java/androidx/javascriptengine/JavaScriptConsoleCallback.java
index b854ddd..d3b4cea 100644
--- a/javascriptengine/javascriptengine/src/main/java/androidx/javascriptengine/JavaScriptConsoleCallback.java
+++ b/javascriptengine/javascriptengine/src/main/java/androidx/javascriptengine/JavaScriptConsoleCallback.java
@@ -81,12 +81,12 @@
 
         /**
          * Construct a new ConsoleMessage
-         * @param level The message (error/verbosity) level.
-         * @param message The message body.
-         * @param source The source file/expression where the message was generated.
-         * @param line Line number of where the message was generated.
-         * @param column Column number of where the message was generated.
-         * @param trace Stack trace of where the message was generated, if available.
+         * @param level the message (error/verbosity) level
+         * @param message the message body
+         * @param source the source file/expression where the message was generated
+         * @param line line number of where the message was generated
+         * @param column column number of where the message was generated
+         * @param trace stack trace of where the message was generated, if available
          */
         public ConsoleMessage(@Level int level, @NonNull String message, @NonNull String source,
                 int line, int column, @Nullable String trace) {
@@ -122,31 +122,49 @@
          * <p>
          * ConsoleMessages can be filtered by level using a bitmask of the desired levels. However,
          * any ConsoleMessage will only have one level associated with it.
+         *
+         * @return the log level
          */
         @Level
         public int getLevel() {
             return mLevel;
         }
 
-        /** Return the message body */
+        /**
+         * Return the message body
+         *
+         * @return the message body
+         */
         @NonNull
         public String getMessage() {
             return mMessage;
         }
 
-        /** Return the source file/expression name */
+        /**
+         * Return the source file/expression name
+         *
+         * @return the source file/expression name
+         */
         @NonNull
         @RestrictTo(RestrictTo.Scope.LIBRARY)
         public String getSource() {
             return mSource;
         }
 
-        /** Return the line number producing the message */
+        /**
+         * Return the line number producing the message
+         *
+         * @return the line number producing the message
+         */
         public int getLine() {
             return mLine;
         }
 
-        /** Return the column number producing the message */
+        /**
+         * Return the column number producing the message
+         *
+         * @return the column number producing the message
+         */
         public int getColumn() {
             return mColumn;
         }
@@ -158,6 +176,8 @@
          * messages may originate from outside of an evaluation (where a stack trace would not make
          * sense), or may be omitted for performance reasons. A stack trace is not guaranteed to be
          * complete if present. The precise formatting of the trace is not defined.
+         *
+         * @return a stringified stack trace
          */
         @Nullable
         @RestrictTo(RestrictTo.Scope.LIBRARY)
@@ -171,6 +191,8 @@
          * <p>
          * Do not try to parse the result of this method as its format may change across
          * JavaScriptEngine versions.
+         *
+         * @return a string representation of this console message
          */
         @NonNull
         @Override
diff --git a/javascriptengine/javascriptengine/src/main/java/androidx/javascriptengine/JavaScriptException.java b/javascriptengine/javascriptengine/src/main/java/androidx/javascriptengine/JavaScriptException.java
index da93785..1044461 100644
--- a/javascriptengine/javascriptengine/src/main/java/androidx/javascriptengine/JavaScriptException.java
+++ b/javascriptengine/javascriptengine/src/main/java/androidx/javascriptengine/JavaScriptException.java
@@ -19,7 +19,7 @@
 import androidx.annotation.NonNull;
 
 /**
- * Super class for all exceptions resolved by
+ * Super class for all asynchronous exceptions produced by
  * {@link JavaScriptIsolate#evaluateJavaScriptAsync(String)}.
  */
 public class JavaScriptException extends Exception {
diff --git a/javascriptengine/javascriptengine/src/main/java/androidx/javascriptengine/JavaScriptIsolate.java b/javascriptengine/javascriptengine/src/main/java/androidx/javascriptengine/JavaScriptIsolate.java
index eea5139..d45f6a3 100644
--- a/javascriptengine/javascriptengine/src/main/java/androidx/javascriptengine/JavaScriptIsolate.java
+++ b/javascriptengine/javascriptengine/src/main/java/androidx/javascriptengine/JavaScriptIsolate.java
@@ -162,7 +162,7 @@
      * <p>
      * See {@link #maybeSetIsolateDead(TerminationInfo)} for additional information.
      *
-     * @return the generated termination info if it was set, or null if the state did not change.
+     * @return the generated termination info if it was set, or null if the state did not change
      */
     @Nullable
     TerminationInfo maybeSetSandboxDead() {
@@ -182,15 +182,15 @@
      * <p>
      * There are 3 possible behaviors based on the output of the expression:
      * <ul>
-     *   <li><strong>If the JS expression returns a JS String</strong>, then the Java Future
-     * resolves to Java String.</li>
-     *   <li><strong>If the JS expression returns a JS Promise</strong>,
+     *   <li><strong>If the JS expression evaluates to a JS String</strong>, then the Java Future
+     * resolves to a Java String.</li>
+     *   <li><strong>If the JS expression evaluates to a JS Promise</strong>,
      * and if {@link JavaScriptSandbox#isFeatureSupported(String)} for
-     * {@link JavaScriptSandbox#JS_FEATURE_PROMISE_RETURN} returns {@code true}, Java Future
-     * resolves to Java String once the promise resolves. If it returns {@code false}, then the
-     * Future resolves to an empty string.</li>
-     *   <li><strong>If the JS expression returns another data type</strong>, then Java Future
-     * resolves to empty Java String.</li>
+     * {@link JavaScriptSandbox#JS_FEATURE_PROMISE_RETURN} returns {@code true}, the Java Future
+     * resolves to a Java String once the promise resolves. If it returns {@code false}, then the
+     * Future resolves to an empty Java string.</li>
+     *   <li><strong>If the JS expression evaluates to another data type</strong>, then the Java
+     * Future resolves to an empty Java String.</li>
      * </ul>
      * The environment uses a single JS global object for all the calls to
      * evaluateJavaScriptAsync(String) and {@link #provideNamedData(String, byte[])} methods.
@@ -203,10 +203,9 @@
      * If {@link JavaScriptSandbox#isFeatureSupported(String)} for
      * {@link JavaScriptSandbox#JS_FEATURE_EVALUATE_WITHOUT_TRANSACTION_LIMIT} returns {@code
      * false},
-     * the size of the expression to be evaluated and the return/error value is limited by the
+     * the size of the expression to be evaluated and the result/error value is limited by the
      * binder transaction limit ({@link android.os.TransactionTooLargeException}). If it returns
-     * {@code true}, they are not limited by the binder
-     * transaction limit but are bound by
+     * {@code true}, they are not limited by the binder transaction limit but are bound by
      * {@link IsolateStartupParameters#setMaxEvaluationReturnSizeBytes(int)} with a default size
      * of {@link IsolateStartupParameters#DEFAULT_MAX_EVALUATION_RETURN_SIZE_BYTES}.
      * <p>
@@ -216,8 +215,8 @@
      * @param code JavaScript code to evaluate. The script should return a JavaScript String or,
      *             alternatively, a Promise that will resolve to a String if
      *             {@link JavaScriptSandbox#JS_FEATURE_PROMISE_RETURN} is supported.
-     * @return Future that evaluates to the result String of the evaluation or exceptions (see
-     * {@link JavaScriptException} and subclasses) if there is an error.
+     * @return a Future that evaluates to the result String of the evaluation or an exception (see
+     * {@link JavaScriptException} and subclasses) if there is an error
      */
     @NonNull
     public ListenableFuture<String> evaluateJavaScriptAsync(@NonNull String code) {
@@ -236,18 +235,17 @@
      * <p>
      * This API exposes the underlying file to the service. In case the service process is
      * compromised for unforeseen reasons, it might be able to read from the {@code
-     * AssetFileDescriptor} beyond the given length and offset.  This API does <strong> not
+     * AssetFileDescriptor} beyond the given length and offset.  This API does <strong>not
      * </strong> close the given {@code AssetFileDescriptor}.
      * <p>
-     * <strong>Note: The underlying file must be UTF-8 encoded.</strong>
+     * <strong>Note: The underlying file data must be UTF-8 encoded.</strong>
      * <p>
-     * This overload is useful when the source of the data is easily readable as a
+     * This overload is useful when the source of the data is easily readable as an
      * {@code AssetFileDescriptor}, e.g. an asset or raw resource.
      *
-     * @param afd An {@code AssetFileDescriptor} for a file containing UTF-8 encoded JavaScript
-     *            code that is evaluated. Returns a String or a Promise of a String in case
-     *            {@link JavaScriptSandbox#JS_FEATURE_PROMISE_RETURN} is supported
-     * @return Future that evaluates to the result String of the evaluation or exceptions (see
+     * @param afd an {@code AssetFileDescriptor} for a file containing UTF-8 encoded JavaScript
+     *            code to be evaluated
+     * @return a Future that evaluates to the result String of the evaluation or an exception (see
      * {@link JavaScriptException} and subclasses) if there is an error
      */
     @SuppressWarnings("NullAway")
@@ -270,18 +268,17 @@
      * <p>
      * This API exposes the underlying file to the service. In case the service process is
      * compromised for unforeseen reasons, it might be able to read from the {@code
-     * ParcelFileDescriptor} beyond the given length and offset. This API does <strong> not
+     * ParcelFileDescriptor} beyond the given length and offset. This API does <strong>not
      * </strong> close the given {@code ParcelFileDescriptor}.
      * <p>
-     * <strong>Note: The underlying file must be UTF-8 encoded.</strong>
+     * <strong>Note: The underlying file data must be UTF-8 encoded.</strong>
      * <p>
      * This overload is useful when the source of the data is easily readable as a
      * {@code ParcelFileDescriptor}, e.g. a file from shared memory or the app's data directory.
      *
-     * @param pfd A {@code ParcelFileDescriptor} for a file containing UTF-8 encoded JavaScript
-     *            code that is evaluated. Returns a String or a Promise of a String in case
-     *             {@link JavaScriptSandbox#JS_FEATURE_PROMISE_RETURN} is supported
-     * @return Future that evaluates to the result String of the evaluation or exceptions (see
+     * @param pfd a {@code ParcelFileDescriptor} for a file containing UTF-8 encoded JavaScript
+     *            code that is evaluated
+     * @return a Future that evaluates to the result String of the evaluation or an exception (see
      * {@link JavaScriptException} and subclasses) if there is an error
      */
     @SuppressWarnings("NullAway")
@@ -366,12 +363,12 @@
      * {@link JavaScriptSandbox#isFeatureSupported(String)}
      * returns true for {@link JavaScriptSandbox#JS_FEATURE_PROVIDE_CONSUME_ARRAY_BUFFER}.
      *
-     * @param name       Identifier for the data that is passed, the same identifier should be used
-     *                   in the JavaScript environment to refer to the data
-     * @param inputBytes Bytes to be passed into the JavaScript environment. This array must not be
+     * @param name       identifier for the data that is passed. The same identifier should be used
+     *                   in the JavaScript environment to refer to the data.
+     * @param inputBytes bytes to be passed into the JavaScript environment. This array must not be
      *                   modified until the JavaScript promise returned by
      *                   consumeNamedDataAsArrayBuffer has resolved (or rejected).
-     * @throws IllegalStateException if the name has previously been used in the isolate.
+     * @throws IllegalStateException if the name has previously been used in the isolate
      */
     @RequiresFeature(name = JavaScriptSandbox.JS_FEATURE_PROVIDE_CONSUME_ARRAY_BUFFER,
             enforcement = "androidx.javascriptengine.JavaScriptSandbox#isFeatureSupported")
@@ -415,8 +412,8 @@
      * Note that delayed console messages may continue to be delivered after the isolate has been
      * closed (or has crashed).
      *
-     * @param executor Executor for running callback methods.
-     * @param callback Callback implementing console logging behaviour.
+     * @param executor the executor for running callback methods
+     * @param callback the callback implementing console logging behaviour
      */
     @RequiresFeature(name = JavaScriptSandbox.JS_FEATURE_CONSOLE_MESSAGING,
             enforcement = "androidx.javascriptengine.JavaScriptSandbox#isFeatureSupported")
@@ -435,7 +432,7 @@
      * This is the same as calling {@link #setConsoleCallback(Executor, JavaScriptConsoleCallback)}
      * using the main executor of the context used to create the {@link JavaScriptSandbox} object.
      *
-     * @param callback Callback implementing console logging behaviour.
+     * @param callback the callback implementing console logging behaviour
      */
     @RequiresFeature(name = JavaScriptSandbox.JS_FEATURE_CONSOLE_MESSAGING,
             enforcement = "androidx.javascriptengine.JavaScriptSandbox#isFeatureSupported")
@@ -473,9 +470,9 @@
      * Closing an isolate via {@link #close()} is not considered a crash, even if there are
      * unresolved evaluations, and will not trigger termination callbacks.
      *
-     * @param executor Executor with which to run callback.
-     * @param callback Consumer to be called with TerminationInfo when a crash occurs.
-     * @throws IllegalStateException if the callback is already registered (using any executor).
+     * @param executor the executor with which to run callback
+     * @param callback the consumer to be called with TerminationInfo when a crash occurs
+     * @throws IllegalStateException if the callback is already registered (using any executor)
      */
     @SuppressLint("RegistrationName")
     public void addOnTerminatedCallback(@NonNull Executor executor,
@@ -493,8 +490,8 @@
      * This is the same as calling {@link #addOnTerminatedCallback(Executor, Consumer)} using the
      * main executor of the context used to create the {@link JavaScriptSandbox} object.
      *
-     * @param callback Consumer to be called with TerminationInfo when a crash occurs.
-     * @throws IllegalStateException if the callback is already registered (using any executor).
+     * @param callback the consumer to be called with TerminationInfo when a crash occurs
+     * @throws IllegalStateException if the callback is already registered (using any executor)
      */
     @SuppressLint("RegistrationName")
     public void addOnTerminatedCallback(@NonNull Consumer<TerminationInfo> callback) {
@@ -504,7 +501,7 @@
     /**
      * Remove a callback previously registered with addOnTerminatedCallback.
      *
-     * @param callback The callback to unregister, if currently registered.
+     * @param callback the callback to unregister, if currently registered
      */
     @SuppressLint("RegistrationName")
     public void removeOnTerminatedCallback(@NonNull Consumer<TerminationInfo> callback) {
diff --git a/javascriptengine/javascriptengine/src/main/java/androidx/javascriptengine/JavaScriptSandbox.java b/javascriptengine/javascriptengine/src/main/java/androidx/javascriptengine/JavaScriptSandbox.java
index b35dbd2..3fdbbfb 100644
--- a/javascriptengine/javascriptengine/src/main/java/androidx/javascriptengine/JavaScriptSandbox.java
+++ b/javascriptengine/javascriptengine/src/main/java/androidx/javascriptengine/JavaScriptSandbox.java
@@ -75,8 +75,8 @@
  * class. This provides a security boundary between the calling app and the Javascript execution
  * environment.
  * <p>
- * The calling app can only have only one isolated process at a time, so only one
- * instance of this object can exist at a time.
+ * The calling app can have only one isolated process at a time, so only one
+ * instance of this class can be open at any given time.
  * <p>
  * It's safe to share a single {@link JavaScriptSandbox}
  * object with multiple threads and use it from multiple threads at once.
@@ -137,7 +137,7 @@
             });
 
     /**
-     *
+     * A client-side feature, which may be conditional on one or more service-side features.
      */
     @RestrictTo(RestrictTo.Scope.LIBRARY)
     @StringDef(value =
@@ -168,8 +168,8 @@
      * <p>
      * Irrespective of this feature, calling {@link JavaScriptSandbox#close()} terminates all
      * {@link JavaScriptIsolate} objects (and the isolated process) immediately and all pending
-     * {@link JavaScriptIsolate#evaluateJavaScriptAsync(String)} futures resolve with {@link
-     * IsolateTerminatedException}.
+     * {@link JavaScriptIsolate#evaluateJavaScriptAsync(String)} futures resolve with
+     * {@link IsolateTerminatedException}.
      */
     public static final String JS_FEATURE_ISOLATE_TERMINATION = "JS_FEATURE_ISOLATE_TERMINATION";
 
@@ -239,8 +239,10 @@
             "JS_FEATURE_ISOLATE_CLIENT";
 
     /**
+     * Feature for {@link #isFeatureSupported(String)}.
+     * <p>
      * When this feature is present,
-     * {@link JavaScriptIsolate#evaluateJavaScriptAsync(android.content.res.AssetFileDescriptor)},
+     * {@link JavaScriptIsolate#evaluateJavaScriptAsync(android.content.res.AssetFileDescriptor)}
      * and {@link JavaScriptIsolate#evaluateJavaScriptAsync(android.os.ParcelFileDescriptor)}
      * can be used to evaluate JavaScript code of known and unknown length from file descriptors.
      */
@@ -335,11 +337,10 @@
      * Sandbox support should be checked using {@link JavaScriptSandbox#isSupported()} before
      * attempting to create a sandbox via this method.
      *
-     * @param context When the context is destroyed, the connection is closed. Use an
-     *                application
-     *                context if the connection is expected to outlive a single activity or service.
-     * @return Future that evaluates to a connected {@link JavaScriptSandbox} instance or an
-     * exception if binding to service fails.
+     * @param context the Context for the sandbox. Use an application context if the connection
+     *                is expected to outlive a single activity or service.
+     * @return a Future that evaluates to a connected {@link JavaScriptSandbox} instance or an
+     * exception if binding to service fails
      */
     @NonNull
     public static ListenableFuture<JavaScriptSandbox> createConnectedInstanceAsync(
@@ -363,11 +364,10 @@
      * Only one sandbox process can exist at a time. Attempting to create a new instance before
      * the previous instance has been closed will fail with an {@link IllegalStateException}.
      *
-     * @param context When the context is destroyed, the connection will be closed. Use an
-     *                application
-     *                context if the connection is expected to outlive a single activity/service.
-     * @return Future that evaluates to a connected {@link JavaScriptSandbox} instance or an
-     * exception if binding to service fails.
+     * @param context the Context for the sandbox. Use an application context if the connection
+     *                is expected to outlive a single activity or service.
+     * @return a Future that evaluates to a connected {@link JavaScriptSandbox} instance or an
+     * exception if binding to service fails
      */
     @NonNull
     @VisibleForTesting
@@ -386,7 +386,7 @@
      * This method should be used to check for sandbox support before calling
      * {@link JavaScriptSandbox#createConnectedInstanceAsync(Context)}.
      *
-     * @return true if JavaScriptSandbox is supported and false otherwise.
+     * @return true if JavaScriptSandbox is supported and false otherwise
      */
     public static boolean isSupported() {
         PackageInfo systemWebViewPackage = WebView.getCurrentWebViewPackage();
@@ -454,8 +454,10 @@
     }
 
     /**
-     * Creates and returns an {@link JavaScriptIsolate} within which JS can be executed with default
+     * Creates and returns a {@link JavaScriptIsolate} within which JS can be executed with default
      * settings.
+     *
+     * @return a new JavaScriptIsolate
      */
     @NonNull
     public JavaScriptIsolate createIsolate() {
@@ -463,13 +465,14 @@
     }
 
     /**
-     * Creates and returns an {@link JavaScriptIsolate} within which JS can be executed with the
+     * Creates and returns a {@link JavaScriptIsolate} within which JS can be executed with the
      * specified settings.
      * <p>
      * If the sandbox is dead, this will still return an isolate, but evaluations will fail with
      * {@link SandboxDeadException}.
      *
-     * @param settings configuration used to set up the isolate
+     * @param settings the configuration for the isolate
+     * @return a new JavaScriptIsolate
      */
     @NonNull
     public JavaScriptIsolate createIsolate(@NonNull IsolateStartupParameters settings) {
@@ -559,7 +562,7 @@
      * <p>
      * A feature check should be made prior to depending on certain features.
      *
-     * @param feature feature to be checked
+     * @param feature the feature to be checked
      * @return {@code true} if supported, {@code false} otherwise
      */
     public boolean isFeatureSupported(@JsSandboxFeature @NonNull String feature) {
diff --git a/javascriptengine/javascriptengine/src/main/java/androidx/javascriptengine/StreamingFailedException.java b/javascriptengine/javascriptengine/src/main/java/androidx/javascriptengine/StreamingFailedException.java
index c9af354..4b30265 100644
--- a/javascriptengine/javascriptengine/src/main/java/androidx/javascriptengine/StreamingFailedException.java
+++ b/javascriptengine/javascriptengine/src/main/java/androidx/javascriptengine/StreamingFailedException.java
@@ -21,7 +21,7 @@
 
 /**
  * Indicates that streaming JavaScript code into the JS evaluation environment has failed.
- *
+ * <p>
  * The JavaScript isolate may continue to be used after this exception has been thrown. The
  * JavaScript evaluation will not proceed if the JavaScript code streaming fails.
  */
diff --git a/javascriptengine/javascriptengine/src/main/java/androidx/javascriptengine/TerminationInfo.java b/javascriptengine/javascriptengine/src/main/java/androidx/javascriptengine/TerminationInfo.java
index db18013..5b6c53f 100644
--- a/javascriptengine/javascriptengine/src/main/java/androidx/javascriptengine/TerminationInfo.java
+++ b/javascriptengine/javascriptengine/src/main/java/androidx/javascriptengine/TerminationInfo.java
@@ -73,7 +73,7 @@
      * <p>
      * New status codes may be added with new JavaScriptEngine versions.
      *
-     * @return status code of the termination.
+     * @return the status code of the termination
      */
     @Status
     public int getStatus() {
@@ -84,7 +84,7 @@
      * Describe the status code of the termination.
      * These strings are not stable between JavaScriptEngine versions.
      *
-     * @return description of status code of the termination.
+     * @return a description of the status code of the termination
      */
     @NonNull
     public String getStatusString() {
@@ -104,7 +104,7 @@
      * Get the message associated with this termination.
      * The content or format of these messages is not stable between JavaScriptEngine versions.
      *
-     * @return Human-readable message about the termination.
+     * @return a human-readable message about the termination
      */
     @NonNull
     public String getMessage() {
@@ -115,7 +115,7 @@
      * Describe the termination.
      * The content or format of this description is not stable between JavaScriptEngine versions.
      *
-     * @return Human-readable description of the termination.
+     * @return a human-readable description of the termination
      */
     @NonNull
     @Override