Repository: google/error-prone (language: java)

Issue:
style: prefer https:// links in favour of http://
The following regular expression identified the deviations:

`http://(?!(www\.w3|www\.apache\.org/licenses|maven\.apache\.org/(POM|xsd)))`


Discussion / hints:
Note: the front page uses lists `http://` link as well, however, I was not able to find the source for the doc

https://errorprone.info/ -> 

```
$ bazel build :hello
ERROR: example/myproject/BUILD:29:1: Java compilation in rule '//example/myproject:hello'
ShortSet.java:6: error: [CollectionIncompatibleType] Argument 'i - 1' should not be passed to this method;
its type int is not compatible with its collection's type argument Short
      s.remove(i - 1);
              ^
    (see http://errorprone.info/bugpattern/CollectionIncompatibleType)
1 error
```
It's in the `gh-pages` branch: https://github.com/google/error-prone/blob/gh-pages/index.md

Fix patch:
diff --git a/annotations/src/main/java/com/google/errorprone/annotations/RestrictedApi.java b/annotations/src/main/java/com/google/errorprone/annotations/RestrictedApi.java
index e5fbba8a2aa..e07e98d04b3 100644
--- a/annotations/src/main/java/com/google/errorprone/annotations/RestrictedApi.java
+++ b/annotations/src/main/java/com/google/errorprone/annotations/RestrictedApi.java
@@ -48,7 +48,7 @@
  * public class Foo {
  *   @RestrictedApi(
  *      explanation="You could shoot yourself in the foot with Foo.bar if you aren't careful",
- *      link="http://edsger.dijkstra/foo_bar_consider_harmful.html",
+ *      link="https://edsger.dijkstra/foo_bar_consider_harmful.html",
  *      allowedOnPath="testsuite/.*", // Unsafe behavior in tests is ok.
  *      allowlistAnnotations = {ReviewedFooBar.class},
  *      allowlistWithWarningAnnotations = {LegacyUnsafeFooBar.class})
diff --git a/annotations/src/main/java/com/google/errorprone/annotations/concurrent/LazyInit.java b/annotations/src/main/java/com/google/errorprone/annotations/concurrent/LazyInit.java
index 119d297d0ea..6654df14cb2 100644
--- a/annotations/src/main/java/com/google/errorprone/annotations/concurrent/LazyInit.java
+++ b/annotations/src/main/java/com/google/errorprone/annotations/concurrent/LazyInit.java
@@ -48,7 +48,7 @@
  * }</pre>
  *
  * <p>The need for using the {@code local} variable is detailed in
- * http://jeremymanson.blogspot.com/2008/12/benign-data-races-in-java.html (see, particularly, the
+ * https://jeremymanson.blogspot.com/2008/12/benign-data-races-in-java.html (see, particularly, the
  * part after "Now, let's break the code").
  *
  * <p>Also note that {@code LazyInit} must not be used on 64-bit primitives ({@code long}s and
diff --git a/appveyor.yml b/appveyor.yml
index c137cbda9d8..a9d57420c88 100644
--- a/appveyor.yml
+++ b/appveyor.yml
@@ -10,7 +10,7 @@ install:
       Add-Type -AssemblyName System.IO.Compression.FileSystem
       if (!(Test-Path -Path "C:\maven" )) {
         (new-object System.Net.WebClient).DownloadFile(
-          'http://www.us.apache.org/dist/maven/maven-3/3.3.9/binaries/apache-maven-3.3.9-bin.zip',
+          'https://www.us.apache.org/dist/maven/maven-3/3.3.9/binaries/apache-maven-3.3.9-bin.zip',
           'C:\maven-bin.zip'
         )
         [System.IO.Compression.ZipFile]::ExtractToDirectory("C:\maven-bin.zip", "C:\maven")
diff --git a/check_api/src/main/java/com/google/errorprone/ErrorProneAnalyzer.java b/check_api/src/main/java/com/google/errorprone/ErrorProneAnalyzer.java
index bb82f2c2e55..b304bdbfbdc 100644
--- a/check_api/src/main/java/com/google/errorprone/ErrorProneAnalyzer.java
+++ b/check_api/src/main/java/com/google/errorprone/ErrorProneAnalyzer.java
@@ -272,7 +272,7 @@ private boolean finishedCompilation(CompilationUnitTree tree) {
         case IMPORT -> {
           // The spec disallows mixing imports and empty top-level declarations (";"), but
           // javac has a bug that causes it to accept empty declarations interspersed with imports:
-          // http://mail.openjdk.java.net/pipermail/compiler-dev/2013-August/006968.html
+          // https://mail.openjdk.java.net/pipermail/compiler-dev/2013-August/006968.html
           //
           // Any import declarations after the first semi are incorrectly added to the list
           // of type declarations, so we have to skip over them here.
diff --git a/check_api/src/main/java/com/google/errorprone/dataflow/nullnesspropagation/NullnessPropagationTransfer.java b/check_api/src/main/java/com/google/errorprone/dataflow/nullnesspropagation/NullnessPropagationTransfer.java
index e9ec9a7ba0d..a9a975d64d8 100644
--- a/check_api/src/main/java/com/google/errorprone/dataflow/nullnesspropagation/NullnessPropagationTransfer.java
+++ b/check_api/src/main/java/com/google/errorprone/dataflow/nullnesspropagation/NullnessPropagationTransfer.java
@@ -499,7 +499,7 @@ Nullness visitAssignment(AssignmentNode node, SubNodeValues inputs, Updates upda
      * It's not clear to me that this is technically correct, but it works in practice with the
      * bytecode generated by both javac and ecj.
      *
-     * http://stackoverflow.com/q/12850676/28465
+     * https://stackoverflow.com/q/12850676/28465
      */
     return value;
   }
@@ -903,7 +903,7 @@ private static boolean isEqualsMethod(
       MemberName calleeName, List<Node> arguments, Types types, Symtab symtab) {
     // we don't care about class name -- we're matching against Object.equals(Object)
     // this implies that non-overriding methods are assumed to be null-guaranteeing.
-    // Also see http://errorprone.info/bugpattern/NonOverridingEquals
+    // Also see https://errorprone.info/bugpattern/NonOverridingEquals
     if (!calleeName.member.equals("equals") || arguments.size() != 1) {
       return false;
     }
diff --git a/check_api/src/main/java/com/google/errorprone/names/NeedlemanWunschEditDistance.java b/check_api/src/main/java/com/google/errorprone/names/NeedlemanWunschEditDistance.java
index 441e6c44964..43d4ae35118 100644
--- a/check_api/src/main/java/com/google/errorprone/names/NeedlemanWunschEditDistance.java
+++ b/check_api/src/main/java/com/google/errorprone/names/NeedlemanWunschEditDistance.java
@@ -26,7 +26,7 @@
  * that, for example editing {@code Christopher} into {@code Chris} (dropping 6 characters) is not 6
  * times as expensive as editing {@code Christopher} into {@code Christophe}.
  *
- * <p>See http://en.wikipedia.org/wiki/Needleman-Wunsch_algorithm
+ * <p>See https://en.wikipedia.org/wiki/Needleman-Wunsch_algorithm
  *
  * @author alanw@google.com (Alan Wendt)
  */
diff --git a/check_api/src/main/java/com/google/errorprone/util/OperatorPrecedence.java b/check_api/src/main/java/com/google/errorprone/util/OperatorPrecedence.java
index e116d119120..717b44ac421 100644
--- a/check_api/src/main/java/com/google/errorprone/util/OperatorPrecedence.java
+++ b/check_api/src/main/java/com/google/errorprone/util/OperatorPrecedence.java
@@ -22,7 +22,7 @@
 /**
  * The precedence for an operator kind in the {@link com.sun.source.tree} API.
  *
- * <p>As documented at: http://docs.oracle.com/javase/tutorial/java/nutsandbolts/operators.html
+ * <p>As documented at: https://docs.oracle.com/javase/tutorial/java/nutsandbolts/operators.html
  */
 public enum OperatorPrecedence {
   POSTFIX(14),
diff --git a/check_api/src/main/java/com/google/errorprone/util/SourceCodeEscapers.java b/check_api/src/main/java/com/google/errorprone/util/SourceCodeEscapers.java
index 7464953d8c1..e88163ee9df 100644
--- a/check_api/src/main/java/com/google/errorprone/util/SourceCodeEscapers.java
+++ b/check_api/src/main/java/com/google/errorprone/util/SourceCodeEscapers.java
@@ -35,7 +35,7 @@ private SourceCodeEscapers() {}
   // For each xxxEscaper() method, please add links to external reference pages
   // that are considered authoritative for the behavior of that escaper.
 
-  // From: http://en.wikipedia.org/wiki/ASCII#ASCII_printable_characters
+  // From: https://en.wikipedia.org/wiki/ASCII#ASCII_printable_characters
   private static final char PRINTABLE_ASCII_MIN = 0x20; // ' '
   private static final char PRINTABLE_ASCII_MAX = 0x7E; // '~'
 
@@ -46,7 +46,7 @@ private SourceCodeEscapers() {}
    * safely be included in either a Java character literal or string literal. This is the preferred
    * way to escape Java characters for use in String or character literals.
    *
-   * <p>See: <a href= "http://java.sun.com/docs/books/jls/third_edition/html/lexical.html#101089"
+   * <p>See: <a href= "https://java.sun.com/docs/books/jls/third_edition/html/lexical.html#101089"
    * >The Java Language Specification</a> for more details.
    */
   public static CharEscaper javaCharEscaper() {
@@ -93,7 +93,7 @@ public static CharEscaper getJavaTextBlockEscaper() {
               '\\', "\\\\"));
 
   // This escaper does not produce octal escape sequences. See:
-  // http://java.sun.com/docs/books/jls/third_edition/html/lexical.html#101089
+  // https://java.sun.com/docs/books/jls/third_edition/html/lexical.html#101089
   //  "Octal escapes are provided for compatibility with C, but can express
   //   only Unicode values \u0000 through \u00FF, so Unicode escapes are
   //   usually preferred."
diff --git a/core/src/main/java/com/google/errorprone/bugpatterns/ThreeLetterTimeZoneID.java b/core/src/main/java/com/google/errorprone/bugpatterns/ThreeLetterTimeZoneID.java
index 83de4818e8b..61652971898 100644
--- a/core/src/main/java/com/google/errorprone/bugpatterns/ThreeLetterTimeZoneID.java
+++ b/core/src/main/java/com/google/errorprone/bugpatterns/ThreeLetterTimeZoneID.java
@@ -126,7 +126,7 @@ static Replacement getReplacement(String id, boolean inJodaTimeContext, String m
   }
 
   // American time zones for which the TLA doesn't observe daylight savings.
-  // http://www-01.ibm.com/support/docview.wss?uid=swg21250503#3char
+  // https://www-01.ibm.com/support/docview.wss?uid=swg21250503#3char
   // How we handle it depends upon whether we are in a JodaTime context or not.
   static Replacement handleNonDaylightSavingsZone(
       boolean inJodaTimeContext, String daylightSavingsZone, String fixedOffset, String message) {
diff --git a/core/src/main/java/com/google/errorprone/bugpatterns/android/MislabeledAndroidString.java b/core/src/main/java/com/google/errorprone/bugpatterns/android/MislabeledAndroidString.java
index b500f72419a..42f981a3d49 100644
--- a/core/src/main/java/com/google/errorprone/bugpatterns/android/MislabeledAndroidString.java
+++ b/core/src/main/java/com/google/errorprone/bugpatterns/android/MislabeledAndroidString.java
@@ -34,7 +34,7 @@
 
 /**
  * Replacement of misleading <a
- * href="http://developer.android.com/reference/android/R.string.html">android.R.string</a>
+ * href="https://developer.android.com/reference/android/R.string.html">android.R.string</a>
  * constants with more intuitive ones.
  *
  * @author kmb@google.com (Kevin Bierhoff)
diff --git a/core/src/main/java/com/google/errorprone/bugpatterns/inject/InjectOnMemberAndConstructor.java b/core/src/main/java/com/google/errorprone/bugpatterns/inject/InjectOnMemberAndConstructor.java
index 293e7f0aa5e..d42216d515f 100644
--- a/core/src/main/java/com/google/errorprone/bugpatterns/inject/InjectOnMemberAndConstructor.java
+++ b/core/src/main/java/com/google/errorprone/bugpatterns/inject/InjectOnMemberAndConstructor.java
@@ -82,7 +82,7 @@ public final Description matchClass(ClassTree classTree, VisitorState state) {
     if (ctorsWithInject.size() != 1) {
       // Injection frameworks don't support multiple @Inject ctors.
       // There is already an ERROR check for it.
-      // http://errorprone.info/bugpattern/MoreThanOneInjectableConstructor
+      // https://errorprone.info/bugpattern/MoreThanOneInjectableConstructor
       return Description.NO_MATCH;
     }
 
diff --git a/core/src/main/java/com/google/errorprone/bugpatterns/inject/package-info.java b/core/src/main/java/com/google/errorprone/bugpatterns/inject/package-info.java
index dd0d05b0889..38b8c95a0a5 100644
--- a/core/src/main/java/com/google/errorprone/bugpatterns/inject/package-info.java
+++ b/core/src/main/java/com/google/errorprone/bugpatterns/inject/package-info.java
@@ -15,7 +15,7 @@
  */
 
 /**
- * Bug patterns related to <a href="http://en.wikipedia.org/wiki/Dependency_injection">dependency
+ * Bug patterns related to <a href="https://en.wikipedia.org/wiki/Dependency_injection">dependency
  * injection</a> and <a href="https://jcp.org/en/jsr/detail?id=330">JSR 330</a>. See the various
  * subpackages for checks related to specific DI frameworks.
  */
diff --git a/core/src/main/java/com/google/errorprone/bugpatterns/time/TimeUnitMismatch.java b/core/src/main/java/com/google/errorprone/bugpatterns/time/TimeUnitMismatch.java
index 6f7bd81d7df..daf39b74b17 100644
--- a/core/src/main/java/com/google/errorprone/bugpatterns/time/TimeUnitMismatch.java
+++ b/core/src/main/java/com/google/errorprone/bugpatterns/time/TimeUnitMismatch.java
@@ -582,7 +582,7 @@ public static TreeAndTimeUnit of(
       return null;
     }
 
-    // http://grepcode.com/file/repo1.maven.org/maven2/mysql/mysql-connector-java/5.1.33/com/mysql/jdbc/TimeUtil.java#336
+    // https://grepcode.com/file/repo1.maven.org/maven2/mysql/mysql-connector-java/5.1.33/com/mysql/jdbc/TimeUtil.java#336
     if (name.equals("secondsPart")) {
       return NANOSECONDS;
     }
diff --git a/core/src/main/java/com/google/errorprone/refaster/ExpressionTemplate.java b/core/src/main/java/com/google/errorprone/refaster/ExpressionTemplate.java
index 1e0df54253b..9e24244030d 100644
--- a/core/src/main/java/com/google/errorprone/refaster/ExpressionTemplate.java
+++ b/core/src/main/java/com/google/errorprone/refaster/ExpressionTemplate.java
@@ -264,7 +264,7 @@ private static int getPrecedence(JCTree leaf, Context context) {
 
     if (parent instanceof JCConditional conditional) {
       // This intentionally differs from Pretty, because Pretty appears buggy:
-      // http://mail.openjdk.java.net/pipermail/compiler-dev/2013-September/007303.html
+      // https://mail.openjdk.java.net/pipermail/compiler-dev/2013-September/007303.html
       return TreeInfo.condPrec + ((conditional.cond == leaf) ? 1 : 0);
     } else if (parent instanceof JCAssign assign) {
       return TreeInfo.assignPrec + ((assign.lhs == leaf) ? 1 : 0);
diff --git a/docs/bugpattern/BindingToUnqualifiedCommonType.md b/docs/bugpattern/BindingToUnqualifiedCommonType.md
index 26d97a01310..3f827464495 100644
--- a/docs/bugpattern/BindingToUnqualifiedCommonType.md
+++ b/docs/bugpattern/BindingToUnqualifiedCommonType.md
@@ -36,5 +36,5 @@ bind(Integer.class).toInstance(80);
 To avoid confusion in these circumstances, please use a Qualifier annotation
 when binding simple value types.
 
-[`@Qualifier`]: http://docs.oracle.com/javaee/6/api/javax/inject/Qualifier.html
+[`@Qualifier`]: https://docs.oracle.com/javaee/6/api/javax/inject/Qualifier.html
 [`@BindingAnnotation`]: https://github.com/google/guice/wiki/BindingAnnotations
diff --git a/docs/bugpattern/DateFormatConstant.md b/docs/bugpattern/DateFormatConstant.md
index ea61d75d478..472f14be26c 100644
--- a/docs/bugpattern/DateFormatConstant.md
+++ b/docs/bugpattern/DateFormatConstant.md
@@ -30,7 +30,7 @@ private static final DateFormat dateFormat =
 
 ```
 
-[`DateFormat`]: http://docs.oracle.com/javase/8/docs/api/java/text/DateFormat.html
-[`ThreadLocal`]: http://docs.oracle.com/javase/8/docs/api/java/lang/ThreadLocal.html
+[`DateFormat`]: https://docs.oracle.com/javase/8/docs/api/java/text/DateFormat.html
+[`ThreadLocal`]: https://docs.oracle.com/javase/8/docs/api/java/lang/ThreadLocal.html
 [`DateTimeFormatter`]: https://docs.oracle.com/javase/8/docs/api/java/time/format/DateTimeFormatter.html
 [style]: https://google.github.io/styleguide/javaguide.html#s5.2.4-constant-names
diff --git a/docs/bugpattern/DefaultCharset.md b/docs/bugpattern/DefaultCharset.md
index 403f01cc14d..40b39b0ade8 100644
--- a/docs/bugpattern/DefaultCharset.md
+++ b/docs/bugpattern/DefaultCharset.md
@@ -3,7 +3,7 @@ A [`Charset`][charset] is a mapping between sequences of
 when encoding characters into bytes and decoding bytes into characters.
 
 [charset]: https://docs.oracle.com/javase/8/docs/api/java/nio/charset/Charset.html
-[codeunit]: http://unicode.org/glossary/#code_unit
+[codeunit]: https://unicode.org/glossary/#code_unit
 
 Using APIs that rely on the JVM's default Charset under the hood is dangerous.
 The default charset can vary from machine to machine or JVM to JVM. This can
@@ -18,4 +18,4 @@ If you need stable encoding/decoding, you must specify an explicit charset. The
 
 When in doubt, use [UTF-8].
 
-[UTF-8]: http://www.utf8everywhere.org/
+[UTF-8]: https://www.utf8everywhere.org/
diff --git a/docs/bugpattern/DoubleBraceInitialization.md b/docs/bugpattern/DoubleBraceInitialization.md
index 993e33c97d5..161758f21dd 100644
--- a/docs/bugpattern/DoubleBraceInitialization.md
+++ b/docs/bugpattern/DoubleBraceInitialization.md
@@ -16,7 +16,7 @@ Luckily, there are more readable and more performant alternatives in the factory
 methods and builders for `ImmutableList`, `ImmutableSet`, and `ImmutableMap`.
 
 The `List.of`, `Set.of`, and `Map.of` static factories
-[added in Java 9](http://openjdk.java.net/jeps/269) are also a good choice.
+[added in Java 9](https://openjdk.java.net/jeps/269) are also a good choice.
 
 That is, prefer this:
 
diff --git a/docs/bugpattern/DoubleCheckedLocking.md b/docs/bugpattern/DoubleCheckedLocking.md
index d80050f9039..df425aeedc6 100644
--- a/docs/bugpattern/DoubleCheckedLocking.md
+++ b/docs/bugpattern/DoubleCheckedLocking.md
@@ -4,8 +4,8 @@ thread-safe.
 If the field is not volatile, the compiler may re-order the code in the
 accessor. For more information, see:
 
-*   http://jeremymanson.blogspot.com/2008/05/double-checked-locking.html
-*   http://www.cs.umd.edu/~pugh/java/memoryModel/DoubleCheckedLocking.html
+*   https://jeremymanson.blogspot.com/2008/05/double-checked-locking.html
+*   https://www.cs.umd.edu/~pugh/java/memoryModel/DoubleCheckedLocking.html
 *   Java Concurrency in Practice, §16.2.4
 *   [Effective Java 3rd Edition §83][ej3e-83]
 
@@ -83,7 +83,7 @@ static Object get() {
 ## Double-checked locking and immutability
 
 If the object being initialized with double-checked locking is
-[immutable](http://jeremymanson.blogspot.com/2008/04/immutability-in-java.html),
+[immutable](https://jeremymanson.blogspot.com/2008/04/immutability-in-java.html),
 then it is safe for the field to be non-volatile. *However*, the use of volatile
 is still encouraged because it is almost free on x86 and makes the code more
 obviously correct.
diff --git a/docs/bugpattern/EqualsIncompatibleType.md b/docs/bugpattern/EqualsIncompatibleType.md
index 1d74505d41b..6ff71b9f1cf 100644
--- a/docs/bugpattern/EqualsIncompatibleType.md
+++ b/docs/bugpattern/EqualsIncompatibleType.md
@@ -146,6 +146,6 @@ if (set.contains(hi)) {
 }
 ```
 
-[equalstester]: http://static.javadoc.io/com.google.guava/guava-testlib/19.0/com/google/common/testing/EqualsTester.html
+[equalstester]: https://static.javadoc.io/com.google.guava/guava-testlib/19.0/com/google/common/testing/EqualsTester.html
 [objeq]: https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html#equals(java.lang.Object)
 [av]: https://github.com/google/auto/blob/master/value/userguide/index.md
diff --git a/docs/bugpattern/ExpectedExceptionChecker.md b/docs/bugpattern/ExpectedExceptionChecker.md
index a690d3a2d27..e2936cae6eb 100644
--- a/docs/bugpattern/ExpectedExceptionChecker.md
+++ b/docs/bugpattern/ExpectedExceptionChecker.md
@@ -36,4 +36,4 @@ public void testRemoveFails() {
 }
 ```
 
-[`ExpectedException`]: http://junit.org/junit4/javadoc/latest/org/junit/rules/ExpectedException.html
+[`ExpectedException`]: https://junit.org/junit4/javadoc/latest/org/junit/rules/ExpectedException.html
diff --git a/docs/bugpattern/IdentityHashMapUsage.md b/docs/bugpattern/IdentityHashMapUsage.md
index 2fb609c7481..42650e43122 100644
--- a/docs/bugpattern/IdentityHashMapUsage.md
+++ b/docs/bugpattern/IdentityHashMapUsage.md
@@ -1,5 +1,5 @@
 `java.util.IdentityHashMap` uses reference equality to compare keys. This is
-[in violation of the contract of `java.util.Map`](http://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/util/IdentityHashMap.html),
+[in violation of the contract of `java.util.Map`](https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/util/IdentityHashMap.html),
 which states that object equality (the keys' `equals` methods) should be used
 for key comparison. This peculiarity can lead to confusion and subtle bugs,
 especially when the two types of maps are used together. This check attempts to
diff --git a/docs/bugpattern/InterruptedExceptionSwallowed.md b/docs/bugpattern/InterruptedExceptionSwallowed.md
index a6c22878fd4..fc35f5181b5 100644
--- a/docs/bugpattern/InterruptedExceptionSwallowed.md
+++ b/docs/bugpattern/InterruptedExceptionSwallowed.md
@@ -6,7 +6,7 @@ handled properly, however `try` blocks that catch `Exception` or `Throwable` (or
 methods that `throws` either type) make it difficult to recognize that
 interruption may occur.
 
-For advice on how to handle `InterruptedException`, see http://web.archive.org/web/20201025132525/https://www.ibm.com/developerworks/library/j-jtp05236/index.html
+For advice on how to handle `InterruptedException`, see https://web.archive.org/web/20201025132525/https://www.ibm.com/developerworks/library/j-jtp05236/index.html
 
 ## Suppression
 
diff --git a/docs/bugpattern/JUnit4ClassAnnotationNonStatic.md b/docs/bugpattern/JUnit4ClassAnnotationNonStatic.md
index f7973ee6c15..bb7f274982d 100644
--- a/docs/bugpattern/JUnit4ClassAnnotationNonStatic.md
+++ b/docs/bugpattern/JUnit4ClassAnnotationNonStatic.md
@@ -7,5 +7,5 @@ JUnit4 runs `@BeforeClass` and `@AfterClass` methods without making an instance
 of the test class, meaning that the methods must be `static`. JUnit4 will fail
 to run any `@BeforeClass` or `@AfterClass` method that isn't also `static`.
 
-[beforeclass]: http://junit.sourceforge.net/javadoc/org/junit/BeforeClass.html
-[afterclass]: http://junit.sourceforge.net/javadoc/org/junit/AfterClass.html
+[beforeclass]: https://junit.sourceforge.net/javadoc/org/junit/BeforeClass.html
+[afterclass]: https://junit.sourceforge.net/javadoc/org/junit/AfterClass.html
diff --git a/docs/bugpattern/JavaLangClash.md b/docs/bugpattern/JavaLangClash.md
index 861287482c4..83fafd12f73 100644
--- a/docs/bugpattern/JavaLangClash.md
+++ b/docs/bugpattern/JavaLangClash.md
@@ -1,5 +1,5 @@
 Class names from `java.lang` should never be reused. From
-[Java Puzzlers](http://www.javapuzzlers.com/java-puzzlers-sampler.pdf):
+[Java Puzzlers](https://www.javapuzzlers.com/java-puzzlers-sampler.pdf):
 
 > Avoid reusing the names of platform classes, and never reuse class names from
 > `java.lang`, because these names are automatically imported everywhere.
diff --git a/docs/bugpattern/JavaxInjectOnAbstractMethod.md b/docs/bugpattern/JavaxInjectOnAbstractMethod.md
index 555ad634e32..26c50518df9 100644
--- a/docs/bugpattern/JavaxInjectOnAbstractMethod.md
+++ b/docs/bugpattern/JavaxInjectOnAbstractMethod.md
@@ -9,6 +9,6 @@ frameworks may allow this, since the default methods are not abstract.
 
 See the [Guice wiki] page on JSR-330 for more.
 
-[`Inject`]: http://javax-inject.github.io/javax-inject/api/javax/inject/Inject.html
+[`Inject`]: https://javax-inject.github.io/javax-inject/api/javax/inject/Inject.html
 [OverridesJavaxInjectableMethod]: OverridesJavaxInjectableMethod
 [Guice wiki]: https://github.com/google/guice/wiki/JSR330
diff --git a/docs/bugpattern/MissingRuntimeRetention.md b/docs/bugpattern/MissingRuntimeRetention.md
index a5473da12a1..d5a1a27ff8b 100644
--- a/docs/bugpattern/MissingRuntimeRetention.md
+++ b/docs/bugpattern/MissingRuntimeRetention.md
@@ -27,5 +27,5 @@ NOTE: Even for dependency injection frameworks traditionally considered to be
 compile-time dependent, the JSR-330 specification still requires runtime
 retention for both [`Qualifier`] and [`Scope`].
 
-[`Qualifier`]: http://docs.oracle.com/javaee/6/api/javax/inject/Qualifier.html
-[`Scope`]: http://docs.oracle.com/javaee/6/api/javax/inject/Scope.html
+[`Qualifier`]: https://docs.oracle.com/javaee/6/api/javax/inject/Qualifier.html
+[`Scope`]: https://docs.oracle.com/javaee/6/api/javax/inject/Scope.html
diff --git a/docs/bugpattern/MockitoUsage.md b/docs/bugpattern/MockitoUsage.md
index 3aaea7c67fb..2e355cf5d0a 100644
--- a/docs/bugpattern/MockitoUsage.md
+++ b/docs/bugpattern/MockitoUsage.md
@@ -16,4 +16,4 @@ verify(mock.execute()); // oops!
 
 For more information, see the [Mockito documentation][docs].
 
-[docs]: http://github.com/mockito/mockito/wiki/FAQ#what-are-unfinished-verificationstubbing-errors
+[docs]: https://github.com/mockito/mockito/wiki/FAQ#what-are-unfinished-verificationstubbing-errors
diff --git a/docs/bugpattern/OutlineNone.md b/docs/bugpattern/OutlineNone.md
index 81f9d58e859..3561a58f14c 100644
--- a/docs/bugpattern/OutlineNone.md
+++ b/docs/bugpattern/OutlineNone.md
@@ -12,4 +12,4 @@ where they are within the page, therefore making the page inaccessible.
 Caveat: `outline` is not the *only* way to emphasize selected elements. You may
 instead choose to change the background color, add an underline, or otherwise
 make them visually distinct. Learn more & get alternative suggestions at
-[OutlineNone.com](http://outlinenone.com).
+[OutlineNone.com](https://outlinenone.com).
diff --git a/docs/bugpattern/SelfAssertion.md b/docs/bugpattern/SelfAssertion.md
index db93a71af0d..2e805c101a7 100644
--- a/docs/bugpattern/SelfAssertion.md
+++ b/docs/bugpattern/SelfAssertion.md
@@ -14,4 +14,4 @@ To test the implementation of an `equals` method, use
 [Guava's EqualsTester][javadoc], or explicitly call `equals` as part of the
 test.
 
-[javadoc]: http://static.javadoc.io/com.google.guava/guava-testlib/21.0/com/google/common/testing/EqualsTester.html
+[javadoc]: https://static.javadoc.io/com.google.guava/guava-testlib/21.0/com/google/common/testing/EqualsTester.html
diff --git a/docs/bugpattern/SelfEquals.md b/docs/bugpattern/SelfEquals.md
index 48f691c6a26..884b5dbca0a 100644
--- a/docs/bugpattern/SelfEquals.md
+++ b/docs/bugpattern/SelfEquals.md
@@ -2,4 +2,4 @@ The arguments to equals method are the same object, so it always returns true.
 Either change the arguments to point to different objects or substitute true.
 
 For test cases, instead of explicitly testing equals, use
-[EqualsTester from Guava](http://static.javadoc.io/com.google.guava/guava-testlib/19.0/com/google/common/testing/EqualsTester.html).
+[EqualsTester from Guava](https://static.javadoc.io/com.google.guava/guava-testlib/19.0/com/google/common/testing/EqualsTester.html).
diff --git a/docs/bugpattern/StringSplitter.md b/docs/bugpattern/StringSplitter.md
index b522b3ea019..6e1b4a6866b 100644
--- a/docs/bugpattern/StringSplitter.md
+++ b/docs/bugpattern/StringSplitter.md
@@ -1,6 +1,6 @@
 `String.split(String)` and `Pattern.split(CharSequence)` have surprising
 behaviour. For example, consider the following puzzler from
-http://konigsberg.blogspot.com/2009/11/final-thoughts-java-puzzler-splitting.html:
+https://konigsberg.blogspot.com/2009/11/final-thoughts-java-puzzler-splitting.html:
 
 ```java
 String[] nothing = "".split(":");
diff --git a/docs/bugpattern/TruthIncompatibleType.md b/docs/bugpattern/TruthIncompatibleType.md
index 61a8ed81c5a..6bf4a383727 100644
--- a/docs/bugpattern/TruthIncompatibleType.md
+++ b/docs/bugpattern/TruthIncompatibleType.md
@@ -40,4 +40,4 @@ new EqualsTester()
 Although consider omitting an explicit comparison with a different type, as
 `EqualsTester` does this already by default.
 
-[javadoc]: http://static.javadoc.io/com.google.guava/guava-testlib/21.0/com/google/common/testing/EqualsTester.html
+[javadoc]: https://static.javadoc.io/com.google.guava/guava-testlib/21.0/com/google/common/testing/EqualsTester.html
diff --git a/docs/bugpattern/UndefinedEquals.md b/docs/bugpattern/UndefinedEquals.md
index 965e604d1e4..d464d21ff32 100644
--- a/docs/bugpattern/UndefinedEquals.md
+++ b/docs/bugpattern/UndefinedEquals.md
@@ -65,14 +65,14 @@ well-defined `equals`.
 [`Collection`]: https://docs.oracle.com/javase/8/docs/api/java/util/Collection.html
 [`Iterable`]: https://docs.oracle.com/javase/8/docs/api/java/lang/Iterable.html
 [`Iterables.elementsEqual`]: https://guava.dev/releases/snapshot/api/docs/com/google/common/collect/Iterables.html#elementsEqual-java.lang.Iterable-java.lang.Iterable-
-[`LinkedList`]: http://docs.oracle.com/javase/8/docs/api/java/util/LinkedList.html
+[`LinkedList`]: https://docs.oracle.com/javase/8/docs/api/java/util/LinkedList.html
 [`ListMultimap`]: https://guava.dev/releases/snapshot/api/docs/com/google/common/collect/ListMultimap.html
 [`LongSparseArray`]: https://developer.android.com/reference/android/util/LongSparseArray
 [`Multimap`]: https://guava.dev/releases/snapshot/api/docs/com/google/common/collect/Multimap.html
 [`Multiset`]: https://guava.dev/releases/snapshot/api/docs/com/google/common/collect/Multiset.html
 [`SetMultimap`]: https://guava.dev/releases/snapshot/api/docs/com/google/common/collect/SetMultimap.html
 [`SparseArray`]: https://developer.android.com/reference/android/util/SparseArray
-[`Queue`]: http://docs.oracle.com/javase/8/docs/api/java/util/Queue.html
-[`CharSequence`]: http://docs.oracle.com/javase/8/docs/api/java/lang/CharSequence.html
-[`java.util.Date`]: http://docs.oracle.com/javase/8/docs/api/java/util/Date.html
+[`Queue`]: https://docs.oracle.com/javase/8/docs/api/java/util/Queue.html
+[`CharSequence`]: https://docs.oracle.com/javase/8/docs/api/java/lang/CharSequence.html
+[`java.util.Date`]: https://docs.oracle.com/javase/8/docs/api/java/util/Date.html
 [`ImmutableCollection`]: https://guava.dev/releases/snapshot-jre/api/docs/com/google/common/collect/ImmutableCollection.html
diff --git a/docs/bugpattern/UnnecessarySetDefault.md b/docs/bugpattern/UnnecessarySetDefault.md
index 99c757b6074..4c5d67a02eb 100644
--- a/docs/bugpattern/UnnecessarySetDefault.md
+++ b/docs/bugpattern/UnnecessarySetDefault.md
@@ -1,4 +1,4 @@
 NullPointerTester comes with built-in support for some well known types like
 `Optional` and `ImmutableList` via guava's
-[`ArbitraryInstances`](http://static.javadoc.io/com.google.guava/guava-testlib/23.0/com/google/common/testing/ArbitraryInstances.html)
+[`ArbitraryInstances`](https://static.javadoc.io/com.google.guava/guava-testlib/23.0/com/google/common/testing/ArbitraryInstances.html)
 class. Explicitly calling `setDefault` for these types is unnecessary.
diff --git a/docs/bugpattern/UnsafeFinalization.md b/docs/bugpattern/UnsafeFinalization.md
index c2a29b6646b..5a2e658895b 100644
--- a/docs/bugpattern/UnsafeFinalization.md
+++ b/docs/bugpattern/UnsafeFinalization.md
@@ -66,6 +66,6 @@ object instead.
 
 ## References
 
-*   [Boehm, "Destructors, finalizers, and synchronization." POPL 2003.](http://www.hpl.hp.com/techreports/2002/HPL-2002-335.html)
+*   [Boehm, "Destructors, finalizers, and synchronization." POPL 2003.](https://www.hpl.hp.com/techreports/2002/HPL-2002-335.html)
     Section 3.4 discusses this problem.
 *   [Java Language Specification 12.6.2, "Interaction with the Memory Model."](https://docs.oracle.com/javase/specs/jls/se9/html/jls-12.html#jls-12.6.2)
diff --git a/docs/bugpattern/UnsafeReflectiveConstructionCast.md b/docs/bugpattern/UnsafeReflectiveConstructionCast.md
index 7d0cc345d97..643efffcc24 100644
--- a/docs/bugpattern/UnsafeReflectiveConstructionCast.md
+++ b/docs/bugpattern/UnsafeReflectiveConstructionCast.md
@@ -15,4 +15,4 @@ Class.forName(someString).asSubclass(Foo.class).getDeclaredConstructor(...).newI
 
 This has caused issues in the past:
 
-CVE-2014-7911 - http://seclists.org/fulldisclosure/2014/Nov/51
+CVE-2014-7911 - https://seclists.org/fulldisclosure/2014/Nov/51
diff --git a/docs/bugpattern/VarTypeName.md b/docs/bugpattern/VarTypeName.md
index d979a7509d3..960c39ce3ce 100644
--- a/docs/bugpattern/VarTypeName.md
+++ b/docs/bugpattern/VarTypeName.md
@@ -1,4 +1,4 @@
 As of JDK 10 `var` is a restricted local variable type and cannot be used for
 type declarations (see [JEP 286][]).
 
-[JEP 286]: http://openjdk.java.net/jeps/286
+[JEP 286]: https://openjdk.java.net/jeps/286
diff --git a/docs/bugpattern/WaitNotInLoop.md b/docs/bugpattern/WaitNotInLoop.md
index 887fe43b5e7..77dea17e866 100644
--- a/docs/bugpattern/WaitNotInLoop.md
+++ b/docs/bugpattern/WaitNotInLoop.md
@@ -161,6 +161,6 @@ synchronized (this) {
 ## More information
 
 See Java Concurrency in Practice section 14.2.2, "Waking up too soon,"
-[the Javadoc for `Object.wait()`](http://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#wait-long-),
+[the Javadoc for `Object.wait()`](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#wait-long-),
 and the "Implementation Considerations" section in
 [the Javadoc for `Condition`](https://docs.oracle.com/javase/7/docs/api/java/util/concurrent/locks/Condition.html).
diff --git a/docs/bugpattern/android/FragmentNotInstantiable.md b/docs/bugpattern/android/FragmentNotInstantiable.md
index 1e08043bc6f..531906a7cf0 100644
--- a/docs/bugpattern/android/FragmentNotInstantiable.md
+++ b/docs/bugpattern/android/FragmentNotInstantiable.md
@@ -10,7 +10,7 @@ the fragment is re-instantiated; instead, arguments should be supplied with
 `setArguments(Bundle)` and retrieved with `getArguments()`.
 
 For more information, please see the documentation for
-[Fragment](http://developer.android.com/reference/android/app/Fragment.html#Fragment\(\)).
+[Fragment](https://developer.android.com/reference/android/app/Fragment.html#Fragment\(\)).
 
 This check is an adaptation of the `ValidFragment` rule of
-[Android Lint](http://tools.android.com/tips/lint-checks).
+[Android Lint](https://tools.android.com/tips/lint-checks).
diff --git a/docs/bugpattern/android/HardCodedSdCardPath.md b/docs/bugpattern/android/HardCodedSdCardPath.md
index 3c1c064a75d..8f40055a176 100644
--- a/docs/bugpattern/android/HardCodedSdCardPath.md
+++ b/docs/bugpattern/android/HardCodedSdCardPath.md
@@ -6,9 +6,9 @@ Similarly, do not reference the `/data/data/` path directly, as it can vary in
 multi-user scenarios. You should use `Context.getFilesDir().getPath()` instead.
 
 For more information, please see the documentation for
-[android.os.Environment](http://developer.android.com/reference/android/os/Environment.html)
+[android.os.Environment](https://developer.android.com/reference/android/os/Environment.html)
 and
-[android.content.Context](http://developer.android.com/reference/android/content/Context.html).
+[android.content.Context](https://developer.android.com/reference/android/content/Context.html).
 
 This check is an adaptation of the `SdCardPath` rule of
-[Android Lint](http://tools.android.com/tips/lint-checks).
+[Android Lint](https://tools.android.com/tips/lint-checks).
diff --git a/docs/bugpattern/nullness/UnnecessaryCheckNotNull.md b/docs/bugpattern/nullness/UnnecessaryCheckNotNull.md
index 7b0bed50398..694ef613373 100644
--- a/docs/bugpattern/nullness/UnnecessaryCheckNotNull.md
+++ b/docs/bugpattern/nullness/UnnecessaryCheckNotNull.md
@@ -20,7 +20,7 @@ still checked to be null and is thus redundant.
     such methods is not a literal.
 
 *   When a primitive is passed as the argument to check, the primitive will be
-    [autoboxed](http://docs.oracle.com/javase/7/docs/technotes/guides/language/autoboxing.html)
+    [autoboxed](https://docs.oracle.com/javase/7/docs/technotes/guides/language/autoboxing.html)
     into a boxed object, which is non-null, causing the check to always pass
     without the condition being evaluated. If the intent was to ensure that the
     primitive met some criterion (e.g., a boolean that should be non-null),
diff --git a/pom.xml b/pom.xml
index 2b7b6439a0b..6f7705ee04e 100644
--- a/pom.xml
+++ b/pom.xml
@@ -50,7 +50,7 @@
 
   <organization>
     <name>Google LLC</name>
-    <url>http://www.google.com</url>
+    <url>https://www.google.com</url>
   </organization>
 
   <developers>


Test patch:
diff --git a/annotation/src/test/java/com/google/errorprone/BugPatternValidatorTest.java b/annotation/src/test/java/com/google/errorprone/BugPatternValidatorTest.java
index a7e054756a6..bdb5f6f15bc 100644
--- a/annotation/src/test/java/com/google/errorprone/BugPatternValidatorTest.java
+++ b/annotation/src/test/java/com/google/errorprone/BugPatternValidatorTest.java
@@ -70,7 +70,7 @@ public void linkTypeNoneButIncludesLink() {
         explanation = "linkType none but includes link",
         severity = SeverityLevel.ERROR,
         linkType = LinkType.NONE,
-        link = "http://foo")
+        link = "https://foo")
     final class BugPatternTestClass {}
 
     BugPattern annotation = BugPatternTestClass.class.getAnnotation(BugPattern.class);
@@ -85,7 +85,7 @@ public void linkTypeCustomAndIncludesLink() throws Exception {
         explanation = "linkType custom and includes link",
         severity = SeverityLevel.ERROR,
         linkType = LinkType.CUSTOM,
-        link = "http://foo")
+        link = "https://foo")
     final class BugPatternTestClass {}
 
     BugPattern annotation = BugPatternTestClass.class.getAnnotation(BugPattern.class);
diff --git a/check_api/src/test/java/com/google/errorprone/matchers/DescriptionTest.java b/check_api/src/test/java/com/google/errorprone/matchers/DescriptionTest.java
index c3338a12a93..31a5231c47a 100644
--- a/check_api/src/test/java/com/google/errorprone/matchers/DescriptionTest.java
+++ b/check_api/src/test/java/com/google/errorprone/matchers/DescriptionTest.java
@@ -133,8 +133,8 @@ public void customLinkOverride() {
         new CustomLinkChecker()
             .buildDescription((DiagnosticPosition) new MockTree())
             .setMessage("custom message")
-            .setLinkUrl("http://foo")
+            .setLinkUrl("https://foo")
             .build();
-    assertThat(description.getMessage()).contains("http://foo");
+    assertThat(description.getMessage()).contains("https://foo");
   }
 }
diff --git a/core/src/test/java/com/google/errorprone/bugpatterns/OutlineNoneTest.java b/core/src/test/java/com/google/errorprone/bugpatterns/OutlineNoneTest.java
index ae2a7839b8d..65eba093b87 100644
--- a/core/src/test/java/com/google/errorprone/bugpatterns/OutlineNoneTest.java
+++ b/core/src/test/java/com/google/errorprone/bugpatterns/OutlineNoneTest.java
@@ -40,7 +40,7 @@ public void template() {
 interface Test {
   // BUG: Diagnostic contains: OutlineNone
   @Template(
-      ".body {color: red;outline: 0px;}<a href=http://outlinenone.com style=\\"outline:none\\">")
+      ".body {color: red;outline: 0px;}<a href=https://outlinenone.com style=\\"outline:none\\">")
   SafeHtml myElement();
 
   // BUG: Diagnostic contains: OutlineNone
@@ -62,7 +62,7 @@ public void templateMutliline() {
 
 interface Test {
   // BUG: Diagnostic contains: OutlineNone
-  @Template(".body {color: red;}\\n" + "<a href=http://outlinenone.com style=\\"outline:none\\">")
+  @Template(".body {color: red;}\\n" + "<a href=https://outlinenone.com style=\\"outline:none\\">")
   SafeHtml myElement();
 }
 """)
diff --git a/core/src/test/java/com/google/errorprone/bugpatterns/javadoc/InvalidLinkTest.java b/core/src/test/java/com/google/errorprone/bugpatterns/javadoc/InvalidLinkTest.java
index 9c5316df818..ef724297b2c 100644
--- a/core/src/test/java/com/google/errorprone/bugpatterns/javadoc/InvalidLinkTest.java
+++ b/core/src/test/java/com/google/errorprone/bugpatterns/javadoc/InvalidLinkTest.java
@@ -41,7 +41,7 @@ public void httpLink() {
             "Test.java",
             """
             interface Test {
-              /** {@link http://foo/bar/baz} */
+              /** {@link https://foo/bar/baz} */
               void foo();
             }
             """)
@@ -49,7 +49,7 @@ interface Test {
             "Test.java",
             """
             interface Test {
-              /** <a href="http://foo/bar/baz">link</a> */
+              /** <a href="https://foo/bar/baz">link</a> */
               void foo();
             }
             """)
@@ -63,7 +63,7 @@ public void httpLink_lineBreak() {
             "Test.java",
             """
             interface Test {
-              /** {@link http://foo/bar/baz foo} */
+              /** {@link https://foo/bar/baz foo} */
               void foo();
             }
             """)
@@ -71,7 +71,7 @@ interface Test {
             "Test.java",
             """
             interface Test {
-              /** <a href="http://foo/bar/baz">foo</a> */
+              /** <a href="https://foo/bar/baz">foo</a> */
               void foo();
             }
             """)
diff --git a/core/src/test/java/com/google/errorprone/bugpatterns/javadoc/UnescapedEntityTest.java b/core/src/test/java/com/google/errorprone/bugpatterns/javadoc/UnescapedEntityTest.java
index be558ac0c2f..06b07b4d835 100644
--- a/core/src/test/java/com/google/errorprone/bugpatterns/javadoc/UnescapedEntityTest.java
+++ b/core/src/test/java/com/google/errorprone/bugpatterns/javadoc/UnescapedEntityTest.java
@@ -295,7 +295,7 @@ public void badSee() {
 
             interface Test {
               /**
-               * @see <a href="http://google.com">google</a>
+               * @see <a href="https://google.com">google</a>
                */
               void foo(List<Integer> foos);
             }
diff --git a/core/src/test/java/com/google/errorprone/bugpatterns/javadoc/UrlInSeeTest.java b/core/src/test/java/com/google/errorprone/bugpatterns/javadoc/UrlInSeeTest.java
index ed9f4893592..03df67ba668 100644
--- a/core/src/test/java/com/google/errorprone/bugpatterns/javadoc/UrlInSeeTest.java
+++ b/core/src/test/java/com/google/errorprone/bugpatterns/javadoc/UrlInSeeTest.java
@@ -36,14 +36,14 @@ public void positive() {
             "Test.java",
             """
             /**
-             * @see http://foo for more details
+             * @see https://foo for more details
              */
             class Test {}
             """)
         .addOutputLines(
             "Test.java",
             """
-            /** See http://foo for more details */
+            /** See https://foo for more details */
             class Test {}
             """)
         .doTest(TEXT_MATCH);
diff --git a/core/src/test/java/com/google/errorprone/dataflow/nullnesspropagation/NullnessPropagationTest.java b/core/src/test/java/com/google/errorprone/dataflow/nullnesspropagation/NullnessPropagationTest.java
index 6f939270560..d5fb4f34d35 100644
--- a/core/src/test/java/com/google/errorprone/dataflow/nullnesspropagation/NullnessPropagationTest.java
+++ b/core/src/test/java/com/google/errorprone/dataflow/nullnesspropagation/NullnessPropagationTest.java
@@ -1609,7 +1609,7 @@ void method() {
          * We'd prefer for this to be non-null, but we don't run the analysis over the enclosing
          * class's enclosing method, so our captured-variable handling is limited to compile-time
          * constants, which include only primitives and strings:
-         * http://docs.oracle.com/javase/specs/jls/se7/html/jls-15.html#jls-15.28
+         * https://docs.oracle.com/javase/specs/jls/se7/html/jls-15.html#jls-15.28
          */
         // BUG: Diagnostic contains: (Nullable)
         triggerNullnessChecker(nonnull);