From 514f212777da34df57fb9ce875ce77948bf95473 Mon Sep 17 00:00:00 2001 From: cpovirk Date: Fri, 19 Jul 2024 08:59:31 -0700 Subject: [PATCH] Update links. RELNOTES=n/a PiperOrigin-RevId: 654022683 --- .../testers/CollectionAddAllTester.java | 10 +++-- .../testing/testers/CollectionAddTester.java | 5 ++- .../common/testing/ArbitraryInstances.java | 2 +- .../collect/testing/OpenJdk6MapTests.java | 2 +- .../com/google/common/base/CharMatcher.java | 3 +- .../com/google/common/base/Throwables.java | 3 +- .../src/com/google/common/collect/Lists.java | 23 +++++++---- .../src/com/google/common/collect/Maps.java | 27 ++++++++----- .../src/com/google/common/collect/Sets.java | 25 +++++++----- .../src/com/google/common/hash/Hashing.java | 2 +- .../com/google/common/html/HtmlEscapers.java | 9 +++-- .../guava/src/com/google/common/io/Files.java | 4 +- .../com/google/common/net/HttpHeaders.java | 20 ++++++++-- .../src/com/google/common/net/MediaType.java | 29 +++++++++++--- .../com/google/common/net/UrlEscapers.java | 38 ++++++++++--------- .../common/annotations/Annotations.gwt.xml | 4 +- .../src/com/google/common/base/Base.gwt.xml | 4 +- .../src/com/google/common/cache/Cache.gwt.xml | 4 +- .../com/google/common/collect/Collect.gwt.xml | 4 +- .../com/google/common/escape/Escape.gwt.xml | 4 +- .../src/com/google/common/html/Html.gwt.xml | 4 +- guava-gwt/src/com/google/common/io/Io.gwt.xml | 4 +- .../src/com/google/common/math/Math.gwt.xml | 4 +- .../src/com/google/common/net/Net.gwt.xml | 4 +- .../common/primitives/Primitives.gwt.xml | 4 +- .../common/util/concurrent/Concurrent.gwt.xml | 4 +- .../src/com/google/common/xml/Xml.gwt.xml | 4 +- .../publicsuffix/PublicSuffixPatterns.gwt.xml | 4 +- .../publicsuffix/PublicSuffixType.gwt.xml | 4 +- .../common/collect/testing/Testing.gwt.xml | 4 +- .../collect/testing/google/Google.gwt.xml | 4 +- .../common/escape/testing/Testing.gwt.xml | 4 +- .../com/google/common/testing/Testing.gwt.xml | 4 +- .../testers/CollectionAddAllTester.java | 10 +++-- .../testing/testers/CollectionAddTester.java | 5 ++- .../common/testing/ArbitraryInstances.java | 2 +- .../collect/testing/OpenJdk6MapTests.java | 2 +- .../com/google/common/base/CharMatcher.java | 3 +- .../com/google/common/base/Throwables.java | 3 +- .../src/com/google/common/collect/Lists.java | 23 +++++++---- guava/src/com/google/common/collect/Maps.java | 27 ++++++++----- guava/src/com/google/common/collect/Sets.java | 25 +++++++----- guava/src/com/google/common/hash/Hashing.java | 2 +- .../com/google/common/html/HtmlEscapers.java | 9 +++-- guava/src/com/google/common/io/Files.java | 4 +- guava/src/com/google/common/io/MoreFiles.java | 4 +- .../com/google/common/net/HttpHeaders.java | 20 ++++++++-- .../src/com/google/common/net/MediaType.java | 29 +++++++++++--- .../com/google/common/net/UrlEscapers.java | 38 ++++++++++--------- 49 files changed, 323 insertions(+), 157 deletions(-) diff --git a/android/guava-testlib/src/com/google/common/collect/testing/testers/CollectionAddAllTester.java b/android/guava-testlib/src/com/google/common/collect/testing/testers/CollectionAddAllTester.java index 09094ac23b84..f868e6e0ddfb 100644 --- a/android/guava-testlib/src/com/google/common/collect/testing/testers/CollectionAddAllTester.java +++ b/android/guava-testlib/src/com/google/common/collect/testing/testers/CollectionAddAllTester.java @@ -178,8 +178,9 @@ public static Method getAddAllNullUnsupportedMethod() { /** * Returns the {@link Method} instance for {@link #testAddAll_unsupportedNonePresent()} so that * tests can suppress it with {@code FeatureSpecificTestSuiteBuilder.suppressing()} while we - * figure out what to do with {@code ConcurrentHashMap} support for - * {@code entrySet().add()}. + * figure out what to do with {@code + * ConcurrentHashMap} support for {@code entrySet().add()}. */ @J2ktIncompatible @GwtIncompatible // reflection @@ -190,8 +191,9 @@ public static Method getAddAllUnsupportedNonePresentMethod() { /** * Returns the {@link Method} instance for {@link #testAddAll_unsupportedSomePresent()} so that * tests can suppress it with {@code FeatureSpecificTestSuiteBuilder.suppressing()} while we - * figure out what to do with {@code ConcurrentHashMap} support for - * {@code entrySet().add()}. + * figure out what to do with {@code + * ConcurrentHashMap} support for {@code entrySet().add()}. */ @J2ktIncompatible @GwtIncompatible // reflection diff --git a/android/guava-testlib/src/com/google/common/collect/testing/testers/CollectionAddTester.java b/android/guava-testlib/src/com/google/common/collect/testing/testers/CollectionAddTester.java index 5b64d4790fe4..7f8392d3c1e8 100644 --- a/android/guava-testlib/src/com/google/common/collect/testing/testers/CollectionAddTester.java +++ b/android/guava-testlib/src/com/google/common/collect/testing/testers/CollectionAddTester.java @@ -133,8 +133,9 @@ public static Method getAddNullUnsupportedMethod() { /** * Returns the {@link Method} instance for {@link #testAdd_unsupportedNotPresent()} so that tests * can suppress it with {@code FeatureSpecificTestSuiteBuilder.suppressing()} while we figure out - * what to do with {@code ConcurrentHashMap} support for {@code - * entrySet().add()}. + * what to do with {@code + * ConcurrentHashMap} support for {@code entrySet().add()}. */ @J2ktIncompatible @GwtIncompatible // reflection diff --git a/android/guava-testlib/src/com/google/common/testing/ArbitraryInstances.java b/android/guava-testlib/src/com/google/common/testing/ArbitraryInstances.java index 3b9f3727fc41..8fabfadc55e1 100644 --- a/android/guava-testlib/src/com/google/common/testing/ArbitraryInstances.java +++ b/android/guava-testlib/src/com/google/common/testing/ArbitraryInstances.java @@ -184,7 +184,7 @@ public int compare(Field left, Field right) { /** * Returns a new {@code MatchResult} that corresponds to a successful match. Apache Harmony (used * in Android) requires a successful match in order to generate a {@code MatchResult}: - * http://goo.gl/5VQFmC + * https://cs.android.com/android/platform/superproject/+/android-2.3.7_r1:libcore/luni/src/main/java/java/util/regex/Matcher.java;l=550;drc=5850271b4ab93ebc27c1d49169a348c6be3c7f04 */ private static MatchResult createMatchResult() { Matcher matcher = Pattern.compile(".").matcher("X"); diff --git a/android/guava-testlib/test/com/google/common/collect/testing/OpenJdk6MapTests.java b/android/guava-testlib/test/com/google/common/collect/testing/OpenJdk6MapTests.java index 8e18d654b5aa..49b4710d965e 100644 --- a/android/guava-testlib/test/com/google/common/collect/testing/OpenJdk6MapTests.java +++ b/android/guava-testlib/test/com/google/common/collect/testing/OpenJdk6MapTests.java @@ -66,7 +66,7 @@ protected Collection suppressForConcurrentHashMap() { * The entrySet() of ConcurrentHashMap, unlike that of other Map * implementations, supports add() under JDK8. This seems problematic, but I * didn't see that discussed in the review, which included many other - * changes: http://goo.gl/okTTdr + * changes: https://mail.openjdk.org/pipermail/core-libs-dev/2013-May/thread.html#17367 * * TODO(cpovirk): decide what the best long-term action here is: force users * to suppress (as we do now), stop testing entrySet().add() at all, make diff --git a/android/guava/src/com/google/common/base/CharMatcher.java b/android/guava/src/com/google/common/base/CharMatcher.java index c6416e93a858..b346fe0dd7a2 100644 --- a/android/guava/src/com/google/common/base/CharMatcher.java +++ b/android/guava/src/com/google/common/base/CharMatcher.java @@ -133,7 +133,8 @@ public static CharMatcher none() { * illustrated here. * This is not the same definition used by other Java APIs. (See a comparison of several definitions of "whitespace".) + * href="https://docs.google.com/spreadsheets/d/1kq4ECwPjHX9B8QUCTPclgsDCXYaj7T-FlT4tB5q3ahk/edit">comparison + * of several definitions of "whitespace".) * *

All Unicode White_Space characters are on the BMP and thus supported by this API. * diff --git a/android/guava/src/com/google/common/base/Throwables.java b/android/guava/src/com/google/common/base/Throwables.java index 73dad9790a85..c461316562bc 100644 --- a/android/guava/src/com/google/common/base/Throwables.java +++ b/android/guava/src/com/google/common/base/Throwables.java @@ -223,7 +223,8 @@ public static void propagateIfPossi * directly, or use a combination of {@link #throwIfUnchecked} and {@code throw new * RuntimeException(e)}. But consider whether users would be better off if your API threw a * different type of exception. For background on the deprecation, read Why we deprecated {@code Throwables.propagate}. + * href="https://github.com/google/guava/wiki/Why-we-deprecated-Throwables.propagate">Why we + * deprecated {@code Throwables.propagate}. */ @CanIgnoreReturnValue @J2ktIncompatible diff --git a/android/guava/src/com/google/common/collect/Lists.java b/android/guava/src/com/google/common/collect/Lists.java index 327a2004975f..23c37fb39520 100644 --- a/android/guava/src/com/google/common/collect/Lists.java +++ b/android/guava/src/com/google/common/collect/Lists.java @@ -77,7 +77,9 @@ private Lists() {} * *

Note: this method is now unnecessary and should be treated as deprecated. Instead, * use the {@code ArrayList} {@linkplain ArrayList#ArrayList() constructor} directly, taking - * advantage of "diamond" syntax. + * advantage of "diamond" + * syntax. */ @GwtCompatible(serializable = true) public static ArrayList newArrayList() { @@ -119,7 +121,9 @@ private Lists() {} * *

Note: if {@code elements} is a {@link Collection}, you don't need this method. Use * the {@code ArrayList} {@linkplain ArrayList#ArrayList(Collection) constructor} directly, taking - * advantage of "diamond" syntax. + * advantage of "diamond" + * syntax. */ @GwtCompatible(serializable = true) public static ArrayList newArrayList( @@ -160,9 +164,10 @@ static int computeArrayListCapacity(int arraySize) { * *

Note: this method is now unnecessary and should be treated as deprecated. Instead, * use {@code new }{@link ArrayList#ArrayList(int) ArrayList}{@code <>(int)} directly, taking - * advantage of "diamond" syntax. (Unlike here, there is no risk - * of overload ambiguity, since the {@code ArrayList} constructors very wisely did not accept - * varargs.) + * advantage of "diamond" + * syntax. (Unlike here, there is no risk of overload ambiguity, since the {@code ArrayList} + * constructors very wisely did not accept varargs.) * * @param initialArraySize the exact size of the initial backing array for the returned array list * ({@code ArrayList} documentation calls this value the "capacity") @@ -210,7 +215,9 @@ static int computeArrayListCapacity(int arraySize) { * *

Note: this method is now unnecessary and should be treated as deprecated. Instead, * use the {@code LinkedList} {@linkplain LinkedList#LinkedList() constructor} directly, taking - * advantage of "diamond" syntax. + * advantage of "diamond" + * syntax. */ @GwtCompatible(serializable = true) public static LinkedList newLinkedList() { @@ -231,7 +238,9 @@ static int computeArrayListCapacity(int arraySize) { * *

Note: if {@code elements} is a {@link Collection}, you don't need this method. Use * the {@code LinkedList} {@linkplain LinkedList#LinkedList(Collection) constructor} directly, - * taking advantage of "diamond" syntax. + * taking advantage of "diamond" + * syntax. */ @GwtCompatible(serializable = true) public static LinkedList newLinkedList( diff --git a/android/guava/src/com/google/common/collect/Maps.java b/android/guava/src/com/google/common/collect/Maps.java index 346fa2db6467..b0d8e15dea29 100644 --- a/android/guava/src/com/google/common/collect/Maps.java +++ b/android/guava/src/com/google/common/collect/Maps.java @@ -231,7 +231,8 @@ public static , V> ImmutableMap immutableEnumMap( * *

Note: this method is now unnecessary and should be treated as deprecated. Instead, * use the {@code HashMap} constructor directly, taking advantage of "diamond" syntax. + * href="https://docs.oracle.com/javase/tutorial/java/generics/genTypeInference.html#type-inference-instantiation">"diamond" + * syntax. * * @return a new, empty {@code HashMap} */ @@ -249,7 +250,8 @@ HashMap newHashMap() { * *

Note: this method is now unnecessary and should be treated as deprecated. Instead, * use the {@code HashMap} constructor directly, taking advantage of "diamond" syntax. + * href="https://docs.oracle.com/javase/tutorial/java/generics/genTypeInference.html#type-inference-instantiation">"diamond" + * syntax. * * @param map the mappings to be placed in the new map * @return a new {@code HashMap} initialized with the mappings from {@code map} @@ -309,7 +311,8 @@ static int capacity(int expectedSize) { * *

Note: this method is now unnecessary and should be treated as deprecated. Instead, * use the {@code LinkedHashMap} constructor directly, taking advantage of "diamond" syntax. + * href="https://docs.oracle.com/javase/tutorial/java/generics/genTypeInference.html#type-inference-instantiation">"diamond" + * syntax. * * @return a new, empty {@code LinkedHashMap} */ @@ -326,7 +329,8 @@ LinkedHashMap newLinkedHashMap() { * *

Note: this method is now unnecessary and should be treated as deprecated. Instead, * use the {@code LinkedHashMap} constructor directly, taking advantage of "diamond" syntax. + * href="https://docs.oracle.com/javase/tutorial/java/generics/genTypeInference.html#type-inference-instantiation">"diamond" + * syntax. * * @param map the mappings to be placed in the new map * @return a new, {@code LinkedHashMap} initialized with the mappings from {@code map} @@ -370,7 +374,8 @@ public static ConcurrentMap newConcurrentMap() { * *

Note: this method is now unnecessary and should be treated as deprecated. Instead, * use the {@code TreeMap} constructor directly, taking advantage of "diamond" syntax. + * href="https://docs.oracle.com/javase/tutorial/java/generics/genTypeInference.html#type-inference-instantiation">"diamond" + * syntax. * * @return a new, empty {@code TreeMap} */ @@ -388,7 +393,8 @@ public static ConcurrentMap newConcurrentMap() { * *

Note: this method is now unnecessary and should be treated as deprecated. Instead, * use the {@code TreeMap} constructor directly, taking advantage of "diamond" syntax. + * href="https://docs.oracle.com/javase/tutorial/java/generics/genTypeInference.html#type-inference-instantiation">"diamond" + * syntax. * * @param map the sorted map whose mappings are to be placed in the new map and whose comparator * is to be used to sort the new map @@ -408,7 +414,8 @@ public static ConcurrentMap newConcurrentMap() { * *

Note: this method is now unnecessary and should be treated as deprecated. Instead, * use the {@code TreeMap} constructor directly, taking advantage of "diamond" syntax. + * href="https://docs.oracle.com/javase/tutorial/java/generics/genTypeInference.html#type-inference-instantiation">"diamond" + * syntax. * * @param comparator the comparator to sort the keys with * @return a new, empty {@code TreeMap} @@ -439,7 +446,8 @@ TreeMap newTreeMap(@CheckForNull Comparator comparator) { * *

Note: this method is now unnecessary and should be treated as deprecated. Instead, * use the {@code EnumMap} constructor directly, taking advantage of "diamond" syntax. + * href="https://docs.oracle.com/javase/tutorial/java/generics/genTypeInference.html#type-inference-instantiation">"diamond" + * syntax. * * @param map the map from which to initialize this {@code EnumMap} * @return a new {@code EnumMap} initialized with the mappings from {@code map} @@ -456,7 +464,8 @@ TreeMap newTreeMap(@CheckForNull Comparator comparator) { * *

Note: this method is now unnecessary and should be treated as deprecated. Instead, * use the {@code IdentityHashMap} constructor directly, taking advantage of "diamond" syntax. + * href="https://docs.oracle.com/javase/tutorial/java/generics/genTypeInference.html#type-inference-instantiation">"diamond" + * syntax. * * @return a new, empty {@code IdentityHashMap} */ diff --git a/android/guava/src/com/google/common/collect/Sets.java b/android/guava/src/com/google/common/collect/Sets.java index a92d608a2094..e386fc4faa7b 100644 --- a/android/guava/src/com/google/common/collect/Sets.java +++ b/android/guava/src/com/google/common/collect/Sets.java @@ -177,7 +177,8 @@ public static > EnumSet newEnumSet( * *

Note: this method is now unnecessary and should be treated as deprecated. Instead, * use the {@code HashSet} constructor directly, taking advantage of "diamond" syntax. + * href="https://docs.oracle.com/javase/tutorial/java/generics/genTypeInference.html#type-inference-instantiation">"diamond" + * syntax. */ public static HashSet newHashSet() { return new HashSet<>(); @@ -216,7 +217,8 @@ public static > EnumSet newEnumSet( * *

Note: if {@code elements} is a {@link Collection}, you don't need this method. * Instead, use the {@code HashSet} constructor directly, taking advantage of "diamond" syntax. + * href="https://docs.oracle.com/javase/tutorial/java/generics/genTypeInference.html#type-inference-instantiation">"diamond" + * syntax. * *

Overall, this method is not very useful and will likely be deprecated in the future. */ @@ -303,7 +305,8 @@ public static Set newConcurrentHashSet(Iterable elements) { * *

Note: this method is now unnecessary and should be treated as deprecated. Instead, * use the {@code LinkedHashSet} constructor directly, taking advantage of "diamond" syntax. + * href="https://docs.oracle.com/javase/tutorial/java/generics/genTypeInference.html#type-inference-instantiation">"diamond" + * syntax. * * @return a new, empty {@code LinkedHashSet} */ @@ -319,7 +322,8 @@ public static Set newConcurrentHashSet(Iterable elements) { * *

Note: if {@code elements} is a {@link Collection}, you don't need this method. * Instead, use the {@code LinkedHashSet} constructor directly, taking advantage of "diamond" syntax. + * href="https://docs.oracle.com/javase/tutorial/java/generics/genTypeInference.html#type-inference-instantiation">"diamond" + * syntax. * *

Overall, this method is not very useful and will likely be deprecated in the future. * @@ -363,7 +367,8 @@ public static Set newConcurrentHashSet(Iterable elements) { * *

Note: this method is now unnecessary and should be treated as deprecated. Instead, * use the {@code TreeSet} constructor directly, taking advantage of "diamond" syntax. + * href="https://docs.oracle.com/javase/tutorial/java/generics/genTypeInference.html#type-inference-instantiation">"diamond" + * syntax. * * @return a new, empty {@code TreeSet} */ @@ -385,7 +390,8 @@ public static TreeSet newTreeSet() { * *

Note: this method is now unnecessary and should be treated as deprecated. Instead, * use the {@code TreeSet} constructor directly, taking advantage of "diamond" syntax. + * href="https://docs.oracle.com/javase/tutorial/java/generics/genTypeInference.html#type-inference-instantiation">"diamond" + * syntax. * *

This method is just a small convenience for creating an empty set and then calling {@link * Iterables#addAll}. This method is not very useful and will likely be deprecated in the future. @@ -408,9 +414,10 @@ public static TreeSet newTreeSet(Iterable * *

Note: this method is now unnecessary and should be treated as deprecated. Instead, * use the {@code TreeSet} constructor directly, taking advantage of "diamond" syntax. One caveat to this is that the {@code TreeSet} - * constructor uses a null {@code Comparator} to mean "natural ordering," whereas this factory - * rejects null. Clean your code accordingly. + * href="https://docs.oracle.com/javase/tutorial/java/generics/genTypeInference.html#type-inference-instantiation">"diamond" + * syntax. One caveat to this is that the {@code TreeSet} constructor uses a null {@code + * Comparator} to mean "natural ordering," whereas this factory rejects null. Clean your code + * accordingly. * * @param comparator the comparator to use to sort the set * @return a new, empty {@code TreeSet} diff --git a/android/guava/src/com/google/common/hash/Hashing.java b/android/guava/src/com/google/common/hash/Hashing.java index bc19a66ead3e..0b4793ffdcb5 100644 --- a/android/guava/src/com/google/common/hash/Hashing.java +++ b/android/guava/src/com/google/common/hash/Hashing.java @@ -35,7 +35,7 @@ * utilities. * *

A comparison of the various hash functions can be found here. + * href="https://docs.google.com/spreadsheets/d/1_q2EVcxA2HjcrlVMbaqXwMj31h9M5-Bqj_m8vITOwwk/">here. * * @author Kevin Bourrillion * @author Dimitris Andreou diff --git a/android/guava/src/com/google/common/html/HtmlEscapers.java b/android/guava/src/com/google/common/html/HtmlEscapers.java index c42638871507..51e70e92a7db 100644 --- a/android/guava/src/com/google/common/html/HtmlEscapers.java +++ b/android/guava/src/com/google/common/html/HtmlEscapers.java @@ -25,10 +25,11 @@ * One Google-authored templating system available for external use is Closure Templates. * - *

HTML escaping is particularly tricky: For example, some - * elements' text contents must not be HTML escaped. As a result, it is impossible to escape an - * HTML document correctly without domain-specific knowledge beyond what {@code HtmlEscapers} - * provides. We strongly encourage the use of HTML templating systems. + *

HTML escaping is particularly tricky: For example, some elements' text contents must not be HTML + * escaped. As a result, it is impossible to escape an HTML document correctly without + * domain-specific knowledge beyond what {@code HtmlEscapers} provides. We strongly encourage the + * use of HTML templating systems. * * @author Sven Mawson * @author David Beaumont diff --git a/android/guava/src/com/google/common/io/Files.java b/android/guava/src/com/google/common/io/Files.java index 6397135aae87..0669038c3bd4 100644 --- a/android/guava/src/com/google/common/io/Files.java +++ b/android/guava/src/com/google/common/io/Files.java @@ -791,7 +791,9 @@ public static String simplifyPath(String pathname) { * behavior that the {@link File} API does not already account for. For example, on NTFS it will * report {@code "txt"} as the extension for the filename {@code "foo.exe:.txt"} even though NTFS * will drop the {@code ":.txt"} part of the name when the file is actually created on the - * filesystem due to NTFS's Alternate Data Streams. + * filesystem due to NTFS's Alternate + * Data Streams. * * @since 11.0 */ diff --git a/android/guava/src/com/google/common/net/HttpHeaders.java b/android/guava/src/com/google/common/net/HttpHeaders.java index 244d6c970375..2c57debe0519 100644 --- a/android/guava/src/com/google/common/net/HttpHeaders.java +++ b/android/guava/src/com/google/common/net/HttpHeaders.java @@ -366,7 +366,8 @@ private ReferrerPolicyValues() {} public static final String SET_COOKIE2 = "Set-Cookie2"; /** - * The HTTP {@code SourceMap} header field name. + * The HTTP {@code + * SourceMap} header field name. * * @since 27.1 */ @@ -456,18 +457,25 @@ private ReferrerPolicyValues() {} public static final String X_FORWARDED_FOR = "X-Forwarded-For"; /** The HTTP {@code X-Forwarded-Proto} header field name. */ public static final String X_FORWARDED_PROTO = "X-Forwarded-Proto"; + /** - * The HTTP {@code X-Forwarded-Host} header field name. + * The HTTP {@code + * X-Forwarded-Host} header field name. * * @since 20.0 */ public static final String X_FORWARDED_HOST = "X-Forwarded-Host"; + /** - * The HTTP {@code X-Forwarded-Port} header field name. + * The HTTP {@code + * X-Forwarded-Port} header field name. * * @since 20.0 */ public static final String X_FORWARDED_PORT = "X-Forwarded-Port"; + /** The HTTP {@code X-Frame-Options} header field name. */ public static final String X_FRAME_OPTIONS = "X-Frame-Options"; /** The HTTP {@code X-Powered-By} header field name. */ @@ -496,8 +504,11 @@ private ReferrerPolicyValues() {} public static final String X_REQUESTED_WITH = "X-Requested-With"; /** The HTTP {@code X-User-IP} header field name. */ public static final String X_USER_IP = "X-User-IP"; + /** - * The HTTP {@code X-Download-Options} header field name. + * The HTTP {@code + * X-Download-Options} header field name. * *

When the new X-Download-Options header is present with the value {@code noopen}, the user is * prevented from opening a file download directly; instead, they must first save the file @@ -506,6 +517,7 @@ private ReferrerPolicyValues() {} * @since 24.1 */ public static final String X_DOWNLOAD_OPTIONS = "X-Download-Options"; + /** The HTTP {@code X-XSS-Protection} header field name. */ public static final String X_XSS_PROTECTION = "X-XSS-Protection"; /** diff --git a/android/guava/src/com/google/common/net/MediaType.java b/android/guava/src/com/google/common/net/MediaType.java index 99d47dca70c7..fa9c4b29a3dc 100644 --- a/android/guava/src/com/google/common/net/MediaType.java +++ b/android/guava/src/com/google/common/net/MediaType.java @@ -396,7 +396,9 @@ private static MediaType addKnownType(MediaType mediaType) { public static final MediaType DART_UTF_8 = createConstantUtf8(APPLICATION_TYPE, "dart"); /** - * Apple Passbook. + * Apple + * Passbook. * * @since 19.0 */ @@ -525,29 +527,44 @@ private static MediaType addKnownType(MediaType mediaType) { public static final MediaType MBOX = createConstant(APPLICATION_TYPE, "mbox"); /** - * Apple over-the-air mobile configuration profiles. + * Apple + * over-the-air mobile configuration profiles. * * @since 18.0 */ public static final MediaType APPLE_MOBILE_CONFIG = createConstant(APPLICATION_TYPE, "x-apple-aspen-config"); - /** Microsoft Excel spreadsheets. */ + /** + * Microsoft + * Excel spreadsheets. + */ public static final MediaType MICROSOFT_EXCEL = createConstant(APPLICATION_TYPE, "vnd.ms-excel"); /** - * Microsoft Outlook items. + * Microsoft + * Outlook items. * * @since 27.1 */ public static final MediaType MICROSOFT_OUTLOOK = createConstant(APPLICATION_TYPE, "vnd.ms-outlook"); - /** Microsoft Powerpoint presentations. */ + /** + * Microsoft + * Powerpoint presentations. + */ public static final MediaType MICROSOFT_POWERPOINT = createConstant(APPLICATION_TYPE, "vnd.ms-powerpoint"); - /** Microsoft Word documents. */ + /** + * Microsoft + * Word documents. + */ public static final MediaType MICROSOFT_WORD = createConstant(APPLICATION_TYPE, "msword"); /** diff --git a/android/guava/src/com/google/common/net/UrlEscapers.java b/android/guava/src/com/google/common/net/UrlEscapers.java index c7e15efc6d91..68cbd01e34bc 100644 --- a/android/guava/src/com/google/common/net/UrlEscapers.java +++ b/android/guava/src/com/google/common/net/UrlEscapers.java @@ -45,10 +45,12 @@ private UrlEscapers() {} /** * Returns an {@link Escaper} instance that escapes strings so they can be safely included in URL form parameter names and values. Escaping is performed - * with the UTF-8 character encoding. The caller is responsible for replacing any unpaired carriage return or line feed characters - * with a CR+LF pair on any non-file inputs before escaping them with this escaper. + * href="https://url.spec.whatwg.org/#application-x-www-form-urlencoded-percent-encode-set">URL + * form parameter names and values. Escaping is performed with the UTF-8 character encoding. + * The caller is responsible for replacing + * any unpaired carriage return or line feed characters with a CR+LF pair on any non-file + * inputs before escaping them with this escaper. * *

When escaping a String, the following rules apply: * @@ -63,9 +65,9 @@ private UrlEscapers() {} * * *

This escaper is suitable for escaping parameter names and values even when using the non-standard semicolon, rather than the ampersand, as - * a parameter delimiter. Nevertheless, we recommend using the ampersand unless you must - * interoperate with systems that require semicolons. + * href="https://www.w3.org/TR/html401/appendix/notes.html#h-B.2.2">using the non-standard + * semicolon, rather than the ampersand, as a parameter delimiter. Nevertheless, we recommend + * using the ampersand unless you must interoperate with systems that require semicolons. * *

Note: Unlike other escapers, URL escapers produce uppercase hexadecimal sequences. @@ -80,14 +82,15 @@ public static Escaper urlFormParameterEscaper() { /** * Returns an {@link Escaper} instance that escapes strings so they can be safely included in URL path segments. The returned escaper escapes all non-ASCII - * characters, even though many of these are accepted in modern - * URLs. (If the escaper were to leave these characters - * unescaped, they would be escaped by the consumer at parse time, anyway.) Additionally, the - * escaper escapes the slash character ("/"). While slashes are acceptable in URL paths, they are - * considered by the specification to be separators between "path segments." This implies that, if - * you wish for your path to contain slashes, you must escape each segment separately and then - * join them. + * href="https://url.spec.whatwg.org/#syntax-url-path-segment">URL path segments. The returned + * escaper escapes all non-ASCII characters, even though many of these are accepted in modern + * URLs. (If the escaper were to leave these + * characters unescaped, they would be escaped by the consumer at parse time, anyway.) + * Additionally, the escaper escapes the slash character ("/"). While slashes are acceptable in + * URL paths, they are considered by the specification to be separators between "path segments." + * This implies that, if you wish for your path to contain slashes, you must escape each segment + * separately and then join them. * *

When escaping a String, the following rules apply: * @@ -116,9 +119,8 @@ public static Escaper urlPathSegmentEscaper() { /** * Returns an {@link Escaper} instance that escapes strings so they can be safely included in a URL fragment. The returned escaper escapes all non-ASCII - * characters, even though many of these are accepted in modern - * URLs. + * href="https://url.spec.whatwg.org/#concept-url-fragment">URL fragment. The returned escaper + * escapes all non-ASCII characters. * *

When escaping a String, the following rules apply: * diff --git a/guava-gwt/src/com/google/common/annotations/Annotations.gwt.xml b/guava-gwt/src/com/google/common/annotations/Annotations.gwt.xml index 529baf56601c..d029b0597a94 100644 --- a/guava-gwt/src/com/google/common/annotations/Annotations.gwt.xml +++ b/guava-gwt/src/com/google/common/annotations/Annotations.gwt.xml @@ -10,7 +10,9 @@ util.concurrent tests under Guava. The problem is that GWT responds poorly to two .gwt.xml files in the same - Java package; see https://goo.gl/pRV3Yn for details. + Java package; see + https://groups.google.com/g/google-web-toolkit-contributors/c/CqYH59Dt_rQ/m/uVGW1QdUsXUJ + for details. The summary is that it ignores one file in favor of the other. util.concurrent, like nearly all our packages, has two .gwt.xml files: one diff --git a/guava-gwt/src/com/google/common/base/Base.gwt.xml b/guava-gwt/src/com/google/common/base/Base.gwt.xml index 22ca5270a38b..18dda00511f8 100644 --- a/guava-gwt/src/com/google/common/base/Base.gwt.xml +++ b/guava-gwt/src/com/google/common/base/Base.gwt.xml @@ -10,7 +10,9 @@ util.concurrent tests under Guava. The problem is that GWT responds poorly to two .gwt.xml files in the same - Java package; see https://goo.gl/pRV3Yn for details. + Java package; see + https://groups.google.com/g/google-web-toolkit-contributors/c/CqYH59Dt_rQ/m/uVGW1QdUsXUJ + for details. The summary is that it ignores one file in favor of the other. util.concurrent, like nearly all our packages, has two .gwt.xml files: one diff --git a/guava-gwt/src/com/google/common/cache/Cache.gwt.xml b/guava-gwt/src/com/google/common/cache/Cache.gwt.xml index 0f46529d3dc4..80a24d190c3f 100644 --- a/guava-gwt/src/com/google/common/cache/Cache.gwt.xml +++ b/guava-gwt/src/com/google/common/cache/Cache.gwt.xml @@ -10,7 +10,9 @@ util.concurrent tests under Guava. The problem is that GWT responds poorly to two .gwt.xml files in the same - Java package; see https://goo.gl/pRV3Yn for details. + Java package; see + https://groups.google.com/g/google-web-toolkit-contributors/c/CqYH59Dt_rQ/m/uVGW1QdUsXUJ + for details. The summary is that it ignores one file in favor of the other. util.concurrent, like nearly all our packages, has two .gwt.xml files: one diff --git a/guava-gwt/src/com/google/common/collect/Collect.gwt.xml b/guava-gwt/src/com/google/common/collect/Collect.gwt.xml index 91756f9e8b52..9350d9dd87ac 100644 --- a/guava-gwt/src/com/google/common/collect/Collect.gwt.xml +++ b/guava-gwt/src/com/google/common/collect/Collect.gwt.xml @@ -10,7 +10,9 @@ util.concurrent tests under Guava. The problem is that GWT responds poorly to two .gwt.xml files in the same - Java package; see https://goo.gl/pRV3Yn for details. + Java package; see + https://groups.google.com/g/google-web-toolkit-contributors/c/CqYH59Dt_rQ/m/uVGW1QdUsXUJ + for details. The summary is that it ignores one file in favor of the other. util.concurrent, like nearly all our packages, has two .gwt.xml files: one diff --git a/guava-gwt/src/com/google/common/escape/Escape.gwt.xml b/guava-gwt/src/com/google/common/escape/Escape.gwt.xml index a3ddbba449b9..3b4d564f689f 100644 --- a/guava-gwt/src/com/google/common/escape/Escape.gwt.xml +++ b/guava-gwt/src/com/google/common/escape/Escape.gwt.xml @@ -10,7 +10,9 @@ util.concurrent tests under Guava. The problem is that GWT responds poorly to two .gwt.xml files in the same - Java package; see https://goo.gl/pRV3Yn for details. + Java package; see + https://groups.google.com/g/google-web-toolkit-contributors/c/CqYH59Dt_rQ/m/uVGW1QdUsXUJ + for details. The summary is that it ignores one file in favor of the other. util.concurrent, like nearly all our packages, has two .gwt.xml files: one diff --git a/guava-gwt/src/com/google/common/html/Html.gwt.xml b/guava-gwt/src/com/google/common/html/Html.gwt.xml index de5e7ad51d90..df5a9cbbb30f 100644 --- a/guava-gwt/src/com/google/common/html/Html.gwt.xml +++ b/guava-gwt/src/com/google/common/html/Html.gwt.xml @@ -10,7 +10,9 @@ util.concurrent tests under Guava. The problem is that GWT responds poorly to two .gwt.xml files in the same - Java package; see https://goo.gl/pRV3Yn for details. + Java package; see + https://groups.google.com/g/google-web-toolkit-contributors/c/CqYH59Dt_rQ/m/uVGW1QdUsXUJ + for details. The summary is that it ignores one file in favor of the other. util.concurrent, like nearly all our packages, has two .gwt.xml files: one diff --git a/guava-gwt/src/com/google/common/io/Io.gwt.xml b/guava-gwt/src/com/google/common/io/Io.gwt.xml index 91756f9e8b52..9350d9dd87ac 100644 --- a/guava-gwt/src/com/google/common/io/Io.gwt.xml +++ b/guava-gwt/src/com/google/common/io/Io.gwt.xml @@ -10,7 +10,9 @@ util.concurrent tests under Guava. The problem is that GWT responds poorly to two .gwt.xml files in the same - Java package; see https://goo.gl/pRV3Yn for details. + Java package; see + https://groups.google.com/g/google-web-toolkit-contributors/c/CqYH59Dt_rQ/m/uVGW1QdUsXUJ + for details. The summary is that it ignores one file in favor of the other. util.concurrent, like nearly all our packages, has two .gwt.xml files: one diff --git a/guava-gwt/src/com/google/common/math/Math.gwt.xml b/guava-gwt/src/com/google/common/math/Math.gwt.xml index 6afbe44c1411..1a2d633638e7 100644 --- a/guava-gwt/src/com/google/common/math/Math.gwt.xml +++ b/guava-gwt/src/com/google/common/math/Math.gwt.xml @@ -10,7 +10,9 @@ util.concurrent tests under Guava. The problem is that GWT responds poorly to two .gwt.xml files in the same - Java package; see https://goo.gl/pRV3Yn for details. + Java package; see + https://groups.google.com/g/google-web-toolkit-contributors/c/CqYH59Dt_rQ/m/uVGW1QdUsXUJ + for details. The summary is that it ignores one file in favor of the other. util.concurrent, like nearly all our packages, has two .gwt.xml files: one diff --git a/guava-gwt/src/com/google/common/net/Net.gwt.xml b/guava-gwt/src/com/google/common/net/Net.gwt.xml index 039f77c1f5e4..6e2d996fea83 100644 --- a/guava-gwt/src/com/google/common/net/Net.gwt.xml +++ b/guava-gwt/src/com/google/common/net/Net.gwt.xml @@ -10,7 +10,9 @@ util.concurrent tests under Guava. The problem is that GWT responds poorly to two .gwt.xml files in the same - Java package; see https://goo.gl/pRV3Yn for details. + Java package; see + https://groups.google.com/g/google-web-toolkit-contributors/c/CqYH59Dt_rQ/m/uVGW1QdUsXUJ + for details. The summary is that it ignores one file in favor of the other. util.concurrent, like nearly all our packages, has two .gwt.xml files: one diff --git a/guava-gwt/src/com/google/common/primitives/Primitives.gwt.xml b/guava-gwt/src/com/google/common/primitives/Primitives.gwt.xml index a3ddbba449b9..3b4d564f689f 100644 --- a/guava-gwt/src/com/google/common/primitives/Primitives.gwt.xml +++ b/guava-gwt/src/com/google/common/primitives/Primitives.gwt.xml @@ -10,7 +10,9 @@ util.concurrent tests under Guava. The problem is that GWT responds poorly to two .gwt.xml files in the same - Java package; see https://goo.gl/pRV3Yn for details. + Java package; see + https://groups.google.com/g/google-web-toolkit-contributors/c/CqYH59Dt_rQ/m/uVGW1QdUsXUJ + for details. The summary is that it ignores one file in favor of the other. util.concurrent, like nearly all our packages, has two .gwt.xml files: one diff --git a/guava-gwt/src/com/google/common/util/concurrent/Concurrent.gwt.xml b/guava-gwt/src/com/google/common/util/concurrent/Concurrent.gwt.xml index 35108a7c8d15..8b3394306123 100644 --- a/guava-gwt/src/com/google/common/util/concurrent/Concurrent.gwt.xml +++ b/guava-gwt/src/com/google/common/util/concurrent/Concurrent.gwt.xml @@ -10,7 +10,9 @@ util.concurrent tests under Guava. The problem is that GWT responds poorly to two .gwt.xml files in the same - Java package; see https://goo.gl/pRV3Yn for details. + Java package; see + https://groups.google.com/g/google-web-toolkit-contributors/c/CqYH59Dt_rQ/m/uVGW1QdUsXUJ + for details. The summary is that it ignores one file in favor of the other. util.concurrent, like nearly all our packages, has two .gwt.xml files: one diff --git a/guava-gwt/src/com/google/common/xml/Xml.gwt.xml b/guava-gwt/src/com/google/common/xml/Xml.gwt.xml index eec7e7bba19c..69c4200a8f70 100644 --- a/guava-gwt/src/com/google/common/xml/Xml.gwt.xml +++ b/guava-gwt/src/com/google/common/xml/Xml.gwt.xml @@ -10,7 +10,9 @@ util.concurrent tests under Guava. The problem is that GWT responds poorly to two .gwt.xml files in the same - Java package; see https://goo.gl/pRV3Yn for details. + Java package; see + https://groups.google.com/g/google-web-toolkit-contributors/c/CqYH59Dt_rQ/m/uVGW1QdUsXUJ + for details. The summary is that it ignores one file in favor of the other. util.concurrent, like nearly all our packages, has two .gwt.xml files: one diff --git a/guava-gwt/src/com/google/thirdparty/publicsuffix/PublicSuffixPatterns.gwt.xml b/guava-gwt/src/com/google/thirdparty/publicsuffix/PublicSuffixPatterns.gwt.xml index f35ad8c4814f..9c95e8a879a8 100644 --- a/guava-gwt/src/com/google/thirdparty/publicsuffix/PublicSuffixPatterns.gwt.xml +++ b/guava-gwt/src/com/google/thirdparty/publicsuffix/PublicSuffixPatterns.gwt.xml @@ -10,7 +10,9 @@ util.concurrent tests under Guava. The problem is that GWT responds poorly to two .gwt.xml files in the same - Java package; see https://goo.gl/pRV3Yn for details. + Java package; see + https://groups.google.com/g/google-web-toolkit-contributors/c/CqYH59Dt_rQ/m/uVGW1QdUsXUJ + for details. The summary is that it ignores one file in favor of the other. util.concurrent, like nearly all our packages, has two .gwt.xml files: one diff --git a/guava-gwt/src/com/google/thirdparty/publicsuffix/PublicSuffixType.gwt.xml b/guava-gwt/src/com/google/thirdparty/publicsuffix/PublicSuffixType.gwt.xml index 22ca5270a38b..18dda00511f8 100644 --- a/guava-gwt/src/com/google/thirdparty/publicsuffix/PublicSuffixType.gwt.xml +++ b/guava-gwt/src/com/google/thirdparty/publicsuffix/PublicSuffixType.gwt.xml @@ -10,7 +10,9 @@ util.concurrent tests under Guava. The problem is that GWT responds poorly to two .gwt.xml files in the same - Java package; see https://goo.gl/pRV3Yn for details. + Java package; see + https://groups.google.com/g/google-web-toolkit-contributors/c/CqYH59Dt_rQ/m/uVGW1QdUsXUJ + for details. The summary is that it ignores one file in favor of the other. util.concurrent, like nearly all our packages, has two .gwt.xml files: one diff --git a/guava-gwt/test/com/google/common/collect/testing/Testing.gwt.xml b/guava-gwt/test/com/google/common/collect/testing/Testing.gwt.xml index 5d17a81f98a9..ea642a5ced55 100644 --- a/guava-gwt/test/com/google/common/collect/testing/Testing.gwt.xml +++ b/guava-gwt/test/com/google/common/collect/testing/Testing.gwt.xml @@ -10,7 +10,9 @@ util.concurrent tests under Guava. The problem is that GWT responds poorly to two .gwt.xml files in the same - Java package; see https://goo.gl/pRV3Yn for details. + Java package; see + https://groups.google.com/g/google-web-toolkit-contributors/c/CqYH59Dt_rQ/m/uVGW1QdUsXUJ + for details. The summary is that it ignores one file in favor of the other. util.concurrent, like nearly all our packages, has two .gwt.xml files: one diff --git a/guava-gwt/test/com/google/common/collect/testing/google/Google.gwt.xml b/guava-gwt/test/com/google/common/collect/testing/google/Google.gwt.xml index 54f33bfb0da9..14c74936e72f 100644 --- a/guava-gwt/test/com/google/common/collect/testing/google/Google.gwt.xml +++ b/guava-gwt/test/com/google/common/collect/testing/google/Google.gwt.xml @@ -10,7 +10,9 @@ util.concurrent tests under Guava. The problem is that GWT responds poorly to two .gwt.xml files in the same - Java package; see https://goo.gl/pRV3Yn for details. + Java package; see + https://groups.google.com/g/google-web-toolkit-contributors/c/CqYH59Dt_rQ/m/uVGW1QdUsXUJ + for details. The summary is that it ignores one file in favor of the other. util.concurrent, like nearly all our packages, has two .gwt.xml files: one diff --git a/guava-gwt/test/com/google/common/escape/testing/Testing.gwt.xml b/guava-gwt/test/com/google/common/escape/testing/Testing.gwt.xml index 0957af4f33ad..0a221c8d9397 100644 --- a/guava-gwt/test/com/google/common/escape/testing/Testing.gwt.xml +++ b/guava-gwt/test/com/google/common/escape/testing/Testing.gwt.xml @@ -10,7 +10,9 @@ util.concurrent tests under Guava. The problem is that GWT responds poorly to two .gwt.xml files in the same - Java package; see https://goo.gl/pRV3Yn for details. + Java package; see + https://groups.google.com/g/google-web-toolkit-contributors/c/CqYH59Dt_rQ/m/uVGW1QdUsXUJ + for details. The summary is that it ignores one file in favor of the other. util.concurrent, like nearly all our packages, has two .gwt.xml files: one diff --git a/guava-gwt/test/com/google/common/testing/Testing.gwt.xml b/guava-gwt/test/com/google/common/testing/Testing.gwt.xml index 72c486dbccec..4feea1c51029 100644 --- a/guava-gwt/test/com/google/common/testing/Testing.gwt.xml +++ b/guava-gwt/test/com/google/common/testing/Testing.gwt.xml @@ -10,7 +10,9 @@ util.concurrent tests under Guava. The problem is that GWT responds poorly to two .gwt.xml files in the same - Java package; see https://goo.gl/pRV3Yn for details. + Java package; see + https://groups.google.com/g/google-web-toolkit-contributors/c/CqYH59Dt_rQ/m/uVGW1QdUsXUJ + for details. The summary is that it ignores one file in favor of the other. util.concurrent, like nearly all our packages, has two .gwt.xml files: one diff --git a/guava-testlib/src/com/google/common/collect/testing/testers/CollectionAddAllTester.java b/guava-testlib/src/com/google/common/collect/testing/testers/CollectionAddAllTester.java index 09094ac23b84..f868e6e0ddfb 100644 --- a/guava-testlib/src/com/google/common/collect/testing/testers/CollectionAddAllTester.java +++ b/guava-testlib/src/com/google/common/collect/testing/testers/CollectionAddAllTester.java @@ -178,8 +178,9 @@ public static Method getAddAllNullUnsupportedMethod() { /** * Returns the {@link Method} instance for {@link #testAddAll_unsupportedNonePresent()} so that * tests can suppress it with {@code FeatureSpecificTestSuiteBuilder.suppressing()} while we - * figure out what to do with {@code ConcurrentHashMap} support for - * {@code entrySet().add()}. + * figure out what to do with {@code + * ConcurrentHashMap} support for {@code entrySet().add()}. */ @J2ktIncompatible @GwtIncompatible // reflection @@ -190,8 +191,9 @@ public static Method getAddAllUnsupportedNonePresentMethod() { /** * Returns the {@link Method} instance for {@link #testAddAll_unsupportedSomePresent()} so that * tests can suppress it with {@code FeatureSpecificTestSuiteBuilder.suppressing()} while we - * figure out what to do with {@code ConcurrentHashMap} support for - * {@code entrySet().add()}. + * figure out what to do with {@code + * ConcurrentHashMap} support for {@code entrySet().add()}. */ @J2ktIncompatible @GwtIncompatible // reflection diff --git a/guava-testlib/src/com/google/common/collect/testing/testers/CollectionAddTester.java b/guava-testlib/src/com/google/common/collect/testing/testers/CollectionAddTester.java index 5b64d4790fe4..7f8392d3c1e8 100644 --- a/guava-testlib/src/com/google/common/collect/testing/testers/CollectionAddTester.java +++ b/guava-testlib/src/com/google/common/collect/testing/testers/CollectionAddTester.java @@ -133,8 +133,9 @@ public static Method getAddNullUnsupportedMethod() { /** * Returns the {@link Method} instance for {@link #testAdd_unsupportedNotPresent()} so that tests * can suppress it with {@code FeatureSpecificTestSuiteBuilder.suppressing()} while we figure out - * what to do with {@code ConcurrentHashMap} support for {@code - * entrySet().add()}. + * what to do with {@code + * ConcurrentHashMap} support for {@code entrySet().add()}. */ @J2ktIncompatible @GwtIncompatible // reflection diff --git a/guava-testlib/src/com/google/common/testing/ArbitraryInstances.java b/guava-testlib/src/com/google/common/testing/ArbitraryInstances.java index 3eb7074a4caf..823ff2794257 100644 --- a/guava-testlib/src/com/google/common/testing/ArbitraryInstances.java +++ b/guava-testlib/src/com/google/common/testing/ArbitraryInstances.java @@ -189,7 +189,7 @@ public int compare(Field left, Field right) { /** * Returns a new {@code MatchResult} that corresponds to a successful match. Apache Harmony (used * in Android) requires a successful match in order to generate a {@code MatchResult}: - * http://goo.gl/5VQFmC + * https://cs.android.com/android/platform/superproject/+/android-2.3.7_r1:libcore/luni/src/main/java/java/util/regex/Matcher.java;l=550;drc=5850271b4ab93ebc27c1d49169a348c6be3c7f04 */ private static MatchResult createMatchResult() { Matcher matcher = Pattern.compile(".").matcher("X"); diff --git a/guava-testlib/test/com/google/common/collect/testing/OpenJdk6MapTests.java b/guava-testlib/test/com/google/common/collect/testing/OpenJdk6MapTests.java index a20afbb45207..3e7ca097f8ce 100644 --- a/guava-testlib/test/com/google/common/collect/testing/OpenJdk6MapTests.java +++ b/guava-testlib/test/com/google/common/collect/testing/OpenJdk6MapTests.java @@ -67,7 +67,7 @@ protected Collection suppressForConcurrentHashMap() { * The entrySet() of ConcurrentHashMap, unlike that of other Map * implementations, supports add() under JDK8. This seems problematic, but I * didn't see that discussed in the review, which included many other - * changes: http://goo.gl/okTTdr + * changes: https://mail.openjdk.org/pipermail/core-libs-dev/2013-May/thread.html#17367 * * TODO(cpovirk): decide what the best long-term action here is: force users * to suppress (as we do now), stop testing entrySet().add() at all, make diff --git a/guava/src/com/google/common/base/CharMatcher.java b/guava/src/com/google/common/base/CharMatcher.java index 39681c7fd3a1..2aee49c7a391 100644 --- a/guava/src/com/google/common/base/CharMatcher.java +++ b/guava/src/com/google/common/base/CharMatcher.java @@ -133,7 +133,8 @@ public static CharMatcher none() { * illustrated here. * This is not the same definition used by other Java APIs. (See a comparison of several definitions of "whitespace".) + * href="https://docs.google.com/spreadsheets/d/1kq4ECwPjHX9B8QUCTPclgsDCXYaj7T-FlT4tB5q3ahk/edit">comparison + * of several definitions of "whitespace".) * *

All Unicode White_Space characters are on the BMP and thus supported by this API. * diff --git a/guava/src/com/google/common/base/Throwables.java b/guava/src/com/google/common/base/Throwables.java index 73dad9790a85..c461316562bc 100644 --- a/guava/src/com/google/common/base/Throwables.java +++ b/guava/src/com/google/common/base/Throwables.java @@ -223,7 +223,8 @@ public static void propagateIfPossi * directly, or use a combination of {@link #throwIfUnchecked} and {@code throw new * RuntimeException(e)}. But consider whether users would be better off if your API threw a * different type of exception. For background on the deprecation, read Why we deprecated {@code Throwables.propagate}. + * href="https://github.com/google/guava/wiki/Why-we-deprecated-Throwables.propagate">Why we + * deprecated {@code Throwables.propagate}. */ @CanIgnoreReturnValue @J2ktIncompatible diff --git a/guava/src/com/google/common/collect/Lists.java b/guava/src/com/google/common/collect/Lists.java index 7bf9949a3029..13ceba742d23 100644 --- a/guava/src/com/google/common/collect/Lists.java +++ b/guava/src/com/google/common/collect/Lists.java @@ -78,7 +78,9 @@ private Lists() {} * *

Note: this method is now unnecessary and should be treated as deprecated. Instead, * use the {@code ArrayList} {@linkplain ArrayList#ArrayList() constructor} directly, taking - * advantage of "diamond" syntax. + * advantage of "diamond" + * syntax. */ @GwtCompatible(serializable = true) public static ArrayList newArrayList() { @@ -120,7 +122,9 @@ private Lists() {} * *

Note: if {@code elements} is a {@link Collection}, you don't need this method. Use * the {@code ArrayList} {@linkplain ArrayList#ArrayList(Collection) constructor} directly, taking - * advantage of "diamond" syntax. + * advantage of "diamond" + * syntax. */ @GwtCompatible(serializable = true) public static ArrayList newArrayList( @@ -161,9 +165,10 @@ static int computeArrayListCapacity(int arraySize) { * *

Note: this method is now unnecessary and should be treated as deprecated. Instead, * use {@code new }{@link ArrayList#ArrayList(int) ArrayList}{@code <>(int)} directly, taking - * advantage of "diamond" syntax. (Unlike here, there is no risk - * of overload ambiguity, since the {@code ArrayList} constructors very wisely did not accept - * varargs.) + * advantage of "diamond" + * syntax. (Unlike here, there is no risk of overload ambiguity, since the {@code ArrayList} + * constructors very wisely did not accept varargs.) * * @param initialArraySize the exact size of the initial backing array for the returned array list * ({@code ArrayList} documentation calls this value the "capacity") @@ -211,7 +216,9 @@ static int computeArrayListCapacity(int arraySize) { * *

Note: this method is now unnecessary and should be treated as deprecated. Instead, * use the {@code LinkedList} {@linkplain LinkedList#LinkedList() constructor} directly, taking - * advantage of "diamond" syntax. + * advantage of "diamond" + * syntax. */ @GwtCompatible(serializable = true) public static LinkedList newLinkedList() { @@ -232,7 +239,9 @@ static int computeArrayListCapacity(int arraySize) { * *

Note: if {@code elements} is a {@link Collection}, you don't need this method. Use * the {@code LinkedList} {@linkplain LinkedList#LinkedList(Collection) constructor} directly, - * taking advantage of "diamond" syntax. + * taking advantage of "diamond" + * syntax. */ @GwtCompatible(serializable = true) public static LinkedList newLinkedList( diff --git a/guava/src/com/google/common/collect/Maps.java b/guava/src/com/google/common/collect/Maps.java index 575089924a5d..3b21a6d9e3cc 100644 --- a/guava/src/com/google/common/collect/Maps.java +++ b/guava/src/com/google/common/collect/Maps.java @@ -232,7 +232,8 @@ public static , V> ImmutableMap immutableEnumMap( * *

Note: this method is now unnecessary and should be treated as deprecated. Instead, * use the {@code HashMap} constructor directly, taking advantage of "diamond" syntax. + * href="https://docs.oracle.com/javase/tutorial/java/generics/genTypeInference.html#type-inference-instantiation">"diamond" + * syntax. * * @return a new, empty {@code HashMap} */ @@ -250,7 +251,8 @@ HashMap newHashMap() { * *

Note: this method is now unnecessary and should be treated as deprecated. Instead, * use the {@code HashMap} constructor directly, taking advantage of "diamond" syntax. + * href="https://docs.oracle.com/javase/tutorial/java/generics/genTypeInference.html#type-inference-instantiation">"diamond" + * syntax. * * @param map the mappings to be placed in the new map * @return a new {@code HashMap} initialized with the mappings from {@code map} @@ -310,7 +312,8 @@ static int capacity(int expectedSize) { * *

Note: this method is now unnecessary and should be treated as deprecated. Instead, * use the {@code LinkedHashMap} constructor directly, taking advantage of "diamond" syntax. + * href="https://docs.oracle.com/javase/tutorial/java/generics/genTypeInference.html#type-inference-instantiation">"diamond" + * syntax. * * @return a new, empty {@code LinkedHashMap} */ @@ -327,7 +330,8 @@ LinkedHashMap newLinkedHashMap() { * *

Note: this method is now unnecessary and should be treated as deprecated. Instead, * use the {@code LinkedHashMap} constructor directly, taking advantage of "diamond" syntax. + * href="https://docs.oracle.com/javase/tutorial/java/generics/genTypeInference.html#type-inference-instantiation">"diamond" + * syntax. * * @param map the mappings to be placed in the new map * @return a new, {@code LinkedHashMap} initialized with the mappings from {@code map} @@ -371,7 +375,8 @@ public static ConcurrentMap newConcurrentMap() { * *

Note: this method is now unnecessary and should be treated as deprecated. Instead, * use the {@code TreeMap} constructor directly, taking advantage of "diamond" syntax. + * href="https://docs.oracle.com/javase/tutorial/java/generics/genTypeInference.html#type-inference-instantiation">"diamond" + * syntax. * * @return a new, empty {@code TreeMap} */ @@ -389,7 +394,8 @@ public static ConcurrentMap newConcurrentMap() { * *

Note: this method is now unnecessary and should be treated as deprecated. Instead, * use the {@code TreeMap} constructor directly, taking advantage of "diamond" syntax. + * href="https://docs.oracle.com/javase/tutorial/java/generics/genTypeInference.html#type-inference-instantiation">"diamond" + * syntax. * * @param map the sorted map whose mappings are to be placed in the new map and whose comparator * is to be used to sort the new map @@ -409,7 +415,8 @@ public static ConcurrentMap newConcurrentMap() { * *

Note: this method is now unnecessary and should be treated as deprecated. Instead, * use the {@code TreeMap} constructor directly, taking advantage of "diamond" syntax. + * href="https://docs.oracle.com/javase/tutorial/java/generics/genTypeInference.html#type-inference-instantiation">"diamond" + * syntax. * * @param comparator the comparator to sort the keys with * @return a new, empty {@code TreeMap} @@ -440,7 +447,8 @@ TreeMap newTreeMap(@CheckForNull Comparator comparator) { * *

Note: this method is now unnecessary and should be treated as deprecated. Instead, * use the {@code EnumMap} constructor directly, taking advantage of "diamond" syntax. + * href="https://docs.oracle.com/javase/tutorial/java/generics/genTypeInference.html#type-inference-instantiation">"diamond" + * syntax. * * @param map the map from which to initialize this {@code EnumMap} * @return a new {@code EnumMap} initialized with the mappings from {@code map} @@ -457,7 +465,8 @@ TreeMap newTreeMap(@CheckForNull Comparator comparator) { * *

Note: this method is now unnecessary and should be treated as deprecated. Instead, * use the {@code IdentityHashMap} constructor directly, taking advantage of "diamond" syntax. + * href="https://docs.oracle.com/javase/tutorial/java/generics/genTypeInference.html#type-inference-instantiation">"diamond" + * syntax. * * @return a new, empty {@code IdentityHashMap} */ diff --git a/guava/src/com/google/common/collect/Sets.java b/guava/src/com/google/common/collect/Sets.java index 520acc6bf237..6114a79bc259 100644 --- a/guava/src/com/google/common/collect/Sets.java +++ b/guava/src/com/google/common/collect/Sets.java @@ -177,7 +177,8 @@ public static > EnumSet newEnumSet( * *

Note: this method is now unnecessary and should be treated as deprecated. Instead, * use the {@code HashSet} constructor directly, taking advantage of "diamond" syntax. + * href="https://docs.oracle.com/javase/tutorial/java/generics/genTypeInference.html#type-inference-instantiation">"diamond" + * syntax. */ public static HashSet newHashSet() { return new HashSet<>(); @@ -216,7 +217,8 @@ public static > EnumSet newEnumSet( * *

Note: if {@code elements} is a {@link Collection}, you don't need this method. * Instead, use the {@code HashSet} constructor directly, taking advantage of "diamond" syntax. + * href="https://docs.oracle.com/javase/tutorial/java/generics/genTypeInference.html#type-inference-instantiation">"diamond" + * syntax. * *

Overall, this method is not very useful and will likely be deprecated in the future. */ @@ -303,7 +305,8 @@ public static Set newConcurrentHashSet(Iterable elements) { * *

Note: this method is now unnecessary and should be treated as deprecated. Instead, * use the {@code LinkedHashSet} constructor directly, taking advantage of "diamond" syntax. + * href="https://docs.oracle.com/javase/tutorial/java/generics/genTypeInference.html#type-inference-instantiation">"diamond" + * syntax. * * @return a new, empty {@code LinkedHashSet} */ @@ -319,7 +322,8 @@ public static Set newConcurrentHashSet(Iterable elements) { * *

Note: if {@code elements} is a {@link Collection}, you don't need this method. * Instead, use the {@code LinkedHashSet} constructor directly, taking advantage of "diamond" syntax. + * href="https://docs.oracle.com/javase/tutorial/java/generics/genTypeInference.html#type-inference-instantiation">"diamond" + * syntax. * *

Overall, this method is not very useful and will likely be deprecated in the future. * @@ -363,7 +367,8 @@ public static Set newConcurrentHashSet(Iterable elements) { * *

Note: this method is now unnecessary and should be treated as deprecated. Instead, * use the {@code TreeSet} constructor directly, taking advantage of "diamond" syntax. + * href="https://docs.oracle.com/javase/tutorial/java/generics/genTypeInference.html#type-inference-instantiation">"diamond" + * syntax. * * @return a new, empty {@code TreeSet} */ @@ -385,7 +390,8 @@ public static TreeSet newTreeSet() { * *

Note: this method is now unnecessary and should be treated as deprecated. Instead, * use the {@code TreeSet} constructor directly, taking advantage of "diamond" syntax. + * href="https://docs.oracle.com/javase/tutorial/java/generics/genTypeInference.html#type-inference-instantiation">"diamond" + * syntax. * *

This method is just a small convenience for creating an empty set and then calling {@link * Iterables#addAll}. This method is not very useful and will likely be deprecated in the future. @@ -408,9 +414,10 @@ public static TreeSet newTreeSet(Iterable * *

Note: this method is now unnecessary and should be treated as deprecated. Instead, * use the {@code TreeSet} constructor directly, taking advantage of "diamond" syntax. One caveat to this is that the {@code TreeSet} - * constructor uses a null {@code Comparator} to mean "natural ordering," whereas this factory - * rejects null. Clean your code accordingly. + * href="https://docs.oracle.com/javase/tutorial/java/generics/genTypeInference.html#type-inference-instantiation">"diamond" + * syntax. One caveat to this is that the {@code TreeSet} constructor uses a null {@code + * Comparator} to mean "natural ordering," whereas this factory rejects null. Clean your code + * accordingly. * * @param comparator the comparator to use to sort the set * @return a new, empty {@code TreeSet} diff --git a/guava/src/com/google/common/hash/Hashing.java b/guava/src/com/google/common/hash/Hashing.java index 6b87ae486b12..1584af2c6965 100644 --- a/guava/src/com/google/common/hash/Hashing.java +++ b/guava/src/com/google/common/hash/Hashing.java @@ -40,7 +40,7 @@ * utilities. * *

A comparison of the various hash functions can be found here. + * href="https://docs.google.com/spreadsheets/d/1_q2EVcxA2HjcrlVMbaqXwMj31h9M5-Bqj_m8vITOwwk/">here. * * @author Kevin Bourrillion * @author Dimitris Andreou diff --git a/guava/src/com/google/common/html/HtmlEscapers.java b/guava/src/com/google/common/html/HtmlEscapers.java index c42638871507..51e70e92a7db 100644 --- a/guava/src/com/google/common/html/HtmlEscapers.java +++ b/guava/src/com/google/common/html/HtmlEscapers.java @@ -25,10 +25,11 @@ * One Google-authored templating system available for external use is Closure Templates. * - *

HTML escaping is particularly tricky: For example, some - * elements' text contents must not be HTML escaped. As a result, it is impossible to escape an - * HTML document correctly without domain-specific knowledge beyond what {@code HtmlEscapers} - * provides. We strongly encourage the use of HTML templating systems. + *

HTML escaping is particularly tricky: For example, some elements' text contents must not be HTML + * escaped. As a result, it is impossible to escape an HTML document correctly without + * domain-specific knowledge beyond what {@code HtmlEscapers} provides. We strongly encourage the + * use of HTML templating systems. * * @author Sven Mawson * @author David Beaumont diff --git a/guava/src/com/google/common/io/Files.java b/guava/src/com/google/common/io/Files.java index 6397135aae87..0669038c3bd4 100644 --- a/guava/src/com/google/common/io/Files.java +++ b/guava/src/com/google/common/io/Files.java @@ -791,7 +791,9 @@ public static String simplifyPath(String pathname) { * behavior that the {@link File} API does not already account for. For example, on NTFS it will * report {@code "txt"} as the extension for the filename {@code "foo.exe:.txt"} even though NTFS * will drop the {@code ":.txt"} part of the name when the file is actually created on the - * filesystem due to NTFS's Alternate Data Streams. + * filesystem due to NTFS's Alternate + * Data Streams. * * @since 11.0 */ diff --git a/guava/src/com/google/common/io/MoreFiles.java b/guava/src/com/google/common/io/MoreFiles.java index b9a30c8fe352..f9626022391d 100644 --- a/guava/src/com/google/common/io/MoreFiles.java +++ b/guava/src/com/google/common/io/MoreFiles.java @@ -453,7 +453,9 @@ public static void createParentDirectories(Path path, FileAttribute... attrs) * behavior that the {@link Path} API does not already account for. For example, on NTFS it will * report {@code "txt"} as the extension for the filename {@code "foo.exe:.txt"} even though NTFS * will drop the {@code ":.txt"} part of the name when the file is actually created on the - * filesystem due to NTFS's Alternate Data Streams. + * filesystem due to NTFS's Alternate + * Data Streams. */ public static String getFileExtension(Path path) { Path name = path.getFileName(); diff --git a/guava/src/com/google/common/net/HttpHeaders.java b/guava/src/com/google/common/net/HttpHeaders.java index 244d6c970375..2c57debe0519 100644 --- a/guava/src/com/google/common/net/HttpHeaders.java +++ b/guava/src/com/google/common/net/HttpHeaders.java @@ -366,7 +366,8 @@ private ReferrerPolicyValues() {} public static final String SET_COOKIE2 = "Set-Cookie2"; /** - * The HTTP {@code SourceMap} header field name. + * The HTTP {@code + * SourceMap} header field name. * * @since 27.1 */ @@ -456,18 +457,25 @@ private ReferrerPolicyValues() {} public static final String X_FORWARDED_FOR = "X-Forwarded-For"; /** The HTTP {@code X-Forwarded-Proto} header field name. */ public static final String X_FORWARDED_PROTO = "X-Forwarded-Proto"; + /** - * The HTTP {@code X-Forwarded-Host} header field name. + * The HTTP {@code + * X-Forwarded-Host} header field name. * * @since 20.0 */ public static final String X_FORWARDED_HOST = "X-Forwarded-Host"; + /** - * The HTTP {@code X-Forwarded-Port} header field name. + * The HTTP {@code + * X-Forwarded-Port} header field name. * * @since 20.0 */ public static final String X_FORWARDED_PORT = "X-Forwarded-Port"; + /** The HTTP {@code X-Frame-Options} header field name. */ public static final String X_FRAME_OPTIONS = "X-Frame-Options"; /** The HTTP {@code X-Powered-By} header field name. */ @@ -496,8 +504,11 @@ private ReferrerPolicyValues() {} public static final String X_REQUESTED_WITH = "X-Requested-With"; /** The HTTP {@code X-User-IP} header field name. */ public static final String X_USER_IP = "X-User-IP"; + /** - * The HTTP {@code X-Download-Options} header field name. + * The HTTP {@code + * X-Download-Options} header field name. * *

When the new X-Download-Options header is present with the value {@code noopen}, the user is * prevented from opening a file download directly; instead, they must first save the file @@ -506,6 +517,7 @@ private ReferrerPolicyValues() {} * @since 24.1 */ public static final String X_DOWNLOAD_OPTIONS = "X-Download-Options"; + /** The HTTP {@code X-XSS-Protection} header field name. */ public static final String X_XSS_PROTECTION = "X-XSS-Protection"; /** diff --git a/guava/src/com/google/common/net/MediaType.java b/guava/src/com/google/common/net/MediaType.java index 99d47dca70c7..fa9c4b29a3dc 100644 --- a/guava/src/com/google/common/net/MediaType.java +++ b/guava/src/com/google/common/net/MediaType.java @@ -396,7 +396,9 @@ private static MediaType addKnownType(MediaType mediaType) { public static final MediaType DART_UTF_8 = createConstantUtf8(APPLICATION_TYPE, "dart"); /** - * Apple Passbook. + * Apple + * Passbook. * * @since 19.0 */ @@ -525,29 +527,44 @@ private static MediaType addKnownType(MediaType mediaType) { public static final MediaType MBOX = createConstant(APPLICATION_TYPE, "mbox"); /** - * Apple over-the-air mobile configuration profiles. + * Apple + * over-the-air mobile configuration profiles. * * @since 18.0 */ public static final MediaType APPLE_MOBILE_CONFIG = createConstant(APPLICATION_TYPE, "x-apple-aspen-config"); - /** Microsoft Excel spreadsheets. */ + /** + * Microsoft + * Excel spreadsheets. + */ public static final MediaType MICROSOFT_EXCEL = createConstant(APPLICATION_TYPE, "vnd.ms-excel"); /** - * Microsoft Outlook items. + * Microsoft + * Outlook items. * * @since 27.1 */ public static final MediaType MICROSOFT_OUTLOOK = createConstant(APPLICATION_TYPE, "vnd.ms-outlook"); - /** Microsoft Powerpoint presentations. */ + /** + * Microsoft + * Powerpoint presentations. + */ public static final MediaType MICROSOFT_POWERPOINT = createConstant(APPLICATION_TYPE, "vnd.ms-powerpoint"); - /** Microsoft Word documents. */ + /** + * Microsoft + * Word documents. + */ public static final MediaType MICROSOFT_WORD = createConstant(APPLICATION_TYPE, "msword"); /** diff --git a/guava/src/com/google/common/net/UrlEscapers.java b/guava/src/com/google/common/net/UrlEscapers.java index c7e15efc6d91..68cbd01e34bc 100644 --- a/guava/src/com/google/common/net/UrlEscapers.java +++ b/guava/src/com/google/common/net/UrlEscapers.java @@ -45,10 +45,12 @@ private UrlEscapers() {} /** * Returns an {@link Escaper} instance that escapes strings so they can be safely included in URL form parameter names and values. Escaping is performed - * with the UTF-8 character encoding. The caller is responsible for replacing any unpaired carriage return or line feed characters - * with a CR+LF pair on any non-file inputs before escaping them with this escaper. + * href="https://url.spec.whatwg.org/#application-x-www-form-urlencoded-percent-encode-set">URL + * form parameter names and values. Escaping is performed with the UTF-8 character encoding. + * The caller is responsible for replacing + * any unpaired carriage return or line feed characters with a CR+LF pair on any non-file + * inputs before escaping them with this escaper. * *

When escaping a String, the following rules apply: * @@ -63,9 +65,9 @@ private UrlEscapers() {} * * *

This escaper is suitable for escaping parameter names and values even when using the non-standard semicolon, rather than the ampersand, as - * a parameter delimiter. Nevertheless, we recommend using the ampersand unless you must - * interoperate with systems that require semicolons. + * href="https://www.w3.org/TR/html401/appendix/notes.html#h-B.2.2">using the non-standard + * semicolon, rather than the ampersand, as a parameter delimiter. Nevertheless, we recommend + * using the ampersand unless you must interoperate with systems that require semicolons. * *

Note: Unlike other escapers, URL escapers produce uppercase hexadecimal sequences. @@ -80,14 +82,15 @@ public static Escaper urlFormParameterEscaper() { /** * Returns an {@link Escaper} instance that escapes strings so they can be safely included in URL path segments. The returned escaper escapes all non-ASCII - * characters, even though many of these are accepted in modern - * URLs. (If the escaper were to leave these characters - * unescaped, they would be escaped by the consumer at parse time, anyway.) Additionally, the - * escaper escapes the slash character ("/"). While slashes are acceptable in URL paths, they are - * considered by the specification to be separators between "path segments." This implies that, if - * you wish for your path to contain slashes, you must escape each segment separately and then - * join them. + * href="https://url.spec.whatwg.org/#syntax-url-path-segment">URL path segments. The returned + * escaper escapes all non-ASCII characters, even though many of these are accepted in modern + * URLs. (If the escaper were to leave these + * characters unescaped, they would be escaped by the consumer at parse time, anyway.) + * Additionally, the escaper escapes the slash character ("/"). While slashes are acceptable in + * URL paths, they are considered by the specification to be separators between "path segments." + * This implies that, if you wish for your path to contain slashes, you must escape each segment + * separately and then join them. * *

When escaping a String, the following rules apply: * @@ -116,9 +119,8 @@ public static Escaper urlPathSegmentEscaper() { /** * Returns an {@link Escaper} instance that escapes strings so they can be safely included in a URL fragment. The returned escaper escapes all non-ASCII - * characters, even though many of these are accepted in modern - * URLs. + * href="https://url.spec.whatwg.org/#concept-url-fragment">URL fragment. The returned escaper + * escapes all non-ASCII characters. * *

When escaping a String, the following rules apply: *