Bug 1642429 - Use checkstyle to enforce that all API methods have docs. r=esawin,snorp
authorAgi Sferro <agi@sferro.dev>
Tue, 02 Jun 2020 15:05:13 +0000
changeset 597608 d29525eebe79ccc056a9e7bb668fd1007934f731
parent 597607 d5cc480a68830eb9f3c30042331092857810e9df
child 597609 a8654b179f2bfce9a4b6698d16583510458afeb7
push id13310
push userffxbld-merge
push dateMon, 29 Jun 2020 14:50:06 +0000
treeherdermozilla-beta@15a59a0afa5c [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersesawin, snorp
bugs1642429
milestone79.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1642429 - Use checkstyle to enforce that all API methods have docs. r=esawin,snorp Differential Revision: https://phabricator.services.mozilla.com/D77693
mobile/android/geckoview/build.gradle
mobile/android/geckoview/checkstyle-suppressions.xml
mobile/android/geckoview/checkstyle.xml
mobile/android/geckoview/src/main/java/org/mozilla/geckoview/Autocomplete.java
mobile/android/geckoview/src/main/java/org/mozilla/geckoview/Autofill.java
mobile/android/geckoview/src/main/java/org/mozilla/geckoview/BasicSelectionActionDelegate.java
mobile/android/geckoview/src/main/java/org/mozilla/geckoview/ContentBlocking.java
mobile/android/geckoview/src/main/java/org/mozilla/geckoview/GeckoResult.java
mobile/android/geckoview/src/main/java/org/mozilla/geckoview/GeckoRuntime.java
mobile/android/geckoview/src/main/java/org/mozilla/geckoview/GeckoRuntimeSettings.java
mobile/android/geckoview/src/main/java/org/mozilla/geckoview/GeckoSession.java
mobile/android/geckoview/src/main/java/org/mozilla/geckoview/GeckoSessionSettings.java
mobile/android/geckoview/src/main/java/org/mozilla/geckoview/GeckoView.java
mobile/android/geckoview/src/main/java/org/mozilla/geckoview/RuntimeSettings.java
mobile/android/geckoview/src/main/java/org/mozilla/geckoview/SessionAccessibility.java
mobile/android/geckoview/src/main/java/org/mozilla/geckoview/WebExtension.java
mobile/android/geckoview/src/main/java/org/mozilla/geckoview/WebPushSubscription.java
--- a/mobile/android/geckoview/build.gradle
+++ b/mobile/android/geckoview/build.gradle
@@ -343,23 +343,27 @@ android.libraryVariants.all { variant ->
         classifier 'sources'
         description = "Generate Javadoc for build variant $name"
         destinationDir = new File(destinationDir, variant.baseName)
         from files(variant.javaCompileProvider.get().source)
     }
 
     task("checkstyle${name.capitalize()}", type: Checkstyle) {
         classpath = variant.javaCompileProvider.get().classpath
-        configFile file("checkstyle.xml")
         // TODO: cleanup and include all sources
         source = ['src/main/java/']
         include '**/*.java'
     }
 }
 
+checkstyle {
+    configDir = file(".")
+    configFile = file("checkstyle.xml")
+}
+
 android.libraryVariants.all { variant ->
     if (variant.name == mozconfig.substs.GRADLE_ANDROID_GECKOVIEW_VARIANT_NAME) {
         configureLibraryVariantWithJNIWrappers(variant, "Generated")
     }
 }
 
 android.libraryVariants.all { variant ->
     // At this point, the Android-Gradle plugin has created all the Android
new file mode 100644
--- /dev/null
+++ b/mobile/android/geckoview/checkstyle-suppressions.xml
@@ -0,0 +1,13 @@
+<?xml version="1.0"?>
+<!-- This Source Code Form is subject to the terms of the Mozilla Public
+   - License, v. 2.0. If a copy of the MPL was not distributed with this
+   - file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
+
+<!DOCTYPE suppressions PUBLIC
+  "-//Checkstyle//DTD SuppressionFilter Configuration 1.2//EN"
+  "https://checkstyle.org/dtds/suppressions_1_2.dtd">
+
+<suppressions>
+  <suppress checks="JavadocMethod"
+    files="org[/\\]mozilla[/\\]gecko[/\\]"/>
+</suppressions>
--- a/mobile/android/geckoview/checkstyle.xml
+++ b/mobile/android/geckoview/checkstyle.xml
@@ -15,26 +15,36 @@
     </module>
 
     <!-- Disallow trailing whitespace -->
     <module name="RegexpSingleline">
         <property name="format" value="\s+$"/>
         <property name="message" value="Trailing whitespace"/>
     </module>
 
+    <module name="SuppressionFilter">
+      <property name="file" value="${config_loc}/checkstyle-suppressions.xml"/>
+      <property name="optional" value="false"/>
+    </module>
+
     <module name="TreeWalker">
         <module name="FinalParameters"/>
         <module name="ParameterName"/>
         <module name="StaticVariableName"/>
         <module name="LeftCurly"/>
         <module name="RightCurly"/>
         <module name="Indentation"/>
         <module name="OneStatementPerLine"/>
         <module name="AvoidStarImport"/>
         <module name="UnusedImports"/>
+        <module name="SuppressWarningsHolder"/>
+        <module name="JavadocMethod">
+          <property name="id" value="checkstyle:javadocmethod"/>
+          <property name="scope" value="public"/>
+        </module>
 
         <module name="MemberName">
             <!-- Private members must use mHungarianNotation -->
             <property name="format" value="m[A-Z][A-Za-z]*$"/>
             <property name="applyToPrivate" value="true" />
             <property name="applyToPublic" value="false" />
             <property name="applyToPackage" value="false" />
             <property name="applyToProtected" value="false" />
@@ -59,9 +69,10 @@
         <module name="WhitespaceAround">
             <property name="allowEmptyConstructors" value="true"/>
             <property name="allowEmptyMethods" value="true"/>
             <property name="allowEmptyTypes" value="true"/>
         </module>
         <module name="OneTopLevelClass"/>
     </module>
 
+    <module name="SuppressWarningsFilter"/>
 </module>
--- a/mobile/android/geckoview/src/main/java/org/mozilla/geckoview/Autocomplete.java
+++ b/mobile/android/geckoview/src/main/java/org/mozilla/geckoview/Autocomplete.java
@@ -235,16 +235,17 @@ public class Autocomplete {
             private final GeckoBundle mBundle;
 
             @AnyThread
             /* package */ Builder(final @NonNull GeckoBundle bundle) {
                 mBundle = new GeckoBundle(bundle);
             }
 
             @AnyThread
+            @SuppressWarnings("checkstyle:javadocmethod")
             public Builder() {
                 mBundle = new GeckoBundle(6);
             }
 
             /**
              * Finalize the {@link LoginEntry} instance.
              *
              * @return The {@link LoginEntry} instance.
@@ -407,41 +408,44 @@ public class Autocomplete {
      */
     public abstract static class Option<T> {
         /* package */ static final String VALUE_KEY = "value";
         /* package */ static final String HINT_KEY = "hint";
 
         public final @NonNull T value;
         public final int hint;
 
+        @SuppressWarnings("checkstyle:javadocmethod")
         public Option(final @NonNull T value, final int hint) {
             this.value = value;
             this.hint = hint;
         }
 
         @AnyThread
         /* package */ abstract @NonNull GeckoBundle toBundle();
     }
 
     /**
      * Abstract base class for saving options.
      * Extended by {@link Autocomplete.LoginSaveOption}.
      */
     public abstract static class SaveOption<T> extends Option<T> {
 
+        @SuppressWarnings("checkstyle:javadocmethod")
         public SaveOption(final @NonNull T value, final int hint) {
             super(value, hint);
         }
     }
 
     /**
      * Abstract base class for saving options.
      * Extended by {@link Autocomplete.LoginSelectOption}.
      */
     public abstract static class SelectOption<T> extends Option<T> {
+        @SuppressWarnings("checkstyle:javadocmethod")
         public SelectOption(
                 final @NonNull T value,
                 final int hint) {
             super(value, hint);
         }
 
         @Override
         public String toString() {
--- a/mobile/android/geckoview/src/main/java/org/mozilla/geckoview/Autofill.java
+++ b/mobile/android/geckoview/src/main/java/org/mozilla/geckoview/Autofill.java
@@ -78,16 +78,17 @@ public class Autofill {
         public static final int NODE_FOCUSED = 6;
 
         /**
          * A node within the autofill session has lost focus.
          */
         public static final int NODE_BLURRED = 7;
 
         @AnyThread
+        @SuppressWarnings("checkstyle:javadocmethod")
         public static @Nullable String toString(
                 final @AutofillNotify int notification) {
             final String[] map = new String[] {
                 "SESSION_STARTED", "SESSION_COMMITTED", "SESSION_CANCELED",
                 "NODE_ADDED", "NODE_REMOVED", "NODE_UPDATED", "NODE_FOCUSED",
                 "NODE_BLURRED" };
             if (notification < 0 || notification >= map.length) {
                 return null;
@@ -132,16 +133,17 @@ public class Autofill {
         public static final int URI = 2;
 
         /**
          * Hint indicating that a node represents a username.
          */
         public static final int USERNAME = 3;
 
         @AnyThread
+        @SuppressWarnings("checkstyle:javadocmethod")
         public static @Nullable String toString(final @AutofillHint int hint) {
             final int idx = hint + 1;
             final String[] map = new String[] {
                 "NONE", "EMAIL", "PASSWORD", "URI", "USERNAME" };
 
             if (idx < 0 || idx >= map.length) {
                 return null;
             }
@@ -176,16 +178,17 @@ public class Autofill {
 
         /**
          * Indicates that a node is a phone input type.
          * Example: {@code <input type="tel">}
          */
         public static final int PHONE = 2;
 
         @AnyThread
+        @SuppressWarnings("checkstyle:javadocmethod")
         public static @Nullable String toString(
                 final @AutofillInputType int type) {
             final int idx = type + 1;
             final String[] map = new String[] {
                 "NONE", "TEXT", "NUMBER", "PHONE" };
 
             if (idx < 0 || idx >= map.length) {
                 return null;
@@ -215,16 +218,17 @@ public class Autofill {
         private int mFocusedRootId = View.NO_ID;
 
         /* package */ Session(@NonNull final GeckoSession geckoSession) {
             mGeckoSession = geckoSession;
             clear();
         }
 
         @AnyThread
+        @SuppressWarnings("checkstyle:javadocmethod")
         public @NonNull Rect getDefaultDimensions() {
             return Support.getDummyAutofillRect(mGeckoSession, false, null);
         }
 
         /* package */ void clear() {
             mId = View.NO_ID;
             mFocusedId = View.NO_ID;
             mFocusedRootId = View.NO_ID;
@@ -290,16 +294,17 @@ public class Autofill {
                 .append(", focusedRootId=").append(mFocusedRootId)
                 .append(", root=").append(getRoot())
                 .append("}");
             return builder.toString();
         }
 
         @TargetApi(23)
         @UiThread
+        @SuppressWarnings("checkstyle:javadocmethod")
         public void fillViewStructure(
                 @NonNull final View view,
                 @NonNull final ViewStructure structure,
                 final int flags) {
             ThreadUtils.assertOnUiThread();
 
             getRoot().fillViewStructure(view, structure, flags);
         }
@@ -439,16 +444,17 @@ public class Autofill {
          * @return The HTML attributes for this node.
          */
         @AnyThread
         public @NonNull Map<String, String> getAttributes() {
             return mAttributes;
         }
 
         @AnyThread
+        @SuppressWarnings("checkstyle:javadocmethod")
         public @Nullable String getAttribute(@NonNull final String key) {
             return mAttributes.get(key);
         }
 
         /* package */ @NonNull Node setAttributes(
                 final Map<String, String> attributes) {
             mAttributes = attributes;
             return this;
@@ -631,16 +637,17 @@ public class Autofill {
                 .append(", callback=").append(mCallback != null)
                 .append("}");
 
             return builder.toString();
         }
 
         @TargetApi(23)
         @UiThread
+        @SuppressWarnings("checkstyle:javadocmethod")
         public void fillViewStructure(
                 @NonNull final View view,
                 @NonNull final ViewStructure structure,
                 final int flags) {
             ThreadUtils.assertOnUiThread();
 
             Log.d(LOGTAG, "fillViewStructure");
 
--- a/mobile/android/geckoview/src/main/java/org/mozilla/geckoview/BasicSelectionActionDelegate.java
+++ b/mobile/android/geckoview/src/main/java/org/mozilla/geckoview/BasicSelectionActionDelegate.java
@@ -91,20 +91,22 @@ public class BasicSelectionActionDelegat
 
         @Override
         public void onGetContentRect(final ActionMode mode, final View view, final Rect outRect) {
             super.onGetContentRect(mode, view, outRect);
             BasicSelectionActionDelegate.this.onGetContentRect(mode, view, outRect);
         }
     }
 
+    @SuppressWarnings("checkstyle:javadocmethod")
     public BasicSelectionActionDelegate(final @NonNull Activity activity) {
         this(activity, Build.VERSION.SDK_INT >= 23);
     }
 
+    @SuppressWarnings("checkstyle:javadocmethod")
     public BasicSelectionActionDelegate(final @NonNull Activity activity,
                                         final boolean useFloatingToolbar) {
         mActivity = activity;
         mUseFloatingToolbar = useFloatingToolbar;
         mExternalActionsEnabled = true;
     }
 
     /**
@@ -369,16 +371,17 @@ public class BasicSelectionActionDelegat
         if (!mUseFloatingToolbar) {
             clearSelection();
         }
         mSession = null;
         mSelection = null;
         mActionMode = null;
     }
 
+    @SuppressWarnings("checkstyle:javadocmethod")
     public void onGetContentRect(final @Nullable ActionMode mode, final @Nullable View view,
                                  final @NonNull Rect outRect) {
         ThreadUtils.assertOnUiThread();
         if (mSelection == null || mSelection.clientRect == null) {
             return;
         }
         mSession.getClientToScreenMatrix(mTempMatrix);
         mTempMatrix.mapRect(mTempRect, mSelection.clientRect);
--- a/mobile/android/geckoview/src/main/java/org/mozilla/geckoview/ContentBlocking.java
+++ b/mobile/android/geckoview/src/main/java/org/mozilla/geckoview/ContentBlocking.java
@@ -551,16 +551,17 @@ public class ContentBlocking {
          */
         public final @NonNull String uri;
 
         private final @CBAntiTracking int mAntiTrackingCat;
         private final @CBSafeBrowsing int mSafeBrowsingCat;
         private final @CBCookieBehavior int mCookieBehaviorCat;
         private final boolean mIsBlocking;
 
+        @SuppressWarnings("checkstyle:javadocmethod")
         public BlockEvent(@NonNull final String uri,
                           final @CBAntiTracking int atCat,
                           final @CBSafeBrowsing int sbCat,
                           final @CBCookieBehavior int cbCat,
                           final boolean isBlocking) {
             this.uri = uri;
             this.mAntiTrackingCat = atCat;
             this.mSafeBrowsingCat = sbCat;
@@ -624,16 +625,17 @@ public class ContentBlocking {
                     ContentBlocking.fpListToAtCat(matchedList) |
                     ContentBlocking.stListToAtCat(matchedList),
                 ContentBlocking.errorToSbCat(error),
                 ContentBlocking.geckoCatToCbCat(category),
                 blocking);
         }
 
         @UiThread
+        @SuppressWarnings("checkstyle:javadocmethod")
         public boolean isBlocking() {
             return mIsBlocking;
         }
     }
 
     /**
      * GeckoSession applications implement this interface to handle content
      * blocking events.
--- a/mobile/android/geckoview/src/main/java/org/mozilla/geckoview/GeckoResult.java
+++ b/mobile/android/geckoview/src/main/java/org/mozilla/geckoview/GeckoResult.java
@@ -209,16 +209,17 @@ public class GeckoResult<T> {
             r.run();
         }
         static DirectDispatcher sInstance = new DirectDispatcher();
         private DirectDispatcher() {}
 
     }
 
     public static final class UncaughtException extends RuntimeException {
+        @SuppressWarnings("checkstyle:javadocmethod")
         public UncaughtException(final Throwable cause) {
             super(cause);
         }
     }
 
     /**
      * Interface used to delegate cancellation operations for a {@link GeckoResult}.
      */
--- a/mobile/android/geckoview/src/main/java/org/mozilla/geckoview/GeckoRuntime.java
+++ b/mobile/android/geckoview/src/main/java/org/mozilla/geckoview/GeckoRuntime.java
@@ -712,16 +712,17 @@ public final class GeckoRuntime implemen
         ThreadUtils.runOnUiThread(() -> {
             if (mNotificationDelegate != null) {
                 mNotificationDelegate.onCloseNotification(notification);
             }
         });
     }
 
     @AnyThread
+    @SuppressWarnings("checkstyle:javadocmethod")
     public @NonNull GeckoRuntimeSettings getSettings() {
         return mSettings;
     }
 
     /* package */ void setPref(final String name, final Object value) {
         PrefsHelper.setPref(name, value, /* flush */ false);
     }
 
@@ -846,16 +847,17 @@ public final class GeckoRuntime implemen
     @Override // Parcelable
     @AnyThread
     public void writeToParcel(final Parcel out, final int flags) {
         out.writeParcelable(mSettings, flags);
     }
 
     // AIDL code may call readFromParcel even though it's not part of Parcelable.
     @AnyThread
+    @SuppressWarnings("checkstyle:javadocmethod")
     public void readFromParcel(final @NonNull Parcel source) {
         mSettings = source.readParcelable(getClass().getClassLoader());
     }
 
     public static final Parcelable.Creator<GeckoRuntime> CREATOR =
             new Parcelable.Creator<GeckoRuntime>() {
         @Override
         @AnyThread
--- a/mobile/android/geckoview/src/main/java/org/mozilla/geckoview/GeckoRuntimeSettings.java
+++ b/mobile/android/geckoview/src/main/java/org/mozilla/geckoview/GeckoRuntimeSettings.java
@@ -338,16 +338,17 @@ public final class GeckoRuntimeSettings 
          * @param requestedLocales List of locale codes in Gecko format ("en" or "en-US").
          * @return The builder instance.
          */
         public @NonNull Builder locales(final @Nullable String[] requestedLocales) {
             getSettings().mRequestedLocales = requestedLocales;
             return this;
         }
 
+        @SuppressWarnings("checkstyle:javadocmethod")
         public @NonNull Builder contentBlocking(
                 final @NonNull ContentBlocking.Settings cb) {
             getSettings().mContentBlocking = cb;
             return this;
         }
 
         /**
          * Sets the preferred color scheme override for web content.
@@ -452,16 +453,17 @@ public final class GeckoRuntimeSettings 
 
     private GeckoRuntime mRuntime;
     /* package */ String[] mArgs;
     /* package */ Bundle mExtras;
     /* package */ String mConfigFilePath;
 
     /* package */ ContentBlocking.Settings mContentBlocking;
 
+    @SuppressWarnings("checkstyle:javadocmethod")
     public @NonNull ContentBlocking.Settings getContentBlocking() {
         return mContentBlocking;
     }
 
     /* package */ final Pref<Boolean> mWebManifest = new Pref<Boolean>(
         "dom.manifest.enabled", true);
     /* package */ final Pref<Boolean> mJavaScript = new Pref<Boolean>(
         "javascript.enabled", true);
@@ -704,16 +706,17 @@ public final class GeckoRuntimeSettings 
      */
     public @Nullable Integer getDisplayDpiOverride() {
         if (mDisplayDpiOverride > 0) {
             return mDisplayDpiOverride;
         }
         return null;
     }
 
+    @SuppressWarnings("checkstyle:javadocmethod")
     public @Nullable Class<? extends Service> getCrashHandler() {
         return mCrashHandler;
     }
 
     /**
      * Gets the screen size  override value.
      *
      * @return Returns a Rect containing the dimensions to use for the window size.
@@ -1051,16 +1054,17 @@ public final class GeckoRuntimeSettings 
      * @param level number of MSAA samples, 0 if MSAA should be disabled.
      * @return This GeckoRuntimeSettings instance.
      */
     public @NonNull GeckoRuntimeSettings setGlMsaaLevel(final int level) {
         mGlMsaaLevel.commit(level);
         return this;
     }
 
+    @SuppressWarnings("checkstyle:javadocmethod")
     public @Nullable RuntimeTelemetry.Delegate getTelemetryDelegate() {
         return mTelemetryProxy.getDelegate();
     }
 
     /**
      * Gets whether about:config is enabled or not.
      *
      * @return True if about:config is enabled, false otherwise.
@@ -1140,16 +1144,17 @@ public final class GeckoRuntimeSettings 
         out.writeInt(mScreenWidthOverride);
         out.writeInt(mScreenHeightOverride);
         out.writeString(mCrashHandler != null ? mCrashHandler.getName() : null);
         out.writeStringArray(mRequestedLocales);
         out.writeString(mConfigFilePath);
     }
 
     // AIDL code may call readFromParcel even though it's not part of Parcelable.
+    @SuppressWarnings("checkstyle:javadocmethod")
     public void readFromParcel(final @NonNull Parcel source) {
         super.readFromParcel(source);
 
         mArgs = source.createStringArray();
         mExtras.readFromParcel(source);
         mDebugPause = ParcelableUtils.readBoolean(source);
         mUseMaxScreenDepth = ParcelableUtils.readBoolean(source);
         mDisplayDensityOverride = source.readFloat();
--- a/mobile/android/geckoview/src/main/java/org/mozilla/geckoview/GeckoSession.java
+++ b/mobile/android/geckoview/src/main/java/org/mozilla/geckoview/GeckoSession.java
@@ -1217,20 +1217,22 @@ public class GeckoSession implements Par
                 handlePromptEvent(GeckoSession.this, message, callback);
             }
         }
     }
 
     protected @Nullable Window mWindow;
     private GeckoSessionSettings mSettings;
 
+    @SuppressWarnings("checkstyle:javadocmethod")
     public GeckoSession() {
         this(null);
     }
 
+    @SuppressWarnings("checkstyle:javadocmethod")
     public GeckoSession(final @Nullable GeckoSessionSettings settings) {
         mSettings = new GeckoSessionSettings(settings, this);
         mListener.registerListeners();
 
         mWebExtensionController = new WebExtension.SessionController(this);
 
         mAutofillSupport = new Autofill.Support(this);
         mAutofillSupport.registerListeners();
@@ -1298,16 +1300,17 @@ public class GeckoSession implements Par
     public void writeToParcel(final Parcel out, final int flags) {
         out.writeStrongInterface(mWindow);
         out.writeParcelable(mSettings, flags);
         out.writeString(mId);
     }
 
     // AIDL code may call readFromParcel even though it's not part of Parcelable.
     @AnyThread
+    @SuppressWarnings("checkstyle:javadocmethod")
     public void readFromParcel(final @NonNull Parcel source) {
         final IBinder binder = source.readStrongBinder();
         final IInterface ifce = (binder != null) ?
                 binder.queryLocalInterface(Window.class.getName()) : null;
         final Window window = (ifce instanceof Window) ? (Window) ifce : null;
         final GeckoSessionSettings settings =
                 source.readParcelable(getClass().getClassLoader());
         final String id = source.readString();
@@ -2168,16 +2171,17 @@ public class GeckoSession implements Par
         private SessionState() {
             mState = new GeckoBundle(3);
         }
 
         private SessionState(final @NonNull GeckoBundle state) {
             mState = new GeckoBundle(state);
         }
 
+        @SuppressWarnings("checkstyle:javadocmethod")
         public SessionState(final @NonNull SessionState state) {
             mState = new GeckoBundle(state.mState);
         }
 
         /* package */ void updateSessionState(final @NonNull GeckoBundle updateData) {
             if (updateData == null) {
                 Log.w(LOGTAG, "Session state update has no data field.");
                 return;
@@ -2254,16 +2258,17 @@ public class GeckoSession implements Par
         }
 
         @Override // Parcelable
         public void writeToParcel(final Parcel dest, final int flags) {
             dest.writeString(toString());
         }
 
         // AIDL code may call readFromParcel even though it's not part of Parcelable.
+        @SuppressWarnings("checkstyle:javadocmethod")
         public void readFromParcel(final @NonNull Parcel source) {
             if (source.readString() == null) {
                 Log.w(LOGTAG, "Can't reproduce session state from Parcel");
             }
 
             try {
                 mState = GeckoBundle.fromJSONObject(new JSONObject(source.readString()));
             } catch (JSONException e) {
@@ -2416,16 +2421,17 @@ public class GeckoSession implements Par
         if (display != mDisplay) {
             throw new IllegalArgumentException("Display not attached");
         }
 
         mDisplay = null;
     }
 
     @AnyThread
+    @SuppressWarnings("checkstyle:javadocmethod")
     public @NonNull GeckoSessionSettings getSettings() {
         return mSettings;
     }
 
     /**
     * Exits fullscreen mode
     */
     @AnyThread
@@ -2504,16 +2510,17 @@ public class GeckoSession implements Par
     */
     @UiThread
     public void setScrollDelegate(final @Nullable ScrollDelegate delegate) {
         ThreadUtils.assertOnUiThread();
         mScrollHandler.setDelegate(delegate, this);
     }
 
     @UiThread
+    @SuppressWarnings("checkstyle:javadocmethod")
     public @Nullable ScrollDelegate getScrollDelegate() {
         ThreadUtils.assertOnUiThread();
         return mScrollHandler.getDelegate();
     }
 
     /**
      * Set the history tracking delegate for this session, replacing the
      * current delegate if one is set.
@@ -6092,16 +6099,17 @@ public class GeckoSession implements Par
          */
         @UiThread
         default @Nullable GeckoResult<boolean[]> getVisited(@NonNull GeckoSession session,
                                                             @NonNull String[] urls) {
             return null;
         }
 
         @UiThread
+        @SuppressWarnings("checkstyle:javadocmethod")
         default void onHistoryStateChange(@NonNull GeckoSession session, @NonNull HistoryList historyList) {}
     }
 
     @Retention(RetentionPolicy.SOURCE)
     @IntDef(flag = true,
             value = {
                 HistoryDelegate.VISIT_TOP_LEVEL,
                 HistoryDelegate.VISIT_REDIRECT_TEMPORARY,
--- a/mobile/android/geckoview/src/main/java/org/mozilla/geckoview/GeckoSessionSettings.java
+++ b/mobile/android/geckoview/src/main/java/org/mozilla/geckoview/GeckoSessionSettings.java
@@ -22,20 +22,22 @@ public final class GeckoSessionSettings 
 
     /**
      * Settings builder used to construct the settings object.
      */
     @AnyThread
     public static final class Builder {
         private final GeckoSessionSettings mSettings;
 
+        @SuppressWarnings("checkstyle:javadocmethod")
         public Builder() {
             mSettings = new GeckoSessionSettings();
         }
 
+        @SuppressWarnings("checkstyle:javadocmethod")
         public Builder(final GeckoSessionSettings settings) {
             mSettings = new GeckoSessionSettings(settings);
         }
 
         /**
          * Finalize and return the settings.
          *
          * @return The constructed settings.
@@ -335,20 +337,22 @@ public final class GeckoSessionSettings 
      * User-provided key to specify the session context ID.
      */
     private static final Key<String> UNSAFE_CONTEXT_ID =
         new Key<String>("unsafeSessionContextId", /* initOnly */ true, /* values */ null);
 
     private final GeckoSession mSession;
     private final GeckoBundle mBundle;
 
+    @SuppressWarnings("checkstyle:javadocmethod")
     public GeckoSessionSettings() {
         this(null, null);
     }
 
+    @SuppressWarnings("checkstyle:javadocmethod")
     public GeckoSessionSettings(final @NonNull GeckoSessionSettings settings) {
         this(settings, null);
     }
 
     /* package */ GeckoSessionSettings(final @Nullable GeckoSessionSettings settings,
                                        final @Nullable GeckoSession session) {
         mSession = session;
 
@@ -703,16 +707,17 @@ public final class GeckoSessionSettings 
     }
 
     @Override // Parcelable
     public void writeToParcel(final @NonNull Parcel out, final int flags) {
         mBundle.writeToParcel(out, flags);
     }
 
     // AIDL code may call readFromParcel even though it's not part of Parcelable.
+    @SuppressWarnings("checkstyle:javadocmethod")
     public void readFromParcel(final @NonNull Parcel source) {
         mBundle.readFromParcel(source);
     }
 
     public static final Parcelable.Creator<GeckoSessionSettings> CREATOR
             = new Parcelable.Creator<GeckoSessionSettings>() {
                 @Override
                 public GeckoSessionSettings createFromParcel(final Parcel in) {
--- a/mobile/android/geckoview/src/main/java/org/mozilla/geckoview/GeckoView.java
+++ b/mobile/android/geckoview/src/main/java/org/mozilla/geckoview/GeckoView.java
@@ -220,21 +220,23 @@ public class GeckoView extends FrameLayo
             if (mDisplay == null) {
                 return GeckoResult.fromException(new IllegalStateException("Display must be created before pixels can be captured"));
             }
 
             return mDisplay.capturePixels();
         }
     }
 
+    @SuppressWarnings("checkstyle:javadocmethod")
     public GeckoView(final Context context) {
         super(context);
         init();
     }
 
+    @SuppressWarnings("checkstyle:javadocmethod")
     public GeckoView(final Context context, final AttributeSet attrs) {
         super(context, attrs);
         init();
     }
 
     private void init() {
         setFocusable(true);
         setFocusableInTouchMode(true);
@@ -485,25 +487,27 @@ public class GeckoView extends FrameLayo
         }
 
         if (isFocused()) {
             session.setFocused(true);
         }
     }
 
     @AnyThread
+    @SuppressWarnings("checkstyle:javadocmethod")
     public @Nullable GeckoSession getSession() {
         return mSession;
     }
 
     @AnyThread
     /* package */ @NonNull EventDispatcher getEventDispatcher() {
         return mSession.getEventDispatcher();
     }
 
+    @SuppressWarnings("checkstyle:javadocmethod")
     public @NonNull PanZoomController getPanZoomController() {
         ThreadUtils.assertOnUiThread();
         return mSession.getPanZoomController();
     }
 
     @Override
     public void onAttachedToWindow() {
         if (mSession != null) {
--- a/mobile/android/geckoview/src/main/java/org/mozilla/geckoview/RuntimeSettings.java
+++ b/mobile/android/geckoview/src/main/java/org/mozilla/geckoview/RuntimeSettings.java
@@ -32,16 +32,17 @@ public abstract class RuntimeSettings im
      * Base class for (nested) runtime settings builders.
      *
      * Please extend this class when adding nested settings builders for
      * GeckoRuntimeSettings.
      */
     public abstract static class Builder<Settings extends RuntimeSettings> {
         private final Settings mSettings;
 
+        @SuppressWarnings("checkstyle:javadocmethod")
         public Builder() {
             mSettings = newSettings(null);
         }
 
         /**
          * Finalize and return the settings.
          *
          * @return The constructed settings.
@@ -257,16 +258,17 @@ public abstract class RuntimeSettings im
     public void writeToParcel(final Parcel out, final int flags) {
         for (final Pref<?> pref : mPrefs) {
             out.writeValue(pref.get());
         }
     }
 
     @AnyThread
     // AIDL code may call readFromParcel even though it's not part of Parcelable.
+    @SuppressWarnings("checkstyle:javadocmethod")
     public void readFromParcel(final @NonNull Parcel source) {
         for (final Pref<?> pref : mPrefs) {
             // We know this is safe.
             @SuppressWarnings("unchecked")
             final Pref<Object> uncheckedPref = (Pref<Object>) pref;
             uncheckedPref.commit(source.readValue(getClass().getClassLoader()));
         }
     }
--- a/mobile/android/geckoview/src/main/java/org/mozilla/geckoview/SessionAccessibility.java
+++ b/mobile/android/geckoview/src/main/java/org/mozilla/geckoview/SessionAccessibility.java
@@ -729,16 +729,17 @@ public class SessionAccessibility {
                         Settings.class, "toggleNativeAccessibility", isEnabled());
             }
         }
 
         @WrapForJNI(dispatchTo = "gecko")
         private static native void toggleNativeAccessibility(boolean enable);
     }
 
+    @SuppressWarnings("checkstyle:javadocmethod")
     public boolean onMotionEvent(final @NonNull MotionEvent event) {
         ThreadUtils.assertOnUiThread();
 
         if (!Settings.isTouchExplorationEnabled()) {
             return false;
         }
 
         if (event.getSource() != InputDevice.SOURCE_TOUCHSCREEN) {
--- a/mobile/android/geckoview/src/main/java/org/mozilla/geckoview/WebExtension.java
+++ b/mobile/android/geckoview/src/main/java/org/mozilla/geckoview/WebExtension.java
@@ -1373,16 +1373,19 @@ public class WebExtension {
             enabled = source.enabled != null  ? source.enabled : defaultValue.enabled;
             badgeText = source.badgeText != null ? source.badgeText : defaultValue.badgeText;
             badgeTextColor = source.badgeTextColor != null
                     ? source.badgeTextColor : defaultValue.badgeTextColor;
             badgeBackgroundColor = source.badgeBackgroundColor != null
                     ? source.badgeBackgroundColor : defaultValue.badgeBackgroundColor;
         }
 
+        /**
+         * Notifies the extension that the user has clicked on this Action.
+         */
         @UiThread
         public void click() {
             if (mPopupUri != null && !mPopupUri.isEmpty()) {
                 final ActionDelegate delegate = mExtension.mDelegateController.getActionDelegate();
                 if (delegate == null) {
                     return;
                 }
 
--- a/mobile/android/geckoview/src/main/java/org/mozilla/geckoview/WebPushSubscription.java
+++ b/mobile/android/geckoview/src/main/java/org/mozilla/geckoview/WebPushSubscription.java
@@ -75,16 +75,17 @@ public class WebPushSubscription impleme
      * in encrypting and authenticating messages sent to the {@link #endpoint}.
      *
      * @see <a href="https://www.w3.org/TR/push-api/#dom-pushencryptionkeyname-auth">PushEncryptionKeyName - auth</a>
      * @see <a href="https://tools.ietf.org/html/rfc8291#section-3.2">RFC 8291, section 3.2</a>
      */
     @NonNull
     public final byte[] authSecret;
 
+    @SuppressWarnings("checkstyle:javadocmethod")
     public WebPushSubscription(final @NonNull String scope,
                                final @NonNull String endpoint,
                                final @Nullable byte[] appServerKey,
                                final @NonNull byte[] browserPublicKey,
                                final @NonNull byte[] authSecret) {
         this.scope = scope;
         this.endpoint = endpoint;
         this.appServerKey = appServerKey;