Skip to content

Commit

Permalink
Update links.
Browse files Browse the repository at this point in the history
RELNOTES=n/a
PiperOrigin-RevId: 654022683
  • Loading branch information
cpovirk authored and Google Java Core Libraries committed Jul 19, 2024
1 parent 63734b9 commit 514f212
Show file tree
Hide file tree
Showing 49 changed files with 323 additions and 157 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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 <a href="http://goo.gl/qJBruX">{@code ConcurrentHashMap} support for
* {@code entrySet().add()}</a>.
* figure out what to do with <a
* href="https://github.com/openjdk/jdk/blob/c25c4896ad9ef031e3cddec493aef66ff87c48a7/src/java.base/share/classes/java/util/concurrent/ConcurrentHashMap.java#L4830">{@code
* ConcurrentHashMap} support for {@code entrySet().add()}</a>.
*/
@J2ktIncompatible
@GwtIncompatible // reflection
Expand All @@ -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 <a href="http://goo.gl/qJBruX">{@code ConcurrentHashMap} support for
* {@code entrySet().add()}</a>.
* figure out what to do with <a
* href="https://github.com/openjdk/jdk/blob/c25c4896ad9ef031e3cddec493aef66ff87c48a7/src/java.base/share/classes/java/util/concurrent/ConcurrentHashMap.java#L4830">{@code
* ConcurrentHashMap} support for {@code entrySet().add()}</a>.
*/
@J2ktIncompatible
@GwtIncompatible // reflection
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 <a href="http://goo.gl/qJBruX">{@code ConcurrentHashMap} support for {@code
* entrySet().add()}</a>.
* what to do with <a
* href="https://github.com/openjdk/jdk/blob/c25c4896ad9ef031e3cddec493aef66ff87c48a7/src/java.base/share/classes/java/util/concurrent/ConcurrentHashMap.java#L4830">{@code
* ConcurrentHashMap} support for {@code entrySet().add()}</a>.
*/
@J2ktIncompatible
@GwtIncompatible // reflection
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ protected Collection<Method> 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
Expand Down
3 changes: 2 additions & 1 deletion android/guava/src/com/google/common/base/CharMatcher.java
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,8 @@ public static CharMatcher none() {
* illustrated <a
* href="http://unicode.org/cldr/utility/list-unicodeset.jsp?a=%5Cp%7Bwhitespace%7D">here</a>.
* This is not the same definition used by other Java APIs. (See a <a
* href="https://goo.gl/Y6SLWx">comparison of several definitions of "whitespace"</a>.)
* href="https://docs.google.com/spreadsheets/d/1kq4ECwPjHX9B8QUCTPclgsDCXYaj7T-FlT4tB5q3ahk/edit">comparison
* of several definitions of "whitespace"</a>.)
*
* <p>All Unicode White_Space characters are on the BMP and thus supported by this API.
*
Expand Down
3 changes: 2 additions & 1 deletion android/guava/src/com/google/common/base/Throwables.java
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,8 @@ public static <X1 extends Throwable, X2 extends Throwable> 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 <a
* href="https://goo.gl/Ivn2kc">Why we deprecated {@code Throwables.propagate}</a>.
* href="https://github.com/google/guava/wiki/Why-we-deprecated-Throwables.propagate">Why we
* deprecated {@code Throwables.propagate}</a>.
*/
@CanIgnoreReturnValue
@J2ktIncompatible
Expand Down
23 changes: 16 additions & 7 deletions android/guava/src/com/google/common/collect/Lists.java
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,9 @@ private Lists() {}
*
* <p><b>Note:</b> this method is now unnecessary and should be treated as deprecated. Instead,
* use the {@code ArrayList} {@linkplain ArrayList#ArrayList() constructor} directly, taking
* advantage of <a href="http://goo.gl/iz2Wi">"diamond" syntax</a>.
* advantage of <a
* href="https://docs.oracle.com/javase/tutorial/java/generics/genTypeInference.html#type-inference-instantiation">"diamond"
* syntax</a>.
*/
@GwtCompatible(serializable = true)
public static <E extends @Nullable Object> ArrayList<E> newArrayList() {
Expand Down Expand Up @@ -119,7 +121,9 @@ private Lists() {}
*
* <p><b>Note:</b> 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 <a href="http://goo.gl/iz2Wi">"diamond" syntax</a>.
* advantage of <a
* href="https://docs.oracle.com/javase/tutorial/java/generics/genTypeInference.html#type-inference-instantiation">"diamond"
* syntax</a>.
*/
@GwtCompatible(serializable = true)
public static <E extends @Nullable Object> ArrayList<E> newArrayList(
Expand Down Expand Up @@ -160,9 +164,10 @@ static int computeArrayListCapacity(int arraySize) {
*
* <p><b>Note:</b> 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 <a href="http://goo.gl/iz2Wi">"diamond" syntax</a>. (Unlike here, there is no risk
* of overload ambiguity, since the {@code ArrayList} constructors very wisely did not accept
* varargs.)
* advantage of <a
* href="https://docs.oracle.com/javase/tutorial/java/generics/genTypeInference.html#type-inference-instantiation">"diamond"
* syntax</a>. (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")
Expand Down Expand Up @@ -210,7 +215,9 @@ static int computeArrayListCapacity(int arraySize) {
*
* <p><b>Note:</b> this method is now unnecessary and should be treated as deprecated. Instead,
* use the {@code LinkedList} {@linkplain LinkedList#LinkedList() constructor} directly, taking
* advantage of <a href="http://goo.gl/iz2Wi">"diamond" syntax</a>.
* advantage of <a
* href="https://docs.oracle.com/javase/tutorial/java/generics/genTypeInference.html#type-inference-instantiation">"diamond"
* syntax</a>.
*/
@GwtCompatible(serializable = true)
public static <E extends @Nullable Object> LinkedList<E> newLinkedList() {
Expand All @@ -231,7 +238,9 @@ static int computeArrayListCapacity(int arraySize) {
*
* <p><b>Note:</b> 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 <a href="http://goo.gl/iz2Wi">"diamond" syntax</a>.
* taking advantage of <a
* href="https://docs.oracle.com/javase/tutorial/java/generics/genTypeInference.html#type-inference-instantiation">"diamond"
* syntax</a>.
*/
@GwtCompatible(serializable = true)
public static <E extends @Nullable Object> LinkedList<E> newLinkedList(
Expand Down
27 changes: 18 additions & 9 deletions android/guava/src/com/google/common/collect/Maps.java
Original file line number Diff line number Diff line change
Expand Up @@ -231,7 +231,8 @@ public static <K extends Enum<K>, V> ImmutableMap<K, V> immutableEnumMap(
*
* <p><b>Note:</b> this method is now unnecessary and should be treated as deprecated. Instead,
* use the {@code HashMap} constructor directly, taking advantage of <a
* href="http://goo.gl/iz2Wi">"diamond" syntax</a>.
* href="https://docs.oracle.com/javase/tutorial/java/generics/genTypeInference.html#type-inference-instantiation">"diamond"
* syntax</a>.
*
* @return a new, empty {@code HashMap}
*/
Expand All @@ -249,7 +250,8 @@ HashMap<K, V> newHashMap() {
*
* <p><b>Note:</b> this method is now unnecessary and should be treated as deprecated. Instead,
* use the {@code HashMap} constructor directly, taking advantage of <a
* href="http://goo.gl/iz2Wi">"diamond" syntax</a>.
* href="https://docs.oracle.com/javase/tutorial/java/generics/genTypeInference.html#type-inference-instantiation">"diamond"
* syntax</a>.
*
* @param map the mappings to be placed in the new map
* @return a new {@code HashMap} initialized with the mappings from {@code map}
Expand Down Expand Up @@ -309,7 +311,8 @@ static int capacity(int expectedSize) {
*
* <p><b>Note:</b> this method is now unnecessary and should be treated as deprecated. Instead,
* use the {@code LinkedHashMap} constructor directly, taking advantage of <a
* href="http://goo.gl/iz2Wi">"diamond" syntax</a>.
* href="https://docs.oracle.com/javase/tutorial/java/generics/genTypeInference.html#type-inference-instantiation">"diamond"
* syntax</a>.
*
* @return a new, empty {@code LinkedHashMap}
*/
Expand All @@ -326,7 +329,8 @@ LinkedHashMap<K, V> newLinkedHashMap() {
*
* <p><b>Note:</b> this method is now unnecessary and should be treated as deprecated. Instead,
* use the {@code LinkedHashMap} constructor directly, taking advantage of <a
* href="http://goo.gl/iz2Wi">"diamond" syntax</a>.
* href="https://docs.oracle.com/javase/tutorial/java/generics/genTypeInference.html#type-inference-instantiation">"diamond"
* syntax</a>.
*
* @param map the mappings to be placed in the new map
* @return a new, {@code LinkedHashMap} initialized with the mappings from {@code map}
Expand Down Expand Up @@ -370,7 +374,8 @@ public static <K, V> ConcurrentMap<K, V> newConcurrentMap() {
*
* <p><b>Note:</b> this method is now unnecessary and should be treated as deprecated. Instead,
* use the {@code TreeMap} constructor directly, taking advantage of <a
* href="http://goo.gl/iz2Wi">"diamond" syntax</a>.
* href="https://docs.oracle.com/javase/tutorial/java/generics/genTypeInference.html#type-inference-instantiation">"diamond"
* syntax</a>.
*
* @return a new, empty {@code TreeMap}
*/
Expand All @@ -388,7 +393,8 @@ public static <K, V> ConcurrentMap<K, V> newConcurrentMap() {
*
* <p><b>Note:</b> this method is now unnecessary and should be treated as deprecated. Instead,
* use the {@code TreeMap} constructor directly, taking advantage of <a
* href="http://goo.gl/iz2Wi">"diamond" syntax</a>.
* href="https://docs.oracle.com/javase/tutorial/java/generics/genTypeInference.html#type-inference-instantiation">"diamond"
* syntax</a>.
*
* @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
Expand All @@ -408,7 +414,8 @@ public static <K, V> ConcurrentMap<K, V> newConcurrentMap() {
*
* <p><b>Note:</b> this method is now unnecessary and should be treated as deprecated. Instead,
* use the {@code TreeMap} constructor directly, taking advantage of <a
* href="http://goo.gl/iz2Wi">"diamond" syntax</a>.
* href="https://docs.oracle.com/javase/tutorial/java/generics/genTypeInference.html#type-inference-instantiation">"diamond"
* syntax</a>.
*
* @param comparator the comparator to sort the keys with
* @return a new, empty {@code TreeMap}
Expand Down Expand Up @@ -439,7 +446,8 @@ TreeMap<K, V> newTreeMap(@CheckForNull Comparator<C> comparator) {
*
* <p><b>Note:</b> this method is now unnecessary and should be treated as deprecated. Instead,
* use the {@code EnumMap} constructor directly, taking advantage of <a
* href="http://goo.gl/iz2Wi">"diamond" syntax</a>.
* href="https://docs.oracle.com/javase/tutorial/java/generics/genTypeInference.html#type-inference-instantiation">"diamond"
* syntax</a>.
*
* @param map the map from which to initialize this {@code EnumMap}
* @return a new {@code EnumMap} initialized with the mappings from {@code map}
Expand All @@ -456,7 +464,8 @@ TreeMap<K, V> newTreeMap(@CheckForNull Comparator<C> comparator) {
*
* <p><b>Note:</b> this method is now unnecessary and should be treated as deprecated. Instead,
* use the {@code IdentityHashMap} constructor directly, taking advantage of <a
* href="http://goo.gl/iz2Wi">"diamond" syntax</a>.
* href="https://docs.oracle.com/javase/tutorial/java/generics/genTypeInference.html#type-inference-instantiation">"diamond"
* syntax</a>.
*
* @return a new, empty {@code IdentityHashMap}
*/
Expand Down
25 changes: 16 additions & 9 deletions android/guava/src/com/google/common/collect/Sets.java
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,8 @@ public static <E extends Enum<E>> EnumSet<E> newEnumSet(
*
* <p><b>Note:</b> this method is now unnecessary and should be treated as deprecated. Instead,
* use the {@code HashSet} constructor directly, taking advantage of <a
* href="http://goo.gl/iz2Wi">"diamond" syntax</a>.
* href="https://docs.oracle.com/javase/tutorial/java/generics/genTypeInference.html#type-inference-instantiation">"diamond"
* syntax</a>.
*/
public static <E extends @Nullable Object> HashSet<E> newHashSet() {
return new HashSet<>();
Expand Down Expand Up @@ -216,7 +217,8 @@ public static <E extends Enum<E>> EnumSet<E> newEnumSet(
*
* <p><b>Note:</b> if {@code elements} is a {@link Collection}, you don't need this method.
* Instead, use the {@code HashSet} constructor directly, taking advantage of <a
* href="http://goo.gl/iz2Wi">"diamond" syntax</a>.
* href="https://docs.oracle.com/javase/tutorial/java/generics/genTypeInference.html#type-inference-instantiation">"diamond"
* syntax</a>.
*
* <p>Overall, this method is not very useful and will likely be deprecated in the future.
*/
Expand Down Expand Up @@ -303,7 +305,8 @@ public static <E> Set<E> newConcurrentHashSet(Iterable<? extends E> elements) {
*
* <p><b>Note:</b> this method is now unnecessary and should be treated as deprecated. Instead,
* use the {@code LinkedHashSet} constructor directly, taking advantage of <a
* href="http://goo.gl/iz2Wi">"diamond" syntax</a>.
* href="https://docs.oracle.com/javase/tutorial/java/generics/genTypeInference.html#type-inference-instantiation">"diamond"
* syntax</a>.
*
* @return a new, empty {@code LinkedHashSet}
*/
Expand All @@ -319,7 +322,8 @@ public static <E> Set<E> newConcurrentHashSet(Iterable<? extends E> elements) {
*
* <p><b>Note:</b> if {@code elements} is a {@link Collection}, you don't need this method.
* Instead, use the {@code LinkedHashSet} constructor directly, taking advantage of <a
* href="http://goo.gl/iz2Wi">"diamond" syntax</a>.
* href="https://docs.oracle.com/javase/tutorial/java/generics/genTypeInference.html#type-inference-instantiation">"diamond"
* syntax</a>.
*
* <p>Overall, this method is not very useful and will likely be deprecated in the future.
*
Expand Down Expand Up @@ -363,7 +367,8 @@ public static <E> Set<E> newConcurrentHashSet(Iterable<? extends E> elements) {
*
* <p><b>Note:</b> this method is now unnecessary and should be treated as deprecated. Instead,
* use the {@code TreeSet} constructor directly, taking advantage of <a
* href="http://goo.gl/iz2Wi">"diamond" syntax</a>.
* href="https://docs.oracle.com/javase/tutorial/java/generics/genTypeInference.html#type-inference-instantiation">"diamond"
* syntax</a>.
*
* @return a new, empty {@code TreeSet}
*/
Expand All @@ -385,7 +390,8 @@ public static <E extends Comparable> TreeSet<E> newTreeSet() {
*
* <p><b>Note:</b> this method is now unnecessary and should be treated as deprecated. Instead,
* use the {@code TreeSet} constructor directly, taking advantage of <a
* href="http://goo.gl/iz2Wi">"diamond" syntax</a>.
* href="https://docs.oracle.com/javase/tutorial/java/generics/genTypeInference.html#type-inference-instantiation">"diamond"
* syntax</a>.
*
* <p>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.
Expand All @@ -408,9 +414,10 @@ public static <E extends Comparable> TreeSet<E> newTreeSet(Iterable<? extends E>
*
* <p><b>Note:</b> this method is now unnecessary and should be treated as deprecated. Instead,
* use the {@code TreeSet} constructor directly, taking advantage of <a
* href="http://goo.gl/iz2Wi">"diamond" syntax</a>. 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</a>. 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}
Expand Down
2 changes: 1 addition & 1 deletion android/guava/src/com/google/common/hash/Hashing.java
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
* utilities.
*
* <p>A comparison of the various hash functions can be found <a
* href="http://goo.gl/jS7HH">here</a>.
* href="https://docs.google.com/spreadsheets/d/1_q2EVcxA2HjcrlVMbaqXwMj31h9M5-Bqj_m8vITOwwk/">here</a>.
*
* @author Kevin Bourrillion
* @author Dimitris Andreou
Expand Down
9 changes: 5 additions & 4 deletions android/guava/src/com/google/common/html/HtmlEscapers.java
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,11 @@
* One Google-authored templating system available for external use is <a
* href="https://developers.google.com/closure/templates/">Closure Templates</a>.
*
* <p>HTML escaping is particularly tricky: For example, <a href="http://goo.gl/5TgZb">some
* elements' text contents must not be HTML escaped</a>. 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.
* <p>HTML escaping is particularly tricky: For example, <a
* href="https://www.w3.org/TR/html4/types.html#h-6.2">some elements' text contents must not be HTML
* escaped</a>. 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
Expand Down
4 changes: 3 additions & 1 deletion android/guava/src/com/google/common/io/Files.java
Original file line number Diff line number Diff line change
Expand Up @@ -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 <a href="https://goo.gl/vTpJi4">Alternate Data Streams</a>.
* filesystem due to NTFS's <a
* href="https://learn.microsoft.com/en-us/archive/blogs/askcore/alternate-data-streams-in-ntfs">Alternate
* Data Streams</a>.
*
* @since 11.0
*/
Expand Down
Loading

0 comments on commit 514f212

Please sign in to comment.