diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 307f1edb80e8..3f754437caf7 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -27,13 +27,13 @@ jobs: steps: # Cancel any previous runs for the same branch that are still running. - name: 'Cancel previous runs' - uses: styfle/cancel-workflow-action@0.11.0 + uses: styfle/cancel-workflow-action@b173b6ec0100793626c2d9e6b90435061f4fc3e5 with: access_token: ${{ github.token }} - name: 'Check out repository' - uses: actions/checkout@v3 + uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab - name: 'Set up JDK ${{ matrix.java }}' - uses: actions/setup-java@v3.6.0 + uses: actions/setup-java@5ffc13f4174014e2d4d4572b3d74c3fa61aeb2c2 with: java-version: ${{ matrix.java }} @@ -58,9 +58,9 @@ jobs: runs-on: ubuntu-latest steps: - name: 'Check out repository' - uses: actions/checkout@v3 + uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab - name: 'Set up JDK 11' - uses: actions/setup-java@v3.6.0 + uses: actions/setup-java@5ffc13f4174014e2d4d4572b3d74c3fa61aeb2c2 with: java-version: 11 @@ -84,9 +84,9 @@ jobs: runs-on: ubuntu-latest steps: - name: 'Check out repository' - uses: actions/checkout@v3 + uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab - name: 'Set up JDK 11' - uses: actions/setup-java@v3.6.0 + uses: actions/setup-java@5ffc13f4174014e2d4d4572b3d74c3fa61aeb2c2 with: java-version: 11 diff --git a/.github/workflows/scorecard.yml b/.github/workflows/scorecard.yml new file mode 100644 index 000000000000..02e0d81e6bf2 --- /dev/null +++ b/.github/workflows/scorecard.yml @@ -0,0 +1,72 @@ +# This workflow uses actions that are not certified by GitHub. They are provided +# by a third-party and are governed by separate terms of service, privacy +# policy, and support documentation. + +name: Scorecard supply-chain security +on: + # For Branch-Protection check. Only the default branch is supported. See + # https://github.com/ossf/scorecard/blob/main/docs/checks.md#branch-protection + branch_protection_rule: + # To guarantee Maintained check is occasionally updated. See + # https://github.com/ossf/scorecard/blob/main/docs/checks.md#maintained + schedule: + - cron: '45 9 * * 0' + push: + branches: [ "master" ] + +# Declare default permissions as read only. +permissions: read-all + +jobs: + analysis: + name: Scorecard analysis + runs-on: ubuntu-latest + permissions: + # Needed to upload the results to code-scanning dashboard. + security-events: write + # Needed to publish results and get a badge (see publish_results below). + id-token: write + # Uncomment the permissions below if installing in a private repository. + # contents: read + # actions: read + + steps: + - name: "Checkout code" + uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2 + with: + persist-credentials: false + + - name: "Run analysis" + uses: ossf/scorecard-action@80e868c13c90f172d68d1f4501dee99e2479f7af # v2.1.3 + with: + results_file: results.sarif + results_format: sarif + # (Optional) "write" PAT token. Uncomment the `repo_token` line below if: + # - you want to enable the Branch-Protection check on a *public* repository, or + # - you are installing Scorecard on a *private* repository + # To create the PAT, follow the steps in https://github.com/ossf/scorecard-action#authentication-with-pat. + # repo_token: ${{ secrets.SCORECARD_TOKEN }} + + # Public repositories: + # - Publish results to OpenSSF REST API for easy access by consumers + # - Allows the repository to include the Scorecard badge. + # - See https://github.com/ossf/scorecard-action#publishing-results. + # For private repositories: + # - `publish_results` will always be set to `false`, regardless + # of the value entered here. + publish_results: true + + # Upload the results as artifacts (optional). Commenting out will disable uploads of run results in SARIF + # format to the repository Actions tab. + - name: "Upload artifact" + uses: actions/upload-artifact@0b7f8abb1508181956e8e162db84b466c27e18ce # v3.1.2 + with: + name: SARIF file + path: results.sarif + retention-days: 5 + + # Upload the results to GitHub's code scanning dashboard. + - name: "Upload to code-scanning" + uses: github/codeql-action/upload-sarif@f3feb00acb00f31a6f60280e6ace9ca31d91c76a # v2.3.2 + with: + sarif_file: results.sarif diff --git a/COPYING b/LICENSE similarity index 100% rename from COPYING rename to LICENSE diff --git a/README.md b/README.md index 8afda8fbb9e0..8bd217a9c532 100644 --- a/README.md +++ b/README.md @@ -2,6 +2,7 @@ [![Latest release](https://img.shields.io/github/release/google/guava.svg)](https://github.com/google/guava/releases/latest) [![Build Status](https://github.com/google/guava/workflows/CI/badge.svg?branch=master)](https://github.com/google/guava/actions) +[![OpenSSF Best Practices](https://bestpractices.coreinfrastructure.org/projects/7197/badge)](https://bestpractices.coreinfrastructure.org/projects/7197) Guava is a set of core Java libraries from Google that includes new collection types (such as multimap and multiset), immutable collections, a graph library, and diff --git a/android/guava-testlib/src/com/google/common/collect/testing/AbstractIteratorTester.java b/android/guava-testlib/src/com/google/common/collect/testing/AbstractIteratorTester.java index ab68998a2f99..b4e5b35e80b1 100644 --- a/android/guava-testlib/src/com/google/common/collect/testing/AbstractIteratorTester.java +++ b/android/guava-testlib/src/com/google/common/collect/testing/AbstractIteratorTester.java @@ -31,6 +31,7 @@ import java.util.Set; import java.util.Stack; import junit.framework.AssertionFailedError; +import org.checkerframework.checker.nullness.qual.Nullable; /** * Most of the logic for {@link IteratorTester} and {@link ListIteratorTester}. @@ -148,7 +149,7 @@ protected final class MultiExceptionListIterator implements ListIterator { * this to determine which stack to pop from on a call to {@code remove()} (or to pop from and * push to on a call to {@code set()}). */ - Stack stackWithLastReturnedElementAtTop = null; + @Nullable Stack stackWithLastReturnedElementAtTop = null; MultiExceptionListIterator(List expectedElements) { Helpers.addAll(nextElements, Helpers.reverse(expectedElements)); @@ -363,7 +364,7 @@ private static List subListCopy(Object[] source, int size) { } private interface IteratorOperation { - Object execute(Iterator iterator); + @Nullable Object execute(Iterator iterator); } /** @@ -449,7 +450,7 @@ private > void internalExecuteAndCompare( private static final IteratorOperation REMOVE_METHOD = new IteratorOperation() { @Override - public Object execute(Iterator iterator) { + public @Nullable Object execute(Iterator iterator) { iterator.remove(); return null; } @@ -475,7 +476,7 @@ private final IteratorOperation newAddMethod() { final Object toInsert = elementsToInsert.next(); return new IteratorOperation() { @Override - public Object execute(Iterator iterator) { + public @Nullable Object execute(Iterator iterator) { @SuppressWarnings("unchecked") ListIterator rawIterator = (ListIterator) iterator; rawIterator.add(toInsert); @@ -488,7 +489,7 @@ private final IteratorOperation newSetMethod() { final E toInsert = elementsToInsert.next(); return new IteratorOperation() { @Override - public Object execute(Iterator iterator) { + public @Nullable Object execute(Iterator iterator) { @SuppressWarnings("unchecked") ListIterator li = (ListIterator) iterator; li.set(toInsert); diff --git a/android/guava-testlib/src/com/google/common/collect/testing/AbstractMapTester.java b/android/guava-testlib/src/com/google/common/collect/testing/AbstractMapTester.java index 5e0de3ccc443..2f322971785a 100644 --- a/android/guava-testlib/src/com/google/common/collect/testing/AbstractMapTester.java +++ b/android/guava-testlib/src/com/google/common/collect/testing/AbstractMapTester.java @@ -23,6 +23,7 @@ import java.util.ListIterator; import java.util.Map; import java.util.Map.Entry; +import org.checkerframework.checker.nullness.qual.Nullable; import org.junit.Ignore; /** @@ -167,7 +168,7 @@ protected void expectMissing(Entry... entries) { } } - private static boolean equal(Object a, Object b) { + private static boolean equal(@Nullable Object a, @Nullable Object b) { return a == b || (a != null && a.equals(b)); } diff --git a/android/guava-testlib/src/com/google/common/collect/testing/AbstractTester.java b/android/guava-testlib/src/com/google/common/collect/testing/AbstractTester.java index dc1e1a0674fc..adbc8dcc6f79 100644 --- a/android/guava-testlib/src/com/google/common/collect/testing/AbstractTester.java +++ b/android/guava-testlib/src/com/google/common/collect/testing/AbstractTester.java @@ -18,6 +18,7 @@ import com.google.common.annotations.GwtCompatible; import junit.framework.TestCase; +import org.checkerframework.checker.nullness.qual.Nullable; /** * This abstract base class for testers allows the framework to inject needed information after @@ -34,8 +35,8 @@ public class AbstractTester extends TestCase { private G subjectGenerator; private String suiteName; - private Runnable setUp; - private Runnable tearDown; + private @Nullable Runnable setUp; + private @Nullable Runnable tearDown; // public so that it can be referenced in generated GWT tests. @Override @@ -54,7 +55,8 @@ public void tearDown() throws Exception { } // public so that it can be referenced in generated GWT tests. - public final void init(G subjectGenerator, String suiteName, Runnable setUp, Runnable tearDown) { + public final void init( + G subjectGenerator, String suiteName, @Nullable Runnable setUp, @Nullable Runnable tearDown) { this.subjectGenerator = subjectGenerator; this.suiteName = suiteName; this.setUp = setUp; diff --git a/android/guava-testlib/src/com/google/common/collect/testing/BaseComparable.java b/android/guava-testlib/src/com/google/common/collect/testing/BaseComparable.java index 3847709894cd..cf3a11eabc24 100644 --- a/android/guava-testlib/src/com/google/common/collect/testing/BaseComparable.java +++ b/android/guava-testlib/src/com/google/common/collect/testing/BaseComparable.java @@ -18,6 +18,7 @@ import com.google.common.annotations.GwtCompatible; import java.io.Serializable; +import org.checkerframework.checker.nullness.qual.Nullable; /** * Simple base class to verify that we handle generics correctly. @@ -38,7 +39,7 @@ public int hashCode() { // delegate to 's' } @Override - public boolean equals(Object other) { + public boolean equals(@Nullable Object other) { if (other == null) { return false; } else if (other instanceof BaseComparable) { diff --git a/android/guava-testlib/src/com/google/common/collect/testing/FeatureSpecificTestSuiteBuilder.java b/android/guava-testlib/src/com/google/common/collect/testing/FeatureSpecificTestSuiteBuilder.java index b59b090f892a..bf15135dc4f2 100644 --- a/android/guava-testlib/src/com/google/common/collect/testing/FeatureSpecificTestSuiteBuilder.java +++ b/android/guava-testlib/src/com/google/common/collect/testing/FeatureSpecificTestSuiteBuilder.java @@ -39,6 +39,7 @@ import junit.framework.Test; import junit.framework.TestCase; import junit.framework.TestSuite; +import org.checkerframework.checker.nullness.qual.Nullable; /** * Creates, based on your criteria, a JUnit test suite that exhaustively tests the object generated @@ -62,7 +63,7 @@ protected B self() { // Test Data - private G subjectGenerator; + private @Nullable G subjectGenerator; // Gets run before every test. private Runnable setUp; // Gets run at the conclusion of every test. @@ -125,7 +126,7 @@ public Set> getFeatures() { // Name - private String name; + private @Nullable String name; /** Configures this builder produce a TestSuite with the given name. */ @CanIgnoreReturnValue diff --git a/android/guava-testlib/src/com/google/common/collect/testing/Helpers.java b/android/guava-testlib/src/com/google/common/collect/testing/Helpers.java index c044fcfa9196..64dded5afe8a 100644 --- a/android/guava-testlib/src/com/google/common/collect/testing/Helpers.java +++ b/android/guava-testlib/src/com/google/common/collect/testing/Helpers.java @@ -40,11 +40,12 @@ import java.util.Set; import junit.framework.Assert; import junit.framework.AssertionFailedError; +import org.checkerframework.checker.nullness.qual.Nullable; @GwtCompatible(emulated = true) public class Helpers { // Clone of Objects.equal - static boolean equal(Object a, Object b) { + static boolean equal(@Nullable Object a, @Nullable Object b) { return a == b || (a != null && a.equals(b)); } @@ -253,7 +254,7 @@ static void fail(Throwable cause, Object message) { } public static Comparator> entryComparator( - Comparator keyComparator) { + @Nullable Comparator keyComparator) { return new Comparator>() { @Override @SuppressWarnings("unchecked") // no less safe than putting it in the map! @@ -384,7 +385,7 @@ public V setValue(V value) { @SuppressWarnings("unchecked") @Override - public boolean equals(Object o) { + public boolean equals(@Nullable Object o) { if (o instanceof Entry) { Entry e = (Entry) o; e.setValue(value); // muhahaha! @@ -462,7 +463,7 @@ protected NullsBefore(String justAfterNull) { } @Override - public int compare(String lhs, String rhs) { + public int compare(@Nullable String lhs, @Nullable String rhs) { if (lhs == rhs) { return 0; } @@ -486,7 +487,7 @@ public int compare(String lhs, String rhs) { } @Override - public boolean equals(Object obj) { + public boolean equals(@Nullable Object obj) { if (obj instanceof NullsBefore) { NullsBefore other = (NullsBefore) obj; return justAfterNull.equals(other.justAfterNull); diff --git a/android/guava-testlib/src/com/google/common/collect/testing/MinimalIterable.java b/android/guava-testlib/src/com/google/common/collect/testing/MinimalIterable.java index 15d48dbbd75b..816a9737794f 100644 --- a/android/guava-testlib/src/com/google/common/collect/testing/MinimalIterable.java +++ b/android/guava-testlib/src/com/google/common/collect/testing/MinimalIterable.java @@ -20,6 +20,7 @@ import java.util.Arrays; import java.util.Collection; import java.util.Iterator; +import org.checkerframework.checker.nullness.qual.Nullable; /** * An implementation of {@code Iterable} which throws an exception on all invocations of the {@link @@ -63,7 +64,7 @@ public static MinimalIterable from(Collection elements) { return (MinimalIterable) of(elements.toArray()); } - private Iterator iterator; + private @Nullable Iterator iterator; private MinimalIterable(Iterator iterator) { this.iterator = iterator; diff --git a/android/guava-testlib/src/com/google/common/collect/testing/MinimalSet.java b/android/guava-testlib/src/com/google/common/collect/testing/MinimalSet.java index 9a87d244d01f..4027684b42c8 100644 --- a/android/guava-testlib/src/com/google/common/collect/testing/MinimalSet.java +++ b/android/guava-testlib/src/com/google/common/collect/testing/MinimalSet.java @@ -22,6 +22,7 @@ import java.util.Collection; import java.util.List; import java.util.Set; +import org.checkerframework.checker.nullness.qual.Nullable; /** * A simplistic set which implements the bare minimum so that it can be used in tests without @@ -63,7 +64,7 @@ private MinimalSet(Class type, E... contents) { */ @Override - public boolean equals(Object object) { + public boolean equals(@Nullable Object object) { if (object instanceof Set) { Set that = (Set) object; return (this.size() == that.size()) && this.containsAll(that); diff --git a/android/guava-testlib/src/com/google/common/collect/testing/SafeTreeMap.java b/android/guava-testlib/src/com/google/common/collect/testing/SafeTreeMap.java index 19a89050d6c5..c284619da15d 100644 --- a/android/guava-testlib/src/com/google/common/collect/testing/SafeTreeMap.java +++ b/android/guava-testlib/src/com/google/common/collect/testing/SafeTreeMap.java @@ -29,6 +29,7 @@ import java.util.Set; import java.util.SortedMap; import java.util.TreeMap; +import org.checkerframework.checker.nullness.qual.Nullable; /** * A wrapper around {@code TreeMap} that aggressively checks to see if keys are mutually comparable. @@ -76,12 +77,12 @@ private SafeTreeMap(NavigableMap delegate) { } @Override - public Entry ceilingEntry(K key) { + public @Nullable Entry ceilingEntry(K key) { return delegate.ceilingEntry(checkValid(key)); } @Override - public K ceilingKey(K key) { + public @Nullable K ceilingKey(K key) { return delegate.ceilingKey(checkValid(key)); } @@ -163,7 +164,7 @@ public void clear() { } @Override - public Entry firstEntry() { + public @Nullable Entry firstEntry() { return delegate.firstEntry(); } @@ -173,17 +174,17 @@ public K firstKey() { } @Override - public Entry floorEntry(K key) { + public @Nullable Entry floorEntry(K key) { return delegate.floorEntry(checkValid(key)); } @Override - public K floorKey(K key) { + public @Nullable K floorKey(K key) { return delegate.floorKey(checkValid(key)); } @Override - public V get(Object key) { + public @Nullable V get(Object key) { return delegate.get(checkValid(key)); } @@ -198,12 +199,12 @@ public NavigableMap headMap(K toKey, boolean inclusive) { } @Override - public Entry higherEntry(K key) { + public @Nullable Entry higherEntry(K key) { return delegate.higherEntry(checkValid(key)); } @Override - public K higherKey(K key) { + public @Nullable K higherKey(K key) { return delegate.higherKey(checkValid(key)); } @@ -218,7 +219,7 @@ public NavigableSet keySet() { } @Override - public Entry lastEntry() { + public @Nullable Entry lastEntry() { return delegate.lastEntry(); } @@ -228,12 +229,12 @@ public K lastKey() { } @Override - public Entry lowerEntry(K key) { + public @Nullable Entry lowerEntry(K key) { return delegate.lowerEntry(checkValid(key)); } @Override - public K lowerKey(K key) { + public @Nullable K lowerKey(K key) { return delegate.lowerKey(checkValid(key)); } @@ -243,17 +244,17 @@ public NavigableSet navigableKeySet() { } @Override - public Entry pollFirstEntry() { + public @Nullable Entry pollFirstEntry() { return delegate.pollFirstEntry(); } @Override - public Entry pollLastEntry() { + public @Nullable Entry pollLastEntry() { return delegate.pollLastEntry(); } @Override - public V put(K key, V value) { + public @Nullable V put(K key, V value) { return delegate.put(checkValid(key), value); } @@ -266,7 +267,7 @@ public void putAll(Map map) { } @Override - public V remove(Object key) { + public @Nullable V remove(Object key) { return delegate.remove(checkValid(key)); } @@ -311,7 +312,7 @@ private T checkValid(T t) { } @Override - public boolean equals(Object obj) { + public boolean equals(@Nullable Object obj) { return delegate.equals(obj); } diff --git a/android/guava-testlib/src/com/google/common/collect/testing/SafeTreeSet.java b/android/guava-testlib/src/com/google/common/collect/testing/SafeTreeSet.java index 2bcfe5d59ad8..ddb628656b89 100644 --- a/android/guava-testlib/src/com/google/common/collect/testing/SafeTreeSet.java +++ b/android/guava-testlib/src/com/google/common/collect/testing/SafeTreeSet.java @@ -25,6 +25,7 @@ import java.util.NavigableSet; import java.util.SortedSet; import java.util.TreeSet; +import org.checkerframework.checker.nullness.qual.Nullable; /** * A wrapper around {@code TreeSet} that aggressively checks to see if elements are mutually @@ -82,7 +83,7 @@ public boolean addAll(Collection collection) { } @Override - public E ceiling(E e) { + public @Nullable E ceiling(E e) { return delegate.ceiling(checkValid(e)); } @@ -127,7 +128,7 @@ public E first() { } @Override - public E floor(E e) { + public @Nullable E floor(E e) { return delegate.floor(checkValid(e)); } @@ -142,7 +143,7 @@ public NavigableSet headSet(E toElement, boolean inclusive) { } @Override - public E higher(E e) { + public @Nullable E higher(E e) { return delegate.higher(checkValid(e)); } @@ -162,17 +163,17 @@ public E last() { } @Override - public E lower(E e) { + public @Nullable E lower(E e) { return delegate.lower(checkValid(e)); } @Override - public E pollFirst() { + public @Nullable E pollFirst() { return delegate.pollFirst(); } @Override - public E pollLast() { + public @Nullable E pollLast() { return delegate.pollLast(); } @@ -239,7 +240,7 @@ private T checkValid(T t) { } @Override - public boolean equals(Object obj) { + public boolean equals(@Nullable Object obj) { return delegate.equals(obj); } diff --git a/android/guava-testlib/src/com/google/common/collect/testing/SampleElements.java b/android/guava-testlib/src/com/google/common/collect/testing/SampleElements.java index 400107dc58fc..9fed1fbe8ed3 100644 --- a/android/guava-testlib/src/com/google/common/collect/testing/SampleElements.java +++ b/android/guava-testlib/src/com/google/common/collect/testing/SampleElements.java @@ -21,6 +21,7 @@ import java.util.Iterator; import java.util.List; import java.util.Map.Entry; +import org.checkerframework.checker.nullness.qual.Nullable; /** * A container class for the five sample elements we need for testing. @@ -143,7 +144,7 @@ private static class Collider { } @Override - public boolean equals(Object obj) { + public boolean equals(@Nullable Object obj) { return obj instanceof Collider && ((Collider) obj).value == value; } diff --git a/android/guava-testlib/src/com/google/common/collect/testing/SortedMapTestSuiteBuilder.java b/android/guava-testlib/src/com/google/common/collect/testing/SortedMapTestSuiteBuilder.java index 7944aaa6a0b8..4a290860e55c 100644 --- a/android/guava-testlib/src/com/google/common/collect/testing/SortedMapTestSuiteBuilder.java +++ b/android/guava-testlib/src/com/google/common/collect/testing/SortedMapTestSuiteBuilder.java @@ -30,6 +30,7 @@ import java.util.Map.Entry; import java.util.Set; import junit.framework.TestSuite; +import org.checkerframework.checker.nullness.qual.Nullable; /** * Creates, based on your criteria, a JUnit test suite that exhaustively tests a SortedMap @@ -88,12 +89,12 @@ protected SetTestSuiteBuilder createDerivedKeySetSuite(TestSetGenerator ke * To avoid infinite recursion, test suites with these marker features won't have derived suites * created for them. */ - enum NoRecurse implements Feature { + enum NoRecurse implements Feature<@Nullable Void> { SUBMAP, DESCENDING; @Override - public Set> getImpliedFeatures() { + public Set> getImpliedFeatures() { return Collections.emptySet(); } } diff --git a/android/guava-testlib/src/com/google/common/collect/testing/UnhashableObject.java b/android/guava-testlib/src/com/google/common/collect/testing/UnhashableObject.java index 69d263bda096..3e1d3b4ee369 100644 --- a/android/guava-testlib/src/com/google/common/collect/testing/UnhashableObject.java +++ b/android/guava-testlib/src/com/google/common/collect/testing/UnhashableObject.java @@ -17,6 +17,7 @@ package com.google.common.collect.testing; import com.google.common.annotations.GwtCompatible; +import org.checkerframework.checker.nullness.qual.Nullable; /** * An unhashable object to be used in testing as values in our collections. @@ -32,7 +33,7 @@ public UnhashableObject(int value) { } @Override - public boolean equals(Object object) { + public boolean equals(@Nullable Object object) { if (object instanceof UnhashableObject) { UnhashableObject that = (UnhashableObject) object; return this.value == that.value; diff --git a/android/guava-testlib/src/com/google/common/collect/testing/features/CollectionSize.java b/android/guava-testlib/src/com/google/common/collect/testing/features/CollectionSize.java index 6203e514862e..cc627bb5cb99 100644 --- a/android/guava-testlib/src/com/google/common/collect/testing/features/CollectionSize.java +++ b/android/guava-testlib/src/com/google/common/collect/testing/features/CollectionSize.java @@ -24,6 +24,7 @@ import java.util.Collection; import java.util.Collections; import java.util.Set; +import org.checkerframework.checker.nullness.qual.Nullable; /** * When describing the features of the collection produced by a given generator (i.e. in a call to @@ -59,7 +60,7 @@ public enum CollectionSize implements Feature, Comparable> implied; - private final Integer numElements; + private final @Nullable Integer numElements; CollectionSize(int numElements) { this.implied = Collections.emptySet(); diff --git a/android/guava-testlib/src/com/google/common/collect/testing/features/TesterRequirements.java b/android/guava-testlib/src/com/google/common/collect/testing/features/TesterRequirements.java index 4780b1bf50ff..2290f296c756 100644 --- a/android/guava-testlib/src/com/google/common/collect/testing/features/TesterRequirements.java +++ b/android/guava-testlib/src/com/google/common/collect/testing/features/TesterRequirements.java @@ -20,6 +20,7 @@ import com.google.common.collect.testing.Helpers; import java.util.Collections; import java.util.Set; +import org.checkerframework.checker.nullness.qual.Nullable; /** * Encapsulates the constraints that a class under test must satisfy in order for a tester method to @@ -54,7 +55,7 @@ public final Set> getAbsentFeatures() { } @Override - public boolean equals(Object object) { + public boolean equals(@Nullable Object object) { if (object == this) { return true; } diff --git a/android/guava-testlib/src/com/google/common/collect/testing/testers/AbstractListIndexOfTester.java b/android/guava-testlib/src/com/google/common/collect/testing/testers/AbstractListIndexOfTester.java index 46bd52942657..05f72dfd3df3 100644 --- a/android/guava-testlib/src/com/google/common/collect/testing/testers/AbstractListIndexOfTester.java +++ b/android/guava-testlib/src/com/google/common/collect/testing/testers/AbstractListIndexOfTester.java @@ -23,6 +23,7 @@ import com.google.common.collect.testing.WrongType; import com.google.common.collect.testing.features.CollectionFeature; import com.google.common.collect.testing.features.CollectionSize; +import org.checkerframework.checker.nullness.qual.Nullable; import org.junit.Ignore; /** @@ -34,7 +35,7 @@ @Ignore // Affects only Android test runner, which respects JUnit 4 annotations on JUnit 3 tests. public abstract class AbstractListIndexOfTester extends AbstractListTester { /** Override to call {@code indexOf()} or {@code lastIndexOf()}. */ - protected abstract int find(Object o); + protected abstract int find(@Nullable Object o); /** Override to return "indexOf" or "lastIndexOf()" for use in failure messages. */ protected abstract String getMethodName(); diff --git a/android/guava-testlib/src/com/google/common/testing/AbstractPackageSanityTests.java b/android/guava-testlib/src/com/google/common/testing/AbstractPackageSanityTests.java index 1e31bbfb408f..6153367c9450 100644 --- a/android/guava-testlib/src/com/google/common/testing/AbstractPackageSanityTests.java +++ b/android/guava-testlib/src/com/google/common/testing/AbstractPackageSanityTests.java @@ -22,6 +22,7 @@ import com.google.common.annotations.Beta; import com.google.common.annotations.GwtIncompatible; +import com.google.common.annotations.J2ktIncompatible; import com.google.common.annotations.VisibleForTesting; import com.google.common.base.Optional; import com.google.common.base.Predicate; @@ -105,6 +106,7 @@ // TODO: Switch to JUnit 4 and use @Parameterized and @BeforeClass // Note: @Test annotations are deliberate, as some subclasses specify @RunWith(JUnit4). @GwtIncompatible +@J2ktIncompatible @J2ObjCIncompatible // com.google.common.reflect.ClassPath public abstract class AbstractPackageSanityTests extends TestCase { @@ -325,7 +327,7 @@ private static AssertionFailedError sanityError( /** * Finds the classes not ending with a test suffix and not covered by an explicit test whose name - * is {@code explicitTestName}. + * is {@code explicitTestNames}. */ @VisibleForTesting List> findClassesToTest( 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 26f4df4749af..a52373d64976 100644 --- a/android/guava-testlib/src/com/google/common/testing/ArbitraryInstances.java +++ b/android/guava-testlib/src/com/google/common/testing/ArbitraryInstances.java @@ -19,6 +19,7 @@ import static com.google.common.base.Preconditions.checkArgument; import com.google.common.annotations.GwtIncompatible; +import com.google.common.annotations.J2ktIncompatible; import com.google.common.base.CharMatcher; import com.google.common.base.Charsets; import com.google.common.base.Defaults; @@ -142,7 +143,7 @@ import java.util.regex.MatchResult; import java.util.regex.Matcher; import java.util.regex.Pattern; -import javax.annotation.CheckForNull; +import org.checkerframework.checker.nullness.qual.Nullable; /** * Supplies an arbitrary "default" instance for a wide range of types, often useful in testing @@ -167,6 +168,8 @@ * @since 12.0 */ @GwtIncompatible +@J2ktIncompatible +@ElementTypesAreNonnullByDefault public final class ArbitraryInstances { private static final Ordering BY_FIELD_NAME = @@ -326,8 +329,7 @@ private static void setImplementation(Class type, Class impl } @SuppressWarnings("unchecked") // it's a subtype map - @CheckForNull - private static Class getImplementation(Class type) { + private static @Nullable Class getImplementation(Class type) { return (Class) implementations.get(type); } @@ -337,8 +339,7 @@ private static Class getImplementation(Class type) { * Returns an arbitrary instance for {@code type}, or {@code null} if no arbitrary instance can be * determined. */ - @CheckForNull - public static T get(Class type) { + public static @Nullable T get(Class type) { T defaultValue = DEFAULTS.getInstance(type); if (defaultValue != null) { return defaultValue; @@ -349,7 +350,7 @@ public static T get(Class type) { } if (type.isEnum()) { T[] enumConstants = type.getEnumConstants(); - return (enumConstants.length == 0) ? null : enumConstants[0]; + return (enumConstants == null || enumConstants.length == 0) ? null : enumConstants[0]; } if (type.isArray()) { return createEmptyArray(type); @@ -385,8 +386,7 @@ public static T get(Class type) { } } - @CheckForNull - private static T arbitraryConstantInstanceOrNull(Class type) { + private static @Nullable T arbitraryConstantInstanceOrNull(Class type) { Field[] fields = type.getDeclaredFields(); Arrays.sort(fields, BY_FIELD_NAME); for (Field field : fields) { @@ -497,11 +497,12 @@ private Object readResolve() { } // Always equal is a valid total ordering. And it works for any Object. - private static final class AlwaysEqual extends Ordering implements Serializable { + private static final class AlwaysEqual extends Ordering<@Nullable Object> + implements Serializable { private static final AlwaysEqual INSTANCE = new AlwaysEqual(); @Override - public int compare(Object o1, Object o2) { + public int compare(@Nullable Object o1, @Nullable Object o2) { return 0; } diff --git a/android/guava-testlib/src/com/google/common/testing/ClassSanityTester.java b/android/guava-testlib/src/com/google/common/testing/ClassSanityTester.java index 54de68d08c2b..8c4ee4705bc0 100644 --- a/android/guava-testlib/src/com/google/common/testing/ClassSanityTester.java +++ b/android/guava-testlib/src/com/google/common/testing/ClassSanityTester.java @@ -23,6 +23,7 @@ import com.google.common.annotations.Beta; import com.google.common.annotations.GwtIncompatible; +import com.google.common.annotations.J2ktIncompatible; import com.google.common.annotations.VisibleForTesting; import com.google.common.base.Joiner; import com.google.common.base.Objects; @@ -51,9 +52,9 @@ import java.util.List; import java.util.Map.Entry; import java.util.Set; -import javax.annotation.CheckForNull; import junit.framework.Assert; import junit.framework.AssertionFailedError; +import org.checkerframework.checker.nullness.qual.Nullable; /** * Tester that runs automated sanity tests for any given class. A typical use case is to test static @@ -81,6 +82,7 @@ */ @Beta @GwtIncompatible +@J2ktIncompatible public final class ClassSanityTester { private static final Ordering> BY_METHOD_NAME = @@ -337,13 +339,14 @@ void doTestEquals(Class cls) * @return The instantiated instance, or {@code null} if the class has no non-private constructor * or factory method to be constructed. */ - @CheckForNull - T instantiate(Class cls) - throws ParameterNotInstantiableException, IllegalAccessException, InvocationTargetException, + @Nullable T instantiate(Class cls) + throws ParameterNotInstantiableException, + IllegalAccessException, + InvocationTargetException, FactoryMethodReturnsNullException { if (cls.isEnum()) { T[] constants = cls.getEnumConstants(); - if (constants.length > 0) { + if (constants != null && constants.length > 0) { return constants[0]; } else { return null; @@ -386,8 +389,7 @@ T instantiate(Class cls) * class, preventing its methods from being accessible. * @throws InvocationTargetException if a static method threw exception. */ - @CheckForNull - private T instantiate(Invokable factory) + private @Nullable T instantiate(Invokable factory) throws ParameterNotInstantiableException, InvocationTargetException, IllegalAccessException { return invoke(factory, getDummyArguments(factory)); } @@ -576,7 +578,7 @@ private void testEqualsUsing(final Invokable factory) IllegalAccessException, InvocationTargetException, FactoryMethodReturnsNullException { List params = factory.getParameters(); List argGenerators = Lists.newArrayListWithCapacity(params.size()); - List args = Lists.newArrayListWithCapacity(params.size()); + List<@Nullable Object> args = Lists.newArrayListWithCapacity(params.size()); for (Parameter param : params) { FreshValueGenerator generator = newFreshValueGenerator(); argGenerators.add(generator); @@ -634,7 +636,7 @@ private List generateEqualFactoryArguments( Object shouldBeEqualArg = generateDummyArg(param, newFreshValueGenerator()); if (arg != shouldBeEqualArg && Objects.equal(arg, shouldBeEqualArg) - && hashCodeInsensitiveToArgReference(factory, args, i, shouldBeEqualArg) + && hashCodeInsensitiveToArgReference(factory, args, i, checkNotNull(shouldBeEqualArg)) && hashCodeInsensitiveToArgReference( factory, args, i, generateDummyArg(param, newFreshValueGenerator()))) { // If the implementation uses identityHashCode(), referential equality is @@ -672,8 +674,7 @@ Object interfaceMethodCalled(Class interfaceType, Method method) { return generator; } - @CheckForNull - private static Object generateDummyArg(Parameter param, FreshValueGenerator generator) + private static @Nullable Object generateDummyArg(Parameter param, FreshValueGenerator generator) throws ParameterNotInstantiableException { if (isNullable(param)) { return null; @@ -769,8 +770,7 @@ private static T createInstance(Invokable factory, List a return instance; } - @CheckForNull - private static T invoke(Invokable factory, List args) + private static @Nullable T invoke(Invokable factory, List args) throws InvocationTargetException, IllegalAccessException { T returnValue = factory.invoke(null, args.toArray()); if (returnValue == null) { @@ -836,7 +836,7 @@ R dummyReturnValue(TypeToken returnType) { } @Override - public boolean equals(Object obj) { + public boolean equals(@Nullable Object obj) { return obj instanceof SerializableDummyProxy; } diff --git a/android/guava-testlib/src/com/google/common/testing/ClusterException.java b/android/guava-testlib/src/com/google/common/testing/ClusterException.java index 7665ab1d435b..2b8d4eb77e72 100644 --- a/android/guava-testlib/src/com/google/common/testing/ClusterException.java +++ b/android/guava-testlib/src/com/google/common/testing/ClusterException.java @@ -59,20 +59,21 @@ * @author Luiz-Otavio Zorzella */ @GwtCompatible +@ElementTypesAreNonnullByDefault final class ClusterException extends RuntimeException { - public final Collection exceptions; + final Collection exceptions; private ClusterException(Collection exceptions) { super( exceptions.size() + " exceptions were thrown. The first exception is listed as a cause.", exceptions.iterator().next()); - ArrayList temp = new ArrayList<>(exceptions); + ArrayList temp = new ArrayList<>(exceptions); this.exceptions = Collections.unmodifiableCollection(temp); } - /** @see #create(Collection) */ - public static RuntimeException create(Throwable... exceptions) { + /** See {@link #create(Collection)}. */ + static RuntimeException create(Throwable... exceptions) { ArrayList temp = new ArrayList<>(Arrays.asList(exceptions)); return create(temp); } @@ -96,7 +97,7 @@ public static RuntimeException create(Throwable... exceptions) { * @throws NullPointerException if {@code exceptions} is null * @throws IllegalArgumentException if {@code exceptions} is empty */ - public static RuntimeException create(Collection exceptions) { + static RuntimeException create(Collection exceptions) { if (exceptions.size() == 0) { throw new IllegalArgumentException("Can't create an ExceptionCollection with no exceptions"); } diff --git a/android/guava-testlib/src/com/google/common/testing/DummyProxy.java b/android/guava-testlib/src/com/google/common/testing/DummyProxy.java index 85e229d51831..7b2525c72c61 100644 --- a/android/guava-testlib/src/com/google/common/testing/DummyProxy.java +++ b/android/guava-testlib/src/com/google/common/testing/DummyProxy.java @@ -20,6 +20,7 @@ import static com.google.common.testing.NullPointerTester.isNullable; import com.google.common.annotations.GwtIncompatible; +import com.google.common.annotations.J2ktIncompatible; import com.google.common.collect.ImmutableList; import com.google.common.collect.Sets; import com.google.common.reflect.AbstractInvocationHandler; @@ -30,6 +31,7 @@ import java.lang.reflect.Method; import java.lang.reflect.Proxy; import java.util.Set; +import org.checkerframework.checker.nullness.qual.Nullable; /** * Generates a dummy interface proxy that simply returns a dummy value for each method. @@ -37,6 +39,8 @@ * @author Ben Yu */ @GwtIncompatible +@J2ktIncompatible +@ElementTypesAreNonnullByDefault abstract class DummyProxy { /** @@ -59,7 +63,7 @@ final T newProxy(TypeToken interfaceType) { } /** Returns the dummy return value for {@code returnType}. */ - abstract R dummyReturnValue(TypeToken returnType); + abstract @Nullable R dummyReturnValue(TypeToken returnType); private class DummyHandler extends AbstractInvocationHandler implements Serializable { private final TypeToken interfaceType; @@ -69,7 +73,7 @@ private class DummyHandler extends AbstractInvocationHandler implements Serializ } @Override - protected Object handleInvocation(Object proxy, Method method, Object[] args) { + protected @Nullable Object handleInvocation(Object proxy, Method method, Object[] args) { Invokable invokable = interfaceType.method(method); ImmutableList params = invokable.getParameters(); for (int i = 0; i < args.length; i++) { @@ -87,7 +91,7 @@ public int hashCode() { } @Override - public boolean equals(Object obj) { + public boolean equals(@Nullable Object obj) { if (obj instanceof DummyHandler) { DummyHandler that = (DummyHandler) obj; return identity().equals(that.identity()); diff --git a/android/guava-testlib/src/com/google/common/testing/ElementTypesAreNonnullByDefault.java b/android/guava-testlib/src/com/google/common/testing/ElementTypesAreNonnullByDefault.java new file mode 100644 index 000000000000..1362176b5a12 --- /dev/null +++ b/android/guava-testlib/src/com/google/common/testing/ElementTypesAreNonnullByDefault.java @@ -0,0 +1,41 @@ +/* + * Copyright (C) 2021 The Guava Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.common.testing; + +import static java.lang.annotation.ElementType.FIELD; +import static java.lang.annotation.ElementType.METHOD; +import static java.lang.annotation.ElementType.PARAMETER; +import static java.lang.annotation.ElementType.TYPE; +import static java.lang.annotation.RetentionPolicy.RUNTIME; + +import com.google.common.annotations.GwtCompatible; +import java.lang.annotation.Retention; +import java.lang.annotation.Target; +import javax.annotation.Nonnull; +import javax.annotation.meta.TypeQualifierDefault; + +/** + * Marks all "top-level" types as non-null in a way that is recognized by Kotlin. Note that this + * unfortunately includes type-variable usages, so we also provide {@link ParametricNullness} to + * "undo" it as best we can. + */ +@GwtCompatible +@Retention(RUNTIME) +@Target(TYPE) +@TypeQualifierDefault({FIELD, METHOD, PARAMETER}) +@Nonnull +@interface ElementTypesAreNonnullByDefault {} diff --git a/android/guava-testlib/src/com/google/common/testing/EqualsTester.java b/android/guava-testlib/src/com/google/common/testing/EqualsTester.java index 37472a378439..d4484702a994 100644 --- a/android/guava-testlib/src/com/google/common/testing/EqualsTester.java +++ b/android/guava-testlib/src/com/google/common/testing/EqualsTester.java @@ -22,11 +22,12 @@ import com.google.common.annotations.GwtCompatible; import com.google.common.base.Equivalence; -import com.google.common.collect.ImmutableList; import com.google.common.collect.Iterables; import com.google.common.collect.Lists; import com.google.errorprone.annotations.CanIgnoreReturnValue; +import java.util.ArrayList; import java.util.List; +import org.checkerframework.checker.nullness.qual.Nullable; /** * Tester for equals() and hashCode() methods of a class. @@ -75,6 +76,7 @@ * @since 10.0 */ @GwtCompatible +@ElementTypesAreNonnullByDefault public final class EqualsTester { private static final int REPETITIONS = 3; @@ -95,9 +97,17 @@ public EqualsTester() { * equal to any other equality groups added to this tester. */ @CanIgnoreReturnValue - public EqualsTester addEqualityGroup(Object... equalityGroup) { + public EqualsTester addEqualityGroup(@Nullable Object @Nullable ... equalityGroup) { checkNotNull(equalityGroup); - equalityGroups.add(ImmutableList.copyOf(equalityGroup)); + List list = new ArrayList<>(equalityGroup.length); + for (int i = 0; i < equalityGroup.length; i++) { + Object element = equalityGroup[i]; + if (element == null) { + throw new NullPointerException("at index " + i); + } + list.add(element); + } + equalityGroups.add(list); return this; } diff --git a/android/guava-testlib/src/com/google/common/testing/EquivalenceTester.java b/android/guava-testlib/src/com/google/common/testing/EquivalenceTester.java index b69072984683..ec34752c57ab 100644 --- a/android/guava-testlib/src/com/google/common/testing/EquivalenceTester.java +++ b/android/guava-testlib/src/com/google/common/testing/EquivalenceTester.java @@ -50,6 +50,7 @@ * @since 10.0 */ @GwtCompatible +@ElementTypesAreNonnullByDefault public final class EquivalenceTester { private static final int REPETITIONS = 3; diff --git a/android/guava-testlib/src/com/google/common/testing/FakeTicker.java b/android/guava-testlib/src/com/google/common/testing/FakeTicker.java index 8e3ca4a9751c..8c0e0026e0ce 100644 --- a/android/guava-testlib/src/com/google/common/testing/FakeTicker.java +++ b/android/guava-testlib/src/com/google/common/testing/FakeTicker.java @@ -35,6 +35,7 @@ * @author Jige Yu * @since 10.0 */ +@ElementTypesAreNonnullByDefault @GwtCompatible public class FakeTicker extends Ticker { diff --git a/android/guava-testlib/src/com/google/common/testing/ForwardingWrapperTester.java b/android/guava-testlib/src/com/google/common/testing/ForwardingWrapperTester.java index 9b156c6e03fa..c0d2c6a01217 100644 --- a/android/guava-testlib/src/com/google/common/testing/ForwardingWrapperTester.java +++ b/android/guava-testlib/src/com/google/common/testing/ForwardingWrapperTester.java @@ -23,6 +23,7 @@ import static junit.framework.Assert.fail; import com.google.common.annotations.GwtIncompatible; +import com.google.common.annotations.J2ktIncompatible; import com.google.common.base.Function; import com.google.common.base.Throwables; import com.google.common.collect.Lists; @@ -35,6 +36,7 @@ import java.lang.reflect.Modifier; import java.util.List; import java.util.concurrent.atomic.AtomicInteger; +import org.checkerframework.checker.nullness.qual.Nullable; /** * Tester to ensure forwarding wrapper works by delegating calls to the corresponding method with @@ -54,6 +56,8 @@ * @since 14.0 */ @GwtIncompatible +@J2ktIncompatible +@ElementTypesAreNonnullByDefault public final class ForwardingWrapperTester { private boolean testsEquals = false; @@ -173,9 +177,9 @@ private static void testToString( wrapperFunction.apply(proxy).toString()); } - private static Object[] getParameterValues(Method method) { + private static @Nullable Object[] getParameterValues(Method method) { FreshValueGenerator paramValues = new FreshValueGenerator(); - List passedArgs = Lists.newArrayList(); + List<@Nullable Object> passedArgs = Lists.newArrayList(); for (Class paramType : method.getParameterTypes()) { passedArgs.add(paramValues.generateFresh(paramType)); } @@ -187,8 +191,8 @@ private static final class InteractionTester extends AbstractInvocationHandle private final Class interfaceType; private final Method method; - private final Object[] passedArgs; - private final Object returnValue; + private final @Nullable Object[] passedArgs; + private final @Nullable Object returnValue; private final AtomicInteger called = new AtomicInteger(); InteractionTester(Class interfaceType, Method method) { @@ -199,8 +203,8 @@ private static final class InteractionTester extends AbstractInvocationHandle } @Override - protected Object handleInvocation(Object p, Method calledMethod, Object[] args) - throws Throwable { + protected @Nullable Object handleInvocation( + Object p, Method calledMethod, @Nullable Object[] args) throws Throwable { assertEquals(method, calledMethod); assertEquals(method + " invoked more than once.", 0, called.get()); for (int i = 0; i < passedArgs.length; i++) { diff --git a/android/guava-testlib/src/com/google/common/testing/FreshValueGenerator.java b/android/guava-testlib/src/com/google/common/testing/FreshValueGenerator.java index 259f50c45214..41c8ee624c56 100644 --- a/android/guava-testlib/src/com/google/common/testing/FreshValueGenerator.java +++ b/android/guava-testlib/src/com/google/common/testing/FreshValueGenerator.java @@ -20,6 +20,7 @@ import static com.google.common.base.Throwables.throwIfUnchecked; import com.google.common.annotations.GwtIncompatible; +import com.google.common.annotations.J2ktIncompatible; import com.google.common.base.CharMatcher; import com.google.common.base.Charsets; import com.google.common.base.Equivalence; @@ -118,7 +119,7 @@ import java.util.concurrent.ConcurrentMap; import java.util.concurrent.atomic.AtomicInteger; import java.util.regex.Pattern; -import javax.annotation.CheckForNull; +import org.checkerframework.checker.nullness.qual.Nullable; /** * Generates fresh instances of types that are different from each other (if possible). @@ -126,6 +127,7 @@ * @author Ben Yu */ @GwtIncompatible +@J2ktIncompatible class FreshValueGenerator { private static final ImmutableMap, Method> GENERATORS; @@ -175,8 +177,7 @@ final void addSampleInstances(Class type, Iterable instances *
  • null if no value can be generated. * */ - @CheckForNull - final Object generateFresh(TypeToken type) { + final @Nullable Object generateFresh(TypeToken type) { Object generated = generate(type); if (generated != null) { freshness.incrementAndGet(); @@ -184,8 +185,7 @@ final Object generateFresh(TypeToken type) { return generated; } - @CheckForNull - final T generateFresh(Class type) { + final @Nullable T generateFresh(Class type) { return Primitives.wrap(type).cast(generateFresh(TypeToken.of(type))); } @@ -199,7 +199,7 @@ final T newFreshProxy(final Class interfaceType) { * Generates an instance for {@code type} using the current {@link #freshness}. The generated * instance may or may not be unique across different calls. */ - private Object generate(TypeToken type) { + private @Nullable Object generate(TypeToken type) { Class rawType = type.getRawType(); List samples = sampleInstances.get(rawType); Object sample = pickInstance(samples, null); @@ -210,7 +210,7 @@ private Object generate(TypeToken type) { return pickInstance(rawType.getEnumConstants(), null); } if (type.isArray()) { - TypeToken componentType = type.getComponentType(); + TypeToken componentType = checkNotNull(type.getComponentType()); Object array = Array.newInstance(componentType.getRawType(), 1); Array.set(array, 0, generate(componentType)); return array; @@ -256,7 +256,7 @@ private Object generate(TypeToken type) { return defaultGenerate(rawType); } - private T defaultGenerate(Class rawType) { + private @Nullable T defaultGenerate(Class rawType) { if (rawType.isInterface()) { // always create a new proxy return newProxy(rawType); @@ -289,7 +289,7 @@ private final class FreshInvocationHandler extends AbstractInvocationHandler { } @Override - protected Object handleInvocation(Object proxy, Method method, Object[] args) { + protected Object handleInvocation(Object proxy, Method method, @Nullable Object[] args) { return interfaceMethodCalled(interfaceType, method); } @@ -299,7 +299,7 @@ public int hashCode() { } @Override - public boolean equals(@CheckForNull Object obj) { + public boolean equals(@Nullable Object obj) { if (obj instanceof FreshInvocationHandler) { FreshInvocationHandler that = (FreshInvocationHandler) obj; return identity == that.identity; @@ -620,7 +620,7 @@ Comparator generateComparator() { } @Generates - Ordering generateOrdering() { + Ordering generateOrdering() { return new Ordering() { @Override public int compare(T left, T right) { @@ -647,29 +647,29 @@ static > Range generateRange(C freshElement) { } @Generates - static Iterable generateIterable(@CheckForNull E freshElement) { + static Iterable generateIterable(@Nullable E freshElement) { return generateList(freshElement); } @Generates - static Collection generateCollection(@CheckForNull E freshElement) { + static Collection generateCollection(@Nullable E freshElement) { return generateList(freshElement); } @Generates - static List generateList(@CheckForNull E freshElement) { + static List generateList(@Nullable E freshElement) { return generateArrayList(freshElement); } @Generates - static ArrayList generateArrayList(@CheckForNull E freshElement) { + static ArrayList generateArrayList(@Nullable E freshElement) { ArrayList list = Lists.newArrayList(); list.add(freshElement); return list; } @Generates - static LinkedList generateLinkedList(@CheckForNull E freshElement) { + static LinkedList generateLinkedList(@Nullable E freshElement) { LinkedList list = Lists.newLinkedList(); list.add(freshElement); return list; @@ -686,17 +686,17 @@ static ImmutableCollection generateImmutableCollection(E freshElement) { } @Generates - static Set generateSet(@CheckForNull E freshElement) { + static Set generateSet(@Nullable E freshElement) { return generateHashSet(freshElement); } @Generates - static HashSet generateHashSet(@CheckForNull E freshElement) { + static HashSet generateHashSet(@Nullable E freshElement) { return generateLinkedHashSet(freshElement); } @Generates - static LinkedHashSet generateLinkedHashSet(@CheckForNull E freshElement) { + static LinkedHashSet generateLinkedHashSet(@Nullable E freshElement) { LinkedHashSet set = Sets.newLinkedHashSet(); set.add(freshElement); return set; @@ -731,19 +731,19 @@ static > ImmutableSortedSet generateImmutable } @Generates - static Multiset generateMultiset(@CheckForNull E freshElement) { + static Multiset generateMultiset(@Nullable E freshElement) { return generateHashMultiset(freshElement); } @Generates - static HashMultiset generateHashMultiset(@CheckForNull E freshElement) { + static HashMultiset generateHashMultiset(@Nullable E freshElement) { HashMultiset multiset = HashMultiset.create(); multiset.add(freshElement); return multiset; } @Generates - static LinkedHashMultiset generateLinkedHashMultiset(@CheckForNull E freshElement) { + static LinkedHashMultiset generateLinkedHashMultiset(@Nullable E freshElement) { LinkedHashMultiset multiset = LinkedHashMultiset.create(); multiset.add(freshElement); return multiset; @@ -773,18 +773,17 @@ static > ImmutableSortedMultiset generateImmutableSor } @Generates - static Map generateMap(@CheckForNull K key, @CheckForNull V value) { + static Map generateMap(@Nullable K key, @Nullable V value) { return generateHashdMap(key, value); } @Generates - static HashMap generateHashdMap(@CheckForNull K key, @CheckForNull V value) { + static HashMap generateHashdMap(@Nullable K key, @Nullable V value) { return generateLinkedHashMap(key, value); } @Generates - static LinkedHashMap generateLinkedHashMap( - @CheckForNull K key, @CheckForNull V value) { + static LinkedHashMap generateLinkedHashMap(@Nullable K key, @Nullable V value) { LinkedHashMap map = Maps.newLinkedHashMap(); map.put(key, value); return map; @@ -809,19 +808,19 @@ static ConcurrentMap generateConcurrentMap(K key, V value) { @Generates static , V> SortedMap generateSortedMap( - K key, @CheckForNull V value) { + K key, @Nullable V value) { return generateNavigableMap(key, value); } @Generates static , V> NavigableMap generateNavigableMap( - K key, @CheckForNull V value) { + K key, @Nullable V value) { return generateTreeMap(key, value); } @Generates static , V> TreeMap generateTreeMap( - K key, @CheckForNull V value) { + K key, @Nullable V value) { TreeMap map = Maps.newTreeMap(); map.put(key, value); return map; @@ -834,7 +833,7 @@ static , V> ImmutableSortedMap generateImm } @Generates - static Multimap generateMultimap(@CheckForNull K key, @CheckForNull V value) { + static Multimap generateMultimap(@Nullable K key, @Nullable V value) { return generateListMultimap(key, value); } @@ -844,14 +843,13 @@ static ImmutableMultimap generateImmutableMultimap(K key, V value) } @Generates - static ListMultimap generateListMultimap( - @CheckForNull K key, @CheckForNull V value) { + static ListMultimap generateListMultimap(@Nullable K key, @Nullable V value) { return generateArrayListMultimap(key, value); } @Generates static ArrayListMultimap generateArrayListMultimap( - @CheckForNull K key, @CheckForNull V value) { + @Nullable K key, @Nullable V value) { ArrayListMultimap multimap = ArrayListMultimap.create(); multimap.put(key, value); return multimap; @@ -863,13 +861,12 @@ static ImmutableListMultimap generateImmutableListMultimap(K key, V } @Generates - static SetMultimap generateSetMultimap(@CheckForNull K key, @CheckForNull V value) { + static SetMultimap generateSetMultimap(@Nullable K key, @Nullable V value) { return generateLinkedHashMultimap(key, value); } @Generates - static HashMultimap generateHashMultimap( - @CheckForNull K key, @CheckForNull V value) { + static HashMultimap generateHashMultimap(@Nullable K key, @Nullable V value) { HashMultimap multimap = HashMultimap.create(); multimap.put(key, value); return multimap; @@ -877,7 +874,7 @@ static HashMultimap generateHashMultimap( @Generates static LinkedHashMultimap generateLinkedHashMultimap( - @CheckForNull K key, @CheckForNull V value) { + @Nullable K key, @Nullable V value) { LinkedHashMultimap multimap = LinkedHashMultimap.create(); multimap.put(key, value); return multimap; @@ -889,12 +886,12 @@ static ImmutableSetMultimap generateImmutableSetMultimap(K key, V v } @Generates - static BiMap generateBimap(@CheckForNull K key, @CheckForNull V value) { + static BiMap generateBimap(@Nullable K key, @Nullable V value) { return generateHashBiMap(key, value); } @Generates - static HashBiMap generateHashBiMap(@CheckForNull K key, @CheckForNull V value) { + static HashBiMap generateHashBiMap(@Nullable K key, @Nullable V value) { HashBiMap bimap = HashBiMap.create(); bimap.put(key, value); return bimap; @@ -906,14 +903,12 @@ static ImmutableBiMap generateImmutableBimap(K key, V value) { } @Generates - static Table generateTable( - @CheckForNull R row, @CheckForNull C column, @CheckForNull V value) { + static Table generateTable(R row, C column, V value) { return generateHashBasedTable(row, column, value); } @Generates - static HashBasedTable generateHashBasedTable( - @CheckForNull R row, @CheckForNull C column, @CheckForNull V value) { + static HashBasedTable generateHashBasedTable(R row, C column, V value) { HashBasedTable table = HashBasedTable.create(); table.put(row, column, value); return table; diff --git a/android/guava-testlib/src/com/google/common/testing/GcFinalization.java b/android/guava-testlib/src/com/google/common/testing/GcFinalization.java index da6aa2211b49..cf3409ac3578 100644 --- a/android/guava-testlib/src/com/google/common/testing/GcFinalization.java +++ b/android/guava-testlib/src/com/google/common/testing/GcFinalization.java @@ -19,6 +19,7 @@ import static java.util.concurrent.TimeUnit.SECONDS; import com.google.common.annotations.GwtIncompatible; +import com.google.common.annotations.J2ktIncompatible; import com.google.errorprone.annotations.DoNotMock; import com.google.j2objc.annotations.J2ObjCIncompatible; import java.lang.ref.WeakReference; @@ -103,7 +104,9 @@ * @since 11.0 */ @GwtIncompatible +@J2ktIncompatible @J2ObjCIncompatible // gc +@ElementTypesAreNonnullByDefault public final class GcFinalization { private GcFinalization() {} diff --git a/android/guava-testlib/src/com/google/common/testing/IgnoreJRERequirement.java b/android/guava-testlib/src/com/google/common/testing/IgnoreJRERequirement.java new file mode 100644 index 000000000000..2203162bf2b7 --- /dev/null +++ b/android/guava-testlib/src/com/google/common/testing/IgnoreJRERequirement.java @@ -0,0 +1,29 @@ +/* + * Copyright 2019 The Guava Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ + +package com.google.common.testing; + +import static java.lang.annotation.ElementType.CONSTRUCTOR; +import static java.lang.annotation.ElementType.METHOD; +import static java.lang.annotation.ElementType.TYPE; + +import java.lang.annotation.Target; + +/** + * Disables Animal Sniffer's checking of compatibility with older versions of Java/Android. + * + *

    Each package's copy of this annotation needs to be listed in our {@code pom.xml}. + */ +@Target({METHOD, CONSTRUCTOR, TYPE}) +@interface IgnoreJRERequirement {} diff --git a/android/guava-testlib/src/com/google/common/testing/NullPointerTester.java b/android/guava-testlib/src/com/google/common/testing/NullPointerTester.java index c511129b210c..4de2c9cc239a 100644 --- a/android/guava-testlib/src/com/google/common/testing/NullPointerTester.java +++ b/android/guava-testlib/src/com/google/common/testing/NullPointerTester.java @@ -20,6 +20,7 @@ import static com.google.common.base.Preconditions.checkNotNull; import com.google.common.annotations.GwtIncompatible; +import com.google.common.annotations.J2ktIncompatible; import com.google.common.base.Converter; import com.google.common.base.Objects; import com.google.common.collect.ClassToInstanceMap; @@ -34,7 +35,7 @@ import com.google.common.reflect.TypeToken; import com.google.errorprone.annotations.CanIgnoreReturnValue; import java.lang.annotation.Annotation; -import java.lang.reflect.AnnotatedElement; +import java.lang.reflect.AnnotatedType; import java.lang.reflect.Constructor; import java.lang.reflect.InvocationTargetException; import java.lang.reflect.Member; @@ -42,18 +43,19 @@ import java.lang.reflect.Modifier; import java.lang.reflect.ParameterizedType; import java.lang.reflect.Type; +import java.lang.reflect.TypeVariable; import java.util.Arrays; import java.util.List; import java.util.concurrent.ConcurrentMap; -import javax.annotation.CheckForNull; import junit.framework.Assert; import junit.framework.AssertionFailedError; +import org.checkerframework.checker.nullness.qual.Nullable; /** * A test utility that verifies that your methods and constructors throw {@link * NullPointerException} or {@link UnsupportedOperationException} whenever null is passed to a - * parameter that isn't annotated with an annotation with the simple name {@code Nullable}, {@code - * CheckForNull}, {@code NullableType}, or {@code NullableDecl}. + * parameter whose declaration or type isn't annotated with an annotation with the simple name + * {@code Nullable}, {@code CheckForNull}, {@code NullableType}, or {@code NullableDecl}. * *

    The tested methods and constructors are invoked -- each time with one parameter being null and * the rest not null -- and the test fails if no expected exception is thrown. {@code @@ -67,6 +69,8 @@ * @since 10.0 */ @GwtIncompatible +@J2ktIncompatible +@ElementTypesAreNonnullByDefault public final class NullPointerTester { private final ClassToInstanceMap defaults = MutableClassToInstanceMap.create(); @@ -74,6 +78,22 @@ public final class NullPointerTester { private ExceptionTypePolicy policy = ExceptionTypePolicy.NPE_OR_UOE; + public NullPointerTester() { + try { + /* + * Converter.apply has a non-nullable parameter type but doesn't throw for null arguments. For + * more information, see the comments in that class. + * + * We already know that that's how it behaves, and subclasses of Converter can't change that + * behavior. So there's no sense in making all subclass authors exclude the method from any + * NullPointerTester tests that they have. + */ + ignoredMembers.add(Converter.class.getMethod("apply", Object.class)); + } catch (NoSuchMethodException shouldBeImpossible) { + // OK, fine: If it doesn't exist, then there's chance that we're going to be asked to test it. + } + } + /** * Sets a default value that can be used for any parameter of type {@code type}. Returns this * object. @@ -178,7 +198,7 @@ public void testAllPublicInstanceMethods(Object instance) { * * @param instance the instance to invoke {@code method} on, or null if {@code method} is static */ - public void testMethod(@CheckForNull Object instance, Method method) { + public void testMethod(@Nullable Object instance, Method method) { Class[] types = method.getParameterTypes(); for (int nullIndex = 0; nullIndex < types.length; nullIndex++) { testMethodParameter(instance, method, nullIndex); @@ -209,8 +229,7 @@ public void testConstructor(Constructor ctor) { * * @param instance the instance to invoke {@code method} on, or null if {@code method} is static */ - public void testMethodParameter( - @CheckForNull final Object instance, final Method method, int paramIndex) { + public void testMethodParameter(@Nullable Object instance, Method method, int paramIndex) { method.setAccessible(true); testParameter(instance, invokable(instance, method), paramIndex, method.getDeclaringClass()); } @@ -308,7 +327,7 @@ private static final class Signature { } @Override - public boolean equals(Object obj) { + public boolean equals(@Nullable Object obj) { if (obj instanceof Signature) { Signature that = (Signature) obj; return name.equals(that.name) && parameterTypes.equals(that.parameterTypes); @@ -331,11 +350,18 @@ public int hashCode() { * static */ private void testParameter( - Object instance, Invokable invokable, int paramIndex, Class testedClass) { + @Nullable Object instance, Invokable invokable, int paramIndex, Class testedClass) { + /* + * com.google.common is starting to rely on type-use annotations, which aren't visible under + * Android VMs. So we skip testing there. + */ + if (isAndroid() && Reflection.getPackageName(testedClass).startsWith("com.google.common")) { + return; + } if (isPrimitiveOrNullable(invokable.getParameters().get(paramIndex))) { return; // there's nothing to test } - Object[] params = buildParamList(invokable, paramIndex); + @Nullable Object[] params = buildParamList(invokable, paramIndex); try { @SuppressWarnings("unchecked") // We'll get a runtime exception if the type is wrong. Invokable unsafe = (Invokable) invokable; @@ -371,9 +397,10 @@ private void testParameter( } } - private Object[] buildParamList(Invokable invokable, int indexOfParamToSetToNull) { + private @Nullable Object[] buildParamList( + Invokable invokable, int indexOfParamToSetToNull) { ImmutableList params = invokable.getParameters(); - Object[] args = new Object[params.size()]; + @Nullable Object[] args = new Object[params.size()]; for (int i = 0; i < args.length; i++) { Parameter param = params.get(i); @@ -389,7 +416,7 @@ private Object[] buildParamList(Invokable invokable, int indexOfParamToSet return args; } - private T getDefaultValue(TypeToken type) { + private @Nullable T getDefaultValue(TypeToken type) { // We assume that all defaults are generics-safe, even if they aren't, // we take the risk. @SuppressWarnings("unchecked") @@ -457,13 +484,13 @@ private static TypeToken getFirstTypeParameter(Type type) { private T newDefaultReturningProxy(final TypeToken type) { return new DummyProxy() { @Override - R dummyReturnValue(TypeToken returnType) { + @Nullable R dummyReturnValue(TypeToken returnType) { return getDefaultValue(returnType); } }.newProxy(type); } - private static Invokable invokable(@CheckForNull Object instance, Method method) { + private static Invokable invokable(@Nullable Object instance, Method method) { if (instance == null) { return Invokable.from(method); } else { @@ -479,8 +506,16 @@ static boolean isPrimitiveOrNullable(Parameter param) { ImmutableSet.of( "CheckForNull", "Nullable", "NullableDecl", "NullableType", "ParametricNullness"); - static boolean isNullable(AnnotatedElement e) { - for (Annotation annotation : e.getAnnotations()) { + static boolean isNullable(Invokable invokable) { + return NULLNESS_ANNOTATION_READER.isNullable(invokable); + } + + static boolean isNullable(Parameter param) { + return NULLNESS_ANNOTATION_READER.isNullable(param); + } + + private static boolean containsNullable(Annotation[] annotations) { + for (Annotation annotation : annotations) { if (NULLABLE_ANNOTATION_SIMPLE_NAMES.contains(annotation.annotationType().getSimpleName())) { return true; } @@ -551,4 +586,87 @@ public boolean isExpectedType(Throwable cause) { public abstract boolean isExpectedType(Throwable cause); } + + private static boolean annotatedTypeExists() { + try { + Class.forName("java.lang.reflect.AnnotatedType"); + } catch (ClassNotFoundException e) { + return false; + } + return true; + } + + private static final NullnessAnnotationReader NULLNESS_ANNOTATION_READER = + annotatedTypeExists() + ? NullnessAnnotationReader.FROM_DECLARATION_AND_TYPE_USE_ANNOTATIONS + : NullnessAnnotationReader.FROM_DECLARATION_ANNOTATIONS_ONLY; + + /** + * Looks for declaration nullness annotations and, if supported, type-use nullness annotations. + * + *

    Under Android VMs, the methods for retrieving type-use annotations don't exist. This means + * that {@link NullPointerException} may misbehave under Android when used on classes that rely on + * type-use annotations. + * + *

    Under j2objc, the necessary APIs exist, but some (perhaps all) return stub values, like + * empty arrays. Presumably {@link NullPointerException} could likewise misbehave under j2objc, + * but I don't know that anyone uses it there, anyway. + */ + private enum NullnessAnnotationReader { + // Usages (which are unsafe only for Android) are guarded by the annotatedTypeExists() check. + @SuppressWarnings({"Java7ApiChecker", "AndroidApiChecker", "DoNotCall", "deprecation"}) + FROM_DECLARATION_AND_TYPE_USE_ANNOTATIONS { + @Override + @IgnoreJRERequirement + boolean isNullable(Invokable invokable) { + return FROM_DECLARATION_ANNOTATIONS_ONLY.isNullable(invokable) + || containsNullable(invokable.getAnnotatedReturnType().getAnnotations()); + // TODO(cpovirk): Should we also check isNullableTypeVariable? + } + + @Override + @IgnoreJRERequirement + boolean isNullable(Parameter param) { + return FROM_DECLARATION_ANNOTATIONS_ONLY.isNullable(param) + || containsNullable(param.getAnnotatedType().getAnnotations()) + || isNullableTypeVariable(param.getAnnotatedType().getType()); + } + + @IgnoreJRERequirement + boolean isNullableTypeVariable(Type type) { + if (!(type instanceof TypeVariable)) { + return false; + } + TypeVariable typeVar = (TypeVariable) type; + for (AnnotatedType bound : typeVar.getAnnotatedBounds()) { + // Until Java 15, the isNullableTypeVariable case here won't help: + // https://bugs.openjdk.java.net/browse/JDK-8202469 + if (containsNullable(bound.getAnnotations()) || isNullableTypeVariable(bound.getType())) { + return true; + } + } + return false; + } + }, + FROM_DECLARATION_ANNOTATIONS_ONLY { + @Override + boolean isNullable(Invokable invokable) { + return containsNullable(invokable.getAnnotations()); + } + + @Override + boolean isNullable(Parameter param) { + return containsNullable(param.getAnnotations()); + } + }; + + abstract boolean isNullable(Invokable invokable); + + abstract boolean isNullable(Parameter param); + } + + private static boolean isAndroid() { + // Arguably it would make more sense to test "can we see type-use annotations" directly.... + return checkNotNull(System.getProperty("java.runtime.name", "")).contains("Android"); + } } diff --git a/android/guava-testlib/src/com/google/common/testing/Platform.java b/android/guava-testlib/src/com/google/common/testing/Platform.java index b107966ec97a..bbad5598d74d 100644 --- a/android/guava-testlib/src/com/google/common/testing/Platform.java +++ b/android/guava-testlib/src/com/google/common/testing/Platform.java @@ -31,6 +31,7 @@ * @author Chris Povirk */ @GwtCompatible(emulated = true) +@ElementTypesAreNonnullByDefault final class Platform { /** Serializes and deserializes the specified object. */ @SuppressWarnings("unchecked") diff --git a/android/guava-testlib/src/com/google/common/testing/RelationshipTester.java b/android/guava-testlib/src/com/google/common/testing/RelationshipTester.java index 1ffed6bb67b7..d1caedd4e8d1 100644 --- a/android/guava-testlib/src/com/google/common/testing/RelationshipTester.java +++ b/android/guava-testlib/src/com/google/common/testing/RelationshipTester.java @@ -33,6 +33,7 @@ * @author Gregory Kick */ @GwtCompatible +@ElementTypesAreNonnullByDefault final class RelationshipTester { static class ItemReporter { diff --git a/android/guava-testlib/src/com/google/common/testing/SerializableTester.java b/android/guava-testlib/src/com/google/common/testing/SerializableTester.java index 72d3ea4c3b72..c2f8cc169b0b 100644 --- a/android/guava-testlib/src/com/google/common/testing/SerializableTester.java +++ b/android/guava-testlib/src/com/google/common/testing/SerializableTester.java @@ -33,6 +33,7 @@ * @since 10.0 */ @GwtCompatible // but no-op! +@ElementTypesAreNonnullByDefault public final class SerializableTester { private SerializableTester() {} diff --git a/android/guava-testlib/src/com/google/common/testing/SloppyTearDown.java b/android/guava-testlib/src/com/google/common/testing/SloppyTearDown.java index 95ff34e33dda..478e8b7e4d88 100644 --- a/android/guava-testlib/src/com/google/common/testing/SloppyTearDown.java +++ b/android/guava-testlib/src/com/google/common/testing/SloppyTearDown.java @@ -32,6 +32,7 @@ */ @Beta @GwtCompatible +@ElementTypesAreNonnullByDefault public abstract class SloppyTearDown implements TearDown { private static final Logger logger = Logger.getLogger(SloppyTearDown.class.getName()); diff --git a/android/guava-testlib/src/com/google/common/testing/TearDown.java b/android/guava-testlib/src/com/google/common/testing/TearDown.java index 50485348f99f..9a907761d010 100644 --- a/android/guava-testlib/src/com/google/common/testing/TearDown.java +++ b/android/guava-testlib/src/com/google/common/testing/TearDown.java @@ -27,6 +27,7 @@ */ @Beta @GwtCompatible +@ElementTypesAreNonnullByDefault public interface TearDown { /** * Performs a single tear-down operation. See test-libraries-for-java's {@code diff --git a/android/guava-testlib/src/com/google/common/testing/TearDownAccepter.java b/android/guava-testlib/src/com/google/common/testing/TearDownAccepter.java index bad1f1997867..52134256a4c4 100644 --- a/android/guava-testlib/src/com/google/common/testing/TearDownAccepter.java +++ b/android/guava-testlib/src/com/google/common/testing/TearDownAccepter.java @@ -17,8 +17,8 @@ package com.google.common.testing; import com.google.common.annotations.Beta; -import com.google.errorprone.annotations.DoNotMock; import com.google.common.annotations.GwtCompatible; +import com.google.errorprone.annotations.DoNotMock; /** * Any object which can accept registrations of {@link TearDown} instances. @@ -29,6 +29,7 @@ @Beta @DoNotMock("Implement with a lambda") @GwtCompatible +@ElementTypesAreNonnullByDefault public interface TearDownAccepter { /** * Registers a TearDown implementor which will be run after the test proper. diff --git a/android/guava-testlib/src/com/google/common/testing/TearDownStack.java b/android/guava-testlib/src/com/google/common/testing/TearDownStack.java index bab025a61fc2..1f7e855e0698 100644 --- a/android/guava-testlib/src/com/google/common/testing/TearDownStack.java +++ b/android/guava-testlib/src/com/google/common/testing/TearDownStack.java @@ -38,6 +38,7 @@ */ @Beta @GwtCompatible +@ElementTypesAreNonnullByDefault public class TearDownStack implements TearDownAccepter { private static final Logger logger = Logger.getLogger(TearDownStack.class.getName()); diff --git a/android/guava-testlib/src/com/google/common/testing/TestLogHandler.java b/android/guava-testlib/src/com/google/common/testing/TestLogHandler.java index 263f8908ac36..e481a2f19e9b 100644 --- a/android/guava-testlib/src/com/google/common/testing/TestLogHandler.java +++ b/android/guava-testlib/src/com/google/common/testing/TestLogHandler.java @@ -16,13 +16,14 @@ package com.google.common.testing; + import com.google.common.annotations.GwtCompatible; import java.util.ArrayList; import java.util.Collections; import java.util.List; import java.util.logging.Handler; import java.util.logging.LogRecord; -import javax.annotation.CheckForNull; +import org.checkerframework.checker.nullness.qual.Nullable; /** * Tests may use this to intercept messages that are logged by the code under test. Example: @@ -52,14 +53,17 @@ * @since 10.0 */ @GwtCompatible +@ElementTypesAreNonnullByDefault public class TestLogHandler extends Handler { /** We will keep a private list of all logged records */ private final List list = new ArrayList<>(); /** Adds the most recently logged record to our list. */ @Override - public synchronized void publish(@CheckForNull LogRecord record) { - list.add(record); + public synchronized void publish(@Nullable LogRecord record) { + if (record != null) { + list.add(record); + } } @Override diff --git a/android/guava-testlib/src/com/google/common/util/concurrent/testing/AbstractListenableFutureTest.java b/android/guava-testlib/src/com/google/common/util/concurrent/testing/AbstractListenableFutureTest.java index b5bec2c094bd..ee3f8ff776fe 100644 --- a/android/guava-testlib/src/com/google/common/util/concurrent/testing/AbstractListenableFutureTest.java +++ b/android/guava-testlib/src/com/google/common/util/concurrent/testing/AbstractListenableFutureTest.java @@ -31,6 +31,7 @@ import java.util.concurrent.TimeUnit; import java.util.concurrent.TimeoutException; import junit.framework.TestCase; +import org.checkerframework.checker.nullness.qual.Nullable; /** * Abstract test case parent for anything implementing {@link ListenableFuture}. Tests the two get @@ -63,7 +64,7 @@ protected void tearDown() throws Exception { /** Constructs a listenable future with a value available after the latch has counted down. */ protected abstract ListenableFuture createListenableFuture( - V value, Exception except, CountDownLatch waitOn); + V value, @Nullable Exception except, CountDownLatch waitOn); /** Tests that the {@link Future#get()} method blocks until a value is available. */ public void testGetBlocksUntilValueAvailable() throws Throwable { diff --git a/android/guava-testlib/test/com/google/common/collect/testing/IteratorTesterTest.java b/android/guava-testlib/test/com/google/common/collect/testing/IteratorTesterTest.java index 283f51efe66a..b44811e33f63 100644 --- a/android/guava-testlib/test/com/google/common/collect/testing/IteratorTesterTest.java +++ b/android/guava-testlib/test/com/google/common/collect/testing/IteratorTesterTest.java @@ -233,7 +233,7 @@ public void remove() { @Override public Integer next() { // We should throw here, but we won't! - return null; + return 0; } @Override diff --git a/android/guava-testlib/test/com/google/common/collect/testing/MapTestSuiteBuilderTests.java b/android/guava-testlib/test/com/google/common/collect/testing/MapTestSuiteBuilderTests.java index a4d216d1503c..7b56959a81ea 100644 --- a/android/guava-testlib/test/com/google/common/collect/testing/MapTestSuiteBuilderTests.java +++ b/android/guava-testlib/test/com/google/common/collect/testing/MapTestSuiteBuilderTests.java @@ -45,6 +45,7 @@ import junit.framework.Test; import junit.framework.TestCase; import junit.framework.TestSuite; +import org.checkerframework.checker.nullness.qual.Nullable; /** * Tests {@link MapTestSuiteBuilder} by using it against maps that have various negative behaviors. @@ -106,7 +107,7 @@ public Set> entrySet() { } @Override - public String put(String key, String value) { + public @Nullable String put(String key, String value) { checkNotNull(key); return map.put(key, value); } @@ -138,7 +139,7 @@ public int hashCode() { } @Override - public boolean equals(Object o) { + public boolean equals(@Nullable Object o) { return map.equals(o); } @@ -148,7 +149,7 @@ public String toString() { } @Override - public String remove(Object key) { + public @Nullable String remove(Object key) { return map.remove(key); } @@ -194,7 +195,7 @@ public String getKey() { } @Override - public boolean equals(Object obj) { + public boolean equals(@Nullable Object obj) { return next.equals(obj); } @@ -238,7 +239,7 @@ public int hashCode() { } @Override - public boolean equals(Object o) { + public boolean equals(@Nullable Object o) { return map.entrySet().equals(o); } @@ -249,7 +250,7 @@ public String toString() { } @Override - public String put(String key, String value) { + public @Nullable String put(String key, String value) { checkNotNull(value); return map.put(key, value); } diff --git a/android/guava-testlib/test/com/google/common/collect/testing/MyTester.java b/android/guava-testlib/test/com/google/common/collect/testing/MyTester.java index 4a247c1b191c..de79059a6033 100644 --- a/android/guava-testlib/test/com/google/common/collect/testing/MyTester.java +++ b/android/guava-testlib/test/com/google/common/collect/testing/MyTester.java @@ -16,6 +16,7 @@ package com.google.common.collect.testing; +import org.checkerframework.checker.nullness.qual.Nullable; import org.junit.Ignore; /** Support class added to a suite as part of {@link FeatureSpecificTestSuiteBuilderTest}. */ @@ -28,7 +29,7 @@ */ @SuppressWarnings("JUnit4ClassUsedInJUnit3") @Ignore -public final class MyTester extends AbstractTester { +public final class MyTester extends AbstractTester<@Nullable Void> { static int timesTestClassWasRun = 0; public void testNothing() { diff --git a/android/guava-testlib/test/com/google/common/testing/ArbitraryInstancesTest.java b/android/guava-testlib/test/com/google/common/testing/ArbitraryInstancesTest.java index b47672f83dc6..4dc80848f525 100644 --- a/android/guava-testlib/test/com/google/common/testing/ArbitraryInstancesTest.java +++ b/android/guava-testlib/test/com/google/common/testing/ArbitraryInstancesTest.java @@ -127,6 +127,7 @@ import java.util.regex.MatchResult; import java.util.regex.Pattern; import junit.framework.TestCase; +import org.checkerframework.checker.nullness.qual.Nullable; /** * Unit test for {@link ArbitraryInstances}. @@ -473,7 +474,7 @@ private WithGenericConstant() {} } public static class WithNullConstant { - public static final WithNullConstant NULL = null; + public static final @Nullable WithNullConstant NULL = null; private WithNullConstant() {} } @@ -496,7 +497,7 @@ private static class WithPublicConstants { private static class FirstConstantIsNull { // To test that null constant is ignored @SuppressWarnings("unused") - public static final FirstConstantIsNull FIRST = null; + public static final @Nullable FirstConstantIsNull FIRST = null; public static final FirstConstantIsNull SECOND = new FirstConstantIsNull(); } diff --git a/android/guava-testlib/test/com/google/common/testing/ClassSanityTesterTest.java b/android/guava-testlib/test/com/google/common/testing/ClassSanityTesterTest.java index 16d59d69c18d..fee11890b7db 100644 --- a/android/guava-testlib/test/com/google/common/testing/ClassSanityTesterTest.java +++ b/android/guava-testlib/test/com/google/common/testing/ClassSanityTesterTest.java @@ -34,15 +34,16 @@ import java.util.Map; import java.util.Set; import java.util.concurrent.TimeUnit; -import javax.annotation.CheckForNull; import junit.framework.AssertionFailedError; import junit.framework.TestCase; +import org.checkerframework.checker.nullness.qual.Nullable; /** * Unit tests for {@link ClassSanityTester}. * * @author Ben Yu */ +@AndroidIncompatible // NullPointerTester refuses to run for c.g.c under Android public class ClassSanityTesterTest extends TestCase { private final ClassSanityTester tester = new ClassSanityTester(); @@ -58,7 +59,7 @@ public static Object good( // oneConstantOnly doesn't matter since it's not nullable and can be only 1 value. @SuppressWarnings("unused") OneConstantEnum oneConstantOnly, // noConstant doesn't matter since it can only be null - @SuppressWarnings("unused") @CheckForNull NoConstantEnum noConstant) { + @SuppressWarnings("unused") @Nullable NoConstantEnum noConstant) { return new GoodEquals(a, b); } // instance method ignored @@ -106,7 +107,7 @@ public void testEqualsOnReturnValues_bad() throws Exception { private static class BadEqualsFactory { /** oneConstantOnly matters now since it can be either null or the constant. */ @SuppressWarnings("unused") // Called by reflection - public static Object bad(String a, int b, @CheckForNull OneConstantEnum oneConstantOnly) { + public static Object bad(String a, int b, @Nullable OneConstantEnum oneConstantOnly) { return new GoodEquals(a, b); } } @@ -287,8 +288,7 @@ public void testEqualsAndSerializableForReturnValues_factoryReturnsNullAndAnnota } public static class FactoryThatReturnsNullAndAnnotated { - @CheckForNull - public static Object bad() { + public static @Nullable Object bad() { return null; } } @@ -617,7 +617,7 @@ public HasAnInterface(AnInterface i) { } @Override - public boolean equals(@CheckForNull Object obj) { + public boolean equals(@Nullable Object obj) { if (obj instanceof HasAnInterface) { HasAnInterface that = (HasAnInterface) obj; return i.equals(that.i); @@ -674,7 +674,7 @@ private abstract static class Wrapper { } @Override - public boolean equals(@CheckForNull Object obj) { + public boolean equals(@Nullable Object obj) { // In general getClass().isInstance() is bad for equals. // But here we fully control the subclasses to ensure symmetry. if (getClass().isInstance(obj)) { @@ -754,13 +754,12 @@ static GoodEquals create(String a, int b) { // keep trying @SuppressWarnings("unused") - @CheckForNull - public static GoodEquals createMayReturnNull(int a, int b) { + public static @Nullable GoodEquals createMayReturnNull(int a, int b) { return null; } @Override - public boolean equals(@CheckForNull Object obj) { + public boolean equals(@Nullable Object obj) { if (obj instanceof GoodEquals) { GoodEquals that = (GoodEquals) obj; return a.equals(that.a) && b == that.b; @@ -779,12 +778,12 @@ static class BadEquals { public BadEquals() {} // ignored by testEquals() since it has less parameters. - public static BadEquals create(@SuppressWarnings("unused") @CheckForNull String s) { + public static BadEquals create(@SuppressWarnings("unused") @Nullable String s) { return new BadEquals(); } @Override - public boolean equals(@CheckForNull Object obj) { + public boolean equals(@Nullable Object obj) { return obj instanceof BadEquals; } @@ -808,7 +807,7 @@ public int hashCode() { @Override @SuppressWarnings({"BoxedPrimitiveEquality", "NumericEquality"}) - public boolean equals(Object obj) { + public boolean equals(@Nullable Object obj) { if (obj instanceof SameIntegerInstance) { SameIntegerInstance that = (SameIntegerInstance) obj; return i == that.i; @@ -831,7 +830,7 @@ public int hashCode() { @Override @SuppressWarnings({"BoxedPrimitiveEquality", "NumericEquality"}) - public boolean equals(Object obj) { + public boolean equals(@Nullable Object obj) { if (obj instanceof SameLongInstance) { SameLongInstance that = (SameLongInstance) obj; return i == that.i; @@ -854,7 +853,7 @@ public int hashCode() { @Override @SuppressWarnings({"BoxedPrimitiveEquality", "NumericEquality"}) - public boolean equals(Object obj) { + public boolean equals(@Nullable Object obj) { if (obj instanceof SameFloatInstance) { SameFloatInstance that = (SameFloatInstance) obj; return i == that.i; @@ -877,7 +876,7 @@ public int hashCode() { @Override @SuppressWarnings({"BoxedPrimitiveEquality", "NumericEquality"}) - public boolean equals(Object obj) { + public boolean equals(@Nullable Object obj) { if (obj instanceof SameDoubleInstance) { SameDoubleInstance that = (SameDoubleInstance) obj; return i == that.i; @@ -900,7 +899,7 @@ public int hashCode() { @Override @SuppressWarnings({"BoxedPrimitiveEquality", "NumericEquality"}) - public boolean equals(Object obj) { + public boolean equals(@Nullable Object obj) { if (obj instanceof SameShortInstance) { SameShortInstance that = (SameShortInstance) obj; return i == that.i; @@ -923,7 +922,7 @@ public int hashCode() { @Override @SuppressWarnings({"BoxedPrimitiveEquality", "NumericEquality"}) - public boolean equals(Object obj) { + public boolean equals(@Nullable Object obj) { if (obj instanceof SameByteInstance) { SameByteInstance that = (SameByteInstance) obj; return i == that.i; @@ -946,7 +945,7 @@ public int hashCode() { @Override @SuppressWarnings("BoxedPrimitiveEquality") - public boolean equals(Object obj) { + public boolean equals(@Nullable Object obj) { if (obj instanceof SameCharacterInstance) { SameCharacterInstance that = (SameCharacterInstance) obj; return i == that.i; @@ -969,7 +968,7 @@ public int hashCode() { @Override @SuppressWarnings("BoxedPrimitiveEquality") - public boolean equals(Object obj) { + public boolean equals(@Nullable Object obj) { if (obj instanceof SameBooleanInstance) { SameBooleanInstance that = (SameBooleanInstance) obj; return i == that.i; @@ -991,7 +990,7 @@ public int hashCode() { } @Override - public boolean equals(Object obj) { + public boolean equals(@Nullable Object obj) { if (obj instanceof SameStringInstance) { SameStringInstance that = (SameStringInstance) obj; return s == that.s; @@ -1013,7 +1012,7 @@ public int hashCode() { } @Override - public boolean equals(Object obj) { + public boolean equals(@Nullable Object obj) { if (obj instanceof SameObjectInstance) { SameObjectInstance that = (SameObjectInstance) obj; return s == that.s; @@ -1035,7 +1034,7 @@ public int hashCode() { } @Override - public boolean equals(Object obj) { + public boolean equals(@Nullable Object obj) { if (obj instanceof SameInterfaceInstance) { SameInterfaceInstance that = (SameInterfaceInstance) obj; return s == that.s; @@ -1057,7 +1056,7 @@ public int hashCode() { } @Override - public boolean equals(Object obj) { + public boolean equals(@Nullable Object obj) { if (obj instanceof SameListInstance) { SameListInstance that = (SameListInstance) obj; return s == that.s; @@ -1079,7 +1078,7 @@ public int hashCode() { } @Override - public boolean equals(Object obj) { + public boolean equals(@Nullable Object obj) { if (obj instanceof UsesReferentialEquality) { UsesReferentialEquality that = (UsesReferentialEquality) obj; return s == that.s; @@ -1101,7 +1100,7 @@ public int hashCode() { } @Override - public boolean equals(Object obj) { + public boolean equals(@Nullable Object obj) { if (obj instanceof UsesEnum) { UsesEnum that = (UsesEnum) obj; return s == that.s; @@ -1125,7 +1124,7 @@ public static BadEqualsWithParameterizedType create( } @Override - public boolean equals(@CheckForNull Object obj) { + public boolean equals(@Nullable Object obj) { return obj instanceof BadEqualsWithParameterizedType; } @@ -1159,12 +1158,12 @@ public NoNullCheckNeededDespiteNotInstantiable(NotInstantiable x) { void primitiveOnly(int i) {} @SuppressWarnings("unused") // reflected - void nullableOnly(@CheckForNull String s) {} + void nullableOnly(@Nullable String s) {} public void noParameter() {} @SuppressWarnings("unused") // reflected - void primitiveAndNullable(@CheckForNull String s, int i) {} + void primitiveAndNullable(@Nullable String s, int i) {} } static class FactoryMethodReturnsNullButNotAnnotated { @@ -1178,8 +1177,7 @@ static FactoryMethodReturnsNullButNotAnnotated returnsNull() { static class FactoryMethodReturnsNullAndAnnotated { private FactoryMethodReturnsNullAndAnnotated() {} - @CheckForNull - public static FactoryMethodReturnsNullAndAnnotated returnsNull() { + public static @Nullable FactoryMethodReturnsNullAndAnnotated returnsNull() { return null; } } @@ -1192,7 +1190,7 @@ private FactoryMethodAcceptsNull(String name) { this.name = name; } - static FactoryMethodAcceptsNull create(@CheckForNull String name) { + static FactoryMethodAcceptsNull create(@Nullable String name) { return new FactoryMethodAcceptsNull(name); } } @@ -1214,7 +1212,7 @@ static class ConstructorAcceptsNull { final String name; - public ConstructorAcceptsNull(@CheckForNull String name) { + public ConstructorAcceptsNull(@Nullable String name) { this.name = name; } } @@ -1240,7 +1238,7 @@ public ConstructorParameterMapOfNotInstantiable(Map } @Override - public boolean equals(@CheckForNull Object obj) { + public boolean equals(@Nullable Object obj) { throw new UnsupportedOperationException(); } @@ -1275,7 +1273,7 @@ static class ConstructorParameterSingleValue { public ConstructorParameterSingleValue(@SuppressWarnings("unused") Singleton s) {} @Override - public boolean equals(Object obj) { + public boolean equals(@Nullable Object obj) { return obj instanceof ConstructorParameterSingleValue; } diff --git a/android/guava-testlib/test/com/google/common/testing/EqualsTesterTest.java b/android/guava-testlib/test/com/google/common/testing/EqualsTesterTest.java index 53c9bbe2d4a8..b6b1914eb5fd 100644 --- a/android/guava-testlib/test/com/google/common/testing/EqualsTesterTest.java +++ b/android/guava-testlib/test/com/google/common/testing/EqualsTesterTest.java @@ -23,6 +23,7 @@ import java.util.Set; import junit.framework.AssertionFailedError; import junit.framework.TestCase; +import org.checkerframework.checker.nullness.qual.Nullable; /** * Unit tests for {@link EqualsTester}. @@ -302,7 +303,7 @@ private static class ValidTestObject { } @Override - public boolean equals(Object o) { + public boolean equals(@Nullable Object o) { if (!(o instanceof ValidTestObject)) { return false; } @@ -337,7 +338,7 @@ private static class InvalidHashCodeObject { @SuppressWarnings("EqualsHashCode") @Override - public boolean equals(Object o) { + public boolean equals(@Nullable Object o) { if (!(o instanceof InvalidHashCodeObject)) { return false; } @@ -356,7 +357,7 @@ public boolean equals(Object o) { private static class NonReflexiveObject { @Override - public boolean equals(Object o) { + public boolean equals(@Nullable Object o) { return false; } @@ -370,7 +371,7 @@ public int hashCode() { private static class InvalidEqualsNullObject { @Override - public boolean equals(Object o) { + public boolean equals(@Nullable Object o) { return o == this || o == null; } @@ -384,7 +385,7 @@ public int hashCode() { private static class InvalidEqualsIncompatibleClassObject { @Override - public boolean equals(Object o) { + public boolean equals(@Nullable Object o) { return o != null; } @@ -413,7 +414,7 @@ NamedObject addPeers(String... names) { } @Override - public boolean equals(Object obj) { + public boolean equals(@Nullable Object obj) { if (obj instanceof NamedObject) { NamedObject that = (NamedObject) obj; return name.equals(that.name) || peerNames.contains(that.name); @@ -440,7 +441,7 @@ private EqualsBasedOnToString(String s) { } @Override - public boolean equals(Object obj) { + public boolean equals(@Nullable Object obj) { return obj != null && obj.toString().equals(toString()); } diff --git a/android/guava-testlib/test/com/google/common/testing/FakeTickerTest.java b/android/guava-testlib/test/com/google/common/testing/FakeTickerTest.java index cb922c7dd203..5810524d071f 100644 --- a/android/guava-testlib/test/com/google/common/testing/FakeTickerTest.java +++ b/android/guava-testlib/test/com/google/common/testing/FakeTickerTest.java @@ -26,6 +26,7 @@ import java.util.concurrent.Future; import java.util.concurrent.TimeUnit; import junit.framework.TestCase; +import org.checkerframework.checker.nullness.qual.Nullable; /** * Unit test for {@link FakeTicker}. @@ -108,9 +109,9 @@ public void testConcurrentAdvance() throws Exception { int numberOfThreads = 64; runConcurrentTest( numberOfThreads, - new Callable() { + new Callable<@Nullable Void>() { @Override - public Void call() throws Exception { + public @Nullable Void call() throws Exception { // adds two nanoseconds to the ticker ticker.advance(1L); Thread.sleep(10); @@ -132,9 +133,9 @@ public void testConcurrentAutoIncrementStep() throws Exception { int numberOfThreads = 64; runConcurrentTest( numberOfThreads, - new Callable() { + new Callable<@Nullable Void>() { @Override - public Void call() throws Exception { + public @Nullable Void call() throws Exception { long unused = ticker.read(); return null; } @@ -145,7 +146,7 @@ public Void call() throws Exception { /** Runs {@code callable} concurrently {@code numberOfThreads} times. */ @GwtIncompatible // concurrency - private void runConcurrentTest(int numberOfThreads, final Callable callable) + private void runConcurrentTest(int numberOfThreads, final Callable<@Nullable Void> callable) throws Exception { ExecutorService executorService = Executors.newFixedThreadPool(numberOfThreads); final CountDownLatch startLatch = new CountDownLatch(numberOfThreads); @@ -154,9 +155,9 @@ private void runConcurrentTest(int numberOfThreads, final Callable callabl @SuppressWarnings("unused") // https://errorprone.info/bugpattern/FutureReturnValueIgnored Future possiblyIgnoredError = executorService.submit( - new Callable() { + new Callable<@Nullable Void>() { @Override - public Void call() throws Exception { + public @Nullable Void call() throws Exception { startLatch.countDown(); startLatch.await(); callable.call(); diff --git a/android/guava-testlib/test/com/google/common/testing/GcFinalizationTest.java b/android/guava-testlib/test/com/google/common/testing/GcFinalizationTest.java index bc9db50cbaea..f100ef4833b4 100644 --- a/android/guava-testlib/test/com/google/common/testing/GcFinalizationTest.java +++ b/android/guava-testlib/test/com/google/common/testing/GcFinalizationTest.java @@ -25,6 +25,7 @@ import java.util.concurrent.CountDownLatch; import java.util.concurrent.atomic.AtomicBoolean; import junit.framework.TestCase; +import org.checkerframework.checker.nullness.qual.Nullable; /** * Tests for {@link GcFinalization}. @@ -55,7 +56,7 @@ protected void finalize() { } public void testAwaitDone_Future() { - final SettableFuture future = SettableFuture.create(); + final SettableFuture<@Nullable Void> future = SettableFuture.create(); Object x = new Object() { @Override @@ -70,7 +71,7 @@ protected void finalize() { } public void testAwaitDone_Future_Cancel() { - final SettableFuture future = SettableFuture.create(); + final SettableFuture<@Nullable Void> future = SettableFuture.create(); Object x = new Object() { @Override @@ -160,7 +161,7 @@ public void testAwait_CountDownLatch_Interrupted() { public void testAwaitDone_Future_Interrupted_Interrupted() { Interruptenator interruptenator = new Interruptenator(Thread.currentThread()); try { - final SettableFuture future = SettableFuture.create(); + final SettableFuture<@Nullable Void> future = SettableFuture.create(); try { GcFinalization.awaitDone(future); fail("should throw"); diff --git a/android/guava-testlib/test/com/google/common/testing/NullPointerTesterTest.java b/android/guava-testlib/test/com/google/common/testing/NullPointerTesterTest.java index 388f3dcc38eb..d7344abf66dd 100644 --- a/android/guava-testlib/test/com/google/common/testing/NullPointerTesterTest.java +++ b/android/guava-testlib/test/com/google/common/testing/NullPointerTesterTest.java @@ -45,9 +45,9 @@ import java.util.Map; import java.util.Set; import java.util.SortedSet; -import javax.annotation.CheckForNull; import junit.framework.AssertionFailedError; import junit.framework.TestCase; +import org.checkerframework.checker.nullness.qual.Nullable; /** * Unit test for {@link NullPointerTester}. @@ -56,6 +56,7 @@ * @author Mick Killianey */ @SuppressWarnings("CheckReturnValue") +@AndroidIncompatible // NullPointerTester refuses to run for c.g.c under Android public class NullPointerTesterTest extends TestCase { /** Non-NPE RuntimeException. */ @@ -87,11 +88,12 @@ public static void staticOneArgCheckForNullCorrectlyDoesNotThrowNPE( // null? no problem } - public static void staticOneArgJsr305NullableCorrectlyDoesNotThrowNPE(@CheckForNull String s) { + public static void staticOneArgJsr305NullableCorrectlyDoesNotThrowNPE( + @javax.annotation.Nullable String s) { // null? no problem } - public static void staticOneArgNullableCorrectlyDoesNotThrowNPE(@CheckForNull String s) { + public static void staticOneArgNullableCorrectlyDoesNotThrowNPE(@Nullable String s) { // null? no problem } @@ -100,7 +102,7 @@ public static void staticOneArgCheckForNullCorrectlyThrowsOtherThanNPE( throw new FooException(); // ok, as long as it's not NullPointerException } - public static void staticOneArgNullableCorrectlyThrowsOtherThanNPE(@CheckForNull String s) { + public static void staticOneArgNullableCorrectlyThrowsOtherThanNPE(@Nullable String s) { throw new FooException(); // ok, as long as it's not NullPointerException } @@ -108,7 +110,7 @@ public static void staticOneArgCheckForNullThrowsNPE(@javax.annotation.CheckForN checkNotNull(s); // doesn't check if you said you'd accept null, but you don't } - public static void staticOneArgNullableThrowsNPE(@CheckForNull String s) { + public static void staticOneArgNullableThrowsNPE(@Nullable String s) { checkNotNull(s); // doesn't check if you said you'd accept null, but you don't } @@ -129,7 +131,7 @@ public void oneArgCheckForNullCorrectlyDoesNotThrowNPE( // null? no problem } - public void oneArgNullableCorrectlyDoesNotThrowNPE(@CheckForNull String s) { + public void oneArgNullableCorrectlyDoesNotThrowNPE(@Nullable String s) { // null? no problem } @@ -138,7 +140,7 @@ public void oneArgCheckForNullCorrectlyThrowsOtherThanNPE( throw new FooException(); // ok, as long as it's not NullPointerException } - public void oneArgNullableCorrectlyThrowsOtherThanNPE(@CheckForNull String s) { + public void oneArgNullableCorrectlyThrowsOtherThanNPE(@Nullable String s) { throw new FooException(); // ok, as long as it's not NullPointerException } @@ -146,7 +148,7 @@ public void oneArgCheckForNullThrowsNPE(@javax.annotation.CheckForNull String s) checkNotNull(s); // doesn't check if you said you'd accept null, but you don't } - public void oneArgNullableThrowsNPE(@CheckForNull String s) { + public void oneArgNullableThrowsNPE(@Nullable String s) { checkNotNull(s); // doesn't check if you said you'd accept null, but you don't } } @@ -331,7 +333,7 @@ public TwoArg(Action actionWhenFirstParamIsNull, Action actionWhenSecondParamIsN } /** Method that decides how to react to parameters. */ - public void reactToNullParameters(Object first, Object second) { + public void reactToNullParameters(@Nullable Object first, @Nullable Object second) { if (first == null) { actionWhenFirstParamIsNull.act(); } @@ -348,19 +350,19 @@ public void normalNormal(String first, Integer second) { /** Two-arg method with the second param Nullable. */ @SuppressWarnings("GoodTime") // false positive; b/122617528 - public void normalNullable(String first, @CheckForNull Integer second) { + public void normalNullable(String first, @Nullable Integer second) { reactToNullParameters(first, second); } /** Two-arg method with the first param Nullable. */ @SuppressWarnings("GoodTime") // false positive; b/122617528 - public void nullableNormal(@CheckForNull String first, Integer second) { + public void nullableNormal(@Nullable String first, Integer second) { reactToNullParameters(first, second); } /** Two-arg method with the both params Nullable. */ @SuppressWarnings("GoodTime") // false positive; b/122617528 - public void nullableNullable(@CheckForNull String first, @CheckForNull Integer second) { + public void nullableNullable(@Nullable String first, @Nullable Integer second) { reactToNullParameters(first, second); } @@ -474,9 +476,9 @@ protected void protectedOneArg(String s) { checkNotNull(s); } - public void oneNullableArg(@CheckForNull String s) {} + public void oneNullableArg(@Nullable String s) {} - public void oneNullableArgThrows(@CheckForNull String s) { + public void oneNullableArgThrows(@Nullable String s) { doThrow(s); } @@ -485,31 +487,31 @@ public void twoArg(String s, Integer i) { i.intValue(); } - public void twoMixedArgs(String s, @CheckForNull Integer i) { + public void twoMixedArgs(String s, @Nullable Integer i) { checkNotNull(s); } - public void twoMixedArgs(@CheckForNull Integer i, String s) { + public void twoMixedArgs(@Nullable Integer i, String s) { checkNotNull(s); } - public void twoMixedArgsThrows(String s, @CheckForNull Integer i) { + public void twoMixedArgsThrows(String s, @Nullable Integer i) { checkNotNull(s); doThrow(i); } - public void twoMixedArgsThrows(@CheckForNull Integer i, String s) { + public void twoMixedArgsThrows(@Nullable Integer i, String s) { checkNotNull(s); doThrow(i); } - public void twoNullableArgs(@CheckForNull String s, @CheckForNull Integer i) {} + public void twoNullableArgs(@Nullable String s, @javax.annotation.Nullable Integer i) {} - public void twoNullableArgsThrowsFirstArg(@CheckForNull String s, @CheckForNull Integer i) { + public void twoNullableArgsThrowsFirstArg(@Nullable String s, @Nullable Integer i) { doThrow(s); } - public void twoNullableArgsThrowsSecondArg(@CheckForNull String s, @CheckForNull Integer i) { + public void twoNullableArgsThrowsSecondArg(@Nullable String s, @Nullable Integer i) { doThrow(i); } @@ -517,9 +519,9 @@ public static void staticOneArg(String s) { checkNotNull(s); } - public static void staticOneNullableArg(@CheckForNull String s) {} + public static void staticOneNullableArg(@Nullable String s) {} - public static void staticOneNullableArgThrows(@CheckForNull String s) { + public static void staticOneNullableArgThrows(@Nullable String s) { doThrow(s); } } @@ -552,7 +554,7 @@ public void testFailOneArgThrowsWrongType() { private static class PassOneNullableArgThrowsNPE extends PassObject { @Override - public void oneNullableArg(@CheckForNull String s) { + public void oneNullableArg(@Nullable String s) { checkNotNull(s); // ok to throw NPE } } @@ -611,7 +613,7 @@ public void testFailTwoArgsSecondArgThrowsWrongType() { private static class FailTwoMixedArgsFirstArgDoesntThrowNPE extends PassObject { @Override - public void twoMixedArgs(String s, @CheckForNull Integer i) { + public void twoMixedArgs(String s, @Nullable Integer i) { // Fail: missing NPE for s } } @@ -622,7 +624,7 @@ public void testFailTwoMixedArgsFirstArgDoesntThrowNPE() { private static class FailTwoMixedArgsFirstArgThrowsWrongType extends PassObject { @Override - public void twoMixedArgs(String s, @CheckForNull Integer i) { + public void twoMixedArgs(String s, @Nullable Integer i) { doThrow(s); // Fail: throwing non-NPE exception for null s } } @@ -633,7 +635,7 @@ public void testFailTwoMixedArgsFirstArgThrowsWrongType() { private static class PassTwoMixedArgsNullableArgThrowsNPE extends PassObject { @Override - public void twoMixedArgs(String s, @CheckForNull Integer i) { + public void twoMixedArgs(String s, @Nullable Integer i) { checkNotNull(s); i.intValue(); // ok to throw NPE? } @@ -645,7 +647,7 @@ public void testPassTwoMixedArgsNullableArgThrowsNPE() { private static class PassTwoMixedArgSecondNullableArgThrowsOther extends PassObject { @Override - public void twoMixedArgs(String s, @CheckForNull Integer i) { + public void twoMixedArgs(String s, @Nullable Integer i) { checkNotNull(s); doThrow(i); // ok to throw non-NPE exception for null i } @@ -657,7 +659,7 @@ public void testPassTwoMixedArgSecondNullableArgThrowsOther() { private static class FailTwoMixedArgsSecondArgDoesntThrowNPE extends PassObject { @Override - public void twoMixedArgs(@CheckForNull Integer i, String s) { + public void twoMixedArgs(@Nullable Integer i, String s) { // Fail: missing NPE for null s } } @@ -668,7 +670,7 @@ public void testFailTwoMixedArgsSecondArgDoesntThrowNPE() { private static class FailTwoMixedArgsSecondArgThrowsWrongType extends PassObject { @Override - public void twoMixedArgs(@CheckForNull Integer i, String s) { + public void twoMixedArgs(@Nullable Integer i, String s) { doThrow(s); // Fail: throwing non-NPE exception for null s } } @@ -679,7 +681,7 @@ public void testFailTwoMixedArgsSecondArgThrowsWrongType() { private static class PassTwoNullableArgsFirstThrowsNPE extends PassObject { @Override - public void twoNullableArgs(@CheckForNull String s, @CheckForNull Integer i) { + public void twoNullableArgs(@Nullable String s, @Nullable Integer i) { checkNotNull(s); // ok to throw NPE? } } @@ -690,7 +692,7 @@ public void testPassTwoNullableArgsFirstThrowsNPE() { private static class PassTwoNullableArgsFirstThrowsOther extends PassObject { @Override - public void twoNullableArgs(@CheckForNull String s, @CheckForNull Integer i) { + public void twoNullableArgs(@Nullable String s, @Nullable Integer i) { doThrow(s); // ok to throw non-NPE exception for null s } } @@ -701,7 +703,7 @@ public void testPassTwoNullableArgsFirstThrowsOther() { private static class PassTwoNullableArgsSecondThrowsNPE extends PassObject { @Override - public void twoNullableArgs(@CheckForNull String s, @CheckForNull Integer i) { + public void twoNullableArgs(@Nullable String s, @Nullable Integer i) { i.intValue(); // ok to throw NPE? } } @@ -712,7 +714,7 @@ public void testPassTwoNullableArgsSecondThrowsNPE() { private static class PassTwoNullableArgsSecondThrowsOther extends PassObject { @Override - public void twoNullableArgs(@CheckForNull String s, @CheckForNull Integer i) { + public void twoNullableArgs(@Nullable String s, @Nullable Integer i) { doThrow(i); // ok to throw non-NPE exception for null i } } @@ -723,7 +725,7 @@ public void testPassTwoNullableArgsSecondThrowsOther() { private static class PassTwoNullableArgsNeitherThrowsAnything extends PassObject { @Override - public void twoNullableArgs(@CheckForNull String s, @CheckForNull Integer i) { + public void twoNullableArgs(@Nullable String s, @Nullable Integer i) { // ok to do nothing } } @@ -769,7 +771,7 @@ public void testSubclassWithBadSuperclassForPackageProtectedMethod() { private static class SubclassThatOverridesBadSuperclassMethod extends BaseClassThatFailsToThrow { @Override - public void oneArg(@CheckForNull String s) {} + public void oneArg(@Nullable String s) {} } public void testSubclassThatOverridesBadSuperclassMethod() { @@ -778,7 +780,7 @@ public void testSubclassThatOverridesBadSuperclassMethod() { @SuppressWarnings("unused") // for NullPointerTester private static class SubclassOverridesTheWrongMethod extends BaseClassThatFailsToThrow { - public void oneArg(@CheckForNull CharSequence s) {} + public void oneArg(@Nullable CharSequence s) {} } public void testSubclassOverridesTheWrongMethod() { @@ -802,7 +804,7 @@ public void testSubclassThatFailsToThrowForStatic() { private static class SubclassThatTriesToOverrideBadStaticMethod extends ClassThatFailsToThrowForStatic { - static void staticOneArg(@CheckForNull String s) {} + static void staticOneArg(@Nullable String s) {} } public void testSubclassThatTriesToOverrideBadStaticMethod() { @@ -815,7 +817,7 @@ private HardToCreate(HardToCreate x) {} @SuppressWarnings("unused") // used by reflection private static class CanCreateDefault { - public void foo(@CheckForNull HardToCreate ignored, String required) { + public void foo(@Nullable HardToCreate ignored, String required) { checkNotNull(required); } } @@ -878,7 +880,7 @@ private static void shouldFail(Class cls) { @SuppressWarnings("unused") // used by reflection private static class PrivateClassWithPrivateConstructor { - private PrivateClassWithPrivateConstructor(@CheckForNull Integer argument) {} + private PrivateClassWithPrivateConstructor(@Nullable Integer argument) {} } public void testPrivateClass() { @@ -1393,7 +1395,7 @@ private static String rootLocaleFormat(String format, Object... args) { static class OverridesEquals { @SuppressWarnings("EqualsHashCode") @Override - public boolean equals(Object o) { + public boolean equals(@Nullable Object o) { return true; } } diff --git a/android/guava-testlib/test/com/google/common/testing/SerializableTesterTest.java b/android/guava-testlib/test/com/google/common/testing/SerializableTesterTest.java index 753c4ab63118..e950c9968cd1 100644 --- a/android/guava-testlib/test/com/google/common/testing/SerializableTesterTest.java +++ b/android/guava-testlib/test/com/google/common/testing/SerializableTesterTest.java @@ -19,6 +19,7 @@ import java.io.Serializable; import junit.framework.AssertionFailedError; import junit.framework.TestCase; +import org.checkerframework.checker.nullness.qual.Nullable; /** * Tests for {@link SerializableTester}. @@ -82,7 +83,7 @@ private static class ClassWhichIsAlwaysEqualButHasDifferentHashcodes implements @SuppressWarnings("EqualsHashCode") @Override - public boolean equals(Object other) { + public boolean equals(@Nullable Object other) { return (other instanceof ClassWhichIsAlwaysEqualButHasDifferentHashcodes); } } @@ -91,7 +92,7 @@ private static class ObjectWhichIsEqualButChangesClass implements Serializable { private static final long serialVersionUID = 1L; @Override - public boolean equals(Object other) { + public boolean equals(@Nullable Object other) { return (other instanceof ObjectWhichIsEqualButChangesClass || other instanceof OtherForm); } @@ -106,7 +107,7 @@ private Object writeReplace() { private static class OtherForm implements Serializable { @Override - public boolean equals(Object other) { + public boolean equals(@Nullable Object other) { return (other instanceof ObjectWhichIsEqualButChangesClass || other instanceof OtherForm); } diff --git a/android/guava-testlib/test/com/google/common/testing/TearDownStackTest.java b/android/guava-testlib/test/com/google/common/testing/TearDownStackTest.java index 5a4f9ede4861..63e162f75ee9 100644 --- a/android/guava-testlib/test/com/google/common/testing/TearDownStackTest.java +++ b/android/guava-testlib/test/com/google/common/testing/TearDownStackTest.java @@ -20,6 +20,7 @@ import com.google.common.annotations.GwtCompatible; import junit.framework.TestCase; +import org.checkerframework.checker.nullness.qual.Nullable; /** @author Luiz-Otavio "Z" Zorzella */ @GwtCompatible @@ -146,7 +147,7 @@ public void tearDown() throws Exception { private static final class SimpleTearDown implements TearDown { boolean ran = false; - Callback callback = null; + @Nullable Callback callback = null; public SimpleTearDown() {} diff --git a/android/guava-testlib/test/com/google/common/testing/anotherpackage/ForwardingWrapperTesterTest.java b/android/guava-testlib/test/com/google/common/testing/anotherpackage/ForwardingWrapperTesterTest.java index 3782c00374d0..bd823f8f6b03 100644 --- a/android/guava-testlib/test/com/google/common/testing/anotherpackage/ForwardingWrapperTesterTest.java +++ b/android/guava-testlib/test/com/google/common/testing/anotherpackage/ForwardingWrapperTesterTest.java @@ -35,6 +35,7 @@ import java.util.regex.Pattern; import junit.framework.AssertionFailedError; import junit.framework.TestCase; +import org.checkerframework.checker.nullness.qual.Nullable; /** * Tests for {@link ForwardingWrapperTester}. Live in a different package to detect reflection @@ -120,7 +121,7 @@ public Runnable apply(final Runnable runnable) { @SuppressWarnings("EqualsHashCode") @Override - public boolean equals(Object o) { + public boolean equals(@Nullable Object o) { if (o instanceof ForwardingRunnable) { ForwardingRunnable that = (ForwardingRunnable) o; return runnable.equals(that.runnable); @@ -142,7 +143,7 @@ public void testEqualsAndHashCodeForwarded() { public Runnable apply(final Runnable runnable) { return new ForwardingRunnable(runnable) { @Override - public boolean equals(Object o) { + public boolean equals(@Nullable Object o) { if (o instanceof ForwardingRunnable) { ForwardingRunnable that = (ForwardingRunnable) o; return runnable.equals(that.runnable); @@ -531,7 +532,7 @@ public String toString() { private interface Equals { @Override - boolean equals(Object obj); + boolean equals(@Nullable Object obj); @Override int hashCode(); diff --git a/android/guava-tests/benchmark/com/google/common/cache/ChainBenchmark.java b/android/guava-tests/benchmark/com/google/common/cache/ChainBenchmark.java index b7dd39307885..592e80b64ae8 100644 --- a/android/guava-tests/benchmark/com/google/common/cache/ChainBenchmark.java +++ b/android/guava-tests/benchmark/com/google/common/cache/ChainBenchmark.java @@ -20,6 +20,7 @@ import com.google.caliper.Benchmark; import com.google.caliper.Param; import com.google.common.cache.LocalCache.Segment; +import org.checkerframework.checker.nullness.qual.Nullable; /** * Benchmark for {@code LocalCache.Segment.removeEntryFromChain}. @@ -34,7 +35,7 @@ public class ChainBenchmark { private Segment segment; private ReferenceEntry head; - private ReferenceEntry chain; + private @Nullable ReferenceEntry chain; @SuppressWarnings("GuardedBy") @BeforeExperiment diff --git a/android/guava-tests/benchmark/com/google/common/collect/ConcurrentHashMultisetBenchmark.java b/android/guava-tests/benchmark/com/google/common/collect/ConcurrentHashMultisetBenchmark.java index 086a634932f3..322dd547f6d1 100644 --- a/android/guava-tests/benchmark/com/google/common/collect/ConcurrentHashMultisetBenchmark.java +++ b/android/guava-tests/benchmark/com/google/common/collect/ConcurrentHashMultisetBenchmark.java @@ -37,7 +37,7 @@ import java.util.concurrent.ExecutorService; import java.util.concurrent.Executors; import java.util.concurrent.Future; -import javax.annotation.CheckForNull; +import org.checkerframework.checker.nullness.qual.Nullable; /** * Benchmarks for {@link ConcurrentHashMultiset}. @@ -192,7 +192,7 @@ public static OldConcurrentHashMultiset create() { * @return the nonnegative number of occurrences of the element */ @Override - public int count(@CheckForNull Object element) { + public int count(@Nullable Object element) { try { return unbox(countMap.get(element)); } catch (NullPointerException | ClassCastException e) { @@ -295,7 +295,7 @@ public int add(E element, int occurrences) { * @throws IllegalArgumentException if {@code occurrences} is negative */ @Override - public int remove(@CheckForNull Object element, int occurrences) { + public int remove(@Nullable Object element, int occurrences) { if (occurrences == 0) { return count(element); } @@ -330,7 +330,7 @@ public int remove(@CheckForNull Object element, int occurrences) { * @param element the element whose occurrences should all be removed * @return the number of occurrences successfully removed, possibly zero */ - private int removeAllOccurrences(@CheckForNull Object element) { + private int removeAllOccurrences(@Nullable Object element) { try { return unbox(countMap.remove(element)); } catch (NullPointerException | ClassCastException e) { @@ -349,7 +349,7 @@ private int removeAllOccurrences(@CheckForNull Object element) { * @param occurrences the number of occurrences of {@code element} to remove * @return {@code true} if the removal was possible (including if {@code occurrences} is zero) */ - public boolean removeExactly(@CheckForNull Object element, int occurrences) { + public boolean removeExactly(@Nullable Object element, int occurrences) { if (occurrences == 0) { return true; } @@ -543,7 +543,7 @@ public int hashCode() { } /** We use a special form of unboxing that treats null as zero. */ - private static int unbox(@CheckForNull Integer i) { + private static int unbox(@Nullable Integer i) { return (i == null) ? 0 : i; } } diff --git a/android/guava-tests/benchmark/com/google/common/collect/MinMaxPriorityQueueBenchmark.java b/android/guava-tests/benchmark/com/google/common/collect/MinMaxPriorityQueueBenchmark.java index 239a033f7e4d..08755044c3e0 100644 --- a/android/guava-tests/benchmark/com/google/common/collect/MinMaxPriorityQueueBenchmark.java +++ b/android/guava-tests/benchmark/com/google/common/collect/MinMaxPriorityQueueBenchmark.java @@ -25,6 +25,7 @@ import java.util.PriorityQueue; import java.util.Queue; import java.util.Random; +import org.checkerframework.checker.nullness.qual.Nullable; /** * Benchmarks to compare performance of MinMaxPriorityQueue and PriorityQueue. @@ -90,7 +91,7 @@ protected Queue delegate() { } @Override - public T poll() { + public @Nullable T poll() { return mmHeap.pollLast(); } } diff --git a/android/guava-tests/benchmark/com/google/common/hash/ChecksumBenchmark.java b/android/guava-tests/benchmark/com/google/common/hash/ChecksumBenchmark.java index 0fa3e2a88ebd..4bb0031dc2b0 100644 --- a/android/guava-tests/benchmark/com/google/common/hash/ChecksumBenchmark.java +++ b/android/guava-tests/benchmark/com/google/common/hash/ChecksumBenchmark.java @@ -63,7 +63,7 @@ byte crc32Checksum(int reps) throws Exception { byte result = 0x01; for (int i = 0; i < reps; i++) { CRC32 checksum = new CRC32(); - checksum.update(testBytes); + checksum.update(testBytes, 0, testBytes.length); result = (byte) (result ^ checksum.getValue()); } return result; @@ -81,7 +81,7 @@ byte adler32Checksum(int reps) throws Exception { byte result = 0x01; for (int i = 0; i < reps; i++) { Adler32 checksum = new Adler32(); - checksum.update(testBytes); + checksum.update(testBytes, 0, testBytes.length); result = (byte) (result ^ checksum.getValue()); } return result; diff --git a/android/guava-tests/benchmark/com/google/common/io/CharStreamsCopyBenchmark.java b/android/guava-tests/benchmark/com/google/common/io/CharStreamsCopyBenchmark.java index 52532bb61ac2..0b9c87489c67 100644 --- a/android/guava-tests/benchmark/com/google/common/io/CharStreamsCopyBenchmark.java +++ b/android/guava-tests/benchmark/com/google/common/io/CharStreamsCopyBenchmark.java @@ -21,6 +21,7 @@ import java.io.IOException; import java.io.StringReader; import java.io.StringWriter; +import java.nio.Buffer; import java.nio.CharBuffer; import java.util.Random; @@ -40,10 +41,10 @@ long copy(Readable from, Appendable to) throws IOException { CharBuffer buf = CharStreams.createBuffer(); long total = 0; while (from.read(buf) != -1) { - buf.flip(); + ((Buffer) buf).flip(); to.append(buf); total += buf.remaining(); - buf.clear(); + ((Buffer) buf).clear(); } return total; } diff --git a/android/guava-tests/benchmark/com/google/common/util/concurrent/ExecutionListBenchmark.java b/android/guava-tests/benchmark/com/google/common/util/concurrent/ExecutionListBenchmark.java index 22053c8d696a..946b85109cb8 100644 --- a/android/guava-tests/benchmark/com/google/common/util/concurrent/ExecutionListBenchmark.java +++ b/android/guava-tests/benchmark/com/google/common/util/concurrent/ExecutionListBenchmark.java @@ -38,7 +38,7 @@ import java.util.concurrent.atomic.AtomicInteger; import java.util.logging.Level; import java.util.logging.Logger; -import javax.annotation.CheckForNull; +import org.checkerframework.checker.nullness.qual.Nullable; /** Benchmarks for {@link ExecutionList}. */ @VmOptions({"-Xms8g", "-Xmx8g"}) @@ -440,7 +440,7 @@ private static final class NewExecutionListWithoutReverse { static final Logger log = Logger.getLogger(NewExecutionListWithoutReverse.class.getName()); @GuardedBy("this") - private RunnableExecutorPair runnables; + private @Nullable RunnableExecutorPair runnables; @GuardedBy("this") private boolean executed; @@ -488,7 +488,7 @@ private static void executeListener(Runnable runnable, Executor executor) { private static final class RunnableExecutorPair { final Runnable runnable; final Executor executor; - @CheckForNull RunnableExecutorPair next; + @Nullable RunnableExecutorPair next; RunnableExecutorPair(Runnable runnable, Executor executor, RunnableExecutorPair next) { this.runnable = runnable; @@ -504,10 +504,10 @@ private static final class NewExecutionListQueue { static final Logger log = Logger.getLogger(NewExecutionListQueue.class.getName()); @GuardedBy("this") - private RunnableExecutorPair head; + private @Nullable RunnableExecutorPair head; @GuardedBy("this") - private RunnableExecutorPair tail; + private @Nullable RunnableExecutorPair tail; @GuardedBy("this") private boolean executed; @@ -563,7 +563,7 @@ private static void executeListener(Runnable runnable, Executor executor) { private static final class RunnableExecutorPair { Runnable runnable; Executor executor; - @CheckForNull RunnableExecutorPair next; + @Nullable RunnableExecutorPair next; RunnableExecutorPair(Runnable runnable, Executor executor) { this.runnable = runnable; @@ -669,9 +669,9 @@ private static class RunnableExecutorPair { final Runnable runnable; final Executor executor; // Volatile because this is written on one thread and read on another with no synchronization. - @CheckForNull volatile RunnableExecutorPair next; + @Nullable volatile RunnableExecutorPair next; - RunnableExecutorPair(Runnable runnable, Executor executor) { + RunnableExecutorPair(@Nullable Runnable runnable, @Nullable Executor executor) { this.runnable = runnable; this.executor = executor; } diff --git a/android/guava-tests/benchmark/com/google/common/util/concurrent/MonitorBasedArrayBlockingQueue.java b/android/guava-tests/benchmark/com/google/common/util/concurrent/MonitorBasedArrayBlockingQueue.java index 374de7a0302b..7b9be17ec374 100644 --- a/android/guava-tests/benchmark/com/google/common/util/concurrent/MonitorBasedArrayBlockingQueue.java +++ b/android/guava-tests/benchmark/com/google/common/util/concurrent/MonitorBasedArrayBlockingQueue.java @@ -25,7 +25,7 @@ import java.util.NoSuchElementException; import java.util.concurrent.BlockingQueue; import java.util.concurrent.TimeUnit; -import javax.annotation.CheckForNull; +import org.checkerframework.checker.nullness.qual.Nullable; /** * A bounded {@linkplain BlockingQueue blocking queue} backed by an array. This queue orders @@ -290,7 +290,7 @@ public void put(E e) throws InterruptedException { @CanIgnoreReturnValue @Override - public E poll() { + public @Nullable E poll() { final Monitor monitor = this.monitor; if (monitor.enterIf(notEmpty)) { try { @@ -305,7 +305,7 @@ public E poll() { @CanIgnoreReturnValue @Override - public E poll(long timeout, TimeUnit unit) throws InterruptedException { + public @Nullable E poll(long timeout, TimeUnit unit) throws InterruptedException { final Monitor monitor = this.monitor; if (monitor.enterWhen(notEmpty, timeout, unit)) { try { @@ -332,7 +332,7 @@ public E take() throws InterruptedException { @CanIgnoreReturnValue @Override - public E peek() { + public @Nullable E peek() { final Monitor monitor = this.monitor; if (monitor.enterIf(notEmpty)) { try { @@ -398,7 +398,7 @@ public int remainingCapacity() { */ @CanIgnoreReturnValue @Override - public boolean remove(@CheckForNull Object o) { + public boolean remove(@Nullable Object o) { if (o == null) return false; final E[] items = this.items; final Monitor monitor = this.monitor; @@ -429,7 +429,7 @@ public boolean remove(@CheckForNull Object o) { */ @CanIgnoreReturnValue @Override - public boolean contains(@CheckForNull Object o) { + public boolean contains(@Nullable Object o) { if (o == null) return false; final E[] items = this.items; final Monitor monitor = this.monitor; @@ -672,7 +672,7 @@ private class Itr implements Iterator { * we must return it in the following next() call even if it was in the process of being removed * when hasNext() was called. */ - private E nextItem; + private @Nullable E nextItem; /** * Index of element returned by most recent call to next. Reset to -1 if this element is deleted diff --git a/android/guava-tests/benchmark/com/google/common/util/concurrent/MonitorBasedPriorityBlockingQueue.java b/android/guava-tests/benchmark/com/google/common/util/concurrent/MonitorBasedPriorityBlockingQueue.java index 4f34a73c1c6f..25ec5812f361 100644 --- a/android/guava-tests/benchmark/com/google/common/util/concurrent/MonitorBasedPriorityBlockingQueue.java +++ b/android/guava-tests/benchmark/com/google/common/util/concurrent/MonitorBasedPriorityBlockingQueue.java @@ -30,7 +30,7 @@ import java.util.SortedSet; import java.util.concurrent.BlockingQueue; import java.util.concurrent.TimeUnit; -import javax.annotation.CheckForNull; +import org.checkerframework.checker.nullness.qual.Nullable; /** * An unbounded {@linkplain BlockingQueue blocking queue} that uses the same ordering rules as class @@ -123,7 +123,7 @@ public MonitorBasedPriorityBlockingQueue(int initialCapacity) { * @throws IllegalArgumentException if {@code initialCapacity} is less than 1 */ public MonitorBasedPriorityBlockingQueue( - int initialCapacity, @CheckForNull Comparator comparator) { + int initialCapacity, @Nullable Comparator comparator) { q = new PriorityQueue(initialCapacity, comparator); } @@ -217,7 +217,7 @@ public void put(E e) { @CanIgnoreReturnValue // pushed down from class to method @Override - public E poll() { + public @Nullable E poll() { final Monitor monitor = this.monitor; monitor.enter(); try { @@ -229,7 +229,7 @@ public E poll() { @CanIgnoreReturnValue // pushed down from class to method @Override - public E poll(long timeout, TimeUnit unit) throws InterruptedException { + public @Nullable E poll(long timeout, TimeUnit unit) throws InterruptedException { final Monitor monitor = this.monitor; if (monitor.enterWhen(notEmpty, timeout, unit)) { try { @@ -256,7 +256,7 @@ public E take() throws InterruptedException { @CanIgnoreReturnValue // pushed down from class to method @Override - public E peek() { + public @Nullable E peek() { final Monitor monitor = this.monitor; monitor.enter(); try { @@ -313,7 +313,7 @@ public int remainingCapacity() { */ @CanIgnoreReturnValue // pushed down from class to method @Override - public boolean remove(@CheckForNull Object o) { + public boolean remove(@Nullable Object o) { final Monitor monitor = this.monitor; monitor.enter(); try { @@ -333,7 +333,7 @@ public boolean remove(@CheckForNull Object o) { */ @CanIgnoreReturnValue // pushed down from class to method @Override - public boolean contains(@CheckForNull Object o) { + public boolean contains(@Nullable Object o) { final Monitor monitor = this.monitor; monitor.enter(); try { diff --git a/android/guava-tests/pom.xml b/android/guava-tests/pom.xml index 229d0d069824..97ebc0838394 100644 --- a/android/guava-tests/pom.xml +++ b/android/guava-tests/pom.xml @@ -33,10 +33,6 @@ junit junit - - org.easymock - easymock - org.mockito mockito-core @@ -75,13 +71,6 @@ maven-jar-plugin - - default-jar - jar - - true - - create-test-jar test-jar diff --git a/android/guava-tests/test/com/google/common/base/AbstractIteratorTest.java b/android/guava-tests/test/com/google/common/base/AbstractIteratorTest.java index ad13b979071a..1aef3076e974 100644 --- a/android/guava-tests/test/com/google/common/base/AbstractIteratorTest.java +++ b/android/guava-tests/test/com/google/common/base/AbstractIteratorTest.java @@ -50,8 +50,7 @@ public Integer computeNext() { case 2: return endOfData(); default: - fail("Should not have been invoked again"); - return null; + throw new AssertionError("Should not have been invoked again"); } } }; @@ -85,12 +84,12 @@ public void testSneakyThrow() throws Exception { @Override public Integer computeNext() { if (haveBeenCalled) { - fail("Should not have been called again"); + throw new AssertionError("Should not have been called again"); } else { haveBeenCalled = true; sneakyThrow(new SomeCheckedException()); + throw new AssertionError(); // unreachable } - return null; // never reached } }; @@ -192,7 +191,7 @@ public void testReentrantHasNext() { @Override protected Integer computeNext() { boolean unused = hasNext(); - return null; + throw new AssertionError(); } }; try { diff --git a/android/guava-tests/test/com/google/common/base/FinalizableReferenceQueueTest.java b/android/guava-tests/test/com/google/common/base/FinalizableReferenceQueueTest.java index 201fe53a2157..7838f371a269 100644 --- a/android/guava-tests/test/com/google/common/base/FinalizableReferenceQueueTest.java +++ b/android/guava-tests/test/com/google/common/base/FinalizableReferenceQueueTest.java @@ -25,6 +25,7 @@ import java.util.Arrays; import java.util.Collections; import junit.framework.TestCase; +import org.checkerframework.checker.nullness.qual.Nullable; /** * Unit test for {@link FinalizableReferenceQueue}. @@ -37,7 +38,7 @@ @AndroidIncompatible public class FinalizableReferenceQueueTest extends TestCase { - private FinalizableReferenceQueue frq; + private @Nullable FinalizableReferenceQueue frq; @Override protected void tearDown() throws Exception { @@ -83,7 +84,7 @@ public void testThatFinalizerStops() { } /** If we don't keep a strong reference to the reference object, it won't be enqueued. */ - FinalizableWeakReference reference; + @Nullable FinalizableWeakReference reference; /** Create the FRQ in a method that goes out of scope so that we're sure it will be reclaimed. */ private void weaklyReferenceQueue() { diff --git a/android/guava-tests/test/com/google/common/base/FunctionsTest.java b/android/guava-tests/test/com/google/common/base/FunctionsTest.java index 1411c192b551..b854048d0eb1 100644 --- a/android/guava-tests/test/com/google/common/base/FunctionsTest.java +++ b/android/guava-tests/test/com/google/common/base/FunctionsTest.java @@ -27,6 +27,7 @@ import java.io.Serializable; import java.util.Map; import junit.framework.TestCase; +import org.checkerframework.checker.nullness.qual.Nullable; /** * Tests for {@link Functions}. @@ -273,9 +274,9 @@ public void testCompositionWildcard() { Functions.compose(numberToSpanish, japaneseToInteger); } - private static class HashCodeFunction implements Function { + private static class HashCodeFunction implements Function<@Nullable Object, Integer> { @Override - public Integer apply(Object o) { + public Integer apply(@Nullable Object o) { return (o == null) ? 0 : o.hashCode(); } } @@ -378,7 +379,7 @@ public Integer get() { } @Override - public boolean equals(Object obj) { + public boolean equals(@Nullable Object obj) { if (obj instanceof CountingSupplier) { return this.value == ((CountingSupplier) obj).value; } diff --git a/android/guava-tests/test/com/google/common/base/OptionalTest.java b/android/guava-tests/test/com/google/common/base/OptionalTest.java index ba6ace7e94a7..7f70e6d262e4 100644 --- a/android/guava-tests/test/com/google/common/base/OptionalTest.java +++ b/android/guava-tests/test/com/google/common/base/OptionalTest.java @@ -29,6 +29,7 @@ import java.util.List; import java.util.Set; import junit.framework.TestCase; +import org.checkerframework.checker.nullness.qual.Nullable; /** * Unit test for {@link Optional}. @@ -183,12 +184,13 @@ public void testTransform_present_functionReturnsNull() { Optional unused = Optional.of("a") .transform( - new Function() { - @Override - public String apply(String input) { - return null; - } - }); + (Function) + new Function() { + @Override + public @Nullable String apply(String input) { + return null; + } + }); fail("Should throw if Function returns null."); } catch (NullPointerException expected) { } @@ -199,12 +201,13 @@ public void testTransform_absent_functionReturnsNull() { Optional.absent(), Optional.absent() .transform( - new Function() { - @Override - public Object apply(Object input) { - return null; - } - })); + (Function) + new Function() { + @Override + public @Nullable Object apply(Object input) { + return null; + } + })); } public void testEqualsAndHashCode() { diff --git a/android/guava-tests/test/com/google/common/base/PreconditionsTest.java b/android/guava-tests/test/com/google/common/base/PreconditionsTest.java index eccbf2512a3f..e390b3d73b82 100644 --- a/android/guava-tests/test/com/google/common/base/PreconditionsTest.java +++ b/android/guava-tests/test/com/google/common/base/PreconditionsTest.java @@ -31,6 +31,7 @@ import java.util.List; import junit.framework.AssertionFailedError; import junit.framework.TestCase; +import org.checkerframework.checker.nullness.qual.Nullable; /** * Unit test for {@link Preconditions}. @@ -462,7 +463,8 @@ private void assertFailureCause( * @param sig The method signature */ @GwtIncompatible("ArbitraryInstances") - private Object[] getParametersForSignature(Object firstParam, ImmutableList> sig) { + private Object[] getParametersForSignature( + @Nullable Object firstParam, ImmutableList> sig) { Object[] params = new Object[sig.size()]; params[0] = firstParam; if (params.length > 1) { diff --git a/android/guava-tests/test/com/google/common/base/PredicatesTest.java b/android/guava-tests/test/com/google/common/base/PredicatesTest.java index 23922fdd3700..57db2fa0555d 100644 --- a/android/guava-tests/test/com/google/common/base/PredicatesTest.java +++ b/android/guava-tests/test/com/google/common/base/PredicatesTest.java @@ -36,6 +36,7 @@ import java.util.regex.Pattern; import junit.framework.AssertionFailedError; import junit.framework.TestCase; +import org.checkerframework.checker.nullness.qual.Nullable; /** * Unit test for {@link Predicates}. @@ -69,7 +70,7 @@ public int hashCode() { } @Override - public boolean equals(Object obj) { + public boolean equals(@Nullable Object obj) { return obj instanceof IsOdd; } diff --git a/android/guava-tests/test/com/google/common/cache/AbstractCacheTest.java b/android/guava-tests/test/com/google/common/cache/AbstractCacheTest.java index 13ef33db280d..8602e587324a 100644 --- a/android/guava-tests/test/com/google/common/cache/AbstractCacheTest.java +++ b/android/guava-tests/test/com/google/common/cache/AbstractCacheTest.java @@ -24,6 +24,7 @@ import java.util.List; import java.util.concurrent.atomic.AtomicReference; import junit.framework.TestCase; +import org.checkerframework.checker.nullness.qual.Nullable; /** * Unit test for {@link AbstractCache}. @@ -37,7 +38,7 @@ public void testGetIfPresent() { Cache cache = new AbstractCache() { @Override - public Object getIfPresent(Object key) { + public @Nullable Object getIfPresent(Object key) { return valueRef.get(); } }; @@ -53,7 +54,7 @@ public void testGetAllPresent_empty() { Cache cache = new AbstractCache() { @Override - public Object getIfPresent(Object key) { + public @Nullable Object getIfPresent(Object key) { return null; } }; @@ -67,7 +68,7 @@ public void testGetAllPresent_cached() { Cache cache = new AbstractCache() { @Override - public Object getIfPresent(Object key) { + public @Nullable Object getIfPresent(Object key) { return cachedKey.equals(key) ? cachedValue : null; } }; diff --git a/android/guava-tests/test/com/google/common/cache/AbstractLoadingCacheTest.java b/android/guava-tests/test/com/google/common/cache/AbstractLoadingCacheTest.java index c2ddef7b1522..84e004a8b200 100644 --- a/android/guava-tests/test/com/google/common/cache/AbstractLoadingCacheTest.java +++ b/android/guava-tests/test/com/google/common/cache/AbstractLoadingCacheTest.java @@ -23,6 +23,7 @@ import java.util.concurrent.ExecutionException; import java.util.concurrent.atomic.AtomicReference; import junit.framework.TestCase; +import org.checkerframework.checker.nullness.qual.Nullable; /** * Unit test for {@link AbstractLoadingCache}. @@ -46,7 +47,7 @@ public Object get(Object key) throws ExecutionException { } @Override - public Object getIfPresent(Object key) { + public @Nullable Object getIfPresent(Object key) { return valueRef.get(); } }; @@ -78,7 +79,7 @@ public Object get(Object key) throws ExecutionException { } @Override - public Object getIfPresent(Object key) { + public @Nullable Object getIfPresent(Object key) { return valueRef.get(); } }; @@ -110,7 +111,7 @@ public Object get(Object key) throws ExecutionException { } @Override - public Object getIfPresent(Object key) { + public @Nullable Object getIfPresent(Object key) { return valueRef.get(); } }; @@ -142,7 +143,7 @@ public Object get(Object key) throws ExecutionException { } @Override - public Object getIfPresent(Object key) { + public @Nullable Object getIfPresent(Object key) { return valueRef.get(); } }; diff --git a/android/guava-tests/test/com/google/common/cache/CacheBuilderFactory.java b/android/guava-tests/test/com/google/common/cache/CacheBuilderFactory.java index 948b4b560467..77a4734fbba4 100644 --- a/android/guava-tests/test/com/google/common/cache/CacheBuilderFactory.java +++ b/android/guava-tests/test/com/google/common/cache/CacheBuilderFactory.java @@ -26,7 +26,7 @@ import java.util.List; import java.util.Set; import java.util.concurrent.TimeUnit; -import javax.annotation.CheckForNull; +import org.checkerframework.checker.nullness.qual.Nullable; /** * Helper class for creating {@link CacheBuilder} instances with all combinations of several sets of @@ -120,15 +120,15 @@ public CacheBuilder apply(List combination) { private static final Function> NULLABLE_TO_OPTIONAL = new Function>() { @Override - public Optional apply(@CheckForNull Object obj) { + public Optional apply(@Nullable Object obj) { return Optional.fromNullable(obj); } }; - private static final Function, Object> OPTIONAL_TO_NULLABLE = - new Function, Object>() { + private static final Function, @Nullable Object> OPTIONAL_TO_NULLABLE = + new Function, @Nullable Object>() { @Override - public Object apply(Optional optional) { + public @Nullable Object apply(Optional optional) { return optional.orNull(); } }; @@ -158,14 +158,14 @@ public List apply(List> objs) { } private CacheBuilder createCacheBuilder( - Integer concurrencyLevel, - Integer initialCapacity, - Integer maximumSize, - DurationSpec expireAfterWrite, - DurationSpec expireAfterAccess, - DurationSpec refresh, - Strength keyStrength, - Strength valueStrength) { + @Nullable Integer concurrencyLevel, + @Nullable Integer initialCapacity, + @Nullable Integer maximumSize, + @Nullable DurationSpec expireAfterWrite, + @Nullable DurationSpec expireAfterAccess, + @Nullable DurationSpec refresh, + @Nullable Strength keyStrength, + @Nullable Strength valueStrength) { CacheBuilder builder = CacheBuilder.newBuilder(); if (concurrencyLevel != null) { @@ -214,7 +214,7 @@ public int hashCode() { } @Override - public boolean equals(Object o) { + public boolean equals(@Nullable Object o) { if (o instanceof DurationSpec) { DurationSpec that = (DurationSpec) o; return unit.toNanos(duration) == that.unit.toNanos(that.duration); diff --git a/android/guava-tests/test/com/google/common/cache/CacheTesting.java b/android/guava-tests/test/com/google/common/cache/CacheTesting.java index 112dc13fd64c..47a75c0abf69 100644 --- a/android/guava-tests/test/com/google/common/cache/CacheTesting.java +++ b/android/guava-tests/test/com/google/common/cache/CacheTesting.java @@ -44,7 +44,7 @@ import java.util.concurrent.ConcurrentMap; import java.util.concurrent.TimeUnit; import java.util.concurrent.atomic.AtomicReferenceArray; -import javax.annotation.CheckForNull; +import org.checkerframework.checker.nullness.qual.Nullable; /** * A collection of utilities for {@link Cache} testing. @@ -367,7 +367,7 @@ static void processPendingNotifications(Cache cache) { } interface Receiver { - void accept(@CheckForNull T object); + void accept(@Nullable T object); } /** diff --git a/android/guava-tests/test/com/google/common/cache/ForwardingCacheTest.java b/android/guava-tests/test/com/google/common/cache/ForwardingCacheTest.java index 412ff7802f1a..639a208bd5cd 100644 --- a/android/guava-tests/test/com/google/common/cache/ForwardingCacheTest.java +++ b/android/guava-tests/test/com/google/common/cache/ForwardingCacheTest.java @@ -104,7 +104,7 @@ public void testCleanUp() { private static class OnlyGet extends ForwardingCache { @Override protected Cache delegate() { - return null; + throw new AssertionError(); } } } diff --git a/android/guava-tests/test/com/google/common/cache/ForwardingLoadingCacheTest.java b/android/guava-tests/test/com/google/common/cache/ForwardingLoadingCacheTest.java index d78db2d375cc..fe41612132b1 100644 --- a/android/guava-tests/test/com/google/common/cache/ForwardingLoadingCacheTest.java +++ b/android/guava-tests/test/com/google/common/cache/ForwardingLoadingCacheTest.java @@ -112,7 +112,7 @@ public void testCleanUp() { private static class OnlyGet extends ForwardingLoadingCache { @Override protected LoadingCache delegate() { - return null; + throw new AssertionError(); } } } diff --git a/android/guava-tests/test/com/google/common/cache/LocalCacheTest.java b/android/guava-tests/test/com/google/common/cache/LocalCacheTest.java index 9658572f4048..431c962f4792 100644 --- a/android/guava-tests/test/com/google/common/cache/LocalCacheTest.java +++ b/android/guava-tests/test/com/google/common/cache/LocalCacheTest.java @@ -76,6 +76,7 @@ import junit.framework.Test; import junit.framework.TestCase; import junit.framework.TestSuite; +import org.checkerframework.checker.nullness.qual.Nullable; /** @author Charles Fry */ @SuppressWarnings("GuardedBy") // TODO(b/35466881): Fix or suppress. @@ -2695,7 +2696,7 @@ private static Iterable> allKeyValueStrengthMakers( // entries and values private static DummyEntry createDummyEntry( - K key, int hash, V value, ReferenceEntry next) { + K key, int hash, V value, @Nullable ReferenceEntry next) { DummyEntry entry = DummyEntry.create(key, hash, next); DummyValueReference valueRef = DummyValueReference.create(value); entry.setValueReference(valueRef); @@ -2703,7 +2704,7 @@ private static DummyEntry createDummyEntry( } static class DummyEntry implements ReferenceEntry { - private K key; + private @Nullable K key; private final int hash; private final ReferenceEntry next; @@ -2713,7 +2714,8 @@ public DummyEntry(K key, int hash, ReferenceEntry next) { this.next = next; } - public static DummyEntry create(K key, int hash, ReferenceEntry next) { + public static DummyEntry create( + K key, int hash, @Nullable ReferenceEntry next) { return new DummyEntry<>(key, hash, next); } @@ -2822,7 +2824,7 @@ public void setPreviousInWriteQueue(ReferenceEntry previous) { } static class DummyValueReference implements ValueReference { - private V value; + private @Nullable V value; boolean loading = false; public DummyValueReference() { @@ -2852,7 +2854,7 @@ public int getWeight() { } @Override - public ReferenceEntry getEntry() { + public @Nullable ReferenceEntry getEntry() { return null; } @@ -2902,7 +2904,7 @@ public int hashCode() { } @Override - public boolean equals(Object o) { + public boolean equals(@Nullable Object o) { return (o instanceof SerializableCacheLoader); } } @@ -2918,7 +2920,7 @@ public int hashCode() { } @Override - public boolean equals(Object o) { + public boolean equals(@Nullable Object o) { return (o instanceof SerializableRemovalListener); } } @@ -2935,7 +2937,7 @@ public int hashCode() { } @Override - public boolean equals(Object o) { + public boolean equals(@Nullable Object o) { return (o instanceof SerializableTicker); } } @@ -2952,7 +2954,7 @@ public int hashCode() { } @Override - public boolean equals(Object o) { + public boolean equals(@Nullable Object o) { return (o instanceof SerializableWeigher); } } diff --git a/android/guava-tests/test/com/google/common/cache/TestingCacheLoaders.java b/android/guava-tests/test/com/google/common/cache/TestingCacheLoaders.java index 6cc02602126e..e4a06c9cb252 100644 --- a/android/guava-tests/test/com/google/common/cache/TestingCacheLoaders.java +++ b/android/guava-tests/test/com/google/common/cache/TestingCacheLoaders.java @@ -23,7 +23,7 @@ import com.google.common.util.concurrent.ListenableFuture; import java.util.Map; import java.util.concurrent.atomic.AtomicInteger; -import javax.annotation.CheckForNull; +import org.checkerframework.checker.nullness.qual.Nullable; /** * Utility {@link CacheLoader} implementations intended for use in testing. @@ -57,7 +57,7 @@ public Map loadAll(Iterable keys) throws Exception { } /** Returns a {@link CacheLoader} that returns the given {@code constant} for every request. */ - static ConstantLoader constantLoader(@CheckForNull V constant) { + static ConstantLoader constantLoader(@Nullable V constant) { return new ConstantLoader<>(constant); } diff --git a/android/guava-tests/test/com/google/common/collect/AbstractImmutableSetTest.java b/android/guava-tests/test/com/google/common/collect/AbstractImmutableSetTest.java index d7a8d16cadf1..705b15a48082 100644 --- a/android/guava-tests/test/com/google/common/collect/AbstractImmutableSetTest.java +++ b/android/guava-tests/test/com/google/common/collect/AbstractImmutableSetTest.java @@ -33,6 +33,7 @@ import java.util.List; import java.util.Set; import junit.framework.TestCase; +import org.checkerframework.checker.nullness.qual.Nullable; /** * Base class for {@link ImmutableSet} and {@link ImmutableSortedSet} tests. @@ -59,7 +60,7 @@ public abstract class AbstractImmutableSetTest extends TestCase { protected abstract > Set of( E e1, E e2, E e3, E e4, E e5, E e6, E... rest); - protected abstract > Set copyOf(E[] elements); + protected abstract > Set copyOf(E @Nullable [] elements); protected abstract > Set copyOf( Collection elements); diff --git a/android/guava-tests/test/com/google/common/collect/AbstractIteratorTest.java b/android/guava-tests/test/com/google/common/collect/AbstractIteratorTest.java index 72a4be833c42..60ad785c9229 100644 --- a/android/guava-tests/test/com/google/common/collect/AbstractIteratorTest.java +++ b/android/guava-tests/test/com/google/common/collect/AbstractIteratorTest.java @@ -51,8 +51,7 @@ public Integer computeNext() { case 2: return endOfData(); default: - fail("Should not have been invoked again"); - return null; + throw new AssertionError("Should not have been invoked again"); } } }; @@ -97,8 +96,7 @@ public Integer computeNext() { case 2: return endOfData(); default: - fail("Should not have been invoked again"); - return null; + throw new AssertionError("Should not have been invoked again"); } } }; @@ -188,12 +186,12 @@ public void testSneakyThrow() throws Exception { @Override public Integer computeNext() { if (haveBeenCalled) { - fail("Should not have been called again"); + throw new AssertionError("Should not have been called again"); } else { haveBeenCalled = true; sneakyThrow(new SomeCheckedException()); + throw new AssertionError(); // unreachable } - return null; // never reached } }; @@ -281,7 +279,7 @@ public void testReentrantHasNext() { @Override protected Integer computeNext() { boolean unused = hasNext(); - return null; + throw new AssertionError(); } }; try { diff --git a/android/guava-tests/test/com/google/common/collect/AbstractMapEntryTest.java b/android/guava-tests/test/com/google/common/collect/AbstractMapEntryTest.java index 63c17dedaeca..6e6b25497235 100644 --- a/android/guava-tests/test/com/google/common/collect/AbstractMapEntryTest.java +++ b/android/guava-tests/test/com/google/common/collect/AbstractMapEntryTest.java @@ -20,6 +20,7 @@ import java.util.Collections; import java.util.Map.Entry; import junit.framework.TestCase; +import org.checkerframework.checker.nullness.qual.Nullable; /** * Tests for {@code AbstractMapEntry}. @@ -28,8 +29,8 @@ */ @GwtCompatible public class AbstractMapEntryTest extends TestCase { - private static final String NK = null; - private static final Integer NV = null; + private static final @Nullable String NK = null; + private static final @Nullable Integer NV = null; private static Entry entry(final K key, final V value) { return new AbstractMapEntry() { diff --git a/android/guava-tests/test/com/google/common/collect/AbstractSequentialIteratorTest.java b/android/guava-tests/test/com/google/common/collect/AbstractSequentialIteratorTest.java index c0b7d91c4cf4..16a9ba781722 100644 --- a/android/guava-tests/test/com/google/common/collect/AbstractSequentialIteratorTest.java +++ b/android/guava-tests/test/com/google/common/collect/AbstractSequentialIteratorTest.java @@ -26,6 +26,7 @@ import java.util.NoSuchElementException; import junit.framework.AssertionFailedError; import junit.framework.TestCase; +import org.checkerframework.checker.nullness.qual.Nullable; /** Tests for {@link AbstractSequentialIterator}. */ @GwtCompatible(emulated = true) @@ -59,7 +60,8 @@ public void testSampleCode() { public Iterator iterator() { Iterator powersOfTwo = new AbstractSequentialIterator(1) { - protected Integer computeNext(Integer previous) { + @Override + protected @Nullable Integer computeNext(Integer previous) { return (previous == 1 << 30) ? null : previous * 2; } }; @@ -136,7 +138,7 @@ public void testBroken() { private static Iterator newDoubler(int first, final int last) { return new AbstractSequentialIterator(first) { @Override - protected Integer computeNext(Integer previous) { + protected @Nullable Integer computeNext(Integer previous) { return (previous == last) ? null : previous * 2; } }; diff --git a/android/guava-tests/test/com/google/common/collect/CollectionBenchmarkSampleData.java b/android/guava-tests/test/com/google/common/collect/CollectionBenchmarkSampleData.java index cdc7a91cc1e6..0504e6a745f6 100644 --- a/android/guava-tests/test/com/google/common/collect/CollectionBenchmarkSampleData.java +++ b/android/guava-tests/test/com/google/common/collect/CollectionBenchmarkSampleData.java @@ -22,6 +22,7 @@ import java.util.Collections; import java.util.List; import java.util.Set; +import org.checkerframework.checker.nullness.qual.Nullable; /** * Package up sample data for common collections benchmarking. @@ -111,7 +112,7 @@ static class Element implements Comparable { } @Override - public boolean equals(Object obj) { + public boolean equals(@Nullable Object obj) { return this == obj || (obj instanceof Element && ((Element) obj).hash == hash); } @@ -137,7 +138,7 @@ static class SlowElement extends Element { } @Override - public boolean equals(Object obj) { + public boolean equals(@Nullable Object obj) { return slowItDown() != 1 && super.equals(obj); } diff --git a/android/guava-tests/test/com/google/common/collect/Collections2Test.java b/android/guava-tests/test/com/google/common/collect/Collections2Test.java index 4b8761893013..2cf05f632cd5 100644 --- a/android/guava-tests/test/com/google/common/collect/Collections2Test.java +++ b/android/guava-tests/test/com/google/common/collect/Collections2Test.java @@ -16,16 +16,15 @@ package com.google.common.collect; +import static com.google.common.base.Strings.isNullOrEmpty; import static com.google.common.collect.Iterables.concat; import static com.google.common.collect.Lists.newArrayList; import static com.google.common.collect.Lists.newLinkedList; import static com.google.common.truth.Truth.assertThat; -import static java.util.Arrays.asList; import static java.util.Collections.nCopies; import com.google.common.annotations.GwtCompatible; import com.google.common.annotations.GwtIncompatible; -import com.google.common.base.Function; import com.google.common.base.Predicate; import com.google.common.collect.testing.CollectionTestSuiteBuilder; import com.google.common.collect.testing.TestStringCollectionGenerator; @@ -40,6 +39,7 @@ import junit.framework.Test; import junit.framework.TestCase; import junit.framework.TestSuite; +import org.checkerframework.checker.nullness.qual.Nullable; /** * Tests for {@link Collections2}. @@ -62,29 +62,10 @@ public static Test suite() { return suite; } - static final Predicate NOT_YYY_ZZZ = - new Predicate() { - @Override - public boolean apply(String input) { - return !"yyy".equals(input) && !"zzz".equals(input); - } - }; - - static final Predicate LENGTH_1 = - new Predicate() { - @Override - public boolean apply(String input) { - return input.length() == 1; - } - }; - - static final Predicate STARTS_WITH_VOWEL = - new Predicate() { - @Override - public boolean apply(String input) { - return asList('a', 'e', 'i', 'o', 'u').contains(input.charAt(0)); - } - }; + static final Predicate<@Nullable String> NOT_YYY_ZZZ = + input -> !"yyy".equals(input) && !"zzz".equals(input); + + static final Predicate LENGTH_1 = input -> input.length() == 1; @GwtIncompatible // suite private static Test testsForFilter() { @@ -200,25 +181,18 @@ public Collection create(String[] elements) { .createTestSuite(); } - private static final Function REMOVE_FIRST_CHAR = - new Function() { - @Override - public String apply(String from) { - return ((from == null) || "".equals(from)) ? null : from.substring(1); - } - }; - @GwtIncompatible // suite private static Test testsForTransform() { return CollectionTestSuiteBuilder.using( new TestStringCollectionGenerator() { @Override - public Collection create(String[] elements) { - List list = newArrayList(); + public Collection<@Nullable String> create(@Nullable String[] elements) { + List<@Nullable String> list = newArrayList(); for (String element : elements) { list.add((element == null) ? null : "q" + element); } - return Collections2.transform(list, REMOVE_FIRST_CHAR); + return Collections2.transform( + list, from -> isNullOrEmpty(from) ? null : from.substring(1)); } }) .named("Collections2.transform") diff --git a/android/guava-tests/test/com/google/common/collect/ComparatorsTest.java b/android/guava-tests/test/com/google/common/collect/ComparatorsTest.java index b30cb7646d43..03686119dec5 100644 --- a/android/guava-tests/test/com/google/common/collect/ComparatorsTest.java +++ b/android/guava-tests/test/com/google/common/collect/ComparatorsTest.java @@ -25,6 +25,7 @@ import java.util.Collections; import java.util.Comparator; import junit.framework.TestCase; +import org.checkerframework.checker.nullness.qual.Nullable; /** * Tests for {@code Comparators}. @@ -118,7 +119,7 @@ public int hashCode() { } @Override - public boolean equals(Object o) { + public boolean equals(@Nullable Object o) { return (o instanceof Foo) && ((Foo) o).value.equals(value); } diff --git a/android/guava-tests/test/com/google/common/collect/FauxveridesTest.java b/android/guava-tests/test/com/google/common/collect/FauxveridesTest.java index ff0b86bf95a2..f7eda67d50a6 100644 --- a/android/guava-tests/test/com/google/common/collect/FauxveridesTest.java +++ b/android/guava-tests/test/com/google/common/collect/FauxveridesTest.java @@ -34,6 +34,7 @@ import java.util.Map; import java.util.Set; import junit.framework.TestCase; +import org.checkerframework.checker.nullness.qual.Nullable; /** * Tests that all {@code public static} methods "inherited" from superclasses are "overridden" in @@ -176,7 +177,7 @@ private static final class MethodSignature implements Comparable from) { } @Override - public boolean equals(Object obj) { + public boolean equals(@Nullable Object obj) { if (obj instanceof TypeSignature) { TypeSignature other = (TypeSignature) obj; return parameterSignatures.equals(other.parameterSignatures); @@ -251,7 +252,7 @@ private static final class TypeParameterSignature { } @Override - public boolean equals(Object obj) { + public boolean equals(@Nullable Object obj) { if (obj instanceof TypeParameterSignature) { TypeParameterSignature other = (TypeParameterSignature) obj; /* diff --git a/android/guava-tests/test/com/google/common/collect/FluentIterableTest.java b/android/guava-tests/test/com/google/common/collect/FluentIterableTest.java index b8427b1c8140..84032e20c568 100644 --- a/android/guava-tests/test/com/google/common/collect/FluentIterableTest.java +++ b/android/guava-tests/test/com/google/common/collect/FluentIterableTest.java @@ -38,9 +38,9 @@ import java.util.Set; import java.util.SortedSet; import java.util.concurrent.TimeUnit; -import javax.annotation.CheckForNull; import junit.framework.AssertionFailedError; import junit.framework.TestCase; +import org.checkerframework.checker.nullness.qual.Nullable; /** * Unit test for {@link FluentIterable}. @@ -850,7 +850,7 @@ public void testUniqueIndex_nullValue() { .uniqueIndex( new Function() { @Override - public Object apply(@CheckForNull Integer input) { + public Object apply(@Nullable Integer input) { return String.valueOf(input); } }); diff --git a/android/guava-tests/test/com/google/common/collect/ForwardingListTest.java b/android/guava-tests/test/com/google/common/collect/ForwardingListTest.java index 7d3466eedd2c..881228260edd 100644 --- a/android/guava-tests/test/com/google/common/collect/ForwardingListTest.java +++ b/android/guava-tests/test/com/google/common/collect/ForwardingListTest.java @@ -31,6 +31,7 @@ import junit.framework.Test; import junit.framework.TestCase; import junit.framework.TestSuite; +import org.checkerframework.checker.nullness.qual.Nullable; /** * Tests for {@code ForwardingList}. @@ -112,7 +113,7 @@ public String toString() { } @Override - public boolean equals(Object object) { + public boolean equals(@Nullable Object object) { return standardEquals(object); } diff --git a/android/guava-tests/test/com/google/common/collect/ForwardingMapTest.java b/android/guava-tests/test/com/google/common/collect/ForwardingMapTest.java index cf2ed0d3b5f1..6654f54962d5 100644 --- a/android/guava-tests/test/com/google/common/collect/ForwardingMapTest.java +++ b/android/guava-tests/test/com/google/common/collect/ForwardingMapTest.java @@ -47,6 +47,7 @@ import junit.framework.Test; import junit.framework.TestCase; import junit.framework.TestSuite; +import org.checkerframework.checker.nullness.qual.Nullable; /** * Unit test for {@link ForwardingMap}. @@ -83,12 +84,12 @@ public void putAll(Map map) { } @Override - public V remove(Object object) { + public @Nullable V remove(Object object) { return standardRemove(object); } @Override - public boolean equals(Object object) { + public boolean equals(@Nullable Object object) { return standardEquals(object); } @@ -335,7 +336,7 @@ protected Map delegate() { "java.util.function.Consumer", "accept", "java.util.function.IntFunction", "apply"); - private static Object getDefaultValue(final TypeToken type) { + private static @Nullable Object getDefaultValue(final TypeToken type) { Class rawType = type.getRawType(); Object defaultValue = ArbitraryInstances.get(rawType); if (defaultValue != null) { diff --git a/android/guava-tests/test/com/google/common/collect/ForwardingMultisetTest.java b/android/guava-tests/test/com/google/common/collect/ForwardingMultisetTest.java index 327885d538f4..c2d78300514e 100644 --- a/android/guava-tests/test/com/google/common/collect/ForwardingMultisetTest.java +++ b/android/guava-tests/test/com/google/common/collect/ForwardingMultisetTest.java @@ -33,6 +33,7 @@ import junit.framework.Test; import junit.framework.TestCase; import junit.framework.TestSuite; +import org.checkerframework.checker.nullness.qual.Nullable; /** * Tests for {@link ForwardingMultiset}. @@ -115,7 +116,7 @@ public String toString() { } @Override - public boolean equals(Object object) { + public boolean equals(@Nullable Object object) { return standardEquals(object); } @@ -277,7 +278,7 @@ public boolean retainAll(Collection collection) { } @Override - public boolean equals(Object object) { + public boolean equals(@Nullable Object object) { throw new UnsupportedOperationException(); } diff --git a/android/guava-tests/test/com/google/common/collect/ForwardingNavigableMapTest.java b/android/guava-tests/test/com/google/common/collect/ForwardingNavigableMapTest.java index b70cd0718ef1..41e29ec8807f 100644 --- a/android/guava-tests/test/com/google/common/collect/ForwardingNavigableMapTest.java +++ b/android/guava-tests/test/com/google/common/collect/ForwardingNavigableMapTest.java @@ -39,6 +39,7 @@ import junit.framework.Test; import junit.framework.TestCase; import junit.framework.TestSuite; +import org.checkerframework.checker.nullness.qual.Nullable; /** * Tests for {@code ForwardingNavigableMap}. @@ -75,12 +76,12 @@ public void putAll(Map map) { } @Override - public V remove(Object object) { + public @Nullable V remove(Object object) { return standardRemove(object); } @Override - public boolean equals(Object object) { + public boolean equals(@Nullable Object object) { return standardEquals(object); } @@ -134,47 +135,47 @@ public SortedMap subMap(K fromKey, K toKey) { } @Override - public Entry lowerEntry(K key) { + public @Nullable Entry lowerEntry(K key) { return standardLowerEntry(key); } @Override - public K lowerKey(K key) { + public @Nullable K lowerKey(K key) { return standardLowerKey(key); } @Override - public Entry floorEntry(K key) { + public @Nullable Entry floorEntry(K key) { return standardFloorEntry(key); } @Override - public K floorKey(K key) { + public @Nullable K floorKey(K key) { return standardFloorKey(key); } @Override - public Entry ceilingEntry(K key) { + public @Nullable Entry ceilingEntry(K key) { return standardCeilingEntry(key); } @Override - public K ceilingKey(K key) { + public @Nullable K ceilingKey(K key) { return standardCeilingKey(key); } @Override - public Entry higherEntry(K key) { + public @Nullable Entry higherEntry(K key) { return standardHigherEntry(key); } @Override - public K higherKey(K key) { + public @Nullable K higherKey(K key) { return standardHigherKey(key); } @Override - public Entry firstEntry() { + public @Nullable Entry firstEntry() { return standardFirstEntry(); } @@ -184,12 +185,12 @@ public Entry firstEntry() { */ @Override - public Entry pollFirstEntry() { + public @Nullable Entry pollFirstEntry() { return standardPollFirstEntry(); } @Override - public Entry pollLastEntry() { + public @Nullable Entry pollLastEntry() { return standardPollLastEntry(); } @@ -242,7 +243,7 @@ protected NavigableMap delegate() { } @Override - public Entry lastEntry() { + public @Nullable Entry lastEntry() { return standardLastEntry(); } } diff --git a/android/guava-tests/test/com/google/common/collect/ForwardingNavigableSetTest.java b/android/guava-tests/test/com/google/common/collect/ForwardingNavigableSetTest.java index fd47bf8fd53c..2fbc42ae7de3 100644 --- a/android/guava-tests/test/com/google/common/collect/ForwardingNavigableSetTest.java +++ b/android/guava-tests/test/com/google/common/collect/ForwardingNavigableSetTest.java @@ -34,6 +34,7 @@ import junit.framework.Test; import junit.framework.TestCase; import junit.framework.TestSuite; +import org.checkerframework.checker.nullness.qual.Nullable; /** * Tests for {@code ForwardingNavigableSet}. @@ -54,7 +55,7 @@ protected NavigableSet delegate() { } @Override - public boolean equals(Object object) { + public boolean equals(@Nullable Object object) { return standardEquals(object); } @@ -119,32 +120,32 @@ public SortedSet subSet(T fromElement, T toElement) { } @Override - public T lower(T e) { + public @Nullable T lower(T e) { return standardLower(e); } @Override - public T floor(T e) { + public @Nullable T floor(T e) { return standardFloor(e); } @Override - public T ceiling(T e) { + public @Nullable T ceiling(T e) { return standardCeiling(e); } @Override - public T higher(T e) { + public @Nullable T higher(T e) { return standardHigher(e); } @Override - public T pollFirst() { + public @Nullable T pollFirst() { return standardPollFirst(); } @Override - public T pollLast() { + public @Nullable T pollLast() { return standardPollLast(); } diff --git a/android/guava-tests/test/com/google/common/collect/ForwardingQueueTest.java b/android/guava-tests/test/com/google/common/collect/ForwardingQueueTest.java index 248f132777a4..033a96d9e310 100644 --- a/android/guava-tests/test/com/google/common/collect/ForwardingQueueTest.java +++ b/android/guava-tests/test/com/google/common/collect/ForwardingQueueTest.java @@ -29,6 +29,7 @@ import junit.framework.Test; import junit.framework.TestCase; import junit.framework.TestSuite; +import org.checkerframework.checker.nullness.qual.Nullable; /** * Tests for {@code ForwardingQueue}. @@ -106,12 +107,12 @@ public boolean offer(T o) { } @Override - public T peek() { + public @Nullable T peek() { return standardPeek(); } @Override - public T poll() { + public @Nullable T poll() { return standardPoll(); } } diff --git a/android/guava-tests/test/com/google/common/collect/ForwardingSetTest.java b/android/guava-tests/test/com/google/common/collect/ForwardingSetTest.java index 89bf7b31d728..53d12c36afb1 100644 --- a/android/guava-tests/test/com/google/common/collect/ForwardingSetTest.java +++ b/android/guava-tests/test/com/google/common/collect/ForwardingSetTest.java @@ -31,6 +31,7 @@ import junit.framework.Test; import junit.framework.TestCase; import junit.framework.TestSuite; +import org.checkerframework.checker.nullness.qual.Nullable; /** * Tests for {@code ForwardingSet}. @@ -52,7 +53,7 @@ protected Set delegate() { } @Override - public boolean equals(Object object) { + public boolean equals(@Nullable Object object) { return standardEquals(object); } diff --git a/android/guava-tests/test/com/google/common/collect/ForwardingSortedMapTest.java b/android/guava-tests/test/com/google/common/collect/ForwardingSortedMapTest.java index 59e7ece53eac..a4d829085d42 100644 --- a/android/guava-tests/test/com/google/common/collect/ForwardingSortedMapTest.java +++ b/android/guava-tests/test/com/google/common/collect/ForwardingSortedMapTest.java @@ -36,6 +36,7 @@ import junit.framework.Test; import junit.framework.TestCase; import junit.framework.TestSuite; +import org.checkerframework.checker.nullness.qual.Nullable; /** * Tests for {@code ForwardingSortedMap}. @@ -71,12 +72,12 @@ public void putAll(Map map) { } @Override - public V remove(Object object) { + public @Nullable V remove(Object object) { return standardRemove(object); } @Override - public boolean equals(Object object) { + public boolean equals(@Nullable Object object) { return standardEquals(object); } diff --git a/android/guava-tests/test/com/google/common/collect/ForwardingSortedMultisetTest.java b/android/guava-tests/test/com/google/common/collect/ForwardingSortedMultisetTest.java index 2b77cd5e4b74..4f69dea94dca 100644 --- a/android/guava-tests/test/com/google/common/collect/ForwardingSortedMultisetTest.java +++ b/android/guava-tests/test/com/google/common/collect/ForwardingSortedMultisetTest.java @@ -27,10 +27,10 @@ import java.util.Iterator; import java.util.List; import java.util.NavigableSet; -import javax.annotation.CheckForNull; import junit.framework.Test; import junit.framework.TestCase; import junit.framework.TestSuite; +import org.checkerframework.checker.nullness.qual.Nullable; /** * Tests for {@link ForwardingSortedMultiset}. @@ -93,12 +93,12 @@ public SortedMultiset subMultiset( } @Override - public int count(@CheckForNull Object element) { + public int count(@Nullable Object element) { return standardCount(element); } @Override - public boolean equals(@CheckForNull Object object) { + public boolean equals(@Nullable Object object) { return standardEquals(object); } @@ -123,7 +123,7 @@ public void clear() { } @Override - public boolean contains(@CheckForNull Object object) { + public boolean contains(@Nullable Object object) { return standardContains(object); } @@ -143,7 +143,7 @@ public Iterator iterator() { } @Override - public boolean remove(@CheckForNull Object object) { + public boolean remove(@Nullable Object object) { return standardRemove(object); } diff --git a/android/guava-tests/test/com/google/common/collect/ForwardingSortedSetTest.java b/android/guava-tests/test/com/google/common/collect/ForwardingSortedSetTest.java index b83ee6b97112..417370488726 100644 --- a/android/guava-tests/test/com/google/common/collect/ForwardingSortedSetTest.java +++ b/android/guava-tests/test/com/google/common/collect/ForwardingSortedSetTest.java @@ -31,6 +31,7 @@ import junit.framework.Test; import junit.framework.TestCase; import junit.framework.TestSuite; +import org.checkerframework.checker.nullness.qual.Nullable; /** * Tests for {@code ForwardingSortedSet}. @@ -51,7 +52,7 @@ protected SortedSet delegate() { } @Override - public boolean equals(Object object) { + public boolean equals(@Nullable Object object) { return standardEquals(object); } diff --git a/android/guava-tests/test/com/google/common/collect/ImmutableClassToInstanceMapTest.java b/android/guava-tests/test/com/google/common/collect/ImmutableClassToInstanceMapTest.java index bce73b8f759b..b9696301fe5f 100644 --- a/android/guava-tests/test/com/google/common/collect/ImmutableClassToInstanceMapTest.java +++ b/android/guava-tests/test/com/google/common/collect/ImmutableClassToInstanceMapTest.java @@ -33,6 +33,7 @@ import junit.framework.Test; import junit.framework.TestCase; import junit.framework.TestSuite; +import org.checkerframework.checker.nullness.qual.Nullable; /** * Unit test for {@link ImmutableClassToInstanceMap}. @@ -213,7 +214,7 @@ static final class Impl implements One, Two, Three, Four, Five, Serializable { } @Override - public boolean equals(Object obj) { + public boolean equals(@Nullable Object obj) { return obj instanceof Impl && value == ((Impl) obj).value; } diff --git a/android/guava-tests/test/com/google/common/collect/ImmutableMapTest.java b/android/guava-tests/test/com/google/common/collect/ImmutableMapTest.java index 4f86463ea59c..67c039af12be 100644 --- a/android/guava-tests/test/com/google/common/collect/ImmutableMapTest.java +++ b/android/guava-tests/test/com/google/common/collect/ImmutableMapTest.java @@ -57,6 +57,7 @@ import junit.framework.Test; import junit.framework.TestCase; import junit.framework.TestSuite; +import org.checkerframework.checker.nullness.qual.Nullable; /** * Tests for {@link ImmutableMap}. @@ -530,7 +531,7 @@ public int compareTo(ClassWithTerribleHashCode that) { } @Override - public boolean equals(Object x) { + public boolean equals(@Nullable Object x) { return x instanceof ClassWithTerribleHashCode && ((ClassWithTerribleHashCode) x).value == value; } @@ -917,7 +918,7 @@ public IntHolder(int value) { } @Override - public boolean equals(Object o) { + public boolean equals(@Nullable Object o) { return (o instanceof IntHolder) && ((IntHolder) o).value == value; } diff --git a/android/guava-tests/test/com/google/common/collect/ImmutableSortedMapTest.java b/android/guava-tests/test/com/google/common/collect/ImmutableSortedMapTest.java index 817e3dbab801..f3e7c1bd6b8a 100644 --- a/android/guava-tests/test/com/google/common/collect/ImmutableSortedMapTest.java +++ b/android/guava-tests/test/com/google/common/collect/ImmutableSortedMapTest.java @@ -45,6 +45,7 @@ import junit.framework.Test; import junit.framework.TestCase; import junit.framework.TestSuite; +import org.checkerframework.checker.nullness.qual.Nullable; /** * Tests for {@link ImmutableSortedMap}. @@ -717,7 +718,7 @@ public IntHolder(int value) { } @Override - public boolean equals(Object o) { + public boolean equals(@Nullable Object o) { return (o instanceof IntHolder) && ((IntHolder) o).value == value; } diff --git a/android/guava-tests/test/com/google/common/collect/LegacyComparable.java b/android/guava-tests/test/com/google/common/collect/LegacyComparable.java index 8b0c9620cd68..05a6607a420c 100644 --- a/android/guava-tests/test/com/google/common/collect/LegacyComparable.java +++ b/android/guava-tests/test/com/google/common/collect/LegacyComparable.java @@ -19,6 +19,7 @@ import com.google.common.annotations.GwtCompatible; import java.io.Serializable; import java.util.Arrays; +import org.checkerframework.checker.nullness.qual.Nullable; /** * A class that implements {@code Comparable} without generics, such as those found in libraries @@ -51,7 +52,7 @@ public int compareTo(Object object) { } @Override - public boolean equals(Object object) { + public boolean equals(@Nullable Object object) { if (object instanceof LegacyComparable) { LegacyComparable that = (LegacyComparable) object; return this.value.equals(that.value); diff --git a/android/guava-tests/test/com/google/common/collect/MapsCollectionTest.java b/android/guava-tests/test/com/google/common/collect/MapsCollectionTest.java index 9aa8e66b70fb..1e600647b6fc 100644 --- a/android/guava-tests/test/com/google/common/collect/MapsCollectionTest.java +++ b/android/guava-tests/test/com/google/common/collect/MapsCollectionTest.java @@ -49,10 +49,10 @@ import java.util.Set; import java.util.SortedMap; import java.util.SortedSet; -import javax.annotation.CheckForNull; import junit.framework.Test; import junit.framework.TestCase; import junit.framework.TestSuite; +import org.checkerframework.checker.nullness.qual.Nullable; /** * Test suites for wrappers in {@code Maps}. @@ -561,7 +561,7 @@ static void putEntries(Map map, Entry[] entries) static final Predicate FILTER_KEYS = new Predicate() { @Override - public boolean apply(@CheckForNull String string) { + public boolean apply(@Nullable String string) { return !"banana".equals(string) && !"eggplant".equals(string); } }; @@ -569,7 +569,7 @@ public boolean apply(@CheckForNull String string) { static final Predicate FILTER_VALUES = new Predicate() { @Override - public boolean apply(@CheckForNull String string) { + public boolean apply(@Nullable String string) { return !"toast".equals(string) && !"spam".equals(string); } }; diff --git a/android/guava-tests/test/com/google/common/collect/MapsTest.java b/android/guava-tests/test/com/google/common/collect/MapsTest.java index b1703100cc2f..1672efa198a5 100644 --- a/android/guava-tests/test/com/google/common/collect/MapsTest.java +++ b/android/guava-tests/test/com/google/common/collect/MapsTest.java @@ -62,6 +62,7 @@ import java.util.TreeMap; import java.util.concurrent.ConcurrentMap; import junit.framework.TestCase; +import org.checkerframework.checker.nullness.qual.Nullable; /** * Unit test for {@code Maps}. @@ -1325,18 +1326,18 @@ public void testSynchronizedBiMap() { assertEquals(ImmutableSet.of(1, 2, 3), sync.inverse().keySet()); } - static final Predicate NOT_LENGTH_3 = - new Predicate() { + static final Predicate<@Nullable String> NOT_LENGTH_3 = + new Predicate<@Nullable String>() { @Override - public boolean apply(String input) { + public boolean apply(@Nullable String input) { return input == null || input.length() != 3; } }; - static final Predicate EVEN = - new Predicate() { + static final Predicate<@Nullable Integer> EVEN = + new Predicate<@Nullable Integer>() { @Override - public boolean apply(Integer input) { + public boolean apply(@Nullable Integer input) { return input == null || input % 2 == 0; } }; diff --git a/android/guava-tests/test/com/google/common/collect/MapsTransformValuesTest.java b/android/guava-tests/test/com/google/common/collect/MapsTransformValuesTest.java index b4382dbcacd0..a88ff9cd16f7 100644 --- a/android/guava-tests/test/com/google/common/collect/MapsTransformValuesTest.java +++ b/android/guava-tests/test/com/google/common/collect/MapsTransformValuesTest.java @@ -25,7 +25,7 @@ import java.util.Map; import java.util.Map.Entry; import java.util.Set; -import javax.annotation.CheckForNull; +import org.checkerframework.checker.nullness.qual.Nullable; /** * Tests for {@link Maps#transformValues}. @@ -156,7 +156,7 @@ public void testTransformEqualityOfMapsWithNullValues() { underlying, new Function() { @Override - public Boolean apply(@CheckForNull String from) { + public Boolean apply(@Nullable String from) { return from == null; } }); @@ -264,22 +264,22 @@ public Integer apply(Integer from) { } public void testTransformEntrySetContains() { - Map underlying = Maps.newHashMap(); + Map<@Nullable String, @Nullable Boolean> underlying = Maps.newHashMap(); underlying.put("a", null); underlying.put("b", true); underlying.put(null, true); - Map map = + Map<@Nullable String, @Nullable Boolean> map = Maps.transformValues( underlying, - new Function() { + new Function<@Nullable Boolean, @Nullable Boolean>() { @Override - public Boolean apply(@CheckForNull Boolean from) { + public @Nullable Boolean apply(@Nullable Boolean from) { return (from == null) ? true : null; } }); - Set> entries = map.entrySet(); + Set> entries = map.entrySet(); assertTrue(entries.contains(Maps.immutableEntry("a", true))); assertTrue(entries.contains(Maps.immutableEntry("b", (Boolean) null))); assertTrue(entries.contains(Maps.immutableEntry((String) null, (Boolean) null))); diff --git a/android/guava-tests/test/com/google/common/collect/MapsTransformValuesUnmodifiableIteratorTest.java b/android/guava-tests/test/com/google/common/collect/MapsTransformValuesUnmodifiableIteratorTest.java index 10739513f0c1..7411beca42d3 100644 --- a/android/guava-tests/test/com/google/common/collect/MapsTransformValuesUnmodifiableIteratorTest.java +++ b/android/guava-tests/test/com/google/common/collect/MapsTransformValuesUnmodifiableIteratorTest.java @@ -25,7 +25,7 @@ import java.util.Map; import java.util.Map.Entry; import java.util.Set; -import javax.annotation.CheckForNull; +import org.checkerframework.checker.nullness.qual.Nullable; /** * Tests for {@link Maps#transformValues} when the backing map's views have iterators that don't @@ -232,7 +232,7 @@ public void testTransformEqualityOfMapsWithNullValues() { underlying, new Function() { @Override - public Boolean apply(@CheckForNull String from) { + public Boolean apply(@Nullable String from) { return from == null; } }); @@ -340,22 +340,22 @@ public Integer apply(Integer from) { } public void testTransformEntrySetContains() { - Map underlying = Maps.newHashMap(); + Map<@Nullable String, @Nullable Boolean> underlying = Maps.newHashMap(); underlying.put("a", null); underlying.put("b", true); underlying.put(null, true); - Map map = + Map<@Nullable String, @Nullable Boolean> map = Maps.transformValues( underlying, - new Function() { + new Function<@Nullable Boolean, @Nullable Boolean>() { @Override - public Boolean apply(@CheckForNull Boolean from) { + public @Nullable Boolean apply(@Nullable Boolean from) { return (from == null) ? true : null; } }); - Set> entries = map.entrySet(); + Set> entries = map.entrySet(); assertTrue(entries.contains(Maps.immutableEntry("a", true))); assertTrue(entries.contains(Maps.immutableEntry("b", (Boolean) null))); assertTrue(entries.contains(Maps.immutableEntry((String) null, (Boolean) null))); diff --git a/android/guava-tests/test/com/google/common/collect/MultimapsTest.java b/android/guava-tests/test/com/google/common/collect/MultimapsTest.java index 02ea574bbc50..1894c26139c7 100644 --- a/android/guava-tests/test/com/google/common/collect/MultimapsTest.java +++ b/android/guava-tests/test/com/google/common/collect/MultimapsTest.java @@ -55,8 +55,8 @@ import java.util.SortedMap; import java.util.SortedSet; import java.util.TreeSet; -import javax.annotation.CheckForNull; import junit.framework.TestCase; +import org.checkerframework.checker.nullness.qual.Nullable; /** * Unit test for {@code Multimaps}. @@ -267,8 +267,8 @@ private static void checkUnmodifiableMultimap( private static void checkUnmodifiableMultimap( Multimap multimap, boolean permitsDuplicates, - @CheckForNull String nullKey, - @CheckForNull Integer nullValue) { + @Nullable String nullKey, + @Nullable Integer nullValue) { Multimap unmodifiable = prepareUnmodifiableTests(multimap, permitsDuplicates, nullKey, nullValue); @@ -297,8 +297,8 @@ private static void checkUnmodifiableMultimap( private static Multimap prepareUnmodifiableTests( Multimap multimap, boolean permitsDuplicates, - @CheckForNull String nullKey, - @CheckForNull Integer nullValue) { + @Nullable String nullKey, + @Nullable Integer nullValue) { multimap.clear(); multimap.put("foo", 1); multimap.put("foo", 2); diff --git a/android/guava-tests/test/com/google/common/collect/MultisetsImmutableEntryTest.java b/android/guava-tests/test/com/google/common/collect/MultisetsImmutableEntryTest.java index bef27b9b20e5..870490e5fd42 100644 --- a/android/guava-tests/test/com/google/common/collect/MultisetsImmutableEntryTest.java +++ b/android/guava-tests/test/com/google/common/collect/MultisetsImmutableEntryTest.java @@ -20,6 +20,7 @@ import com.google.common.collect.Multiset.Entry; import java.util.Collections; import junit.framework.TestCase; +import org.checkerframework.checker.nullness.qual.Nullable; /** * Tests for {@link Multisets#immutableEntry}. @@ -28,7 +29,7 @@ */ @GwtCompatible public class MultisetsImmutableEntryTest extends TestCase { - private static final String NE = null; + private static final @Nullable String NE = null; private static Entry entry(final E element, final int count) { return Multisets.immutableEntry(element, count); diff --git a/android/guava-tests/test/com/google/common/collect/OrderingTest.java b/android/guava-tests/test/com/google/common/collect/OrderingTest.java index 7c4acc943159..a98379986d89 100644 --- a/android/guava-tests/test/com/google/common/collect/OrderingTest.java +++ b/android/guava-tests/test/com/google/common/collect/OrderingTest.java @@ -40,8 +40,8 @@ import java.util.List; import java.util.Random; import java.util.RandomAccess; -import javax.annotation.CheckForNull; import junit.framework.TestCase; +import org.checkerframework.checker.nullness.qual.Nullable; /** * Unit tests for {@code Ordering}. @@ -833,7 +833,7 @@ public int hashCode() { } @Override - public boolean equals(Object other) { + public boolean equals(@Nullable Object other) { return other instanceof NumberOrdering; } @@ -1030,7 +1030,7 @@ Scenario mutate(final Scenario scenario) { scenario.ordering.onResultOf( new Function() { @Override - public T apply(@CheckForNull Integer from) { + public T apply(@Nullable Integer from) { return scenario.strictlyOrderedList.get(from); } }); diff --git a/android/guava-tests/test/com/google/common/collect/QueuesTest.java b/android/guava-tests/test/com/google/common/collect/QueuesTest.java index 7232a8212c9c..e2c3485f9d54 100644 --- a/android/guava-tests/test/com/google/common/collect/QueuesTest.java +++ b/android/guava-tests/test/com/google/common/collect/QueuesTest.java @@ -40,6 +40,7 @@ import java.util.concurrent.SynchronousQueue; import java.util.concurrent.TimeUnit; import junit.framework.TestCase; +import org.checkerframework.checker.nullness.qual.Nullable; /** * Tests for {@link Queues}. @@ -220,8 +221,9 @@ private void testDrainUninterruptibly_doesNotThrow(final BlockingQueue q @SuppressWarnings("unused") // https://errorprone.info/bugpattern/FutureReturnValueIgnored Future possiblyIgnoredError = threadPool.submit( - new Callable() { - public Void call() throws InterruptedException { + new Callable<@Nullable Void>() { + @Override + public @Nullable Void call() throws InterruptedException { new Producer(q, 50).call(); new Interrupter(mainThread).run(); new Producer(q, 50).call(); @@ -302,7 +304,7 @@ private void assertUninterruptibleDrained(BlockingQueue q) { } } - private static class Producer implements Callable { + private static class Producer implements Callable<@Nullable Void> { final BlockingQueue q; final int elements; final CountDownLatch beganProducing = new CountDownLatch(1); @@ -314,7 +316,7 @@ private static class Producer implements Callable { } @Override - public Void call() throws InterruptedException { + public @Nullable Void call() throws InterruptedException { try { beganProducing.countDown(); for (int i = 0; i < elements; i++) { diff --git a/android/guava-tests/test/com/google/common/collect/SetsTest.java b/android/guava-tests/test/com/google/common/collect/SetsTest.java index d7799cec0c8a..d46cbb136a40 100644 --- a/android/guava-tests/test/com/google/common/collect/SetsTest.java +++ b/android/guava-tests/test/com/google/common/collect/SetsTest.java @@ -73,10 +73,10 @@ import java.util.SortedSet; import java.util.TreeSet; import java.util.concurrent.CopyOnWriteArraySet; -import javax.annotation.CheckForNull; import junit.framework.Test; import junit.framework.TestCase; import junit.framework.TestSuite; +import org.checkerframework.checker.nullness.qual.Nullable; /** * Unit test for {@code Sets}. @@ -1077,7 +1077,7 @@ private static void verifyLinkedHashSetContents( * same as the given comparator. */ private static void verifySortedSetContents( - SortedSet set, Iterable iterable, @CheckForNull Comparator comparator) { + SortedSet set, Iterable iterable, @Nullable Comparator comparator) { assertSame(comparator, set.comparator()); verifySetContents(set, iterable); } @@ -1113,7 +1113,7 @@ public int hashCode() { // delegate to 's' } @Override - public boolean equals(Object other) { + public boolean equals(@Nullable Object other) { if (other == null) { return false; } else if (other instanceof Base) { diff --git a/android/guava-tests/test/com/google/common/collect/SimpleAbstractMultisetTest.java b/android/guava-tests/test/com/google/common/collect/SimpleAbstractMultisetTest.java index 02ab44b9f5c3..04f4fe67c735 100644 --- a/android/guava-tests/test/com/google/common/collect/SimpleAbstractMultisetTest.java +++ b/android/guava-tests/test/com/google/common/collect/SimpleAbstractMultisetTest.java @@ -28,10 +28,10 @@ import java.util.Iterator; import java.util.Map; import java.util.concurrent.atomic.AtomicInteger; -import javax.annotation.CheckForNull; import junit.framework.Test; import junit.framework.TestCase; import junit.framework.TestSuite; +import org.checkerframework.checker.nullness.qual.Nullable; /** * Unit test for {@link AbstractMultiset}. @@ -106,7 +106,7 @@ public void clear() { } @Override - public int count(@CheckForNull Object element) { + public int count(@Nullable Object element) { for (Entry entry : entrySet()) { if (Objects.equal(entry.getElement(), element)) { return entry.getCount(); @@ -116,7 +116,7 @@ public int count(@CheckForNull Object element) { } @Override - public int add(@CheckForNull E element, int occurrences) { + public int add(@Nullable E element, int occurrences) { checkArgument(occurrences >= 0); Integer frequency = backingMap.get(element); if (frequency == null) { diff --git a/android/guava-tests/test/com/google/common/collect/SynchronizedBiMapTest.java b/android/guava-tests/test/com/google/common/collect/SynchronizedBiMapTest.java index 1e422b2b483e..c5637038dafb 100644 --- a/android/guava-tests/test/com/google/common/collect/SynchronizedBiMapTest.java +++ b/android/guava-tests/test/com/google/common/collect/SynchronizedBiMapTest.java @@ -29,6 +29,7 @@ import java.util.Map.Entry; import java.util.Set; import junit.framework.TestSuite; +import org.checkerframework.checker.nullness.qual.Nullable; /** * Tests for {@code Synchronized#biMap}. @@ -111,7 +112,7 @@ public TestBiMap(BiMap delegate, Object mutex) { } @Override - public V forcePut(K key, V value) { + public @Nullable V forcePut(K key, V value) { assertTrue(Thread.holdsLock(mutex)); return delegate.forcePut(key, value); } diff --git a/android/guava-tests/test/com/google/common/collect/SynchronizedDequeTest.java b/android/guava-tests/test/com/google/common/collect/SynchronizedDequeTest.java index 1df6aa1bffd1..09f9c429b06b 100644 --- a/android/guava-tests/test/com/google/common/collect/SynchronizedDequeTest.java +++ b/android/guava-tests/test/com/google/common/collect/SynchronizedDequeTest.java @@ -21,6 +21,7 @@ import java.util.Deque; import java.util.Iterator; import junit.framework.TestCase; +import org.checkerframework.checker.nullness.qual.Nullable; /** * Tests for {@link Synchronized#deque} and {@link Queues#synchronizedDeque}. @@ -47,7 +48,7 @@ public boolean offer(E o) { } @Override - public E poll() { + public @Nullable E poll() { assertTrue(Thread.holdsLock(mutex)); return delegate.poll(); } @@ -65,7 +66,7 @@ public boolean remove(Object object) { } @Override - public E peek() { + public @Nullable E peek() { assertTrue(Thread.holdsLock(mutex)); return delegate.peek(); } @@ -186,13 +187,13 @@ public E removeLast() { } @Override - public E pollFirst() { + public @Nullable E pollFirst() { assertTrue(Thread.holdsLock(mutex)); return delegate.pollFirst(); } @Override - public E pollLast() { + public @Nullable E pollLast() { assertTrue(Thread.holdsLock(mutex)); return delegate.pollLast(); } @@ -210,13 +211,13 @@ public E getLast() { } @Override - public E peekFirst() { + public @Nullable E peekFirst() { assertTrue(Thread.holdsLock(mutex)); return delegate.peekFirst(); } @Override - public E peekLast() { + public @Nullable E peekLast() { assertTrue(Thread.holdsLock(mutex)); return delegate.peekLast(); } diff --git a/android/guava-tests/test/com/google/common/collect/SynchronizedMapTest.java b/android/guava-tests/test/com/google/common/collect/SynchronizedMapTest.java index 2e15eda327a5..1aeae36cc6cf 100644 --- a/android/guava-tests/test/com/google/common/collect/SynchronizedMapTest.java +++ b/android/guava-tests/test/com/google/common/collect/SynchronizedMapTest.java @@ -28,6 +28,7 @@ import java.util.Map.Entry; import java.util.Set; import junit.framework.TestCase; +import org.checkerframework.checker.nullness.qual.Nullable; /** * Tests for {@code Synchronized#map}. @@ -71,7 +72,7 @@ public boolean isEmpty() { } @Override - public V remove(Object object) { + public @Nullable V remove(Object object) { assertTrue(Thread.holdsLock(mutex)); return super.remove(object); } @@ -95,13 +96,13 @@ public boolean containsValue(Object value) { } @Override - public V get(Object key) { + public @Nullable V get(Object key) { assertTrue(Thread.holdsLock(mutex)); return super.get(key); } @Override - public V put(K key, V value) { + public @Nullable V put(K key, V value) { assertTrue(Thread.holdsLock(mutex)); return super.put(key, value); } @@ -131,7 +132,7 @@ public Set> entrySet() { } @Override - public boolean equals(Object obj) { + public boolean equals(@Nullable Object obj) { assertTrue(Thread.holdsLock(mutex)); return super.equals(obj); } diff --git a/android/guava-tests/test/com/google/common/collect/SynchronizedMultimapTest.java b/android/guava-tests/test/com/google/common/collect/SynchronizedMultimapTest.java index 3c4f1375a0ab..6475dad8f983 100644 --- a/android/guava-tests/test/com/google/common/collect/SynchronizedMultimapTest.java +++ b/android/guava-tests/test/com/google/common/collect/SynchronizedMultimapTest.java @@ -30,10 +30,10 @@ import java.util.Map.Entry; import java.util.RandomAccess; import java.util.Set; -import javax.annotation.CheckForNull; import junit.framework.Test; import junit.framework.TestCase; import junit.framework.TestSuite; +import org.checkerframework.checker.nullness.qual.Nullable; /** * Tests for {@code Synchronized#multimap}. @@ -89,7 +89,7 @@ public String toString() { } @Override - public boolean equals(@CheckForNull Object o) { + public boolean equals(@Nullable Object o) { assertTrue(Thread.holdsLock(mutex)); return super.equals(o); } @@ -113,25 +113,25 @@ public boolean isEmpty() { } @Override - public boolean containsKey(@CheckForNull Object key) { + public boolean containsKey(@Nullable Object key) { assertTrue(Thread.holdsLock(mutex)); return super.containsKey(key); } @Override - public boolean containsValue(@CheckForNull Object value) { + public boolean containsValue(@Nullable Object value) { assertTrue(Thread.holdsLock(mutex)); return super.containsValue(value); } @Override - public boolean containsEntry(@CheckForNull Object key, @CheckForNull Object value) { + public boolean containsEntry(@Nullable Object key, @Nullable Object value) { assertTrue(Thread.holdsLock(mutex)); return super.containsEntry(key, value); } @Override - public Set get(@CheckForNull K key) { + public Set get(@Nullable K key) { assertTrue(Thread.holdsLock(mutex)); /* TODO: verify that the Collection is also synchronized? */ return super.get(key); @@ -144,7 +144,7 @@ public boolean put(K key, V value) { } @Override - public boolean putAll(@CheckForNull K key, Iterable values) { + public boolean putAll(@Nullable K key, Iterable values) { assertTrue(Thread.holdsLock(mutex)); return super.putAll(key, values); } @@ -156,19 +156,19 @@ public boolean putAll(Multimap map) { } @Override - public Set replaceValues(@CheckForNull K key, Iterable values) { + public Set replaceValues(@Nullable K key, Iterable values) { assertTrue(Thread.holdsLock(mutex)); return super.replaceValues(key, values); } @Override - public boolean remove(@CheckForNull Object key, @CheckForNull Object value) { + public boolean remove(@Nullable Object key, @Nullable Object value) { assertTrue(Thread.holdsLock(mutex)); return super.remove(key, value); } @Override - public Set removeAll(@CheckForNull Object key) { + public Set removeAll(@Nullable Object key) { assertTrue(Thread.holdsLock(mutex)); return super.removeAll(key); } diff --git a/android/guava-tests/test/com/google/common/collect/SynchronizedNavigableMapTest.java b/android/guava-tests/test/com/google/common/collect/SynchronizedNavigableMapTest.java index 41b597aac10f..ad9fd230dab1 100644 --- a/android/guava-tests/test/com/google/common/collect/SynchronizedNavigableMapTest.java +++ b/android/guava-tests/test/com/google/common/collect/SynchronizedNavigableMapTest.java @@ -33,6 +33,7 @@ import java.util.NavigableSet; import java.util.SortedMap; import junit.framework.TestSuite; +import org.checkerframework.checker.nullness.qual.Nullable; /** * Tests for {@link Maps#synchronizedNavigableMap(NavigableMap)}. @@ -65,7 +66,7 @@ protected Entry delegate() { } @Override - public boolean equals(Object object) { + public boolean equals(@Nullable Object object) { assertTrue(Thread.holdsLock(mutex)); return super.equals(object); } @@ -110,13 +111,13 @@ protected NavigableMap delegate() { } @Override - public Entry ceilingEntry(K key) { + public @Nullable Entry ceilingEntry(K key) { assertTrue(Thread.holdsLock(mutex)); return delegate().ceilingEntry(key); } @Override - public K ceilingKey(K key) { + public @Nullable K ceilingKey(K key) { assertTrue(Thread.holdsLock(mutex)); return delegate().ceilingKey(key); } @@ -134,19 +135,19 @@ public NavigableMap descendingMap() { } @Override - public Entry firstEntry() { + public @Nullable Entry firstEntry() { assertTrue(Thread.holdsLock(mutex)); return delegate().firstEntry(); } @Override - public Entry floorEntry(K key) { + public @Nullable Entry floorEntry(K key) { assertTrue(Thread.holdsLock(mutex)); return delegate().floorEntry(key); } @Override - public K floorKey(K key) { + public @Nullable K floorKey(K key) { assertTrue(Thread.holdsLock(mutex)); return delegate().floorKey(key); } @@ -163,31 +164,31 @@ public SortedMap headMap(K toKey) { } @Override - public Entry higherEntry(K key) { + public @Nullable Entry higherEntry(K key) { assertTrue(Thread.holdsLock(mutex)); return delegate().higherEntry(key); } @Override - public K higherKey(K key) { + public @Nullable K higherKey(K key) { assertTrue(Thread.holdsLock(mutex)); return delegate().higherKey(key); } @Override - public Entry lastEntry() { + public @Nullable Entry lastEntry() { assertTrue(Thread.holdsLock(mutex)); return delegate().lastEntry(); } @Override - public Entry lowerEntry(K key) { + public @Nullable Entry lowerEntry(K key) { assertTrue(Thread.holdsLock(mutex)); return delegate().lowerEntry(key); } @Override - public K lowerKey(K key) { + public @Nullable K lowerKey(K key) { assertTrue(Thread.holdsLock(mutex)); return delegate().lowerKey(key); } @@ -199,13 +200,13 @@ public NavigableSet navigableKeySet() { } @Override - public Entry pollFirstEntry() { + public @Nullable Entry pollFirstEntry() { assertTrue(Thread.holdsLock(mutex)); return delegate().pollFirstEntry(); } @Override - public Entry pollLastEntry() { + public @Nullable Entry pollLastEntry() { assertTrue(Thread.holdsLock(mutex)); return delegate().pollLastEntry(); } diff --git a/android/guava-tests/test/com/google/common/collect/SynchronizedNavigableSetTest.java b/android/guava-tests/test/com/google/common/collect/SynchronizedNavigableSetTest.java index 8638b0d1769d..572bea44e33f 100644 --- a/android/guava-tests/test/com/google/common/collect/SynchronizedNavigableSetTest.java +++ b/android/guava-tests/test/com/google/common/collect/SynchronizedNavigableSetTest.java @@ -32,6 +32,7 @@ import java.util.TreeSet; import junit.framework.TestCase; import junit.framework.TestSuite; +import org.checkerframework.checker.nullness.qual.Nullable; /** * Tests for {@link Sets#synchronizedNavigableSet(NavigableSet)}. @@ -51,7 +52,7 @@ protected NavigableSet create() { static class TestSet extends SynchronizedSetTest.TestSet implements NavigableSet { - TestSet(NavigableSet delegate, Object mutex) { + TestSet(NavigableSet delegate, @Nullable Object mutex) { super(delegate, mutex); } @@ -61,7 +62,7 @@ protected NavigableSet delegate() { } @Override - public E ceiling(E e) { + public @Nullable E ceiling(E e) { assertTrue(Thread.holdsLock(mutex)); return delegate().ceiling(e); } @@ -78,7 +79,7 @@ public NavigableSet descendingSet() { } @Override - public E floor(E e) { + public @Nullable E floor(E e) { assertTrue(Thread.holdsLock(mutex)); return delegate().floor(e); } @@ -95,24 +96,24 @@ public SortedSet headSet(E toElement) { } @Override - public E higher(E e) { + public @Nullable E higher(E e) { assertTrue(Thread.holdsLock(mutex)); return delegate().higher(e); } @Override - public E lower(E e) { + public @Nullable E lower(E e) { return delegate().lower(e); } @Override - public E pollFirst() { + public @Nullable E pollFirst() { assertTrue(Thread.holdsLock(mutex)); return delegate().pollFirst(); } @Override - public E pollLast() { + public @Nullable E pollLast() { assertTrue(Thread.holdsLock(mutex)); return delegate().pollLast(); } diff --git a/android/guava-tests/test/com/google/common/collect/SynchronizedQueueTest.java b/android/guava-tests/test/com/google/common/collect/SynchronizedQueueTest.java index f7b04fe2e864..b677c281b94d 100644 --- a/android/guava-tests/test/com/google/common/collect/SynchronizedQueueTest.java +++ b/android/guava-tests/test/com/google/common/collect/SynchronizedQueueTest.java @@ -21,6 +21,7 @@ import java.util.Iterator; import java.util.Queue; import junit.framework.TestCase; +import org.checkerframework.checker.nullness.qual.Nullable; /** * Tests for {@link Synchronized#queue} and {@link Queues#synchronizedQueue}. @@ -47,7 +48,7 @@ public boolean offer(E o) { } @Override - public E poll() { + public @Nullable E poll() { assertTrue(Thread.holdsLock(mutex)); return delegate.poll(); } @@ -65,7 +66,7 @@ public boolean remove(Object object) { } @Override - public E peek() { + public @Nullable E peek() { assertTrue(Thread.holdsLock(mutex)); return delegate.peek(); } diff --git a/android/guava-tests/test/com/google/common/collect/SynchronizedSetTest.java b/android/guava-tests/test/com/google/common/collect/SynchronizedSetTest.java index 5ffcf5d54bf7..0e85a24bb295 100644 --- a/android/guava-tests/test/com/google/common/collect/SynchronizedSetTest.java +++ b/android/guava-tests/test/com/google/common/collect/SynchronizedSetTest.java @@ -27,9 +27,9 @@ import java.util.Collections; import java.util.HashSet; import java.util.Set; -import javax.annotation.CheckForNull; import junit.framework.Test; import junit.framework.TestCase; +import org.checkerframework.checker.nullness.qual.Nullable; /** * Tests for {@code Synchronized#set}. @@ -40,6 +40,9 @@ public class SynchronizedSetTest extends TestCase { public static final Object MUTEX = new Integer(1); // something Serializable + // TODO(cpovirk): Resolve difference between branches in their choice of mutex: + // - The mainline uses `null` (even since the change in cl/99720576 was integrated). + // - The backport continued to use MUTEX. public static Test suite() { return SetTestSuiteBuilder.using( new TestStringSetGenerator() { @@ -82,7 +85,7 @@ public String toString() { } @Override - public boolean equals(@CheckForNull Object o) { + public boolean equals(@Nullable Object o) { assertTrue(Thread.holdsLock(mutex)); return super.equals(o); } @@ -94,7 +97,7 @@ public int hashCode() { } @Override - public boolean add(@CheckForNull E o) { + public boolean add(@Nullable E o) { assertTrue(Thread.holdsLock(mutex)); return super.add(o); } @@ -112,7 +115,7 @@ public void clear() { } @Override - public boolean contains(@CheckForNull Object o) { + public boolean contains(@Nullable Object o) { assertTrue(Thread.holdsLock(mutex)); return super.contains(o); } @@ -132,7 +135,7 @@ public boolean isEmpty() { /* Don't test iterator(); it may or may not hold the mutex. */ @Override - public boolean remove(@CheckForNull Object o) { + public boolean remove(@Nullable Object o) { assertTrue(Thread.holdsLock(mutex)); return super.remove(o); } diff --git a/android/guava-tests/test/com/google/common/collect/SynchronizedTableTest.java b/android/guava-tests/test/com/google/common/collect/SynchronizedTableTest.java index e1b45443660c..216f32b2e6cf 100644 --- a/android/guava-tests/test/com/google/common/collect/SynchronizedTableTest.java +++ b/android/guava-tests/test/com/google/common/collect/SynchronizedTableTest.java @@ -20,7 +20,7 @@ import java.util.Collection; import java.util.Map; import java.util.Set; -import javax.annotation.CheckForNull; +import org.checkerframework.checker.nullness.qual.Nullable; public class SynchronizedTableTest extends AbstractTableTest { private static final class TestTable implements Table, Serializable { @@ -34,7 +34,7 @@ public String toString() { } @Override - public boolean equals(@CheckForNull Object o) { + public boolean equals(@Nullable Object o) { assertTrue(Thread.holdsLock(mutex)); return delegate.equals(o); } @@ -58,7 +58,7 @@ public boolean isEmpty() { } @Override - public boolean containsValue(@CheckForNull Object value) { + public boolean containsValue(@Nullable Object value) { assertTrue(Thread.holdsLock(mutex)); return delegate.containsValue(value); } @@ -119,13 +119,13 @@ public boolean containsRow(Object rowKey) { } @Override - public V get(Object rowKey, Object columnKey) { + public @Nullable V get(Object rowKey, Object columnKey) { assertTrue(Thread.holdsLock(mutex)); return delegate.get(rowKey, columnKey); } @Override - public V put(R rowKey, C columnKey, V value) { + public @Nullable V put(R rowKey, C columnKey, V value) { assertTrue(Thread.holdsLock(mutex)); return delegate.put(rowKey, columnKey, value); } @@ -137,7 +137,7 @@ public void putAll(Table table) { } @Override - public V remove(Object rowKey, Object columnKey) { + public @Nullable V remove(Object rowKey, Object columnKey) { assertTrue(Thread.holdsLock(mutex)); return delegate.remove(rowKey, columnKey); } diff --git a/android/guava-tests/test/com/google/common/collect/TableCollectionTest.java b/android/guava-tests/test/com/google/common/collect/TableCollectionTest.java index 6a4938278882..18ad54939f4f 100644 --- a/android/guava-tests/test/com/google/common/collect/TableCollectionTest.java +++ b/android/guava-tests/test/com/google/common/collect/TableCollectionTest.java @@ -44,6 +44,7 @@ import junit.framework.Test; import junit.framework.TestCase; import junit.framework.TestSuite; +import org.checkerframework.checker.nullness.qual.Nullable; /** * Collection tests for {@link Table} implementations. @@ -767,10 +768,10 @@ protected Map makePopulatedMap() { } } - static final Function DIVIDE_BY_2 = - new Function() { + static final Function<@Nullable Integer, @Nullable Integer> DIVIDE_BY_2 = + new Function<@Nullable Integer, @Nullable Integer>() { @Override - public Integer apply(Integer input) { + public @Nullable Integer apply(@Nullable Integer input) { return (input == null) ? null : input / 2; } }; @@ -889,10 +890,10 @@ protected Map> makeEmptyMap() { } } - static final Function FIRST_CHARACTER = - new Function() { + static final Function<@Nullable String, @Nullable Character> FIRST_CHARACTER = + new Function<@Nullable String, @Nullable Character>() { @Override - public Character apply(String input) { + public @Nullable Character apply(@Nullable String input) { return input == null ? null : input.charAt(0); } }; diff --git a/android/guava-tests/test/com/google/common/collect/TablesTransformValuesTest.java b/android/guava-tests/test/com/google/common/collect/TablesTransformValuesTest.java index 6730b3f519d4..d6330a246150 100644 --- a/android/guava-tests/test/com/google/common/collect/TablesTransformValuesTest.java +++ b/android/guava-tests/test/com/google/common/collect/TablesTransformValuesTest.java @@ -21,6 +21,7 @@ import com.google.common.annotations.GwtCompatible; import com.google.common.annotations.GwtIncompatible; import com.google.common.base.Function; +import org.checkerframework.checker.nullness.qual.Nullable; /** * Test cases for {@link Tables#transformValues}. @@ -30,10 +31,10 @@ @GwtCompatible(emulated = true) public class TablesTransformValuesTest extends AbstractTableTest { - private static final Function FIRST_CHARACTER = - new Function() { + private static final Function<@Nullable String, @Nullable Character> FIRST_CHARACTER = + new Function<@Nullable String, @Nullable Character>() { @Override - public Character apply(String input) { + public @Nullable Character apply(@Nullable String input) { return input == null ? null : input.charAt(0); } }; diff --git a/android/guava-tests/test/com/google/common/collect/TreeMultimapExplicitTest.java b/android/guava-tests/test/com/google/common/collect/TreeMultimapExplicitTest.java index 92a3d83a7d8c..4b00570a6126 100644 --- a/android/guava-tests/test/com/google/common/collect/TreeMultimapExplicitTest.java +++ b/android/guava-tests/test/com/google/common/collect/TreeMultimapExplicitTest.java @@ -28,6 +28,7 @@ import java.util.Map.Entry; import java.util.SortedSet; import junit.framework.TestCase; +import org.checkerframework.checker.nullness.qual.Nullable; /** * Unit tests for {@code TreeMultimap} with explicit comparators. @@ -41,11 +42,11 @@ public class TreeMultimapExplicitTest extends TestCase { * Compare strings lengths, and if the lengths are equal compare the strings. A {@code null} is * less than any non-null value. */ - private enum StringLength implements Comparator { + private enum StringLength implements Comparator<@Nullable String> { COMPARATOR; @Override - public int compare(String first, String second) { + public int compare(@Nullable String first, @Nullable String second) { if (first == second) { return 0; } else if (first == null) { diff --git a/android/guava-tests/test/com/google/common/escape/UnicodeEscaperTest.java b/android/guava-tests/test/com/google/common/escape/UnicodeEscaperTest.java index 96cfa10b0333..48f2f17152f1 100644 --- a/android/guava-tests/test/com/google/common/escape/UnicodeEscaperTest.java +++ b/android/guava-tests/test/com/google/common/escape/UnicodeEscaperTest.java @@ -18,6 +18,7 @@ import com.google.common.annotations.GwtCompatible; import junit.framework.TestCase; +import org.checkerframework.checker.nullness.qual.Nullable; /** * Tests for {@link UnicodeEscaper}. @@ -39,7 +40,7 @@ public class UnicodeEscaperTest extends TestCase { private static final UnicodeEscaper NOP_ESCAPER = new UnicodeEscaper() { @Override - protected char[] escape(int c) { + protected char @Nullable [] escape(int c) { return null; } }; @@ -48,7 +49,7 @@ protected char[] escape(int c) { private static final UnicodeEscaper SIMPLE_ESCAPER = new UnicodeEscaper() { @Override - protected char[] escape(int cp) { + protected char @Nullable [] escape(int cp) { return ('a' <= cp && cp <= 'z') || ('A' <= cp && cp <= 'Z') || ('0' <= cp && cp <= '9') ? null : ("[" + String.valueOf(cp) + "]").toCharArray(); @@ -163,7 +164,7 @@ public void testFalsePositivesForNextEscapedIndex() { new UnicodeEscaper() { // Canonical escaper method that only escapes lower case ASCII letters. @Override - protected char[] escape(int cp) { + protected char @Nullable [] escape(int cp) { return ('a' <= cp && cp <= 'z') ? new char[] {Character.toUpperCase((char) cp)} : null; } // Inefficient implementation that defines all letters as escapable. diff --git a/android/guava-tests/test/com/google/common/eventbus/PackageSanityTests.java b/android/guava-tests/test/com/google/common/eventbus/PackageSanityTests.java index 225e55500df3..539e1360788d 100644 --- a/android/guava-tests/test/com/google/common/eventbus/PackageSanityTests.java +++ b/android/guava-tests/test/com/google/common/eventbus/PackageSanityTests.java @@ -18,7 +18,7 @@ import com.google.common.testing.AbstractPackageSanityTests; import java.lang.reflect.Method; -import javax.annotation.CheckForNull; +import org.checkerframework.checker.nullness.qual.Nullable; /** * Basic sanity tests for the entire package. @@ -41,7 +41,7 @@ private static class DummySubscriber { private final EventBus eventBus = new EventBus(); @Subscribe - public void handle(@CheckForNull Object anything) {} + public void handle(@Nullable Object anything) {} Subscriber toSubscriber() throws Exception { return Subscriber.create(eventBus, this, subscriberMethod()); diff --git a/android/guava-tests/test/com/google/common/eventbus/StringCatcher.java b/android/guava-tests/test/com/google/common/eventbus/StringCatcher.java index 198fa2eda8ca..0fb9cecf1b57 100644 --- a/android/guava-tests/test/com/google/common/eventbus/StringCatcher.java +++ b/android/guava-tests/test/com/google/common/eventbus/StringCatcher.java @@ -18,8 +18,8 @@ import com.google.common.collect.Lists; import java.util.List; -import javax.annotation.CheckForNull; import junit.framework.Assert; +import org.checkerframework.checker.nullness.qual.Nullable; /** * A simple EventSubscriber mock that records Strings. @@ -33,11 +33,11 @@ public class StringCatcher { private List events = Lists.newArrayList(); @Subscribe - public void hereHaveAString(@CheckForNull String string) { + public void hereHaveAString(@Nullable String string) { events.add(string); } - public void methodWithoutAnnotation(@CheckForNull String string) { + public void methodWithoutAnnotation(@Nullable String string) { Assert.fail("Event bus must not call methods without @Subscribe!"); } diff --git a/android/guava-tests/test/com/google/common/eventbus/SubscriberTest.java b/android/guava-tests/test/com/google/common/eventbus/SubscriberTest.java index e2380df21349..14210ac14f3b 100644 --- a/android/guava-tests/test/com/google/common/eventbus/SubscriberTest.java +++ b/android/guava-tests/test/com/google/common/eventbus/SubscriberTest.java @@ -22,6 +22,7 @@ import java.lang.reflect.InvocationTargetException; import java.lang.reflect.Method; import junit.framework.TestCase; +import org.checkerframework.checker.nullness.qual.Nullable; /** * Tests for {@link Subscriber}. @@ -35,7 +36,7 @@ public class SubscriberTest extends TestCase { private EventBus bus; private boolean methodCalled; - private Object methodArgument; + private @Nullable Object methodArgument; @Override protected void setUp() throws Exception { diff --git a/android/guava-tests/test/com/google/common/eventbus/outside/AbstractEventBusTest.java b/android/guava-tests/test/com/google/common/eventbus/outside/AbstractEventBusTest.java index f4af7a7516de..54d6c93f588b 100644 --- a/android/guava-tests/test/com/google/common/eventbus/outside/AbstractEventBusTest.java +++ b/android/guava-tests/test/com/google/common/eventbus/outside/AbstractEventBusTest.java @@ -18,6 +18,7 @@ import com.google.common.eventbus.EventBus; import junit.framework.TestCase; +import org.checkerframework.checker.nullness.qual.Nullable; /** * Abstract base class for tests that EventBus finds the correct subscribers. @@ -34,7 +35,7 @@ abstract class AbstractEventBusTest extends TestCase { abstract H createSubscriber(); - private H subscriber; + private @Nullable H subscriber; H getSubscriber() { return subscriber; diff --git a/android/guava-tests/test/com/google/common/graph/AbstractNetworkTest.java b/android/guava-tests/test/com/google/common/graph/AbstractNetworkTest.java index e386252bd986..a02783f61fda 100644 --- a/android/guava-tests/test/com/google/common/graph/AbstractNetworkTest.java +++ b/android/guava-tests/test/com/google/common/graph/AbstractNetworkTest.java @@ -36,6 +36,7 @@ import java.util.concurrent.CyclicBarrier; import java.util.concurrent.ExecutorService; import java.util.concurrent.Future; +import org.checkerframework.checker.nullness.qual.Nullable; import org.junit.After; import org.junit.Before; import org.junit.Test; @@ -798,9 +799,9 @@ public void concurrentIteration() throws Exception { for (int i = 0; i < threadCount; i++) { futures.add( executor.submit( - new Callable() { + new Callable<@Nullable Void>() { @Override - public Object call() throws Exception { + public @Nullable Void call() throws Exception { barrier.await(); Integer first = network.nodes().iterator().next(); for (Integer node : network.nodes()) { diff --git a/android/guava-tests/test/com/google/common/graph/ValueGraphTest.java b/android/guava-tests/test/com/google/common/graph/ValueGraphTest.java index 71b6439aa092..24323ca00f60 100644 --- a/android/guava-tests/test/com/google/common/graph/ValueGraphTest.java +++ b/android/guava-tests/test/com/google/common/graph/ValueGraphTest.java @@ -28,6 +28,7 @@ import java.util.concurrent.CyclicBarrier; import java.util.concurrent.ExecutorService; import java.util.concurrent.Future; +import org.checkerframework.checker.nullness.qual.Nullable; import org.junit.After; import org.junit.Test; import org.junit.runner.RunWith; @@ -422,9 +423,9 @@ public void concurrentIteration() throws Exception { for (int i = 0; i < threadCount; i++) { futures.add( executor.submit( - new Callable() { + new Callable<@Nullable Void>() { @Override - public Object call() throws Exception { + public @Nullable Void call() throws Exception { barrier.await(); Integer first = graph.nodes().iterator().next(); for (Integer node : graph.nodes()) { diff --git a/android/guava-tests/test/com/google/common/hash/BloomFilterTest.java b/android/guava-tests/test/com/google/common/hash/BloomFilterTest.java index d99be0902708..8ee920ca9ba8 100644 --- a/android/guava-tests/test/com/google/common/hash/BloomFilterTest.java +++ b/android/guava-tests/test/com/google/common/hash/BloomFilterTest.java @@ -36,8 +36,8 @@ import java.util.List; import java.util.Random; import java.util.concurrent.TimeUnit; -import javax.annotation.CheckForNull; import junit.framework.TestCase; +import org.checkerframework.checker.nullness.qual.Nullable; /** * Tests for SimpleGenericBloomFilter and derived BloomFilter views. @@ -408,7 +408,7 @@ public void funnel(Long value, PrimitiveSink into) { } @Override - public boolean equals(@CheckForNull Object object) { + public boolean equals(@Nullable Object object) { return (object instanceof CustomFunnel); } diff --git a/android/guava-tests/test/com/google/common/hash/HashCodeTest.java b/android/guava-tests/test/com/google/common/hash/HashCodeTest.java index 4cccefe7e36d..231fd402bb41 100644 --- a/android/guava-tests/test/com/google/common/hash/HashCodeTest.java +++ b/android/guava-tests/test/com/google/common/hash/HashCodeTest.java @@ -24,6 +24,7 @@ import com.google.common.testing.ClassSanityTester; import java.util.Arrays; import junit.framework.TestCase; +import org.checkerframework.checker.nullness.qual.Nullable; /** * Unit tests for {@link HashCode}. @@ -391,7 +392,7 @@ private static class ExpectedHashCode { final Long asLong; // null means that asLong should throw an exception final String toString; - ExpectedHashCode(byte[] bytes, int asInt, Long asLong, String toString) { + ExpectedHashCode(byte[] bytes, int asInt, @Nullable Long asLong, String toString) { this.bytes = bytes; this.asInt = asInt; this.asLong = asLong; diff --git a/android/guava-tests/test/com/google/common/hash/MacHashFunctionTest.java b/android/guava-tests/test/com/google/common/hash/MacHashFunctionTest.java index 4dbb4241e0b6..7783b5fc3095 100644 --- a/android/guava-tests/test/com/google/common/hash/MacHashFunctionTest.java +++ b/android/guava-tests/test/com/google/common/hash/MacHashFunctionTest.java @@ -29,6 +29,7 @@ import javax.crypto.SecretKey; import javax.crypto.spec.SecretKeySpec; import junit.framework.TestCase; +import org.checkerframework.checker.nullness.qual.Nullable; import sun.security.jca.ProviderList; import sun.security.jca.Providers; @@ -155,7 +156,7 @@ public String getAlgorithm() { } @Override - public byte[] getEncoded() { + public byte @Nullable [] getEncoded() { return null; } diff --git a/android/guava-tests/test/com/google/common/io/BaseEncodingTest.java b/android/guava-tests/test/com/google/common/io/BaseEncodingTest.java index 15e155aa5ca1..e67f70c5a3a0 100644 --- a/android/guava-tests/test/com/google/common/io/BaseEncodingTest.java +++ b/android/guava-tests/test/com/google/common/io/BaseEncodingTest.java @@ -35,8 +35,8 @@ import java.io.Reader; import java.io.StringReader; import java.io.StringWriter; -import javax.annotation.CheckForNull; import junit.framework.TestCase; +import org.checkerframework.checker.nullness.qual.Nullable; /** * Tests for {@code BaseEncoding}. @@ -462,7 +462,7 @@ private static void assertFailsToDecode(BaseEncoding encoding, String cannotDeco } private static void assertFailsToDecode( - BaseEncoding encoding, String cannotDecode, @CheckForNull String expectedMessage) { + BaseEncoding encoding, String cannotDecode, @Nullable String expectedMessage) { // We use this somewhat weird pattern with an enum for each assertion we want to make as a way // of dealing with the fact that one of the assertions is @GwtIncompatible but we don't want to // have to have duplicate @GwtIncompatible test methods just to make that assertion. @@ -476,7 +476,7 @@ enum AssertFailsToDecodeStrategy { DECODING_STREAM { @Override void assertFailsToDecode( - BaseEncoding encoding, String cannotDecode, @CheckForNull String expectedMessage) { + BaseEncoding encoding, String cannotDecode, @Nullable String expectedMessage) { // Regression test for case where DecodingException was swallowed by default implementation // of // InputStream.read(byte[], int, int) @@ -497,14 +497,14 @@ void assertFailsToDecode( CAN_DECODE { @Override void assertFailsToDecode( - BaseEncoding encoding, String cannotDecode, @CheckForNull String expectedMessage) { + BaseEncoding encoding, String cannotDecode, @Nullable String expectedMessage) { assertThat(encoding.canDecode(cannotDecode)).isFalse(); } }, DECODE { @Override void assertFailsToDecode( - BaseEncoding encoding, String cannotDecode, @CheckForNull String expectedMessage) { + BaseEncoding encoding, String cannotDecode, @Nullable String expectedMessage) { try { encoding.decode(cannotDecode); fail("Expected IllegalArgumentException"); @@ -518,7 +518,7 @@ void assertFailsToDecode( DECODE_CHECKED { @Override void assertFailsToDecode( - BaseEncoding encoding, String cannotDecode, @CheckForNull String expectedMessage) { + BaseEncoding encoding, String cannotDecode, @Nullable String expectedMessage) { try { encoding.decodeChecked(cannotDecode); fail("Expected DecodingException"); @@ -531,7 +531,7 @@ void assertFailsToDecode( }; abstract void assertFailsToDecode( - BaseEncoding encoding, String cannotDecode, @CheckForNull String expectedMessage); + BaseEncoding encoding, String cannotDecode, @Nullable String expectedMessage); } @GwtIncompatible // Reader/Writer diff --git a/android/guava-tests/test/com/google/common/io/ByteSourceTest.java b/android/guava-tests/test/com/google/common/io/ByteSourceTest.java index edf450158b39..58ad653c2fd0 100644 --- a/android/guava-tests/test/com/google/common/io/ByteSourceTest.java +++ b/android/guava-tests/test/com/google/common/io/ByteSourceTest.java @@ -40,6 +40,7 @@ import java.util.Arrays; import java.util.EnumSet; import junit.framework.TestSuite; +import org.checkerframework.checker.nullness.qual.Nullable; /** * Tests for the default implementations of {@code ByteSource} methods. @@ -151,8 +152,8 @@ public byte[] getResult() { } public void testRead_withProcessor_stopsOnFalse() throws IOException { - ByteProcessor processor = - new ByteProcessor() { + ByteProcessor<@Nullable Void> processor = + new ByteProcessor<@Nullable Void>() { boolean firstCall = true; @Override @@ -163,7 +164,7 @@ public boolean processBytes(byte[] buf, int off, int len) throws IOException { } @Override - public Void getResult() { + public @Nullable Void getResult() { return null; } }; diff --git a/android/guava-tests/test/com/google/common/io/ByteStreamsTest.java b/android/guava-tests/test/com/google/common/io/ByteStreamsTest.java index 6bc0bf0703d0..2598b9fedb2c 100644 --- a/android/guava-tests/test/com/google/common/io/ByteStreamsTest.java +++ b/android/guava-tests/test/com/google/common/io/ByteStreamsTest.java @@ -51,7 +51,6 @@ public void testCopyChannel() throws IOException { assertThat(out.toByteArray()).isEqualTo(expected); } - @AndroidIncompatible // Android forbids much filesystem access. Maybe we could make it work? public void testCopyFileChannel() throws IOException { final int chunkSize = 14407; // Random prime, unlikely to match any internal chunk size @@ -381,7 +380,7 @@ public void testNewDataOutput_writeChars() { assertThat(out.toByteArray()).isEqualTo(expected); } - @AndroidIncompatible // https://code.google.com/p/android/issues/detail?id=196848 + @AndroidIncompatible // https://issuetracker.google.com/issues/37074504 public void testUtf16Expected() { byte[] hardcodedExpected = utf16ExpectedWithBom; byte[] computedExpected = "r\u00C9sum\u00C9".getBytes(Charsets.UTF_16); diff --git a/android/guava-tests/test/com/google/common/io/CloserTest.java b/android/guava-tests/test/com/google/common/io/CloserTest.java index 38ff700c8c14..f30d771a8743 100644 --- a/android/guava-tests/test/com/google/common/io/CloserTest.java +++ b/android/guava-tests/test/com/google/common/io/CloserTest.java @@ -31,8 +31,8 @@ import java.lang.reflect.Method; import java.util.List; import java.util.logging.LogRecord; -import javax.annotation.CheckForNull; import junit.framework.TestCase; +import org.checkerframework.checker.nullness.qual.Nullable; /** * Tests for {@link Closer}. @@ -393,7 +393,7 @@ private Suppression(Closeable closeable, Throwable thrown, Throwable suppressed) } @Override - public boolean equals(Object obj) { + public boolean equals(@Nullable Object obj) { if (obj instanceof Suppression) { Suppression other = (Suppression) obj; return closeable.equals(other.closeable) @@ -435,7 +435,7 @@ static TestCloseable throwsOnCreate() throws IOException { throw new IOException(); } - private TestCloseable(@CheckForNull Throwable throwOnClose) { + private TestCloseable(@Nullable Throwable throwOnClose) { this.throwOnClose = throwOnClose; } diff --git a/android/guava-tests/test/com/google/common/io/FileBackedOutputStreamTest.java b/android/guava-tests/test/com/google/common/io/FileBackedOutputStreamTest.java index abd27db0ff32..0938905dfbaf 100644 --- a/android/guava-tests/test/com/google/common/io/FileBackedOutputStreamTest.java +++ b/android/guava-tests/test/com/google/common/io/FileBackedOutputStreamTest.java @@ -28,7 +28,6 @@ * * @author Chris Nokleberg */ -@AndroidIncompatible // Android forbids much filesystem access. Maybe we could make it work? public class FileBackedOutputStreamTest extends IoTestCase { @@ -80,6 +79,7 @@ private void testThreshold( } + @AndroidIncompatible // Finalization probably just doesn't happen fast enough? public void testFinalizeDeletesFile() throws Exception { byte[] data = newPreFilledByteArray(100); FileBackedOutputStream out = new FileBackedOutputStream(0, true); diff --git a/android/guava-tests/test/com/google/common/io/FilesCreateTempDirTest.java b/android/guava-tests/test/com/google/common/io/FilesCreateTempDirTest.java new file mode 100644 index 000000000000..109342a8fab9 --- /dev/null +++ b/android/guava-tests/test/com/google/common/io/FilesCreateTempDirTest.java @@ -0,0 +1,38 @@ +/* + * Copyright (C) 2007 The Guava Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.common.io; + +import static com.google.common.truth.Truth.assertThat; + +import java.io.File; +import junit.framework.TestCase; + +/** + * Unit test for {@link Files#createTempDir}. + * + * @author Chris Nokleberg + */ + +public class FilesCreateTempDirTest extends TestCase { + public void testCreateTempDir() { + File temp = Files.createTempDir(); + assertTrue(temp.exists()); + assertTrue(temp.isDirectory()); + assertThat(temp.listFiles()).isEmpty(); + assertTrue(temp.delete()); + } +} diff --git a/android/guava-tests/test/com/google/common/io/FilesFileTraverserTest.java b/android/guava-tests/test/com/google/common/io/FilesFileTraverserTest.java index 104ced67996b..9409d216df62 100644 --- a/android/guava-tests/test/com/google/common/io/FilesFileTraverserTest.java +++ b/android/guava-tests/test/com/google/common/io/FilesFileTraverserTest.java @@ -22,11 +22,6 @@ import com.google.errorprone.annotations.CanIgnoreReturnValue; import java.io.File; import java.io.IOException; -import java.nio.file.FileVisitResult; -import java.nio.file.Path; -import java.nio.file.SimpleFileVisitor; -import java.nio.file.attribute.BasicFileAttributes; -import junit.framework.TestCase; /** * Tests for {@link Files#fileTraverser()}. @@ -34,38 +29,13 @@ * @author Jens Nyman */ -@AndroidIncompatible // Android forbids much filesystem access. Maybe we could make it work? -public class FilesFileTraverserTest extends TestCase { +public class FilesFileTraverserTest extends IoTestCase { private File rootDir; @Override public void setUp() throws IOException { - rootDir = Files.createTempDir(); - } - - @Override - public void tearDown() throws IOException { - // delete rootDir and its contents - java.nio.file.Files.walkFileTree( - rootDir.toPath(), - new SimpleFileVisitor() { - @Override - public FileVisitResult visitFile(Path file, BasicFileAttributes attrs) - throws IOException { - java.nio.file.Files.deleteIfExists(file); - return FileVisitResult.CONTINUE; - } - - @Override - public FileVisitResult postVisitDirectory(Path dir, IOException exc) throws IOException { - if (exc != null) { - return FileVisitResult.TERMINATE; - } - java.nio.file.Files.deleteIfExists(dir); - return FileVisitResult.CONTINUE; - } - }); + rootDir = createTempDir(); } public void testFileTraverser_emptyDirectory() throws Exception { diff --git a/android/guava-tests/test/com/google/common/io/FilesTest.java b/android/guava-tests/test/com/google/common/io/FilesTest.java index 68e2174926a1..6ffcf5c81fe6 100644 --- a/android/guava-tests/test/com/google/common/io/FilesTest.java +++ b/android/guava-tests/test/com/google/common/io/FilesTest.java @@ -42,14 +42,19 @@ /** * Unit test for {@link Files}. * - *

    Note: {@link Files#fileTraverser()} is tested in {@link FilesFileTraverserTest}. + *

    Some methods are tested in separate files: + * + *

      + *
    • {@link Files#fileTraverser()} is tested in {@link FilesFileTraverserTest}. + *
    • {@link Files#createTempDir()} is tested in {@link FilesCreateTempDirTest}. + *
    * * @author Chris Nokleberg */ -@AndroidIncompatible // Android forbids much filesystem access. Maybe we could make it work? public class FilesTest extends IoTestCase { + @AndroidIncompatible // suites, ByteSourceTester (b/230620681) public static TestSuite suite() { TestSuite suite = new TestSuite(); suite.addTest( @@ -358,14 +363,6 @@ public void testCreateParentDirs_nonDirectoryParentExists() throws IOException { } } - public void testCreateTempDir() { - File temp = Files.createTempDir(); - assertTrue(temp.exists()); - assertTrue(temp.isDirectory()); - assertThat(temp.listFiles()).isEmpty(); - assertTrue(temp.delete()); - } - public void testMove() throws IOException { File i18nFile = getTestFile("i18n.txt"); File temp1 = createTempFile(); diff --git a/android/guava-tests/test/com/google/common/io/IoTestCase.java b/android/guava-tests/test/com/google/common/io/IoTestCase.java index fa8961905931..c79ebcbd2fca 100644 --- a/android/guava-tests/test/com/google/common/io/IoTestCase.java +++ b/android/guava-tests/test/com/google/common/io/IoTestCase.java @@ -28,6 +28,7 @@ import java.util.logging.Level; import java.util.logging.Logger; import junit.framework.TestCase; +import org.checkerframework.checker.nullness.qual.Nullable; /** * Base test case class for I/O tests. @@ -92,7 +93,7 @@ private File getTestDir() throws IOException { } /** Returns the file with the given name under the testdata directory. */ - protected final File getTestFile(String name) throws IOException { + protected final @Nullable File getTestFile(String name) throws IOException { File file = new File(getTestDir(), name); if (!file.exists()) { URL resourceUrl = IoTestCase.class.getResource("testdata/" + name); diff --git a/android/guava-tests/test/com/google/common/io/ResourcesTest.java b/android/guava-tests/test/com/google/common/io/ResourcesTest.java index 37580ffab7be..0b51c9986f88 100644 --- a/android/guava-tests/test/com/google/common/io/ResourcesTest.java +++ b/android/guava-tests/test/com/google/common/io/ResourcesTest.java @@ -133,7 +133,6 @@ public void testGetResource_relativePath() { assertNotNull(Resources.getResource(getClass(), "testdata/i18n.txt")); } - @AndroidIncompatible // Android prevents most access to files public void testGetResource_contextClassLoader() throws IOException { // Check that we can find a resource if it is visible to the context class // loader, even if it is not visible to the loader of the Resources class. diff --git a/android/guava-tests/test/com/google/common/io/SourceSinkFactories.java b/android/guava-tests/test/com/google/common/io/SourceSinkFactories.java index e70370e1d69b..b6dab3563a65 100644 --- a/android/guava-tests/test/com/google/common/io/SourceSinkFactories.java +++ b/android/guava-tests/test/com/google/common/io/SourceSinkFactories.java @@ -37,7 +37,7 @@ import java.nio.CharBuffer; import java.util.Arrays; import java.util.logging.Logger; -import javax.annotation.CheckForNull; +import org.checkerframework.checker.nullness.qual.Nullable; /** * {@link SourceSinkFactory} implementations. @@ -305,7 +305,7 @@ private static class FileByteSinkFactory extends FileFactory implements ByteSink private final byte[] initialBytes; - private FileByteSinkFactory(@CheckForNull byte[] initialBytes) { + private FileByteSinkFactory(byte @Nullable [] initialBytes) { this.initialBytes = initialBytes; } @@ -375,7 +375,7 @@ private static class FileCharSinkFactory extends FileFactory implements CharSink private final String initialString; - private FileCharSinkFactory(@CheckForNull String initialString) { + private FileCharSinkFactory(@Nullable String initialString) { this.initialString = initialString; } diff --git a/android/guava-tests/test/com/google/common/math/BigIntegerMathTest.java b/android/guava-tests/test/com/google/common/math/BigIntegerMathTest.java index 170261bb547f..6f05cc7c918d 100644 --- a/android/guava-tests/test/com/google/common/math/BigIntegerMathTest.java +++ b/android/guava-tests/test/com/google/common/math/BigIntegerMathTest.java @@ -41,6 +41,7 @@ import com.google.common.annotations.GwtCompatible; import com.google.common.annotations.GwtIncompatible; import com.google.common.testing.NullPointerTester; +import com.google.errorprone.annotations.CanIgnoreReturnValue; import java.math.BigDecimal; import java.math.BigInteger; import java.math.RoundingMode; @@ -558,6 +559,7 @@ private static final class RoundToDoubleTester { this.input = input; } + @CanIgnoreReturnValue RoundToDoubleTester setExpectation(double expectedValue, RoundingMode... modes) { for (RoundingMode mode : modes) { Double previous = expectedValues.put(mode, expectedValue); @@ -568,6 +570,7 @@ RoundToDoubleTester setExpectation(double expectedValue, RoundingMode... modes) return this; } + @CanIgnoreReturnValue public RoundToDoubleTester roundUnnecessaryShouldThrow() { unnecessaryShouldThrow = true; return this; diff --git a/android/guava-tests/test/com/google/common/math/QuantilesTest.java b/android/guava-tests/test/com/google/common/math/QuantilesTest.java index fcf605cc04b1..9c8d8e65a6e1 100644 --- a/android/guava-tests/test/com/google/common/math/QuantilesTest.java +++ b/android/guava-tests/test/com/google/common/math/QuantilesTest.java @@ -41,8 +41,8 @@ import java.util.Collections; import java.util.List; import java.util.Random; -import javax.annotation.CheckForNull; import junit.framework.TestCase; +import org.checkerframework.checker.nullness.qual.Nullable; /** * Tests for {@link Quantiles}. @@ -92,7 +92,7 @@ public class QuantilesTest extends TestCase { Correspondence.from( new BinaryPredicate() { @Override - public boolean apply(@CheckForNull Double actual, @CheckForNull Double expected) { + public boolean apply(@Nullable Double actual, @Nullable Double expected) { // Test for equality to allow non-finite values to match; otherwise, use the finite // test. return actual.equals(expected) diff --git a/android/guava-tests/test/com/google/common/net/HostAndPortTest.java b/android/guava-tests/test/com/google/common/net/HostAndPortTest.java index 65e80962bafa..f10cd163fb32 100644 --- a/android/guava-tests/test/com/google/common/net/HostAndPortTest.java +++ b/android/guava-tests/test/com/google/common/net/HostAndPortTest.java @@ -20,6 +20,7 @@ import com.google.common.testing.EqualsTester; import com.google.common.testing.SerializableTester; import junit.framework.TestCase; +import org.checkerframework.checker.nullness.qual.Nullable; /** * Tests for {@link HostAndPort} @@ -102,7 +103,7 @@ public void testFromStringParseableNonsense() { private static void checkFromStringCase( String hpString, int defaultPort, - String expectHost, + @Nullable String expectHost, int expectPort, boolean expectHasExplicitPort) { HostAndPort hp; diff --git a/android/guava-tests/test/com/google/common/net/HttpHeadersTest.java b/android/guava-tests/test/com/google/common/net/HttpHeadersTest.java index 90bb0c8186eb..ef32ccfe308b 100644 --- a/android/guava-tests/test/com/google/common/net/HttpHeadersTest.java +++ b/android/guava-tests/test/com/google/common/net/HttpHeadersTest.java @@ -48,7 +48,7 @@ public void testConstantNameMatchesString() throws Exception { .put("SEC_WEBSOCKET_VERSION", "Sec-WebSocket-Version") .put("X_WEBKIT_CSP", "X-WebKit-CSP") .put("X_WEBKIT_CSP_REPORT_ONLY", "X-WebKit-CSP-Report-Only") - .build(); + .buildOrThrow(); ImmutableSet uppercaseAcronyms = ImmutableSet.of( "CH", "ID", "DNT", "DNS", "DPR", "ECT", "HTTP2", "IP", "MD5", "P3P", "RTT", "TE", "UA", diff --git a/android/guava-tests/test/com/google/common/primitives/BooleansTest.java b/android/guava-tests/test/com/google/common/primitives/BooleansTest.java index c4367fa5168a..6e9f257ad064 100644 --- a/android/guava-tests/test/com/google/common/primitives/BooleansTest.java +++ b/android/guava-tests/test/com/google/common/primitives/BooleansTest.java @@ -570,6 +570,20 @@ public void testAsListSet() { } } + public void testAsListCanonicalValues() { + List list = Booleans.asList(true, false); + assertThat(list.get(0)).isSameInstanceAs(true); + assertThat(list.get(1)).isSameInstanceAs(false); + @SuppressWarnings("deprecation") + Boolean anotherTrue = new Boolean(true); + @SuppressWarnings("deprecation") + Boolean anotherFalse = new Boolean(false); + list.set(0, anotherTrue); + assertThat(list.get(0)).isSameInstanceAs(true); + list.set(1, anotherFalse); + assertThat(list.get(1)).isSameInstanceAs(false); + } + public void testCountTrue() { assertThat(Booleans.countTrue()).isEqualTo(0); assertThat(Booleans.countTrue(false)).isEqualTo(0); diff --git a/android/guava-tests/test/com/google/common/primitives/DoublesTest.java b/android/guava-tests/test/com/google/common/primitives/DoublesTest.java index 052de396d0c5..aad2dfc289c5 100644 --- a/android/guava-tests/test/com/google/common/primitives/DoublesTest.java +++ b/android/guava-tests/test/com/google/common/primitives/DoublesTest.java @@ -34,6 +34,7 @@ import java.util.List; import java.util.regex.Pattern; import junit.framework.TestCase; +import org.checkerframework.checker.nullness.qual.Nullable; /** * Unit test for {@link Doubles}. @@ -607,7 +608,7 @@ public void testAsListEmpty() { * A reference implementation for {@code tryParse} that just catches the exception from {@link * Double#valueOf}. */ - private static Double referenceTryParse(String input) { + private static @Nullable Double referenceTryParse(String input) { if (input.trim().length() < input.length()) { return null; } diff --git a/android/guava-tests/test/com/google/common/primitives/FloatsTest.java b/android/guava-tests/test/com/google/common/primitives/FloatsTest.java index 5b72460c1d37..b9623d3cda00 100644 --- a/android/guava-tests/test/com/google/common/primitives/FloatsTest.java +++ b/android/guava-tests/test/com/google/common/primitives/FloatsTest.java @@ -33,6 +33,7 @@ import java.util.Comparator; import java.util.List; import junit.framework.TestCase; +import org.checkerframework.checker.nullness.qual.Nullable; /** * Unit test for {@link Floats}. @@ -585,7 +586,7 @@ public void testAsListEmpty() { * A reference implementation for {@code tryParse} that just catches the exception from {@link * Float#valueOf}. */ - private static Float referenceTryParse(String input) { + private static @Nullable Float referenceTryParse(String input) { if (input.trim().length() < input.length()) { return null; } diff --git a/android/guava-tests/test/com/google/common/reflect/AbstractInvocationHandlerTest.java b/android/guava-tests/test/com/google/common/reflect/AbstractInvocationHandlerTest.java index 56b20bdfb22a..310878f98283 100644 --- a/android/guava-tests/test/com/google/common/reflect/AbstractInvocationHandlerTest.java +++ b/android/guava-tests/test/com/google/common/reflect/AbstractInvocationHandlerTest.java @@ -26,6 +26,7 @@ import java.lang.reflect.Proxy; import java.util.List; import junit.framework.TestCase; +import org.checkerframework.checker.nullness.qual.Nullable; /** * Tests for {@link AbstractInvocationHandler}. @@ -136,7 +137,7 @@ private static class DelegatingInvocationHandlerWithEquals extends DelegatingInv } @Override - public boolean equals(Object obj) { + public boolean equals(@Nullable Object obj) { if (obj instanceof DelegatingInvocationHandlerWithEquals) { DelegatingInvocationHandlerWithEquals that = (DelegatingInvocationHandlerWithEquals) obj; return delegate.equals(that.delegate); diff --git a/android/guava-tests/test/com/google/common/reflect/InvokableTest.java b/android/guava-tests/test/com/google/common/reflect/InvokableTest.java index def29c3e3bd3..ab5ff738f99b 100644 --- a/android/guava-tests/test/com/google/common/reflect/InvokableTest.java +++ b/android/guava-tests/test/com/google/common/reflect/InvokableTest.java @@ -32,8 +32,8 @@ import java.lang.reflect.ParameterizedType; import java.lang.reflect.TypeVariable; import java.util.Collections; -import javax.annotation.CheckForNull; import junit.framework.TestCase; +import org.checkerframework.checker.nullness.qual.Nullable; /** * Unit tests for {@link Invokable}. @@ -520,7 +520,7 @@ public void testInnerClassWithOneParameterConstructor() { private class InnerWithAnnotatedConstructorParameter { @SuppressWarnings("unused") // called by reflection - InnerWithAnnotatedConstructorParameter(@CheckForNull String s) {} + InnerWithAnnotatedConstructorParameter(@Nullable String s) {} } public void testInnerClassWithAnnotatedConstructorParameter() { @@ -684,7 +684,7 @@ public LocalWithOneParameterConstructor(String x) { public void testLocalClassWithAnnotatedConstructorParameter() throws Exception { class LocalWithAnnotatedConstructorParameter { @SuppressWarnings("unused") // called by reflection - LocalWithAnnotatedConstructorParameter(@CheckForNull String s) {} + LocalWithAnnotatedConstructorParameter(@Nullable String s) {} } Constructor constructor = LocalWithAnnotatedConstructorParameter.class.getDeclaredConstructors()[0]; @@ -733,7 +733,7 @@ private static class Prepender { private final String prefix; private final int times; - Prepender(@NotBlank String prefix, int times) throws NullPointerException { + Prepender(@NotBlank @Nullable String prefix, int times) throws NullPointerException { this.prefix = prefix; this.times = times; } diff --git a/android/guava-tests/test/com/google/common/reflect/ParameterTest.java b/android/guava-tests/test/com/google/common/reflect/ParameterTest.java index 6e0500a9ce08..86ea0104fa93 100644 --- a/android/guava-tests/test/com/google/common/reflect/ParameterTest.java +++ b/android/guava-tests/test/com/google/common/reflect/ParameterTest.java @@ -29,6 +29,16 @@ public class ParameterTest extends TestCase { public void testNulls() { + try { + Class.forName("java.lang.reflect.AnnotatedType"); + } catch (ClassNotFoundException runningInAndroidVm) { + /* + * Parameter declares a method that returns AnnotatedType, which isn't available on Android. + * This would cause NullPointerTester, which calls Class.getDeclaredMethods, to throw + * NoClassDefFoundError. + */ + return; + } for (Method method : ParameterTest.class.getDeclaredMethods()) { for (Parameter param : Invokable.from(method).getParameters()) { new NullPointerTester().testAllPublicInstanceMethods(param); diff --git a/android/guava-tests/test/com/google/common/reflect/SubtypeTester.java b/android/guava-tests/test/com/google/common/reflect/SubtypeTester.java index 3eec668433fb..7cd61c129dad 100644 --- a/android/guava-tests/test/com/google/common/reflect/SubtypeTester.java +++ b/android/guava-tests/test/com/google/common/reflect/SubtypeTester.java @@ -30,6 +30,7 @@ import java.util.Arrays; import java.util.Comparator; import javax.lang.model.element.Modifier; +import org.checkerframework.checker.nullness.qual.Nullable; /** * Tester of subtyping relationships between two types. @@ -78,7 +79,7 @@ abstract class SubtypeTester implements Cloneable { boolean suppressGetSupertype() default false; } - private Method method = null; + private @Nullable Method method = null; /** Call this in a {@link TestSubtype} public method asserting subtype relationship. */ final T isSubtype(T sub) { @@ -105,7 +106,7 @@ final T isSubtype(T sub) { * Call this in a {@link TestSubtype} public method asserting that subtype relationship does not * hold. */ - final X notSubtype(@SuppressWarnings("unused") Object sub) { + final @Nullable X notSubtype(@SuppressWarnings("unused") Object sub) { Type returnType = method.getGenericReturnType(); Type paramType = getOnlyParameterType(); TestSubtype spec = method.getAnnotation(TestSubtype.class); diff --git a/android/guava-tests/test/com/google/common/util/concurrent/AbstractAbstractFutureTest.java b/android/guava-tests/test/com/google/common/util/concurrent/AbstractAbstractFutureTest.java index 991cada29a11..8e94f174f865 100644 --- a/android/guava-tests/test/com/google/common/util/concurrent/AbstractAbstractFutureTest.java +++ b/android/guava-tests/test/com/google/common/util/concurrent/AbstractAbstractFutureTest.java @@ -34,6 +34,7 @@ import java.util.concurrent.ExecutionException; import java.util.concurrent.TimeoutException; import junit.framework.TestCase; +import org.checkerframework.checker.nullness.qual.Nullable; /** * Base class for tests for emulated {@link AbstractFuture} that allow subclasses to swap in a @@ -443,7 +444,8 @@ private static void assertPending(AbstractFuture future) { verifyTimedGetOnPendingFuture(future); } - private static void assertSuccessful(AbstractFuture future, Integer expectedResult) + private static void assertSuccessful( + AbstractFuture future, @Nullable Integer expectedResult) throws InterruptedException, TimeoutException, ExecutionException { assertDone(future); assertThat(future.isCancelled()).isFalse(); diff --git a/android/guava-tests/test/com/google/common/util/concurrent/AbstractFutureBenchmarks.java b/android/guava-tests/test/com/google/common/util/concurrent/AbstractFutureBenchmarks.java index ed5e6a96db0f..d90c5bbe807d 100644 --- a/android/guava-tests/test/com/google/common/util/concurrent/AbstractFutureBenchmarks.java +++ b/android/guava-tests/test/com/google/common/util/concurrent/AbstractFutureBenchmarks.java @@ -25,7 +25,7 @@ import java.util.concurrent.TimeUnit; import java.util.concurrent.TimeoutException; import java.util.concurrent.locks.AbstractQueuedSynchronizer; -import javax.annotation.CheckForNull; +import org.checkerframework.checker.nullness.qual.Nullable; /** Utilities for the AbstractFutureBenchmarks */ final class AbstractFutureBenchmarks { @@ -218,7 +218,7 @@ public void addListener(Runnable listener, Executor exec) { * @return true if the state was successfully changed. */ @CanIgnoreReturnValue - protected boolean set(@CheckForNull V value) { + protected boolean set(@Nullable V value) { boolean result = sync.set(value); if (result) { executionList.execute(); @@ -360,7 +360,7 @@ boolean wasInterrupted() { } /** Transition to the COMPLETED state and set the value. */ - boolean set(@CheckForNull V v) { + boolean set(@Nullable V v) { return complete(v, null, COMPLETED); } @@ -384,7 +384,7 @@ boolean cancel(boolean interrupt) { * @param t the exception to set as the result of the computation. * @param finalState the state to transition to. */ - private boolean complete(@CheckForNull V v, @CheckForNull Throwable t, int finalState) { + private boolean complete(@Nullable V v, @Nullable Throwable t, int finalState) { boolean doCompletion = compareAndSetState(RUNNING, COMPLETING); if (doCompletion) { // If this thread successfully transitioned to COMPLETING, set the value @@ -406,7 +406,7 @@ private boolean complete(@CheckForNull V v, @CheckForNull Throwable t, int final } static final CancellationException cancellationExceptionWithCause( - @CheckForNull String message, @CheckForNull Throwable cause) { + @Nullable String message, @Nullable Throwable cause) { CancellationException exception = new CancellationException(message); exception.initCause(cause); return exception; diff --git a/android/guava-tests/test/com/google/common/util/concurrent/AbstractFutureTest.java b/android/guava-tests/test/com/google/common/util/concurrent/AbstractFutureTest.java index 520586c4db6f..0ed399b726ad 100644 --- a/android/guava-tests/test/com/google/common/util/concurrent/AbstractFutureTest.java +++ b/android/guava-tests/test/com/google/common/util/concurrent/AbstractFutureTest.java @@ -48,6 +48,7 @@ import java.util.concurrent.locks.LockSupport; import junit.framework.AssertionFailedError; import junit.framework.TestCase; +import org.checkerframework.checker.nullness.qual.Nullable; /** * Tests for {@link AbstractFuture}. @@ -444,10 +445,10 @@ public void testFutureBash() { final ExecutorService executor = Executors.newFixedThreadPool(barrier.getParties()); final AtomicReference> currentFuture = Atomics.newReference(); final AtomicInteger numSuccessfulSetCalls = new AtomicInteger(); - Callable completeSuccessfullyRunnable = - new Callable() { + Callable<@Nullable Void> completeSuccessfullyRunnable = + new Callable<@Nullable Void>() { @Override - public Void call() { + public @Nullable Void call() { if (currentFuture.get().set("set")) { numSuccessfulSetCalls.incrementAndGet(); } @@ -455,12 +456,12 @@ public Void call() { return null; } }; - Callable completeExceptionallyRunnable = - new Callable() { + Callable<@Nullable Void> completeExceptionallyRunnable = + new Callable<@Nullable Void>() { Exception failureCause = new Exception("setException"); @Override - public Void call() { + public @Nullable Void call() { if (currentFuture.get().setException(failureCause)) { numSuccessfulSetCalls.incrementAndGet(); } @@ -468,10 +469,10 @@ public Void call() { return null; } }; - Callable cancelRunnable = - new Callable() { + Callable<@Nullable Void> cancelRunnable = + new Callable<@Nullable Void>() { @Override - public Void call() { + public @Nullable Void call() { if (currentFuture.get().cancel(true)) { numSuccessfulSetCalls.incrementAndGet(); } @@ -479,12 +480,12 @@ public Void call() { return null; } }; - Callable setFutureCompleteSuccessfullyRunnable = - new Callable() { + Callable<@Nullable Void> setFutureCompleteSuccessfullyRunnable = + new Callable<@Nullable Void>() { ListenableFuture future = Futures.immediateFuture("setFuture"); @Override - public Void call() { + public @Nullable Void call() { if (currentFuture.get().setFuture(future)) { numSuccessfulSetCalls.incrementAndGet(); } @@ -492,13 +493,13 @@ public Void call() { return null; } }; - Callable setFutureCompleteExceptionallyRunnable = - new Callable() { + Callable<@Nullable Void> setFutureCompleteExceptionallyRunnable = + new Callable<@Nullable Void>() { ListenableFuture future = Futures.immediateFailedFuture(new Exception("setFuture")); @Override - public Void call() { + public @Nullable Void call() { if (currentFuture.get().setFuture(future)) { numSuccessfulSetCalls.incrementAndGet(); } @@ -506,12 +507,12 @@ public Void call() { return null; } }; - Callable setFutureCancelRunnable = - new Callable() { + Callable<@Nullable Void> setFutureCancelRunnable = + new Callable<@Nullable Void>() { ListenableFuture future = Futures.immediateCancelledFuture(); @Override - public Void call() { + public @Nullable Void call() { if (currentFuture.get().setFuture(future)) { numSuccessfulSetCalls.incrementAndGet(); } @@ -574,9 +575,9 @@ public void run() { k % 2 == 0 ? collectResultsRunnable : collectResultsTimedGetRunnable; allTasks.add(Executors.callable(listener)); allTasks.add( - new Callable() { + new Callable<@Nullable Void>() { @Override - public Void call() throws Exception { + public @Nullable Void call() throws Exception { currentFuture.get().addListener(listener, executor); return null; } @@ -760,21 +761,21 @@ public void testSetFutureCancelBash_withDoneFuture() { final AtomicReference> currentFuture = Atomics.newReference(); final AtomicBoolean setFutureSuccess = new AtomicBoolean(); final AtomicBoolean cancellationSuccess = new AtomicBoolean(); - Callable cancelRunnable = - new Callable() { + Callable<@Nullable Void> cancelRunnable = + new Callable<@Nullable Void>() { @Override - public Void call() { + public @Nullable Void call() { cancellationSuccess.set(currentFuture.get().cancel(true)); awaitUnchecked(barrier); return null; } }; - Callable setFutureCompleteSuccessfullyRunnable = - new Callable() { + Callable<@Nullable Void> setFutureCompleteSuccessfullyRunnable = + new Callable<@Nullable Void>() { final ListenableFuture future = Futures.immediateFuture("hello"); @Override - public Void call() { + public @Nullable Void call() { setFutureSuccess.set(currentFuture.get().setFuture(future)); awaitUnchecked(barrier); return null; @@ -1209,13 +1210,10 @@ private ExecutionException getExpectingExecutionException(AbstractFuture throws InterruptedException { try { String got = future.get(); - fail("Expected exception but got " + got); + throw new AssertionError("Expected exception but got " + got); } catch (ExecutionException e) { return e; } - - // unreachable, but compiler doesn't know that fail() always throws - return null; } private static final class WaiterThread extends Thread { diff --git a/android/guava-tests/test/com/google/common/util/concurrent/AbstractScheduledServiceTest.java b/android/guava-tests/test/com/google/common/util/concurrent/AbstractScheduledServiceTest.java index 5d90b15504a7..f7266b274e85 100644 --- a/android/guava-tests/test/com/google/common/util/concurrent/AbstractScheduledServiceTest.java +++ b/android/guava-tests/test/com/google/common/util/concurrent/AbstractScheduledServiceTest.java @@ -43,6 +43,7 @@ import java.util.concurrent.atomic.AtomicInteger; import java.util.concurrent.atomic.AtomicReference; import junit.framework.TestCase; +import org.checkerframework.checker.nullness.qual.Nullable; /** * Unit test for {@link AbstractScheduledService}. @@ -52,7 +53,7 @@ public class AbstractScheduledServiceTest extends TestCase { volatile Scheduler configuration = newFixedDelaySchedule(0, 10, MILLISECONDS); - volatile ScheduledFuture future = null; + volatile @Nullable ScheduledFuture future = null; volatile boolean atFixedRateCalled = false; volatile boolean withFixedDelayCalled = false; @@ -313,9 +314,9 @@ private class TestService extends AbstractScheduledService { AtomicInteger numberOfTimesRunCalled = new AtomicInteger(0); AtomicInteger numberOfTimesExecutorCalled = new AtomicInteger(0); AtomicInteger numberOfTimesSchedulerCalled = new AtomicInteger(0); - volatile Exception runException = null; - volatile Exception startUpException = null; - volatile Exception shutDownException = null; + volatile @Nullable Exception runException = null; + volatile @Nullable Exception startUpException = null; + volatile @Nullable Exception shutDownException = null; @Override protected void runOneIteration() throws Exception { diff --git a/android/guava-tests/test/com/google/common/util/concurrent/CallablesTest.java b/android/guava-tests/test/com/google/common/util/concurrent/CallablesTest.java index 5bc92dc20633..b4766bc8ca20 100644 --- a/android/guava-tests/test/com/google/common/util/concurrent/CallablesTest.java +++ b/android/guava-tests/test/com/google/common/util/concurrent/CallablesTest.java @@ -26,6 +26,7 @@ import java.util.concurrent.Callable; import java.util.concurrent.ExecutionException; import junit.framework.TestCase; +import org.checkerframework.checker.nullness.qual.Nullable; /** * Unit tests for {@link Callables}. @@ -90,10 +91,10 @@ public String call() throws Exception { public void testRenaming() throws Exception { String oldName = Thread.currentThread().getName(); final Supplier newName = Suppliers.ofInstance("MyCrazyThreadName"); - Callable callable = - new Callable() { + Callable<@Nullable Void> callable = + new Callable<@Nullable Void>() { @Override - public Void call() throws Exception { + public @Nullable Void call() throws Exception { assertEquals(Thread.currentThread().getName(), newName.get()); return null; } @@ -107,10 +108,10 @@ public void testRenaming_exceptionalReturn() throws Exception { String oldName = Thread.currentThread().getName(); final Supplier newName = Suppliers.ofInstance("MyCrazyThreadName"); class MyException extends Exception {} - Callable callable = - new Callable() { + Callable<@Nullable Void> callable = + new Callable<@Nullable Void>() { @Override - public Void call() throws Exception { + public @Nullable Void call() throws Exception { assertEquals(Thread.currentThread().getName(), newName.get()); throw new MyException(); } @@ -141,10 +142,10 @@ public void checkPermission(Permission perm) { try { final String oldName = Thread.currentThread().getName(); Supplier newName = Suppliers.ofInstance("MyCrazyThreadName"); - Callable callable = - new Callable() { + Callable<@Nullable Void> callable = + new Callable<@Nullable Void>() { @Override - public Void call() throws Exception { + public @Nullable Void call() throws Exception { assertEquals(Thread.currentThread().getName(), oldName); return null; } diff --git a/android/guava-tests/test/com/google/common/util/concurrent/CycleDetectingLockFactoryTest.java b/android/guava-tests/test/com/google/common/util/concurrent/CycleDetectingLockFactoryTest.java index 2b1dd2fa0881..bf388b0ba887 100644 --- a/android/guava-tests/test/com/google/common/util/concurrent/CycleDetectingLockFactoryTest.java +++ b/android/guava-tests/test/com/google/common/util/concurrent/CycleDetectingLockFactoryTest.java @@ -16,6 +16,7 @@ package com.google.common.util.concurrent; +import static com.google.common.truth.Truth.assertThat; import com.google.common.base.Joiner; import com.google.common.util.concurrent.CycleDetectingLockFactory.Policies; @@ -26,8 +27,6 @@ import java.util.concurrent.locks.Lock; import java.util.concurrent.locks.ReentrantLock; import java.util.concurrent.locks.ReentrantReadWriteLock; -import java.util.regex.Matcher; -import java.util.regex.Pattern; import junit.framework.TestCase; /** @@ -543,16 +542,6 @@ private enum OtherOrder { // "LockA -> LockB \b.*\b LockB -> LockC \b.*\b LockC -> LockA" private void checkMessage(IllegalStateException exception, String... expectedLockCycle) { String regex = Joiner.on("\\b.*\\b").join(expectedLockCycle); - assertContainsRegex(regex, exception.getMessage()); - } - - // TODO(cpovirk): consider adding support for regex to Truth - private static void assertContainsRegex(String expectedRegex, String actual) { - Pattern pattern = Pattern.compile(expectedRegex); - Matcher matcher = pattern.matcher(actual); - if (!matcher.find()) { - String actualDesc = (actual == null) ? "null" : ('<' + actual + '>'); - fail("expected to contain regex:<" + expectedRegex + "> but was:" + actualDesc); - } + assertThat(exception).hasMessageThat().containsMatch(regex); } } diff --git a/android/guava-tests/test/com/google/common/util/concurrent/ExecutionSequencerTest.java b/android/guava-tests/test/com/google/common/util/concurrent/ExecutionSequencerTest.java index 068287c1986b..1dafb3b0b203 100644 --- a/android/guava-tests/test/com/google/common/util/concurrent/ExecutionSequencerTest.java +++ b/android/guava-tests/test/com/google/common/util/concurrent/ExecutionSequencerTest.java @@ -37,6 +37,7 @@ import java.util.concurrent.TimeUnit; import java.util.logging.Logger; import junit.framework.TestCase; +import org.checkerframework.checker.nullness.qual.Nullable; /** Tests for {@link ExecutionSequencer} */ public class ExecutionSequencerTest extends TestCase { @@ -44,7 +45,7 @@ public class ExecutionSequencerTest extends TestCase { ExecutorService executor; private ExecutionSequencer serializer; - private SettableFuture firstFuture; + private SettableFuture<@Nullable Void> firstFuture; private TestCallable firstCallable; @Override @@ -76,7 +77,8 @@ public void testCancellationDoesNotViolateSerialization() { @SuppressWarnings({"unused", "nullness"}) Future possiblyIgnoredError = serializer.submitAsync(firstCallable, directExecutor()); TestCallable secondCallable = new TestCallable(Futures.immediateFuture(null)); - ListenableFuture secondFuture = serializer.submitAsync(secondCallable, directExecutor()); + ListenableFuture<@Nullable Void> secondFuture = + serializer.submitAsync(secondCallable, directExecutor()); TestCallable thirdCallable = new TestCallable(Futures.immediateFuture(null)); @SuppressWarnings({"unused", "nullness"}) Future possiblyIgnoredError1 = serializer.submitAsync(thirdCallable, directExecutor()); @@ -90,7 +92,7 @@ public void testCancellationDoesNotViolateSerialization() { public void testCancellationMultipleThreads() throws Exception { final BlockingCallable blockingCallable = new BlockingCallable(); - ListenableFuture unused = serializer.submit(blockingCallable, executor); + ListenableFuture<@Nullable Void> unused = serializer.submit(blockingCallable, executor); ListenableFuture future2 = serializer.submit( new Callable() { @@ -117,7 +119,7 @@ public Boolean call() { public void testSecondTaskWaitsForFirstEvenIfCancelled() throws Exception { final BlockingCallable blockingCallable = new BlockingCallable(); - ListenableFuture future1 = serializer.submit(blockingCallable, executor); + ListenableFuture<@Nullable Void> future1 = serializer.submit(blockingCallable, executor); ListenableFuture future2 = serializer.submit( new Callable() { @@ -153,12 +155,12 @@ public Boolean call() { public void testCancellationWithReferencedObject() throws Exception { Object toBeGCed = new Object(); WeakReference ref = new WeakReference<>(toBeGCed); - final SettableFuture settableFuture = SettableFuture.create(); + final SettableFuture<@Nullable Void> settableFuture = SettableFuture.create(); ListenableFuture ignored = serializer.submitAsync( - new AsyncCallable() { + new AsyncCallable<@Nullable Void>() { @Override - public ListenableFuture call() { + public ListenableFuture<@Nullable Void> call() { return settableFuture; } }, @@ -195,9 +197,9 @@ public void execute(Runnable task) { final Future[] thingToCancel = new Future[1]; results.add( serializer.submit( - new Callable() { + new Callable<@Nullable Void>() { @Override - public Void call() { + public @Nullable Void call() { thingToCancel[0].cancel(false); return null; } @@ -223,13 +225,13 @@ public Void call() { } public void testAvoidsStackOverflow_manySubmitted() throws Exception { - final SettableFuture settableFuture = SettableFuture.create(); - ArrayList> results = new ArrayList<>(50_001); + final SettableFuture<@Nullable Void> settableFuture = SettableFuture.create(); + ArrayList> results = new ArrayList<>(50_001); results.add( serializer.submitAsync( - new AsyncCallable() { + new AsyncCallable<@Nullable Void>() { @Override - public ListenableFuture call() { + public ListenableFuture<@Nullable Void> call() { return settableFuture; } }, @@ -242,12 +244,12 @@ public ListenableFuture call() { } public void testAvoidsStackOverflow_manyCancelled() throws Exception { - final SettableFuture settableFuture = SettableFuture.create(); - ListenableFuture unused = + final SettableFuture<@Nullable Void> settableFuture = SettableFuture.create(); + ListenableFuture<@Nullable Void> unused = serializer.submitAsync( - new AsyncCallable() { + new AsyncCallable<@Nullable Void>() { @Override - public ListenableFuture call() { + public ListenableFuture<@Nullable Void> call() { return settableFuture; } }, @@ -270,12 +272,12 @@ public Integer call() { } public void testAvoidsStackOverflow_alternatingCancelledAndSubmitted() throws Exception { - final SettableFuture settableFuture = SettableFuture.create(); - ListenableFuture unused = + final SettableFuture<@Nullable Void> settableFuture = SettableFuture.create(); + ListenableFuture<@Nullable Void> unused = serializer.submitAsync( - new AsyncCallable() { + new AsyncCallable<@Nullable Void>() { @Override - public ListenableFuture call() { + public ListenableFuture<@Nullable Void> call() { return settableFuture; } }, @@ -344,12 +346,12 @@ public Integer call() { }, service) .get(); - final SettableFuture settableFuture = SettableFuture.create(); + final SettableFuture<@Nullable Void> settableFuture = SettableFuture.create(); ListenableFuture unused = serializer.submitAsync( - new AsyncCallable() { + new AsyncCallable<@Nullable Void>() { @Override - public ListenableFuture call() { + public ListenableFuture<@Nullable Void> call() { return settableFuture; } }, @@ -359,9 +361,9 @@ public ListenableFuture call() { // after some number of iterations, switch threads unused = serializer.submit( - new Callable() { + new Callable<@Nullable Void>() { @Override - public Void call() { + public @Nullable Void call() { holder.count++; return null; } @@ -383,9 +385,9 @@ public Integer call() { // Otherwise, schedule a task on directExecutor unused = serializer.submit( - new Callable() { + new Callable<@Nullable Void>() { @Override - public Void call() { + public @Nullable Void call() { holder.count++; return null; } @@ -416,14 +418,14 @@ public void testToString() { assertThat(second.toString()).contains(secondCallable.future.toString()); } - private static class BlockingCallable implements Callable { + private static class BlockingCallable implements Callable<@Nullable Void> { private final CountDownLatch startLatch = new CountDownLatch(1); private final CountDownLatch stopLatch = new CountDownLatch(1); private volatile boolean running = false; @Override - public Void call() throws InterruptedException { + public @Nullable Void call() throws InterruptedException { running = true; startLatch.countDown(); stopLatch.await(); @@ -444,17 +446,17 @@ public boolean isRunning() { } } - private static final class TestCallable implements AsyncCallable { + private static final class TestCallable implements AsyncCallable<@Nullable Void> { - private final ListenableFuture future; + private final ListenableFuture<@Nullable Void> future; private boolean called = false; - private TestCallable(ListenableFuture future) { + private TestCallable(ListenableFuture<@Nullable Void> future) { this.future = future; } @Override - public ListenableFuture call() throws Exception { + public ListenableFuture<@Nullable Void> call() throws Exception { called = true; return future; } diff --git a/android/guava-tests/test/com/google/common/util/concurrent/ForwardingObjectTester.java b/android/guava-tests/test/com/google/common/util/concurrent/ForwardingObjectTester.java index 84b0426a6830..ad391efdc5d1 100644 --- a/android/guava-tests/test/com/google/common/util/concurrent/ForwardingObjectTester.java +++ b/android/guava-tests/test/com/google/common/util/concurrent/ForwardingObjectTester.java @@ -28,7 +28,7 @@ import java.util.Arrays; /** - * Tester for typical subclass of {@link ForwardingObject} by using EasyMock partial mocks. + * Tester for typical subclass of {@link ForwardingObject} by using Mockito. * * @author Ben Yu */ diff --git a/android/guava-tests/test/com/google/common/util/concurrent/FutureCallbackTest.java b/android/guava-tests/test/com/google/common/util/concurrent/FutureCallbackTest.java index 92887c36138a..2efdebec57b8 100644 --- a/android/guava-tests/test/com/google/common/util/concurrent/FutureCallbackTest.java +++ b/android/guava-tests/test/com/google/common/util/concurrent/FutureCallbackTest.java @@ -23,8 +23,8 @@ import com.google.common.annotations.GwtCompatible; import java.util.concurrent.CancellationException; import java.util.concurrent.Executor; -import javax.annotation.CheckForNull; import junit.framework.TestCase; +import org.checkerframework.checker.nullness.qual.Nullable; /** * Test for {@link FutureCallback}. @@ -177,8 +177,8 @@ public void execute(Runnable command) { } private final class MockCallback implements FutureCallback { - @CheckForNull private String value = null; - @CheckForNull private Throwable failure = null; + @Nullable private String value = null; + @Nullable private Throwable failure = null; private boolean wasCalled = false; MockCallback(String expectedValue) { diff --git a/android/guava-tests/test/com/google/common/util/concurrent/FuturesTest.java b/android/guava-tests/test/com/google/common/util/concurrent/FuturesTest.java index 94454398a827..c46801b99e72 100644 --- a/android/guava-tests/test/com/google/common/util/concurrent/FuturesTest.java +++ b/android/guava-tests/test/com/google/common/util/concurrent/FuturesTest.java @@ -88,9 +88,9 @@ import java.util.concurrent.atomic.AtomicBoolean; import java.util.logging.LogRecord; import java.util.logging.Logger; -import javax.annotation.CheckForNull; import junit.framework.AssertionFailedError; import junit.framework.TestCase; +import org.checkerframework.checker.nullness.qual.Nullable; /** * Unit tests for {@link Futures}. @@ -141,7 +141,7 @@ public void testImmediateFuture() throws Exception { } public void testImmediateVoidFuture() throws Exception { - ListenableFuture voidFuture = immediateVoidFuture(); + ListenableFuture<@Nullable Void> voidFuture = immediateVoidFuture(); assertThat(getDone(voidFuture)).isNull(); assertThat(getDoneFromTimeoutOverload(voidFuture)).isNull(); @@ -1662,7 +1662,7 @@ public ListenableFuture apply(X t) { } private static AsyncFunction constantAsyncFunction( - final ListenableFuture output) { + final @Nullable ListenableFuture output) { return new AsyncFunction() { @Override public ListenableFuture apply(I input) { @@ -1978,7 +1978,7 @@ public void execute(Runnable runnable) { pendingRunnables.add(runnable); } }; - ListenableFuture future = submit(runnable, executor); + ListenableFuture<@Nullable Void> future = submit(runnable, executor); assertThat(future.isDone()).isFalse(); assertThat(executedRunnables).isEmpty(); assertThat(pendingRunnables).hasSize(1); @@ -1997,7 +1997,7 @@ public void run() { throw exception; } }; - ListenableFuture future = submit(runnable, directExecutor()); + ListenableFuture<@Nullable Void> future = submit(runnable, directExecutor()); try { getDone(future); fail(); @@ -2110,7 +2110,8 @@ public void run() { assertFalse(callableCalled.get()); } - private static AsyncCallable constantAsyncCallable(final ListenableFuture returnValue) { + private static AsyncCallable constantAsyncCallable( + final @Nullable ListenableFuture returnValue) { return new AsyncCallable() { @Override public ListenableFuture call() { @@ -3677,7 +3678,7 @@ public void testNonCancellationPropagating_doesNotPropagate() throws Exception { @GwtIncompatible // used only in GwtIncompatible tests private static class TestException extends Exception { - TestException(@CheckForNull Throwable cause) { + TestException(@Nullable Throwable cause) { super(cause); } } diff --git a/android/guava-tests/test/com/google/common/util/concurrent/GeneratedMonitorTest.java b/android/guava-tests/test/com/google/common/util/concurrent/GeneratedMonitorTest.java index adeb2d1aa7c3..9054ea9752c8 100644 --- a/android/guava-tests/test/com/google/common/util/concurrent/GeneratedMonitorTest.java +++ b/android/guava-tests/test/com/google/common/util/concurrent/GeneratedMonitorTest.java @@ -32,6 +32,7 @@ import java.util.concurrent.TimeUnit; import junit.framework.TestCase; import junit.framework.TestSuite; +import org.checkerframework.checker.nullness.qual.Nullable; /** * Generated tests for {@link Monitor}. @@ -435,7 +436,11 @@ public void setSatisfied(boolean satisfied) { private final CountDownLatch callCompletedLatch; private GeneratedMonitorTest( - Method method, Scenario scenario, boolean fair, Timeout timeout, Outcome expectedOutcome) { + Method method, + Scenario scenario, + boolean fair, + @Nullable Timeout timeout, + Outcome expectedOutcome) { super(nameFor(method, scenario, fair, timeout, expectedOutcome)); this.method = method; this.scenario = scenario; @@ -469,7 +474,7 @@ public void run() { runChosenTest(); } }; - final FutureTask task = new FutureTask<>(runChosenTest, null); + final FutureTask<@Nullable Void> task = new FutureTask<>(runChosenTest, null); startThread( new Runnable() { @Override diff --git a/android/guava-tests/test/com/google/common/util/concurrent/InterruptibleTaskTest.java b/android/guava-tests/test/com/google/common/util/concurrent/InterruptibleTaskTest.java index 0df083fb8059..6d1591354f93 100644 --- a/android/guava-tests/test/com/google/common/util/concurrent/InterruptibleTaskTest.java +++ b/android/guava-tests/test/com/google/common/util/concurrent/InterruptibleTaskTest.java @@ -23,6 +23,7 @@ import java.util.concurrent.TimeUnit; import java.util.concurrent.locks.LockSupport; import junit.framework.TestCase; +import org.checkerframework.checker.nullness.qual.Nullable; public final class InterruptibleTaskTest extends TestCase { @@ -30,10 +31,10 @@ public final class InterruptibleTaskTest extends TestCase { // transition to DONE public void testInterruptThrows() throws Exception { final CountDownLatch isInterruptibleRegistered = new CountDownLatch(1); - InterruptibleTask task = - new InterruptibleTask() { + InterruptibleTask<@Nullable Void> task = + new InterruptibleTask<@Nullable Void>() { @Override - Void runInterruptibly() throws Exception { + @Nullable Void runInterruptibly() throws Exception { BrokenChannel bc = new BrokenChannel(); bc.doBegin(); isInterruptibleRegistered.countDown(); @@ -52,7 +53,7 @@ String toPendingString() { } @Override - void afterRanInterruptiblySuccess(Void result) {} + void afterRanInterruptiblySuccess(@Nullable Void result) {} @Override void afterRanInterruptiblyFailure(Throwable error) {} @@ -100,10 +101,10 @@ void doBegin() { public void testInterruptIsSlow() throws Exception { final CountDownLatch isInterruptibleRegistered = new CountDownLatch(1); final SlowChannel slowChannel = new SlowChannel(); - final InterruptibleTask task = - new InterruptibleTask() { + final InterruptibleTask<@Nullable Void> task = + new InterruptibleTask<@Nullable Void>() { @Override - Void runInterruptibly() throws Exception { + @Nullable Void runInterruptibly() throws Exception { slowChannel.doBegin(); isInterruptibleRegistered.countDown(); try { @@ -126,7 +127,7 @@ String toPendingString() { } @Override - void afterRanInterruptiblySuccess(Void result) {} + void afterRanInterruptiblySuccess(@Nullable Void result) {} @Override void afterRanInterruptiblyFailure(Throwable error) {} diff --git a/android/guava-tests/test/com/google/common/util/concurrent/ListenableFutureTester.java b/android/guava-tests/test/com/google/common/util/concurrent/ListenableFutureTester.java index 575ed06567dd..5c99bc881812 100644 --- a/android/guava-tests/test/com/google/common/util/concurrent/ListenableFutureTester.java +++ b/android/guava-tests/test/com/google/common/util/concurrent/ListenableFutureTester.java @@ -29,7 +29,7 @@ import java.util.concurrent.ExecutorService; import java.util.concurrent.Executors; import java.util.concurrent.TimeUnit; -import javax.annotation.CheckForNull; +import org.checkerframework.checker.nullness.qual.Nullable; /** * Used to test listenable future implementations. @@ -67,7 +67,7 @@ public void tearDown() { exec.shutdown(); } - public void testCompletedFuture(@CheckForNull Object expectedValue) + public void testCompletedFuture(@Nullable Object expectedValue) throws InterruptedException, ExecutionException { assertTrue(future.isDone()); assertFalse(future.isCancelled()); @@ -94,7 +94,7 @@ public void testCancelledFuture() throws InterruptedException, ExecutionExceptio } } - public void testFailedFuture(@CheckForNull String message) throws InterruptedException { + public void testFailedFuture(@Nullable String message) throws InterruptedException { assertTrue(future.isDone()); assertFalse(future.isCancelled()); diff --git a/android/guava-tests/test/com/google/common/util/concurrent/MoreExecutorsTest.java b/android/guava-tests/test/com/google/common/util/concurrent/MoreExecutorsTest.java index aac61735e998..dab6d92f9c6e 100644 --- a/android/guava-tests/test/com/google/common/util/concurrent/MoreExecutorsTest.java +++ b/android/guava-tests/test/com/google/common/util/concurrent/MoreExecutorsTest.java @@ -72,6 +72,7 @@ import java.util.concurrent.TimeUnit; import java.util.concurrent.atomic.AtomicBoolean; import java.util.concurrent.atomic.AtomicReference; +import org.checkerframework.checker.nullness.qual.Nullable; import org.mockito.InOrder; import org.mockito.Mockito; @@ -185,9 +186,9 @@ public void run() { try { Future future = executor.submit( - new Callable() { + new Callable<@Nullable Void>() { @Override - public Void call() throws Exception { + public @Nullable Void call() throws Exception { // WAIT #1 barrier.await(1, TimeUnit.SECONDS); diff --git a/android/guava-tests/test/com/google/common/util/concurrent/RateLimiterTest.java b/android/guava-tests/test/com/google/common/util/concurrent/RateLimiterTest.java index 40713545bf13..977eadaf70f3 100644 --- a/android/guava-tests/test/com/google/common/util/concurrent/RateLimiterTest.java +++ b/android/guava-tests/test/com/google/common/util/concurrent/RateLimiterTest.java @@ -35,7 +35,6 @@ import java.util.Random; import java.util.concurrent.TimeUnit; import junit.framework.TestCase; -import org.easymock.EasyMock; import org.mockito.Mockito; /** @@ -571,17 +570,6 @@ public String toString() { */ public void testMockingMockito() throws Exception { RateLimiter mock = Mockito.mock(RateLimiter.class); - doTestMocking(mock); - } - - @AndroidIncompatible // EasyMock Class Extension doesn't appear to work on Android. - public void testMockingEasyMock() throws Exception { - RateLimiter mock = EasyMock.createNiceMock(RateLimiter.class); - EasyMock.replay(mock); - doTestMocking(mock); - } - - private static void doTestMocking(RateLimiter mock) throws Exception { for (Method method : RateLimiter.class.getMethods()) { if (!isStatic(method.getModifiers()) && !NOT_WORKING_ON_MOCKS.contains(method.getName()) diff --git a/android/guava-tests/test/com/google/common/util/concurrent/SimpleTimeLimiterTest.java b/android/guava-tests/test/com/google/common/util/concurrent/SimpleTimeLimiterTest.java index 35406864dce4..37ef84f66998 100644 --- a/android/guava-tests/test/com/google/common/util/concurrent/SimpleTimeLimiterTest.java +++ b/android/guava-tests/test/com/google/common/util/concurrent/SimpleTimeLimiterTest.java @@ -278,7 +278,7 @@ public String sleepThenReturnInput(String input) { finished = true; return input; } catch (InterruptedException e) { - return null; + throw new AssertionError(); } } diff --git a/android/guava-tests/test/com/google/common/util/concurrent/TestThread.java b/android/guava-tests/test/com/google/common/util/concurrent/TestThread.java index f85d3134dd25..ef3b27410d40 100644 --- a/android/guava-tests/test/com/google/common/util/concurrent/TestThread.java +++ b/android/guava-tests/test/com/google/common/util/concurrent/TestThread.java @@ -28,8 +28,8 @@ import java.util.concurrent.SynchronousQueue; import java.util.concurrent.TimeUnit; import java.util.concurrent.TimeoutException; -import javax.annotation.CheckForNull; import junit.framework.AssertionFailedError; +import org.checkerframework.checker.nullness.qual.Nullable; /** * A helper for concurrency testing. One or more {@code TestThread} instances are instantiated in a @@ -58,7 +58,7 @@ public final class TestThread extends Thread implements TearDown { private final SynchronousQueue requestQueue = new SynchronousQueue<>(); private final SynchronousQueue responseQueue = new SynchronousQueue<>(); - private Throwable uncaughtThrowable = null; + private @Nullable Throwable uncaughtThrowable = null; public TestThread(L lockLikeObject, String threadName) { super(threadName); @@ -168,7 +168,7 @@ public void callAndAssertWaits(String methodName, Object conditionLikeObject) th * Asserts that a prior call that had caused this thread to block or wait has since returned * normally. */ - public void assertPriorCallReturns(@CheckForNull String methodName) throws Exception { + public void assertPriorCallReturns(@Nullable String methodName) throws Exception { assertEquals(null, getResponse(methodName).getResult()); } @@ -176,7 +176,7 @@ public void assertPriorCallReturns(@CheckForNull String methodName) throws Excep * Asserts that a prior call that had caused this thread to block or wait has since returned the * expected boolean value. */ - public void assertPriorCallReturns(boolean expected, @CheckForNull String methodName) + public void assertPriorCallReturns(boolean expected, @Nullable String methodName) throws Exception { assertEquals(expected, getResponse(methodName).getResult()); } @@ -275,7 +275,7 @@ private static class Response { final Object result; final Throwable throwable; - Response(String methodName, Object result, Throwable throwable) { + Response(String methodName, @Nullable Object result, @Nullable Throwable throwable) { this.methodName = methodName; this.result = result; this.throwable = throwable; diff --git a/android/guava-tests/test/com/google/common/util/concurrent/TrustedListenableFutureTaskTest.java b/android/guava-tests/test/com/google/common/util/concurrent/TrustedListenableFutureTaskTest.java index 8cf16c7bfe85..e58d3eef0de6 100644 --- a/android/guava-tests/test/com/google/common/util/concurrent/TrustedListenableFutureTaskTest.java +++ b/android/guava-tests/test/com/google/common/util/concurrent/TrustedListenableFutureTaskTest.java @@ -33,6 +33,7 @@ import java.util.concurrent.atomic.AtomicBoolean; import java.util.concurrent.atomic.AtomicInteger; import junit.framework.TestCase; +import org.checkerframework.checker.nullness.qual.Nullable; /** Test case for {@link TrustedListenableFutureTask}. */ @GwtCompatible(emulated = true) @@ -172,11 +173,11 @@ public void run() { public void testToString() throws Exception { final CountDownLatch enterLatch = new CountDownLatch(1); final CountDownLatch exitLatch = new CountDownLatch(1); - final TrustedListenableFutureTask task = + final TrustedListenableFutureTask<@Nullable Void> task = TrustedListenableFutureTask.create( - new Callable() { + new Callable<@Nullable Void>() { @Override - public Void call() throws Exception { + public @Nullable Void call() throws Exception { enterLatch.countDown(); new CountDownLatch(1).await(); // wait forever return null; diff --git a/android/guava-tests/test/com/google/common/util/concurrent/WrappingExecutorServiceTest.java b/android/guava-tests/test/com/google/common/util/concurrent/WrappingExecutorServiceTest.java index fdb2c54e6792..5cbc7c2b732c 100644 --- a/android/guava-tests/test/com/google/common/util/concurrent/WrappingExecutorServiceTest.java +++ b/android/guava-tests/test/com/google/common/util/concurrent/WrappingExecutorServiceTest.java @@ -188,7 +188,7 @@ protected Runnable wrapTask(Runnable command) { } } - // TODO: If this test can ever depend on EasyMock or the like, use it instead. + // TODO: If this test can ever depend on Mockito or the like, use it instead. private static final class MockExecutor implements ExecutorService { private String lastMethodCalled = ""; private long lastTimeoutInMillis = -1; diff --git a/android/guava/pom.xml b/android/guava/pom.xml index 09630e013bf0..f83ab7e0b068 100644 --- a/android/guava/pom.xml +++ b/android/guava/pom.xml @@ -62,7 +62,7 @@ true org.apache.felix maven-bundle-plugin - 2.5.0 + 5.1.8 bundle-manifest diff --git a/android/guava/src/com/google/common/annotations/J2ktIncompatible.java b/android/guava/src/com/google/common/annotations/J2ktIncompatible.java new file mode 100644 index 000000000000..6e28d025c932 --- /dev/null +++ b/android/guava/src/com/google/common/annotations/J2ktIncompatible.java @@ -0,0 +1,31 @@ +/* + * Copyright (C) 2009 The Guava Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ + +package com.google.common.annotations; + +import java.lang.annotation.ElementType; +import java.lang.annotation.Retention; +import java.lang.annotation.RetentionPolicy; +import java.lang.annotation.Target; + +/** + * The presence of this annotation on an API indicates that the method may not be used with + * J2kt. + * + * @since NEXT + */ +@Retention(RetentionPolicy.CLASS) +@Target({ElementType.TYPE, ElementType.METHOD, ElementType.CONSTRUCTOR, ElementType.FIELD}) +@GwtCompatible +public @interface J2ktIncompatible {} diff --git a/android/guava/src/com/google/common/annotations/VisibleForTesting.java b/android/guava/src/com/google/common/annotations/VisibleForTesting.java index e767afcdd3e2..24b4db5bde02 100644 --- a/android/guava/src/com/google/common/annotations/VisibleForTesting.java +++ b/android/guava/src/com/google/common/annotations/VisibleForTesting.java @@ -22,8 +22,8 @@ * bad design, and it does not prevent anyone from using the declaration---and experience has shown * that they will. If the method breaks the encapsulation of its class, then its internal * representation will be hard to change. Instead, use RestrictedApiChecker, which - * enforces fine-grained visibility policies. + * href="http://errorprone.info/bugpattern/RestrictedApi">RestrictedApiChecker, which enforces + * fine-grained visibility policies. * * @author Johannes Henkel */ diff --git a/android/guava/src/com/google/common/base/CaseFormat.java b/android/guava/src/com/google/common/base/CaseFormat.java index 7b393ebd7e0f..93fa7e4b7665 100644 --- a/android/guava/src/com/google/common/base/CaseFormat.java +++ b/android/guava/src/com/google/common/base/CaseFormat.java @@ -151,7 +151,8 @@ String convert(CaseFormat format, String s) { } /** - * Returns a {@code Converter} that converts strings from this format to {@code targetFormat}. + * Returns a serializable {@code Converter} that converts strings from this format to {@code + * targetFormat}. * * @since 16.0 */ diff --git a/android/guava/src/com/google/common/base/CharMatcher.java b/android/guava/src/com/google/common/base/CharMatcher.java index 2a2a89447890..47b4ed2b13b0 100644 --- a/android/guava/src/com/google/common/base/CharMatcher.java +++ b/android/guava/src/com/google/common/base/CharMatcher.java @@ -20,6 +20,7 @@ import com.google.common.annotations.GwtCompatible; import com.google.common.annotations.GwtIncompatible; +import com.google.common.annotations.J2ktIncompatible; import com.google.common.annotations.VisibleForTesting; import java.util.Arrays; import java.util.BitSet; @@ -411,6 +412,7 @@ public CharMatcher precomputed() { * constructs an eight-kilobyte bit array and queries that. In many situations this produces a * matcher which is faster to query than the original. */ + @J2ktIncompatible @GwtIncompatible // SmallCharMatcher CharMatcher precomputedInternal() { final BitSet table = new BitSet(); @@ -441,6 +443,7 @@ public String toString() { /** * Helper method for {@link #precomputedInternal} that doesn't test if the negation is cheaper. */ + @J2ktIncompatible @GwtIncompatible // SmallCharMatcher private static CharMatcher precomputedPositive( int totalCharacters, BitSet table, String description) { @@ -460,6 +463,7 @@ private static CharMatcher precomputedPositive( } } + @J2ktIncompatible @GwtIncompatible // SmallCharMatcher private static boolean isSmall(int totalCharacters, int tableLength) { return totalCharacters <= SmallCharMatcher.MAX_SIZE @@ -468,6 +472,7 @@ private static boolean isSmall(int totalCharacters, int tableLength) { } /** Sets bits in {@code table} matched by this matcher. */ + @J2ktIncompatible @GwtIncompatible // used only from other GwtIncompatible code void setBits(BitSet table) { for (int c = Character.MAX_VALUE; c >= Character.MIN_VALUE; c--) { @@ -978,6 +983,7 @@ public final CharMatcher precomputed() { } /** Fast matcher using a {@link BitSet} table of matching characters. */ + @J2ktIncompatible @GwtIncompatible // used only from other GwtIncompatible code private static final class BitSetMatcher extends NamedFastMatcher { @@ -1232,6 +1238,7 @@ public boolean matches(char c) { return TABLE.charAt((MULTIPLIER * c) >>> SHIFT) == c; } + @J2ktIncompatible @GwtIncompatible // used only from other GwtIncompatible code @Override void setBits(BitSet table) { @@ -1518,6 +1525,7 @@ public int countIn(CharSequence sequence) { return sequence.length() - original.countIn(sequence); } + @J2ktIncompatible @GwtIncompatible // used only from other GwtIncompatible code @Override void setBits(BitSet table) { @@ -1554,6 +1562,7 @@ public boolean matches(char c) { return first.matches(c) && second.matches(c); } + @J2ktIncompatible @GwtIncompatible // used only from other GwtIncompatible code @Override void setBits(BitSet table) { @@ -1582,6 +1591,7 @@ private static final class Or extends CharMatcher { second = checkNotNull(b); } + @J2ktIncompatible @GwtIncompatible // used only from other GwtIncompatible code @Override void setBits(BitSet table) { @@ -1636,6 +1646,7 @@ public CharMatcher negate() { return isNot(match); } + @J2ktIncompatible @GwtIncompatible // used only from other GwtIncompatible code @Override void setBits(BitSet table) { @@ -1672,6 +1683,7 @@ public CharMatcher or(CharMatcher other) { return other.matches(match) ? any() : this; } + @J2ktIncompatible @GwtIncompatible // used only from other GwtIncompatible code @Override void setBits(BitSet table) { @@ -1710,6 +1722,7 @@ public boolean matches(char c) { return c == match1 || c == match2; } + @J2ktIncompatible @GwtIncompatible // used only from other GwtIncompatible code @Override void setBits(BitSet table) { @@ -1739,6 +1752,7 @@ public boolean matches(char c) { } @Override + @J2ktIncompatible @GwtIncompatible // used only from other GwtIncompatible code void setBits(BitSet table) { for (char c : chars) { @@ -1774,6 +1788,7 @@ public boolean matches(char c) { return startInclusive <= c && c <= endInclusive; } + @J2ktIncompatible @GwtIncompatible // used only from other GwtIncompatible code @Override void setBits(BitSet table) { diff --git a/android/guava/src/com/google/common/base/Charsets.java b/android/guava/src/com/google/common/base/Charsets.java index 7aebea826c78..538e604f2dbd 100644 --- a/android/guava/src/com/google/common/base/Charsets.java +++ b/android/guava/src/com/google/common/base/Charsets.java @@ -16,6 +16,7 @@ import com.google.common.annotations.GwtCompatible; import com.google.common.annotations.GwtIncompatible; +import com.google.common.annotations.J2ktIncompatible; import java.nio.charset.Charset; /** @@ -42,6 +43,7 @@ private Charsets() {} * java.nio.charset.StandardCharsets#US_ASCII} instead. * */ + @J2ktIncompatible @GwtIncompatible // Charset not supported by GWT public static final Charset US_ASCII = Charset.forName("US-ASCII"); @@ -70,6 +72,7 @@ private Charsets() {} * java.nio.charset.StandardCharsets#UTF_16BE} instead. * */ + @J2ktIncompatible @GwtIncompatible // Charset not supported by GWT public static final Charset UTF_16BE = Charset.forName("UTF-16BE"); @@ -80,6 +83,7 @@ private Charsets() {} * java.nio.charset.StandardCharsets#UTF_16LE} instead. * */ + @J2ktIncompatible @GwtIncompatible // Charset not supported by GWT public static final Charset UTF_16LE = Charset.forName("UTF-16LE"); @@ -91,6 +95,7 @@ private Charsets() {} * java.nio.charset.StandardCharsets#UTF_16} instead. * */ + @J2ktIncompatible @GwtIncompatible // Charset not supported by GWT public static final Charset UTF_16 = Charset.forName("UTF-16"); diff --git a/android/guava/src/com/google/common/base/Converter.java b/android/guava/src/com/google/common/base/Converter.java index 7f1234d9a176..63f4394f4821 100644 --- a/android/guava/src/com/google/common/base/Converter.java +++ b/android/guava/src/com/google/common/base/Converter.java @@ -283,8 +283,6 @@ public boolean hasNext() { } @Override - @SuppressWarnings("nullness") // See code comments on convertAll and Converter.apply. - @CheckForNull public B next() { return convert(fromIterator.next()); } @@ -458,40 +456,26 @@ public String toString() { */ @Deprecated @Override - /* - * Even though we implement `Function` instead of `Function<@Nullable A, @Nullable B>` (as - * discussed in a code comment at the top of the class), we declare our override of Function.apply - * to accept and return null. This requires a suppression, but it's safe: - * - * - Callers who use Converter as a Function will neither pass null nor have it returned to - * them. (Or, if they're not using nullness checking, they might be able to pass null and thus - * have null returned to them. But our signature isn't making their existing nullness type error - * any worse.) - * - In the relatively unlikely event that anyone calls Converter.apply directly, that caller is - * allowed to pass null but is also forced to deal with a potentially null return. - * - Perhaps more important than actual *callers* of this method are various tools that look at - * bytecode. Notably, NullPointerTester expects a method to throw NPE when passed null unless it - * is annotated in a way that identifies its parameter type as potentially including null. (And - * this method does not throw NPE -- nor do we want to enact a dangerous change to make it begin - * doing so.) We can even imagine tools that rewrite bytecode to insert null checks before and - * after calling methods with allegedly non-nullable parameters[*]. If we didn't annotate the - * parameter and return type here, then anyone who used such a tool (and managed to pass null to - * this method, presumably because that user doesn't run a normal nullness checker) could see - * NullPointerException. - * - * [*] Granted, such tools could conceivably be smart enough to recognize that the apply() method - * on a Function should never allow null inputs and never produce null outputs even if - * this specific subclass claims otherwise. Such tools might still produce NPE for calls to this - * method. And that is one reason that we should be nervous about "lying" by extending Function in the first place. But for now, we're giving it a try, since extending Function<@Nullable - * A, @Nullable B> will cause issues *today*, whereas extending Function causes problems in - * various hypothetical futures. (Plus, a tool that were that smart would likely already introduce - * problems with LegacyConverter.) - */ - @SuppressWarnings("nullness") - @CheckForNull @InlineMe(replacement = "this.convert(a)") - public final B apply(@CheckForNull A a) { + public final B apply(A a) { + /* + * Given that we declare this method as accepting and returning non-nullable values (because we + * implement Function, as discussed in a class-level comment), it would make some sense to + * perform runtime null checks on the input and output. (That would also make NullPointerTester + * happy!) However, since we didn't do that for many years, we're not about to start now. + * (Runtime checks could be particularly bad for users of LegacyConverter.) + * + * Luckily, our nullness checker is smart enough to realize that `convert` has @PolyNull-like + * behavior, so it knows that `convert(a)` returns a non-nullable value, and we don't need to + * perform even a cast, much less a runtime check. + * + * All that said, don't forget that everyone should call converter.convert() instead of + * converter.apply(), anyway. If clients use only converter.convert(), then their nullness + * checkers are unlikely to ever look at the annotations on this declaration. + * + * Historical note: At one point, we'd declared this method as accepting and returning nullable + * values. For details on that, see earlier revisions of this file. + */ return convert(a); } diff --git a/android/guava/src/com/google/common/base/Defaults.java b/android/guava/src/com/google/common/base/Defaults.java index 5d12343ed241..089f4b572438 100644 --- a/android/guava/src/com/google/common/base/Defaults.java +++ b/android/guava/src/com/google/common/base/Defaults.java @@ -17,6 +17,7 @@ import static com.google.common.base.Preconditions.checkNotNull; import com.google.common.annotations.GwtIncompatible; +import com.google.common.annotations.J2ktIncompatible; import javax.annotation.CheckForNull; /** @@ -25,6 +26,7 @@ * @author Ben Yu * @since 1.0 */ +@J2ktIncompatible @GwtIncompatible @ElementTypesAreNonnullByDefault public final class Defaults { diff --git a/android/guava/src/com/google/common/base/Enums.java b/android/guava/src/com/google/common/base/Enums.java index 5c55b65942cd..11fbfa8ffad2 100644 --- a/android/guava/src/com/google/common/base/Enums.java +++ b/android/guava/src/com/google/common/base/Enums.java @@ -18,6 +18,7 @@ import com.google.common.annotations.GwtCompatible; import com.google.common.annotations.GwtIncompatible; +import com.google.common.annotations.J2ktIncompatible; import java.io.Serializable; import java.lang.ref.WeakReference; import java.lang.reflect.Field; @@ -34,6 +35,7 @@ * @since 9.0 */ @GwtCompatible(emulated = true) +@J2ktIncompatible @ElementTypesAreNonnullByDefault public final class Enums { @@ -48,7 +50,8 @@ private Enums() {} */ @GwtIncompatible // reflection public static Field getField(Enum enumValue) { - Class clazz = enumValue.getDeclaringClass(); + Class + clazz = enumValue.getDeclaringClass(); try { return clazz.getDeclaredField(enumValue.name()); } catch (NoSuchFieldException impossible) { @@ -98,10 +101,10 @@ static > Map>> getEnum } /** - * Returns a converter that converts between strings and {@code enum} values of type {@code - * enumClass} using {@link Enum#valueOf(Class, String)} and {@link Enum#name()}. The converter - * will throw an {@code IllegalArgumentException} if the argument is not the name of any enum - * constant in the specified enum. + * Returns a serializable converter that converts between strings and {@code enum} values of type + * {@code enumClass} using {@link Enum#valueOf(Class, String)} and {@link Enum#name()}. The + * converter will throw an {@code IllegalArgumentException} if the argument is not the name of any + * enum constant in the specified enum. * * @since 16.0 */ diff --git a/android/guava/src/com/google/common/base/Equivalence.java b/android/guava/src/com/google/common/base/Equivalence.java index 7e245f6b4e9b..d4c9566c0ef5 100644 --- a/android/guava/src/com/google/common/base/Equivalence.java +++ b/android/guava/src/com/google/common/base/Equivalence.java @@ -151,11 +151,13 @@ public final Equivalence onResultOf(FunctionThe returned object is serializable if both this {@code Equivalence} and {@code reference} + * are serializable (including when {@code reference} is null). + * * @since 10.0 */ public final Wrapper wrap(@ParametricNullness S reference) { - Wrapper w = new Wrapper<>(this, reference); - return w; + return new Wrapper<>(this, reference); } /** @@ -255,6 +257,8 @@ public String toString() { *

    Note that this method performs a similar function for equivalences as {@link * com.google.common.collect.Ordering#lexicographical} does for orderings. * + *

    The returned object is serializable if this object is serializable. + * * @since 10.0 */ @GwtCompatible(serializable = true) diff --git a/android/guava/src/com/google/common/base/FinalizablePhantomReference.java b/android/guava/src/com/google/common/base/FinalizablePhantomReference.java index 4f9399669569..6f76b63f7647 100644 --- a/android/guava/src/com/google/common/base/FinalizablePhantomReference.java +++ b/android/guava/src/com/google/common/base/FinalizablePhantomReference.java @@ -15,6 +15,7 @@ package com.google.common.base; import com.google.common.annotations.GwtIncompatible; +import com.google.common.annotations.J2ktIncompatible; import java.lang.ref.PhantomReference; import java.lang.ref.ReferenceQueue; import javax.annotation.CheckForNull; @@ -29,6 +30,7 @@ * @author Bob Lee * @since 2.0 */ +@J2ktIncompatible @GwtIncompatible @ElementTypesAreNonnullByDefault public abstract class FinalizablePhantomReference extends PhantomReference diff --git a/android/guava/src/com/google/common/base/FinalizableReference.java b/android/guava/src/com/google/common/base/FinalizableReference.java index 73753c9b3520..f538f9dc0e1b 100644 --- a/android/guava/src/com/google/common/base/FinalizableReference.java +++ b/android/guava/src/com/google/common/base/FinalizableReference.java @@ -15,6 +15,7 @@ package com.google.common.base; import com.google.common.annotations.GwtIncompatible; +import com.google.common.annotations.J2ktIncompatible; import com.google.errorprone.annotations.DoNotMock; /** @@ -25,6 +26,7 @@ * @since 2.0 */ @DoNotMock("Use an instance of one of the Finalizable*Reference classes") +@J2ktIncompatible @GwtIncompatible @ElementTypesAreNonnullByDefault public interface FinalizableReference { diff --git a/android/guava/src/com/google/common/base/FinalizableReferenceQueue.java b/android/guava/src/com/google/common/base/FinalizableReferenceQueue.java index 7447b8051d31..7f1afbb3904d 100644 --- a/android/guava/src/com/google/common/base/FinalizableReferenceQueue.java +++ b/android/guava/src/com/google/common/base/FinalizableReferenceQueue.java @@ -15,6 +15,7 @@ package com.google.common.base; import com.google.common.annotations.GwtIncompatible; +import com.google.common.annotations.J2ktIncompatible; import com.google.common.annotations.VisibleForTesting; import java.io.Closeable; import java.io.FileNotFoundException; @@ -88,6 +89,7 @@ * @author Bob Lee * @since 2.0 */ +@J2ktIncompatible @GwtIncompatible @ElementTypesAreNonnullByDefault public class FinalizableReferenceQueue implements Closeable { diff --git a/android/guava/src/com/google/common/base/FinalizableSoftReference.java b/android/guava/src/com/google/common/base/FinalizableSoftReference.java index c0e9b6bae041..f4b7c80050fb 100644 --- a/android/guava/src/com/google/common/base/FinalizableSoftReference.java +++ b/android/guava/src/com/google/common/base/FinalizableSoftReference.java @@ -15,6 +15,7 @@ package com.google.common.base; import com.google.common.annotations.GwtIncompatible; +import com.google.common.annotations.J2ktIncompatible; import java.lang.ref.ReferenceQueue; import java.lang.ref.SoftReference; import javax.annotation.CheckForNull; @@ -27,6 +28,7 @@ * @author Bob Lee * @since 2.0 */ +@J2ktIncompatible @GwtIncompatible @ElementTypesAreNonnullByDefault public abstract class FinalizableSoftReference extends SoftReference diff --git a/android/guava/src/com/google/common/base/FinalizableWeakReference.java b/android/guava/src/com/google/common/base/FinalizableWeakReference.java index 9cca92ed5310..12c8dfbfceb3 100644 --- a/android/guava/src/com/google/common/base/FinalizableWeakReference.java +++ b/android/guava/src/com/google/common/base/FinalizableWeakReference.java @@ -15,6 +15,7 @@ package com.google.common.base; import com.google.common.annotations.GwtIncompatible; +import com.google.common.annotations.J2ktIncompatible; import java.lang.ref.ReferenceQueue; import java.lang.ref.WeakReference; import javax.annotation.CheckForNull; @@ -27,6 +28,7 @@ * @author Bob Lee * @since 2.0 */ +@J2ktIncompatible @GwtIncompatible @ElementTypesAreNonnullByDefault public abstract class FinalizableWeakReference extends WeakReference diff --git a/android/guava/src/com/google/common/base/FunctionalEquivalence.java b/android/guava/src/com/google/common/base/FunctionalEquivalence.java index 4383f4f36c1a..1cd8c416d39a 100644 --- a/android/guava/src/com/google/common/base/FunctionalEquivalence.java +++ b/android/guava/src/com/google/common/base/FunctionalEquivalence.java @@ -16,7 +16,6 @@ import static com.google.common.base.Preconditions.checkNotNull; -import com.google.common.annotations.Beta; import com.google.common.annotations.GwtCompatible; import java.io.Serializable; import javax.annotation.CheckForNull; @@ -28,7 +27,6 @@ * @author Bob Lee * @since 10.0 */ -@Beta @GwtCompatible @ElementTypesAreNonnullByDefault final class FunctionalEquivalence extends Equivalence implements Serializable { diff --git a/android/guava/src/com/google/common/base/Java8Compatibility.java b/android/guava/src/com/google/common/base/Java8Compatibility.java index edc8b73bdd10..2dfbd6b1cf19 100644 --- a/android/guava/src/com/google/common/base/Java8Compatibility.java +++ b/android/guava/src/com/google/common/base/Java8Compatibility.java @@ -15,12 +15,14 @@ package com.google.common.base; import com.google.common.annotations.GwtIncompatible; +import com.google.common.annotations.J2ktIncompatible; import java.nio.Buffer; /** * Wrappers around {@link Buffer} methods that are covariantly overridden in Java 9+. See * https://github.com/google/guava/issues/3990 */ +@J2ktIncompatible @GwtIncompatible @ElementTypesAreNonnullByDefault final class Java8Compatibility { diff --git a/android/guava/src/com/google/common/base/JdkPattern.java b/android/guava/src/com/google/common/base/JdkPattern.java index 4788398b7c20..a259d0061daa 100644 --- a/android/guava/src/com/google/common/base/JdkPattern.java +++ b/android/guava/src/com/google/common/base/JdkPattern.java @@ -15,12 +15,14 @@ package com.google.common.base; import com.google.common.annotations.GwtIncompatible; +import com.google.common.annotations.J2ktIncompatible; import java.io.Serializable; import java.util.regex.Matcher; import java.util.regex.Pattern; /** A regex pattern implementation which is backed by the {@link Pattern}. */ @ElementTypesAreNonnullByDefault +@J2ktIncompatible @GwtIncompatible final class JdkPattern extends CommonPattern implements Serializable { private final Pattern pattern; diff --git a/android/guava/src/com/google/common/base/Joiner.java b/android/guava/src/com/google/common/base/Joiner.java index 8b29f68f8ad1..fe1b40a5e073 100644 --- a/android/guava/src/com/google/common/base/Joiner.java +++ b/android/guava/src/com/google/common/base/Joiner.java @@ -17,7 +17,6 @@ import static com.google.common.base.Preconditions.checkNotNull; import static java.util.Objects.requireNonNull; -import com.google.common.annotations.Beta; import com.google.common.annotations.GwtCompatible; import com.google.errorprone.annotations.CanIgnoreReturnValue; import java.io.IOException; @@ -366,7 +365,6 @@ public StringBuilder appendTo(StringBuilder builder, Map map) { * * @since 10.0 */ - @Beta @CanIgnoreReturnValue public A appendTo(A appendable, Iterable> entries) throws IOException { @@ -379,7 +377,6 @@ public A appendTo(A appendable, Iterable A appendTo(A appendable, Iterator> parts) throws IOException { @@ -407,7 +404,6 @@ public A appendTo(A appendable, Iterator> entries) { return appendTo(builder, entries.iterator()); @@ -420,7 +416,6 @@ public StringBuilder appendTo(StringBuilder builder, Iterable> entries) { try { @@ -445,7 +440,6 @@ public String join(Map map) { * * @since 10.0 */ - @Beta public String join(Iterable> entries) { return join(entries.iterator()); } @@ -456,7 +450,6 @@ public String join(Iterable> entries) { * * @since 11.0 */ - @Beta public String join(Iterator> entries) { return appendTo(new StringBuilder(), entries).toString(); } diff --git a/android/guava/src/com/google/common/base/MoreObjects.java b/android/guava/src/com/google/common/base/MoreObjects.java index b54cc5d204c3..36e912c14c2d 100644 --- a/android/guava/src/com/google/common/base/MoreObjects.java +++ b/android/guava/src/com/google/common/base/MoreObjects.java @@ -408,12 +408,14 @@ private ValueHolder addHolder() { return valueHolder; } + @CanIgnoreReturnValue private ToStringHelper addHolder(@CheckForNull Object value) { ValueHolder valueHolder = addHolder(); valueHolder.value = value; return this; } + @CanIgnoreReturnValue private ToStringHelper addHolder(String name, @CheckForNull Object value) { ValueHolder valueHolder = addHolder(); valueHolder.value = value; @@ -427,12 +429,14 @@ private UnconditionalValueHolder addUnconditionalHolder() { return valueHolder; } + @CanIgnoreReturnValue private ToStringHelper addUnconditionalHolder(Object value) { UnconditionalValueHolder valueHolder = addUnconditionalHolder(); valueHolder.value = value; return this; } + @CanIgnoreReturnValue private ToStringHelper addUnconditionalHolder(String name, Object value) { UnconditionalValueHolder valueHolder = addUnconditionalHolder(); valueHolder.value = value; diff --git a/android/guava/src/com/google/common/base/Optional.java b/android/guava/src/com/google/common/base/Optional.java index a7a0b3d72038..6eac98326686 100644 --- a/android/guava/src/com/google/common/base/Optional.java +++ b/android/guava/src/com/google/common/base/Optional.java @@ -16,7 +16,6 @@ import static com.google.common.base.Preconditions.checkNotNull; -import com.google.common.annotations.Beta; import com.google.common.annotations.GwtCompatible; import com.google.errorprone.annotations.DoNotMock; import java.io.Serializable; @@ -52,6 +51,9 @@ *

    This class is not intended as a direct analogue of any existing "option" or "maybe" construct * from other programming environments, though it may bear some similarities. * + *

    An instance of this class is serializable if its reference is absent or is a serializable + * object. + * *

    Comparison to {@code java.util.Optional} (JDK 8 and higher): A new {@code Optional} * class was added for Java 8. The two classes are extremely similar, but incompatible (they cannot * share a common supertype). All known differences are listed either here or with the @@ -197,7 +199,6 @@ public static Optional fromNullable(@CheckForNull T nullableReference) { * @throws NullPointerException if this optional's value is absent and the supplier returns {@code * null} */ - @Beta public abstract T or(Supplier supplier); /** @@ -289,7 +290,6 @@ public static Optional fromNullable(@CheckForNull T nullableReference) { * * @since 11.0 (generics widened in 13.0) */ - @Beta public static Iterable presentInstances( final Iterable> optionals) { checkNotNull(optionals); diff --git a/android/guava/src/com/google/common/base/PairwiseEquivalence.java b/android/guava/src/com/google/common/base/PairwiseEquivalence.java index 74be27fd7c6f..ea40518c5a50 100644 --- a/android/guava/src/com/google/common/base/PairwiseEquivalence.java +++ b/android/guava/src/com/google/common/base/PairwiseEquivalence.java @@ -56,7 +56,8 @@ protected int doHash(Iterable iterable) { @Override public boolean equals(@CheckForNull Object object) { if (object instanceof PairwiseEquivalence) { - PairwiseEquivalence that = (PairwiseEquivalence) object; + @SuppressWarnings("unchecked") + PairwiseEquivalence that = (PairwiseEquivalence) object; return this.elementEquivalence.equals(that.elementEquivalence); } diff --git a/android/guava/src/com/google/common/base/PatternCompiler.java b/android/guava/src/com/google/common/base/PatternCompiler.java index 72a45faae963..6a7b620b2569 100644 --- a/android/guava/src/com/google/common/base/PatternCompiler.java +++ b/android/guava/src/com/google/common/base/PatternCompiler.java @@ -15,12 +15,14 @@ package com.google.common.base; import com.google.common.annotations.GwtIncompatible; +import com.google.common.annotations.J2ktIncompatible; /** * Pluggable interface for compiling a regex pattern. By default this package uses the {@code * java.util.regex} library, but an alternate implementation can be supplied using the {@link * java.util.ServiceLoader} mechanism. */ +@J2ktIncompatible @GwtIncompatible @ElementTypesAreNonnullByDefault interface PatternCompiler { diff --git a/android/guava/src/com/google/common/base/Preconditions.java b/android/guava/src/com/google/common/base/Preconditions.java index a42c22eb88f5..1e9ac39cb40c 100644 --- a/android/guava/src/com/google/common/base/Preconditions.java +++ b/android/guava/src/com/google/common/base/Preconditions.java @@ -118,8 +118,6 @@ public final class Preconditions { private Preconditions() {} - // TODO(cpovirk): Standardize parameter names (expression vs. b, reference vs. obj). - /** * Ensures the truth of an expression involving one or more parameters to the calling method. * @@ -175,8 +173,8 @@ public static void checkArgument( * * @since 20.0 (varargs overload since 2.0) */ - public static void checkArgument(boolean b, String errorMessageTemplate, char p1) { - if (!b) { + public static void checkArgument(boolean expression, String errorMessageTemplate, char p1) { + if (!expression) { throw new IllegalArgumentException(lenientFormat(errorMessageTemplate, p1)); } } @@ -188,8 +186,8 @@ public static void checkArgument(boolean b, String errorMessageTemplate, char p1 * * @since 20.0 (varargs overload since 2.0) */ - public static void checkArgument(boolean b, String errorMessageTemplate, int p1) { - if (!b) { + public static void checkArgument(boolean expression, String errorMessageTemplate, int p1) { + if (!expression) { throw new IllegalArgumentException(lenientFormat(errorMessageTemplate, p1)); } } @@ -201,8 +199,8 @@ public static void checkArgument(boolean b, String errorMessageTemplate, int p1) * * @since 20.0 (varargs overload since 2.0) */ - public static void checkArgument(boolean b, String errorMessageTemplate, long p1) { - if (!b) { + public static void checkArgument(boolean expression, String errorMessageTemplate, long p1) { + if (!expression) { throw new IllegalArgumentException(lenientFormat(errorMessageTemplate, p1)); } } @@ -215,8 +213,8 @@ public static void checkArgument(boolean b, String errorMessageTemplate, long p1 * @since 20.0 (varargs overload since 2.0) */ public static void checkArgument( - boolean b, String errorMessageTemplate, @CheckForNull Object p1) { - if (!b) { + boolean expression, String errorMessageTemplate, @CheckForNull Object p1) { + if (!expression) { throw new IllegalArgumentException(lenientFormat(errorMessageTemplate, p1)); } } @@ -228,8 +226,9 @@ public static void checkArgument( * * @since 20.0 (varargs overload since 2.0) */ - public static void checkArgument(boolean b, String errorMessageTemplate, char p1, char p2) { - if (!b) { + public static void checkArgument( + boolean expression, String errorMessageTemplate, char p1, char p2) { + if (!expression) { throw new IllegalArgumentException(lenientFormat(errorMessageTemplate, p1, p2)); } } @@ -241,8 +240,9 @@ public static void checkArgument(boolean b, String errorMessageTemplate, char p1 * * @since 20.0 (varargs overload since 2.0) */ - public static void checkArgument(boolean b, String errorMessageTemplate, char p1, int p2) { - if (!b) { + public static void checkArgument( + boolean expression, String errorMessageTemplate, char p1, int p2) { + if (!expression) { throw new IllegalArgumentException(lenientFormat(errorMessageTemplate, p1, p2)); } } @@ -254,8 +254,9 @@ public static void checkArgument(boolean b, String errorMessageTemplate, char p1 * * @since 20.0 (varargs overload since 2.0) */ - public static void checkArgument(boolean b, String errorMessageTemplate, char p1, long p2) { - if (!b) { + public static void checkArgument( + boolean expression, String errorMessageTemplate, char p1, long p2) { + if (!expression) { throw new IllegalArgumentException(lenientFormat(errorMessageTemplate, p1, p2)); } } @@ -268,8 +269,8 @@ public static void checkArgument(boolean b, String errorMessageTemplate, char p1 * @since 20.0 (varargs overload since 2.0) */ public static void checkArgument( - boolean b, String errorMessageTemplate, char p1, @CheckForNull Object p2) { - if (!b) { + boolean expression, String errorMessageTemplate, char p1, @CheckForNull Object p2) { + if (!expression) { throw new IllegalArgumentException(lenientFormat(errorMessageTemplate, p1, p2)); } } @@ -281,8 +282,9 @@ public static void checkArgument( * * @since 20.0 (varargs overload since 2.0) */ - public static void checkArgument(boolean b, String errorMessageTemplate, int p1, char p2) { - if (!b) { + public static void checkArgument( + boolean expression, String errorMessageTemplate, int p1, char p2) { + if (!expression) { throw new IllegalArgumentException(lenientFormat(errorMessageTemplate, p1, p2)); } } @@ -294,8 +296,9 @@ public static void checkArgument(boolean b, String errorMessageTemplate, int p1, * * @since 20.0 (varargs overload since 2.0) */ - public static void checkArgument(boolean b, String errorMessageTemplate, int p1, int p2) { - if (!b) { + public static void checkArgument( + boolean expression, String errorMessageTemplate, int p1, int p2) { + if (!expression) { throw new IllegalArgumentException(lenientFormat(errorMessageTemplate, p1, p2)); } } @@ -307,8 +310,9 @@ public static void checkArgument(boolean b, String errorMessageTemplate, int p1, * * @since 20.0 (varargs overload since 2.0) */ - public static void checkArgument(boolean b, String errorMessageTemplate, int p1, long p2) { - if (!b) { + public static void checkArgument( + boolean expression, String errorMessageTemplate, int p1, long p2) { + if (!expression) { throw new IllegalArgumentException(lenientFormat(errorMessageTemplate, p1, p2)); } } @@ -321,8 +325,8 @@ public static void checkArgument(boolean b, String errorMessageTemplate, int p1, * @since 20.0 (varargs overload since 2.0) */ public static void checkArgument( - boolean b, String errorMessageTemplate, int p1, @CheckForNull Object p2) { - if (!b) { + boolean expression, String errorMessageTemplate, int p1, @CheckForNull Object p2) { + if (!expression) { throw new IllegalArgumentException(lenientFormat(errorMessageTemplate, p1, p2)); } } @@ -334,8 +338,9 @@ public static void checkArgument( * * @since 20.0 (varargs overload since 2.0) */ - public static void checkArgument(boolean b, String errorMessageTemplate, long p1, char p2) { - if (!b) { + public static void checkArgument( + boolean expression, String errorMessageTemplate, long p1, char p2) { + if (!expression) { throw new IllegalArgumentException(lenientFormat(errorMessageTemplate, p1, p2)); } } @@ -347,8 +352,9 @@ public static void checkArgument(boolean b, String errorMessageTemplate, long p1 * * @since 20.0 (varargs overload since 2.0) */ - public static void checkArgument(boolean b, String errorMessageTemplate, long p1, int p2) { - if (!b) { + public static void checkArgument( + boolean expression, String errorMessageTemplate, long p1, int p2) { + if (!expression) { throw new IllegalArgumentException(lenientFormat(errorMessageTemplate, p1, p2)); } } @@ -360,8 +366,9 @@ public static void checkArgument(boolean b, String errorMessageTemplate, long p1 * * @since 20.0 (varargs overload since 2.0) */ - public static void checkArgument(boolean b, String errorMessageTemplate, long p1, long p2) { - if (!b) { + public static void checkArgument( + boolean expression, String errorMessageTemplate, long p1, long p2) { + if (!expression) { throw new IllegalArgumentException(lenientFormat(errorMessageTemplate, p1, p2)); } } @@ -374,8 +381,8 @@ public static void checkArgument(boolean b, String errorMessageTemplate, long p1 * @since 20.0 (varargs overload since 2.0) */ public static void checkArgument( - boolean b, String errorMessageTemplate, long p1, @CheckForNull Object p2) { - if (!b) { + boolean expression, String errorMessageTemplate, long p1, @CheckForNull Object p2) { + if (!expression) { throw new IllegalArgumentException(lenientFormat(errorMessageTemplate, p1, p2)); } } @@ -388,8 +395,8 @@ public static void checkArgument( * @since 20.0 (varargs overload since 2.0) */ public static void checkArgument( - boolean b, String errorMessageTemplate, @CheckForNull Object p1, char p2) { - if (!b) { + boolean expression, String errorMessageTemplate, @CheckForNull Object p1, char p2) { + if (!expression) { throw new IllegalArgumentException(lenientFormat(errorMessageTemplate, p1, p2)); } } @@ -402,8 +409,8 @@ public static void checkArgument( * @since 20.0 (varargs overload since 2.0) */ public static void checkArgument( - boolean b, String errorMessageTemplate, @CheckForNull Object p1, int p2) { - if (!b) { + boolean expression, String errorMessageTemplate, @CheckForNull Object p1, int p2) { + if (!expression) { throw new IllegalArgumentException(lenientFormat(errorMessageTemplate, p1, p2)); } } @@ -416,8 +423,8 @@ public static void checkArgument( * @since 20.0 (varargs overload since 2.0) */ public static void checkArgument( - boolean b, String errorMessageTemplate, @CheckForNull Object p1, long p2) { - if (!b) { + boolean expression, String errorMessageTemplate, @CheckForNull Object p1, long p2) { + if (!expression) { throw new IllegalArgumentException(lenientFormat(errorMessageTemplate, p1, p2)); } } @@ -430,8 +437,11 @@ public static void checkArgument( * @since 20.0 (varargs overload since 2.0) */ public static void checkArgument( - boolean b, String errorMessageTemplate, @CheckForNull Object p1, @CheckForNull Object p2) { - if (!b) { + boolean expression, + String errorMessageTemplate, + @CheckForNull Object p1, + @CheckForNull Object p2) { + if (!expression) { throw new IllegalArgumentException(lenientFormat(errorMessageTemplate, p1, p2)); } } @@ -444,12 +454,12 @@ public static void checkArgument( * @since 20.0 (varargs overload since 2.0) */ public static void checkArgument( - boolean b, + boolean expression, String errorMessageTemplate, @CheckForNull Object p1, @CheckForNull Object p2, @CheckForNull Object p3) { - if (!b) { + if (!expression) { throw new IllegalArgumentException(lenientFormat(errorMessageTemplate, p1, p2, p3)); } } @@ -462,13 +472,13 @@ public static void checkArgument( * @since 20.0 (varargs overload since 2.0) */ public static void checkArgument( - boolean b, + boolean expression, String errorMessageTemplate, @CheckForNull Object p1, @CheckForNull Object p2, @CheckForNull Object p3, @CheckForNull Object p4) { - if (!b) { + if (!expression) { throw new IllegalArgumentException(lenientFormat(errorMessageTemplate, p1, p2, p3, p4)); } } @@ -543,8 +553,8 @@ public static void checkState( * * @since 20.0 (varargs overload since 2.0) */ - public static void checkState(boolean b, String errorMessageTemplate, char p1) { - if (!b) { + public static void checkState(boolean expression, String errorMessageTemplate, char p1) { + if (!expression) { throw new IllegalStateException(lenientFormat(errorMessageTemplate, p1)); } } @@ -557,8 +567,8 @@ public static void checkState(boolean b, String errorMessageTemplate, char p1) { * * @since 20.0 (varargs overload since 2.0) */ - public static void checkState(boolean b, String errorMessageTemplate, int p1) { - if (!b) { + public static void checkState(boolean expression, String errorMessageTemplate, int p1) { + if (!expression) { throw new IllegalStateException(lenientFormat(errorMessageTemplate, p1)); } } @@ -571,8 +581,8 @@ public static void checkState(boolean b, String errorMessageTemplate, int p1) { * * @since 20.0 (varargs overload since 2.0) */ - public static void checkState(boolean b, String errorMessageTemplate, long p1) { - if (!b) { + public static void checkState(boolean expression, String errorMessageTemplate, long p1) { + if (!expression) { throw new IllegalStateException(lenientFormat(errorMessageTemplate, p1)); } } @@ -585,8 +595,9 @@ public static void checkState(boolean b, String errorMessageTemplate, long p1) { * * @since 20.0 (varargs overload since 2.0) */ - public static void checkState(boolean b, String errorMessageTemplate, @CheckForNull Object p1) { - if (!b) { + public static void checkState( + boolean expression, String errorMessageTemplate, @CheckForNull Object p1) { + if (!expression) { throw new IllegalStateException(lenientFormat(errorMessageTemplate, p1)); } } @@ -599,8 +610,8 @@ public static void checkState(boolean b, String errorMessageTemplate, @CheckForN * * @since 20.0 (varargs overload since 2.0) */ - public static void checkState(boolean b, String errorMessageTemplate, char p1, char p2) { - if (!b) { + public static void checkState(boolean expression, String errorMessageTemplate, char p1, char p2) { + if (!expression) { throw new IllegalStateException(lenientFormat(errorMessageTemplate, p1, p2)); } } @@ -613,8 +624,8 @@ public static void checkState(boolean b, String errorMessageTemplate, char p1, c * * @since 20.0 (varargs overload since 2.0) */ - public static void checkState(boolean b, String errorMessageTemplate, char p1, int p2) { - if (!b) { + public static void checkState(boolean expression, String errorMessageTemplate, char p1, int p2) { + if (!expression) { throw new IllegalStateException(lenientFormat(errorMessageTemplate, p1, p2)); } } @@ -627,8 +638,8 @@ public static void checkState(boolean b, String errorMessageTemplate, char p1, i * * @since 20.0 (varargs overload since 2.0) */ - public static void checkState(boolean b, String errorMessageTemplate, char p1, long p2) { - if (!b) { + public static void checkState(boolean expression, String errorMessageTemplate, char p1, long p2) { + if (!expression) { throw new IllegalStateException(lenientFormat(errorMessageTemplate, p1, p2)); } } @@ -642,8 +653,8 @@ public static void checkState(boolean b, String errorMessageTemplate, char p1, l * @since 20.0 (varargs overload since 2.0) */ public static void checkState( - boolean b, String errorMessageTemplate, char p1, @CheckForNull Object p2) { - if (!b) { + boolean expression, String errorMessageTemplate, char p1, @CheckForNull Object p2) { + if (!expression) { throw new IllegalStateException(lenientFormat(errorMessageTemplate, p1, p2)); } } @@ -656,8 +667,8 @@ public static void checkState( * * @since 20.0 (varargs overload since 2.0) */ - public static void checkState(boolean b, String errorMessageTemplate, int p1, char p2) { - if (!b) { + public static void checkState(boolean expression, String errorMessageTemplate, int p1, char p2) { + if (!expression) { throw new IllegalStateException(lenientFormat(errorMessageTemplate, p1, p2)); } } @@ -670,8 +681,8 @@ public static void checkState(boolean b, String errorMessageTemplate, int p1, ch * * @since 20.0 (varargs overload since 2.0) */ - public static void checkState(boolean b, String errorMessageTemplate, int p1, int p2) { - if (!b) { + public static void checkState(boolean expression, String errorMessageTemplate, int p1, int p2) { + if (!expression) { throw new IllegalStateException(lenientFormat(errorMessageTemplate, p1, p2)); } } @@ -684,8 +695,8 @@ public static void checkState(boolean b, String errorMessageTemplate, int p1, in * * @since 20.0 (varargs overload since 2.0) */ - public static void checkState(boolean b, String errorMessageTemplate, int p1, long p2) { - if (!b) { + public static void checkState(boolean expression, String errorMessageTemplate, int p1, long p2) { + if (!expression) { throw new IllegalStateException(lenientFormat(errorMessageTemplate, p1, p2)); } } @@ -699,8 +710,8 @@ public static void checkState(boolean b, String errorMessageTemplate, int p1, lo * @since 20.0 (varargs overload since 2.0) */ public static void checkState( - boolean b, String errorMessageTemplate, int p1, @CheckForNull Object p2) { - if (!b) { + boolean expression, String errorMessageTemplate, int p1, @CheckForNull Object p2) { + if (!expression) { throw new IllegalStateException(lenientFormat(errorMessageTemplate, p1, p2)); } } @@ -713,8 +724,8 @@ public static void checkState( * * @since 20.0 (varargs overload since 2.0) */ - public static void checkState(boolean b, String errorMessageTemplate, long p1, char p2) { - if (!b) { + public static void checkState(boolean expression, String errorMessageTemplate, long p1, char p2) { + if (!expression) { throw new IllegalStateException(lenientFormat(errorMessageTemplate, p1, p2)); } } @@ -727,8 +738,8 @@ public static void checkState(boolean b, String errorMessageTemplate, long p1, c * * @since 20.0 (varargs overload since 2.0) */ - public static void checkState(boolean b, String errorMessageTemplate, long p1, int p2) { - if (!b) { + public static void checkState(boolean expression, String errorMessageTemplate, long p1, int p2) { + if (!expression) { throw new IllegalStateException(lenientFormat(errorMessageTemplate, p1, p2)); } } @@ -741,8 +752,8 @@ public static void checkState(boolean b, String errorMessageTemplate, long p1, i * * @since 20.0 (varargs overload since 2.0) */ - public static void checkState(boolean b, String errorMessageTemplate, long p1, long p2) { - if (!b) { + public static void checkState(boolean expression, String errorMessageTemplate, long p1, long p2) { + if (!expression) { throw new IllegalStateException(lenientFormat(errorMessageTemplate, p1, p2)); } } @@ -756,8 +767,8 @@ public static void checkState(boolean b, String errorMessageTemplate, long p1, l * @since 20.0 (varargs overload since 2.0) */ public static void checkState( - boolean b, String errorMessageTemplate, long p1, @CheckForNull Object p2) { - if (!b) { + boolean expression, String errorMessageTemplate, long p1, @CheckForNull Object p2) { + if (!expression) { throw new IllegalStateException(lenientFormat(errorMessageTemplate, p1, p2)); } } @@ -771,8 +782,8 @@ public static void checkState( * @since 20.0 (varargs overload since 2.0) */ public static void checkState( - boolean b, String errorMessageTemplate, @CheckForNull Object p1, char p2) { - if (!b) { + boolean expression, String errorMessageTemplate, @CheckForNull Object p1, char p2) { + if (!expression) { throw new IllegalStateException(lenientFormat(errorMessageTemplate, p1, p2)); } } @@ -786,8 +797,8 @@ public static void checkState( * @since 20.0 (varargs overload since 2.0) */ public static void checkState( - boolean b, String errorMessageTemplate, @CheckForNull Object p1, int p2) { - if (!b) { + boolean expression, String errorMessageTemplate, @CheckForNull Object p1, int p2) { + if (!expression) { throw new IllegalStateException(lenientFormat(errorMessageTemplate, p1, p2)); } } @@ -801,8 +812,8 @@ public static void checkState( * @since 20.0 (varargs overload since 2.0) */ public static void checkState( - boolean b, String errorMessageTemplate, @CheckForNull Object p1, long p2) { - if (!b) { + boolean expression, String errorMessageTemplate, @CheckForNull Object p1, long p2) { + if (!expression) { throw new IllegalStateException(lenientFormat(errorMessageTemplate, p1, p2)); } } @@ -816,8 +827,11 @@ public static void checkState( * @since 20.0 (varargs overload since 2.0) */ public static void checkState( - boolean b, String errorMessageTemplate, @CheckForNull Object p1, @CheckForNull Object p2) { - if (!b) { + boolean expression, + String errorMessageTemplate, + @CheckForNull Object p1, + @CheckForNull Object p2) { + if (!expression) { throw new IllegalStateException(lenientFormat(errorMessageTemplate, p1, p2)); } } @@ -831,12 +845,12 @@ public static void checkState( * @since 20.0 (varargs overload since 2.0) */ public static void checkState( - boolean b, + boolean expression, String errorMessageTemplate, @CheckForNull Object p1, @CheckForNull Object p2, @CheckForNull Object p3) { - if (!b) { + if (!expression) { throw new IllegalStateException(lenientFormat(errorMessageTemplate, p1, p2, p3)); } } @@ -850,13 +864,13 @@ public static void checkState( * @since 20.0 (varargs overload since 2.0) */ public static void checkState( - boolean b, + boolean expression, String errorMessageTemplate, @CheckForNull Object p1, @CheckForNull Object p2, @CheckForNull Object p3, @CheckForNull Object p4) { - if (!b) { + if (!expression) { throw new IllegalStateException(lenientFormat(errorMessageTemplate, p1, p2, p3, p4)); } } @@ -943,11 +957,12 @@ public static T checkNotNull( * @since 20.0 (varargs overload since 2.0) */ @CanIgnoreReturnValue - public static T checkNotNull(@CheckForNull T obj, String errorMessageTemplate, char p1) { - if (obj == null) { + public static T checkNotNull( + @CheckForNull T reference, String errorMessageTemplate, char p1) { + if (reference == null) { throw new NullPointerException(lenientFormat(errorMessageTemplate, p1)); } - return obj; + return reference; } /** @@ -958,11 +973,11 @@ public static T checkNotNull(@CheckForNull T obj, String errorMessageTemplat * @since 20.0 (varargs overload since 2.0) */ @CanIgnoreReturnValue - public static T checkNotNull(@CheckForNull T obj, String errorMessageTemplate, int p1) { - if (obj == null) { + public static T checkNotNull(@CheckForNull T reference, String errorMessageTemplate, int p1) { + if (reference == null) { throw new NullPointerException(lenientFormat(errorMessageTemplate, p1)); } - return obj; + return reference; } /** @@ -973,11 +988,12 @@ public static T checkNotNull(@CheckForNull T obj, String errorMessageTemplat * @since 20.0 (varargs overload since 2.0) */ @CanIgnoreReturnValue - public static T checkNotNull(@CheckForNull T obj, String errorMessageTemplate, long p1) { - if (obj == null) { + public static T checkNotNull( + @CheckForNull T reference, String errorMessageTemplate, long p1) { + if (reference == null) { throw new NullPointerException(lenientFormat(errorMessageTemplate, p1)); } - return obj; + return reference; } /** @@ -989,11 +1005,11 @@ public static T checkNotNull(@CheckForNull T obj, String errorMessageTemplat */ @CanIgnoreReturnValue public static T checkNotNull( - @CheckForNull T obj, String errorMessageTemplate, @CheckForNull Object p1) { - if (obj == null) { + @CheckForNull T reference, String errorMessageTemplate, @CheckForNull Object p1) { + if (reference == null) { throw new NullPointerException(lenientFormat(errorMessageTemplate, p1)); } - return obj; + return reference; } /** @@ -1005,11 +1021,11 @@ public static T checkNotNull( */ @CanIgnoreReturnValue public static T checkNotNull( - @CheckForNull T obj, String errorMessageTemplate, char p1, char p2) { - if (obj == null) { + @CheckForNull T reference, String errorMessageTemplate, char p1, char p2) { + if (reference == null) { throw new NullPointerException(lenientFormat(errorMessageTemplate, p1, p2)); } - return obj; + return reference; } /** @@ -1021,11 +1037,11 @@ public static T checkNotNull( */ @CanIgnoreReturnValue public static T checkNotNull( - @CheckForNull T obj, String errorMessageTemplate, char p1, int p2) { - if (obj == null) { + @CheckForNull T reference, String errorMessageTemplate, char p1, int p2) { + if (reference == null) { throw new NullPointerException(lenientFormat(errorMessageTemplate, p1, p2)); } - return obj; + return reference; } /** @@ -1037,11 +1053,11 @@ public static T checkNotNull( */ @CanIgnoreReturnValue public static T checkNotNull( - @CheckForNull T obj, String errorMessageTemplate, char p1, long p2) { - if (obj == null) { + @CheckForNull T reference, String errorMessageTemplate, char p1, long p2) { + if (reference == null) { throw new NullPointerException(lenientFormat(errorMessageTemplate, p1, p2)); } - return obj; + return reference; } /** @@ -1053,11 +1069,11 @@ public static T checkNotNull( */ @CanIgnoreReturnValue public static T checkNotNull( - @CheckForNull T obj, String errorMessageTemplate, char p1, @CheckForNull Object p2) { - if (obj == null) { + @CheckForNull T reference, String errorMessageTemplate, char p1, @CheckForNull Object p2) { + if (reference == null) { throw new NullPointerException(lenientFormat(errorMessageTemplate, p1, p2)); } - return obj; + return reference; } /** @@ -1069,11 +1085,11 @@ public static T checkNotNull( */ @CanIgnoreReturnValue public static T checkNotNull( - @CheckForNull T obj, String errorMessageTemplate, int p1, char p2) { - if (obj == null) { + @CheckForNull T reference, String errorMessageTemplate, int p1, char p2) { + if (reference == null) { throw new NullPointerException(lenientFormat(errorMessageTemplate, p1, p2)); } - return obj; + return reference; } /** @@ -1085,11 +1101,11 @@ public static T checkNotNull( */ @CanIgnoreReturnValue public static T checkNotNull( - @CheckForNull T obj, String errorMessageTemplate, int p1, int p2) { - if (obj == null) { + @CheckForNull T reference, String errorMessageTemplate, int p1, int p2) { + if (reference == null) { throw new NullPointerException(lenientFormat(errorMessageTemplate, p1, p2)); } - return obj; + return reference; } /** @@ -1101,11 +1117,11 @@ public static T checkNotNull( */ @CanIgnoreReturnValue public static T checkNotNull( - @CheckForNull T obj, String errorMessageTemplate, int p1, long p2) { - if (obj == null) { + @CheckForNull T reference, String errorMessageTemplate, int p1, long p2) { + if (reference == null) { throw new NullPointerException(lenientFormat(errorMessageTemplate, p1, p2)); } - return obj; + return reference; } /** @@ -1117,11 +1133,11 @@ public static T checkNotNull( */ @CanIgnoreReturnValue public static T checkNotNull( - @CheckForNull T obj, String errorMessageTemplate, int p1, @CheckForNull Object p2) { - if (obj == null) { + @CheckForNull T reference, String errorMessageTemplate, int p1, @CheckForNull Object p2) { + if (reference == null) { throw new NullPointerException(lenientFormat(errorMessageTemplate, p1, p2)); } - return obj; + return reference; } /** @@ -1133,11 +1149,11 @@ public static T checkNotNull( */ @CanIgnoreReturnValue public static T checkNotNull( - @CheckForNull T obj, String errorMessageTemplate, long p1, char p2) { - if (obj == null) { + @CheckForNull T reference, String errorMessageTemplate, long p1, char p2) { + if (reference == null) { throw new NullPointerException(lenientFormat(errorMessageTemplate, p1, p2)); } - return obj; + return reference; } /** @@ -1149,11 +1165,11 @@ public static T checkNotNull( */ @CanIgnoreReturnValue public static T checkNotNull( - @CheckForNull T obj, String errorMessageTemplate, long p1, int p2) { - if (obj == null) { + @CheckForNull T reference, String errorMessageTemplate, long p1, int p2) { + if (reference == null) { throw new NullPointerException(lenientFormat(errorMessageTemplate, p1, p2)); } - return obj; + return reference; } /** @@ -1165,11 +1181,11 @@ public static T checkNotNull( */ @CanIgnoreReturnValue public static T checkNotNull( - @CheckForNull T obj, String errorMessageTemplate, long p1, long p2) { - if (obj == null) { + @CheckForNull T reference, String errorMessageTemplate, long p1, long p2) { + if (reference == null) { throw new NullPointerException(lenientFormat(errorMessageTemplate, p1, p2)); } - return obj; + return reference; } /** @@ -1181,11 +1197,11 @@ public static T checkNotNull( */ @CanIgnoreReturnValue public static T checkNotNull( - @CheckForNull T obj, String errorMessageTemplate, long p1, @CheckForNull Object p2) { - if (obj == null) { + @CheckForNull T reference, String errorMessageTemplate, long p1, @CheckForNull Object p2) { + if (reference == null) { throw new NullPointerException(lenientFormat(errorMessageTemplate, p1, p2)); } - return obj; + return reference; } /** @@ -1197,11 +1213,11 @@ public static T checkNotNull( */ @CanIgnoreReturnValue public static T checkNotNull( - @CheckForNull T obj, String errorMessageTemplate, @CheckForNull Object p1, char p2) { - if (obj == null) { + @CheckForNull T reference, String errorMessageTemplate, @CheckForNull Object p1, char p2) { + if (reference == null) { throw new NullPointerException(lenientFormat(errorMessageTemplate, p1, p2)); } - return obj; + return reference; } /** @@ -1213,11 +1229,11 @@ public static T checkNotNull( */ @CanIgnoreReturnValue public static T checkNotNull( - @CheckForNull T obj, String errorMessageTemplate, @CheckForNull Object p1, int p2) { - if (obj == null) { + @CheckForNull T reference, String errorMessageTemplate, @CheckForNull Object p1, int p2) { + if (reference == null) { throw new NullPointerException(lenientFormat(errorMessageTemplate, p1, p2)); } - return obj; + return reference; } /** @@ -1229,11 +1245,11 @@ public static T checkNotNull( */ @CanIgnoreReturnValue public static T checkNotNull( - @CheckForNull T obj, String errorMessageTemplate, @CheckForNull Object p1, long p2) { - if (obj == null) { + @CheckForNull T reference, String errorMessageTemplate, @CheckForNull Object p1, long p2) { + if (reference == null) { throw new NullPointerException(lenientFormat(errorMessageTemplate, p1, p2)); } - return obj; + return reference; } /** @@ -1245,14 +1261,14 @@ public static T checkNotNull( */ @CanIgnoreReturnValue public static T checkNotNull( - @CheckForNull T obj, + @CheckForNull T reference, String errorMessageTemplate, @CheckForNull Object p1, @CheckForNull Object p2) { - if (obj == null) { + if (reference == null) { throw new NullPointerException(lenientFormat(errorMessageTemplate, p1, p2)); } - return obj; + return reference; } /** @@ -1264,15 +1280,15 @@ public static T checkNotNull( */ @CanIgnoreReturnValue public static T checkNotNull( - @CheckForNull T obj, + @CheckForNull T reference, String errorMessageTemplate, @CheckForNull Object p1, @CheckForNull Object p2, @CheckForNull Object p3) { - if (obj == null) { + if (reference == null) { throw new NullPointerException(lenientFormat(errorMessageTemplate, p1, p2, p3)); } - return obj; + return reference; } /** @@ -1284,16 +1300,16 @@ public static T checkNotNull( */ @CanIgnoreReturnValue public static T checkNotNull( - @CheckForNull T obj, + @CheckForNull T reference, String errorMessageTemplate, @CheckForNull Object p1, @CheckForNull Object p2, @CheckForNull Object p3, @CheckForNull Object p4) { - if (obj == null) { + if (reference == null) { throw new NullPointerException(lenientFormat(errorMessageTemplate, p1, p2, p3, p4)); } - return obj; + return reference; } /* diff --git a/android/guava/src/com/google/common/base/Predicates.java b/android/guava/src/com/google/common/base/Predicates.java index dc487fc56ffa..30d2ac7dc8f5 100644 --- a/android/guava/src/com/google/common/base/Predicates.java +++ b/android/guava/src/com/google/common/base/Predicates.java @@ -16,9 +16,9 @@ import static com.google.common.base.Preconditions.checkNotNull; -import com.google.common.annotations.Beta; import com.google.common.annotations.GwtCompatible; import com.google.common.annotations.GwtIncompatible; +import com.google.common.annotations.J2ktIncompatible; import java.io.Serializable; import java.util.ArrayList; import java.util.Arrays; @@ -195,8 +195,8 @@ private Predicates() {} * * @since 20.0 (since 10.0 under the incorrect name {@code assignableFrom}) */ + @J2ktIncompatible @GwtIncompatible // Class.isAssignableFrom - @Beta public static Predicate> subtypeOf(Class clazz) { return new SubtypeOfPredicate(clazz); } @@ -235,6 +235,7 @@ public static Predicate> subtypeOf(Class clazz) { * @throws IllegalArgumentException if the pattern is invalid * @since 3.0 */ + @J2ktIncompatible @GwtIncompatible // Only used by other GWT-incompatible code. public static Predicate containsPattern(String pattern) { return new ContainsPatternFromStringPredicate(pattern); @@ -247,6 +248,7 @@ public static Predicate containsPattern(String pattern) { * * @since 3.0 */ + @J2ktIncompatible @GwtIncompatible(value = "java.util.regex.Pattern") public static Predicate contains(Pattern pattern) { return new ContainsPatternPredicate(new JdkPattern(pattern)); @@ -486,7 +488,9 @@ public String toString() { } } - /** @see Predicates#instanceOf(Class) */ + /** + * @see Predicates#instanceOf(Class) + */ @GwtIncompatible // Class.isInstance private static class InstanceOfPredicate implements Predicate, Serializable { @@ -520,10 +524,13 @@ public String toString() { return "Predicates.instanceOf(" + clazz.getName() + ")"; } - private static final long serialVersionUID = 0; + @J2ktIncompatible private static final long serialVersionUID = 0; } - /** @see Predicates#subtypeOf(Class) */ + /** + * @see Predicates#subtypeOf(Class) + */ + @J2ktIncompatible @GwtIncompatible // Class.isAssignableFrom private static class SubtypeOfPredicate implements Predicate>, Serializable { private final Class clazz; @@ -638,7 +645,10 @@ public String toString() { private static final long serialVersionUID = 0; } - /** @see Predicates#contains(Pattern) */ + /** + * @see Predicates#contains(Pattern) + */ + @J2ktIncompatible @GwtIncompatible // Only used by other GWT-incompatible code. private static class ContainsPatternPredicate implements Predicate, Serializable { final CommonPattern pattern; @@ -686,7 +696,10 @@ public String toString() { private static final long serialVersionUID = 0; } - /** @see Predicates#containsPattern(String) */ + /** + * @see Predicates#containsPattern(String) + */ + @J2ktIncompatible @GwtIncompatible // Only used by other GWT-incompatible code. private static class ContainsPatternFromStringPredicate extends ContainsPatternPredicate { diff --git a/android/guava/src/com/google/common/base/SmallCharMatcher.java b/android/guava/src/com/google/common/base/SmallCharMatcher.java index f0e801b67118..81682564143d 100644 --- a/android/guava/src/com/google/common/base/SmallCharMatcher.java +++ b/android/guava/src/com/google/common/base/SmallCharMatcher.java @@ -15,6 +15,7 @@ package com.google.common.base; import com.google.common.annotations.GwtIncompatible; +import com.google.common.annotations.J2ktIncompatible; import com.google.common.annotations.VisibleForTesting; import com.google.common.base.CharMatcher.NamedFastMatcher; import java.util.BitSet; @@ -25,6 +26,7 @@ * * @author Christopher Swenson */ +@J2ktIncompatible @GwtIncompatible // no precomputation is done in GWT @ElementTypesAreNonnullByDefault final class SmallCharMatcher extends NamedFastMatcher { diff --git a/android/guava/src/com/google/common/base/Splitter.java b/android/guava/src/com/google/common/base/Splitter.java index bde2e0ec42f8..7630ecae1ce8 100644 --- a/android/guava/src/com/google/common/base/Splitter.java +++ b/android/guava/src/com/google/common/base/Splitter.java @@ -17,9 +17,9 @@ import static com.google.common.base.Preconditions.checkArgument; import static com.google.common.base.Preconditions.checkNotNull; -import com.google.common.annotations.Beta; import com.google.common.annotations.GwtCompatible; import com.google.common.annotations.GwtIncompatible; +import com.google.common.annotations.J2ktIncompatible; import java.util.ArrayList; import java.util.Collections; import java.util.Iterator; @@ -212,6 +212,7 @@ public int separatorEnd(int separatorPosition) { * @return a splitter, with default settings, that uses this pattern * @throws IllegalArgumentException if {@code separatorPattern} matches the empty string */ + @J2ktIncompatible @GwtIncompatible // java.util.regex public static Splitter on(Pattern separatorPattern) { return on(new JdkPattern(separatorPattern)); @@ -255,6 +256,7 @@ public int separatorEnd(int separatorPosition) { * @throws IllegalArgumentException if {@code separatorPattern} matches the empty string or is a * malformed expression */ + @J2ktIncompatible @GwtIncompatible // java.util.regex public static Splitter onPattern(String separatorPattern) { return on(Platform.compilePattern(separatorPattern)); @@ -429,7 +431,6 @@ public List splitToList(CharSequence sequence) { * * @since 10.0 */ - @Beta public MapSplitter withKeyValueSeparator(String separator) { return withKeyValueSeparator(on(separator)); } @@ -440,7 +441,6 @@ public MapSplitter withKeyValueSeparator(String separator) { * * @since 14.0 */ - @Beta public MapSplitter withKeyValueSeparator(char separator) { return withKeyValueSeparator(on(separator)); } @@ -464,7 +464,6 @@ public MapSplitter withKeyValueSeparator(char separator) { * * @since 10.0 */ - @Beta public MapSplitter withKeyValueSeparator(Splitter keyValueSplitter) { return new MapSplitter(this, keyValueSplitter); } @@ -477,7 +476,6 @@ public MapSplitter withKeyValueSeparator(Splitter keyValueSplitter) { * * @since 10.0 */ - @Beta public static final class MapSplitter { private static final String INVALID_ENTRY_MESSAGE = "Chunk [%s] is not a valid entry"; private final Splitter outerSplitter; diff --git a/android/guava/src/com/google/common/base/StandardSystemProperty.java b/android/guava/src/com/google/common/base/StandardSystemProperty.java index cdac2d39baa8..155037761cd5 100644 --- a/android/guava/src/com/google/common/base/StandardSystemProperty.java +++ b/android/guava/src/com/google/common/base/StandardSystemProperty.java @@ -15,6 +15,7 @@ package com.google.common.base; import com.google.common.annotations.GwtIncompatible; +import com.google.common.annotations.J2ktIncompatible; import javax.annotation.CheckForNull; /** @@ -23,6 +24,7 @@ * @author Kurt Alfred Kluever * @since 15.0 */ +@J2ktIncompatible @GwtIncompatible // java.lang.System#getProperty @ElementTypesAreNonnullByDefault public enum StandardSystemProperty { diff --git a/android/guava/src/com/google/common/base/Suppliers.java b/android/guava/src/com/google/common/base/Suppliers.java index 8b4fc7b3d437..7e8f7ccdaf7b 100644 --- a/android/guava/src/com/google/common/base/Suppliers.java +++ b/android/guava/src/com/google/common/base/Suppliers.java @@ -96,7 +96,7 @@ public String toString() { *

    The returned supplier is thread-safe. The delegate's {@code get()} method will be invoked at * most once unless the underlying {@code get()} throws an exception. The supplier's serialized * form does not contain the cached value, which will be recalculated when {@code get()} is called - * on the reserialized instance. + * on the deserialized instance. * *

    When the underlying delegate throws an exception then this memoizing supplier will keep * delegating calls until it returns valid data. diff --git a/android/guava/src/com/google/common/base/Throwables.java b/android/guava/src/com/google/common/base/Throwables.java index 91a4f1745c08..23936897d956 100644 --- a/android/guava/src/com/google/common/base/Throwables.java +++ b/android/guava/src/com/google/common/base/Throwables.java @@ -21,6 +21,7 @@ import com.google.common.annotations.GwtCompatible; import com.google.common.annotations.GwtIncompatible; +import com.google.common.annotations.J2ktIncompatible; import com.google.common.annotations.VisibleForTesting; import com.google.errorprone.annotations.CanIgnoreReturnValue; import java.io.IOException; @@ -69,6 +70,7 @@ private Throwables() {} * * @since 20.0 */ + @J2ktIncompatible @GwtIncompatible // Class.cast, Class.isInstance public static void throwIfInstanceOf( Throwable throwable, Class declaredType) throws X { @@ -98,6 +100,7 @@ public static void throwIfInstanceOf( * null}. */ @Deprecated + @J2ktIncompatible @GwtIncompatible // throwIfInstanceOf public static void propagateIfInstanceOf( @CheckForNull Throwable throwable, Class declaredType) throws X { @@ -154,6 +157,7 @@ public static void throwIfUnchecked(Throwable throwable) { * null}. */ @Deprecated + @J2ktIncompatible @GwtIncompatible public static void propagateIfPossible(@CheckForNull Throwable throwable) { if (throwable != null) { @@ -179,6 +183,7 @@ public static void propagateIfPossible(@CheckForNull Throwable throwable) { * @param throwable the Throwable to possibly propagate * @param declaredType the single checked exception type declared by the calling method */ + @J2ktIncompatible @GwtIncompatible // propagateIfInstanceOf public static void propagateIfPossible( @CheckForNull Throwable throwable, Class declaredType) throws X { @@ -197,6 +202,7 @@ public static void propagateIfPossible( * @param declaredType1 any checked exception type declared by the calling method * @param declaredType2 any other checked exception type declared by the calling method */ + @J2ktIncompatible @GwtIncompatible // propagateIfInstanceOf public static void propagateIfPossible( @CheckForNull Throwable throwable, Class declaredType1, Class declaredType2) @@ -235,6 +241,7 @@ public static void propagateIfPossi * {@code Throwables.propagate}. */ @CanIgnoreReturnValue + @J2ktIncompatible @GwtIncompatible @Deprecated public static RuntimeException propagate(Throwable throwable) { @@ -328,6 +335,7 @@ public static List getCausalChain(Throwable throwable) { * ClassCastException}'s cause is {@code throwable}. * @since 22.0 */ + @J2ktIncompatible @GwtIncompatible // Class.cast(Object) @CheckForNull public static X getCauseAs( @@ -384,6 +392,7 @@ public static String getStackTraceAsString(Throwable throwable) { * possible use the {@code java.lang.StackWalker.walk} method introduced in JDK 9. */ @Deprecated + @J2ktIncompatible @GwtIncompatible // lazyStackTraceIsLazy, jlaStackTrace public static List lazyStackTrace(Throwable throwable) { return lazyStackTraceIsLazy() @@ -400,11 +409,13 @@ public static List lazyStackTrace(Throwable throwable) { * versions. */ @Deprecated + @J2ktIncompatible @GwtIncompatible // getStackTraceElementMethod public static boolean lazyStackTraceIsLazy() { return getStackTraceElementMethod != null && getStackTraceDepthMethod != null; } + @J2ktIncompatible @GwtIncompatible // invokeAccessibleNonThrowingMethod private static List jlaStackTrace(Throwable t) { checkNotNull(t); @@ -435,6 +446,7 @@ public int size() { }; } + @J2ktIncompatible @GwtIncompatible // java.lang.reflect private static Object invokeAccessibleNonThrowingMethod( Method method, Object receiver, Object... params) { @@ -448,15 +460,17 @@ private static Object invokeAccessibleNonThrowingMethod( } /** JavaLangAccess class name to load using reflection */ - @GwtIncompatible // not used by GWT emulation + @J2ktIncompatible @GwtIncompatible // not used by GWT emulation private static final String JAVA_LANG_ACCESS_CLASSNAME = "sun.misc.JavaLangAccess"; /** SharedSecrets class name to load using reflection */ + @J2ktIncompatible @GwtIncompatible // not used by GWT emulation @VisibleForTesting static final String SHARED_SECRETS_CLASSNAME = "sun.misc.SharedSecrets"; /** Access to some fancy internal JVM internals. */ + @J2ktIncompatible @GwtIncompatible // java.lang.reflect @CheckForNull private static final Object jla = getJLA(); @@ -465,6 +479,7 @@ private static Object invokeAccessibleNonThrowingMethod( * The "getStackTraceElementMethod" method, only available on some JDKs so we use reflection to * find it when available. When this is null, use the slow way. */ + @J2ktIncompatible @GwtIncompatible // java.lang.reflect @CheckForNull private static final Method getStackTraceElementMethod = (jla == null) ? null : getGetMethod(); @@ -473,6 +488,7 @@ private static Object invokeAccessibleNonThrowingMethod( * The "getStackTraceDepth" method, only available on some JDKs so we use reflection to find it * when available. When this is null, use the slow way. */ + @J2ktIncompatible @GwtIncompatible // java.lang.reflect @CheckForNull private static final Method getStackTraceDepthMethod = (jla == null) ? null : getSizeMethod(jla); @@ -481,6 +497,7 @@ private static Object invokeAccessibleNonThrowingMethod( * Returns the JavaLangAccess class that is present in all Sun JDKs. It is not allowed in * AppEngine, and not present in non-Sun JDKs. */ + @J2ktIncompatible @GwtIncompatible // java.lang.reflect @CheckForNull private static Object getJLA() { @@ -507,6 +524,7 @@ private static Object getJLA() { * Returns the Method that can be used to resolve an individual StackTraceElement, or null if that * method cannot be found (it is only to be found in fairly recent JDKs). */ + @J2ktIncompatible @GwtIncompatible // java.lang.reflect @CheckForNull private static Method getGetMethod() { @@ -522,6 +540,7 @@ private static Method getGetMethod() { *

    See Throwables#lazyStackTrace throws * UnsupportedOperationException. */ + @J2ktIncompatible @GwtIncompatible // java.lang.reflect @CheckForNull private static Method getSizeMethod(Object jla) { @@ -537,6 +556,7 @@ private static Method getSizeMethod(Object jla) { } } + @J2ktIncompatible @GwtIncompatible // java.lang.reflect @CheckForNull private static Method getJlaMethod(String name, Class... parameterTypes) throws ThreadDeath { diff --git a/android/guava/src/com/google/common/base/Utf8.java b/android/guava/src/com/google/common/base/Utf8.java index bb945a35f095..f1209bf45730 100644 --- a/android/guava/src/com/google/common/base/Utf8.java +++ b/android/guava/src/com/google/common/base/Utf8.java @@ -18,7 +18,6 @@ import static java.lang.Character.MAX_SURROGATE; import static java.lang.Character.MIN_SURROGATE; -import com.google.common.annotations.Beta; import com.google.common.annotations.GwtCompatible; /** @@ -36,7 +35,6 @@ * @author Clément Roux * @since 16.0 */ -@Beta @GwtCompatible(emulated = true) @ElementTypesAreNonnullByDefault public final class Utf8 { diff --git a/android/guava/src/com/google/common/cache/CacheBuilder.java b/android/guava/src/com/google/common/cache/CacheBuilder.java index 6f467dedd55f..f52243e4d4ff 100644 --- a/android/guava/src/com/google/common/cache/CacheBuilder.java +++ b/android/guava/src/com/google/common/cache/CacheBuilder.java @@ -35,11 +35,10 @@ import java.util.ConcurrentModificationException; import java.util.IdentityHashMap; import java.util.Map; -import java.util.concurrent.ConcurrentHashMap; import java.util.concurrent.TimeUnit; import java.util.logging.Level; import java.util.logging.Logger; -import org.checkerframework.checker.nullness.qual.Nullable; +import javax.annotation.CheckForNull; /** * A builder of {@link LoadingCache} and {@link Cache} instances. @@ -131,13 +130,11 @@ * }); * } * - *

    The returned cache is implemented as a hash table with similar performance characteristics to - * {@link ConcurrentHashMap}. It implements all optional operations of the {@link LoadingCache} and - * {@link Cache} interfaces. The {@code asMap} view (and its collection views) have weakly - * consistent iterators. This means that they are safe for concurrent use, but if other threads - * modify the cache after the iterator is created, it is undefined which of these changes, if any, - * are reflected in that iterator. These iterators never throw {@link - * ConcurrentModificationException}. + *

    The returned cache implements all optional operations of the {@link LoadingCache} and {@link + * Cache} interfaces. The {@code asMap} view (and its collection views) have weakly consistent + * iterators. This means that they are safe for concurrent use, but if other threads modify the + * cache after the iterator is created, it is undefined which of these changes, if any, are + * reflected in that iterator. These iterators never throw {@link ConcurrentModificationException}. * *

    Note: by default, the returned cache uses equality comparisons (the {@link * Object#equals equals} method) to determine equality for keys or values. However, if {@link @@ -145,34 +142,33 @@ * Likewise, if {@link #weakValues} or {@link #softValues} was specified, the cache uses identity * comparisons for values. * - *

    Entries are automatically evicted from the cache when any of {@linkplain #maximumSize(long) - * maximumSize}, {@linkplain #maximumWeight(long) maximumWeight}, {@linkplain #expireAfterWrite - * expireAfterWrite}, {@linkplain #expireAfterAccess expireAfterAccess}, {@linkplain #weakKeys - * weakKeys}, {@linkplain #weakValues weakValues}, or {@linkplain #softValues softValues} are - * requested. + *

    Entries are automatically evicted from the cache when any of {@link #maximumSize(long) + * maximumSize}, {@link #maximumWeight(long) maximumWeight}, {@link #expireAfterWrite + * expireAfterWrite}, {@link #expireAfterAccess expireAfterAccess}, {@link #weakKeys weakKeys}, + * {@link #weakValues weakValues}, or {@link #softValues softValues} are requested. * - *

    If {@linkplain #maximumSize(long) maximumSize} or {@linkplain #maximumWeight(long) - * maximumWeight} is requested entries may be evicted on each cache modification. + *

    If {@link #maximumSize(long) maximumSize} or {@link #maximumWeight(long) maximumWeight} is + * requested entries may be evicted on each cache modification. * - *

    If {@linkplain #expireAfterWrite expireAfterWrite} or {@linkplain #expireAfterAccess - * expireAfterAccess} is requested entries may be evicted on each cache modification, on occasional - * cache accesses, or on calls to {@link Cache#cleanUp}. Expired entries may be counted by {@link - * Cache#size}, but will never be visible to read or write operations. + *

    If {@link #expireAfterWrite expireAfterWrite} or {@link #expireAfterAccess expireAfterAccess} + * is requested entries may be evicted on each cache modification, on occasional cache accesses, or + * on calls to {@link Cache#cleanUp}. Expired entries may be counted by {@link Cache#size}, but will + * never be visible to read or write operations. * - *

    If {@linkplain #weakKeys weakKeys}, {@linkplain #weakValues weakValues}, or {@linkplain - * #softValues softValues} are requested, it is possible for a key or value present in the cache to - * be reclaimed by the garbage collector. Entries with reclaimed keys or values may be removed from - * the cache on each cache modification, on occasional cache accesses, or on calls to {@link - * Cache#cleanUp}; such entries may be counted in {@link Cache#size}, but will never be visible to - * read or write operations. + *

    If {@link #weakKeys weakKeys}, {@link #weakValues weakValues}, or {@link #softValues + * softValues} are requested, it is possible for a key or value present in the cache to be reclaimed + * by the garbage collector. Entries with reclaimed keys or values may be removed from the cache on + * each cache modification, on occasional cache accesses, or on calls to {@link Cache#cleanUp}; such + * entries may be counted in {@link Cache#size}, but will never be visible to read or write + * operations. * *

    Certain cache configurations will result in the accrual of periodic maintenance tasks which * will be performed during write operations, or during occasional read operations in the absence of * writes. The {@link Cache#cleanUp} method of the returned cache will also perform maintenance, but - * calling it should not be necessary with a high throughput cache. Only caches built with - * {@linkplain #removalListener removalListener}, {@linkplain #expireAfterWrite expireAfterWrite}, - * {@linkplain #expireAfterAccess expireAfterAccess}, {@linkplain #weakKeys weakKeys}, {@linkplain - * #weakValues weakValues}, or {@linkplain #softValues softValues} perform periodic maintenance. + * calling it should not be necessary with a high throughput cache. Only caches built with {@link + * #removalListener removalListener}, {@link #expireAfterWrite expireAfterWrite}, {@link + * #expireAfterAccess expireAfterAccess}, {@link #weakKeys weakKeys}, {@link #weakValues + * weakValues}, or {@link #softValues softValues} perform periodic maintenance. * *

    The caches produced by {@code CacheBuilder} are serializable, and the deserialized caches * retain all the configuration properties of the original cache. Note that the serialized form does @@ -276,10 +272,10 @@ public long read() { int concurrencyLevel = UNSET_INT; long maximumSize = UNSET_INT; long maximumWeight = UNSET_INT; - @Nullable Weigher weigher; + @CheckForNull Weigher weigher; - @Nullable Strength keyStrength; - @Nullable Strength valueStrength; + @CheckForNull Strength keyStrength; + @CheckForNull Strength valueStrength; @SuppressWarnings("GoodTime") // should be a java.time.Duration long expireAfterWriteNanos = UNSET_INT; @@ -290,11 +286,11 @@ public long read() { @SuppressWarnings("GoodTime") // should be a java.time.Duration long refreshNanos = UNSET_INT; - @Nullable Equivalence keyEquivalence; - @Nullable Equivalence valueEquivalence; + @CheckForNull Equivalence keyEquivalence; + @CheckForNull Equivalence valueEquivalence; - @Nullable RemovalListener removalListener; - @Nullable Ticker ticker; + @CheckForNull RemovalListener removalListener; + @CheckForNull Ticker ticker; Supplier statsCounterSupplier = NULL_STATS_COUNTER; diff --git a/android/guava/src/com/google/common/cache/CacheLoader.java b/android/guava/src/com/google/common/cache/CacheLoader.java index 6e49869885f6..b5b8aef9f3d6 100644 --- a/android/guava/src/com/google/common/cache/CacheLoader.java +++ b/android/guava/src/com/google/common/cache/CacheLoader.java @@ -133,6 +133,8 @@ public Map loadAll(Iterable keys) throws Exception { * reloading or bulk loading. This is most useful when you can pass a lambda expression. Otherwise * it is useful mostly when you already have an existing function instance. * + *

    The returned object is serializable if {@code function} is serializable. + * * @param function the function to be used for loading values; must never return {@code null} * @return a cache loader that loads values by passing each key to {@code function} */ @@ -145,6 +147,8 @@ public static CacheLoader from(Function function) { * to create a new supplier just to pass it in here; just subclass {@code CacheLoader} and * implement {@link #load load} instead. * + *

    The returned object is serializable if {@code supplier} is serializable. + * * @param supplier the supplier to be used for loading values; must never return {@code null} * @return a cache loader that loads values by calling {@link Supplier#get}, irrespective of the * key diff --git a/android/guava/src/com/google/common/cache/LocalCache.java b/android/guava/src/com/google/common/cache/LocalCache.java index 7b1a06625bc3..74df5a23435c 100644 --- a/android/guava/src/com/google/common/cache/LocalCache.java +++ b/android/guava/src/com/google/common/cache/LocalCache.java @@ -3907,7 +3907,7 @@ public V getIfPresent(Object key) { return value; } - @SuppressWarnings("MissingOverride") // Supermethod will not exist if we build with --release 7. + @Override @CheckForNull public V getOrDefault(@CheckForNull Object key, @CheckForNull V defaultValue) { V result = get(key); diff --git a/android/guava/src/com/google/common/collect/AbstractBiMap.java b/android/guava/src/com/google/common/collect/AbstractBiMap.java index 151764be8491..56cf0a00ae79 100644 --- a/android/guava/src/com/google/common/collect/AbstractBiMap.java +++ b/android/guava/src/com/google/common/collect/AbstractBiMap.java @@ -22,6 +22,7 @@ import com.google.common.annotations.GwtCompatible; import com.google.common.annotations.GwtIncompatible; +import com.google.common.annotations.J2ktIncompatible; import com.google.common.base.Objects; import com.google.errorprone.annotations.CanIgnoreReturnValue; import com.google.j2objc.annotations.RetainedWith; @@ -51,8 +52,12 @@ abstract class AbstractBiMap extends ForwardingMap implements BiMap, Serializable { + @SuppressWarnings("nullness:initialization.field.uninitialized") // For J2KT (lateinit) private transient Map delegate; - @RetainedWith transient AbstractBiMap inverse; + + @SuppressWarnings("nullness:initialization.field.uninitialized") // For J2KT (lateinit) + @RetainedWith + transient AbstractBiMap inverse; /** Package-private constructor for creating a map-backed bimap. */ AbstractBiMap(Map forward, Map backward) { @@ -398,15 +403,8 @@ public Iterator> iterator() { // See java.util.Collections.CheckedEntrySet for details on attacks. @Override - public Object[] toArray() { - /* - * standardToArray returns `@Nullable Object[]` rather than `Object[]` but only because it can - * be used with collections that may contain null. This collection never contains nulls, so we - * can treat it as a plain `Object[]`. - */ - @SuppressWarnings("nullness") - Object[] result = standardToArray(); - return result; + public @Nullable Object[] toArray() { + return standardToArray(); } @Override @@ -464,14 +462,18 @@ V checkValue(@ParametricNullness V value) { return inverse.checkKey(value); } - /** @serialData the forward bimap */ + /** + * @serialData the forward bimap + */ @GwtIncompatible // java.io.ObjectOutputStream + @J2ktIncompatible private void writeObject(ObjectOutputStream stream) throws IOException { stream.defaultWriteObject(); stream.writeObject(inverse()); } @GwtIncompatible // java.io.ObjectInputStream + @J2ktIncompatible @SuppressWarnings("unchecked") // reading data stored by writeObject private void readObject(ObjectInputStream stream) throws IOException, ClassNotFoundException { stream.defaultReadObject(); @@ -479,14 +481,17 @@ private void readObject(ObjectInputStream stream) throws IOException, ClassNotFo } @GwtIncompatible // Not needed in the emulated source. + @J2ktIncompatible Object readResolve() { return inverse().inverse(); } @GwtIncompatible // Not needed in emulated source. + @J2ktIncompatible private static final long serialVersionUID = 0; } @GwtIncompatible // Not needed in emulated source. + @J2ktIncompatible private static final long serialVersionUID = 0; } diff --git a/android/guava/src/com/google/common/collect/AbstractMapBasedMultimap.java b/android/guava/src/com/google/common/collect/AbstractMapBasedMultimap.java index 72cf8f1eea5e..9a2612edf4fe 100644 --- a/android/guava/src/com/google/common/collect/AbstractMapBasedMultimap.java +++ b/android/guava/src/com/google/common/collect/AbstractMapBasedMultimap.java @@ -1175,6 +1175,7 @@ public boolean hasNext() { } @Override + @ParametricNullness public T next() { if (!valueIterator.hasNext()) { Entry> mapEntry = keyIterator.next(); diff --git a/android/guava/src/com/google/common/collect/AbstractMapBasedMultiset.java b/android/guava/src/com/google/common/collect/AbstractMapBasedMultiset.java index 8c71e682da31..45530f267a8e 100644 --- a/android/guava/src/com/google/common/collect/AbstractMapBasedMultiset.java +++ b/android/guava/src/com/google/common/collect/AbstractMapBasedMultiset.java @@ -22,6 +22,7 @@ import com.google.common.annotations.GwtCompatible; import com.google.common.annotations.GwtIncompatible; +import com.google.common.annotations.J2ktIncompatible; import com.google.common.primitives.Ints; import com.google.errorprone.annotations.CanIgnoreReturnValue; import java.io.IOException; @@ -255,12 +256,14 @@ public final int size() { * its count, and so on */ @GwtIncompatible // java.io.ObjectOutputStream + @J2ktIncompatible private void writeObject(ObjectOutputStream stream) throws IOException { stream.defaultWriteObject(); Serialization.writeMultiset(this, stream); } @GwtIncompatible // java.io.ObjectInputStream + @J2ktIncompatible private void readObject(ObjectInputStream stream) throws IOException, ClassNotFoundException { stream.defaultReadObject(); int distinctElements = Serialization.readCount(stream); @@ -269,5 +272,6 @@ private void readObject(ObjectInputStream stream) throws IOException, ClassNotFo } @GwtIncompatible // Not needed in emulated source. + @J2ktIncompatible private static final long serialVersionUID = 0; } diff --git a/android/guava/src/com/google/common/collect/AllEqualOrdering.java b/android/guava/src/com/google/common/collect/AllEqualOrdering.java index f6ca6faff797..366044b0146d 100644 --- a/android/guava/src/com/google/common/collect/AllEqualOrdering.java +++ b/android/guava/src/com/google/common/collect/AllEqualOrdering.java @@ -43,8 +43,7 @@ public int compare(@CheckForNull Object left, @CheckForNull Object right) { } @Override - @SuppressWarnings("nullness") // unsafe: see supertype - public ImmutableList immutableSortedCopy(Iterable iterable) { + public ImmutableList immutableSortedCopy(Iterable iterable) { return ImmutableList.copyOf(iterable); } diff --git a/android/guava/src/com/google/common/collect/ArrayListMultimap.java b/android/guava/src/com/google/common/collect/ArrayListMultimap.java index 349f40770736..5983a58ed155 100644 --- a/android/guava/src/com/google/common/collect/ArrayListMultimap.java +++ b/android/guava/src/com/google/common/collect/ArrayListMultimap.java @@ -20,6 +20,7 @@ import com.google.common.annotations.GwtCompatible; import com.google.common.annotations.GwtIncompatible; +import com.google.common.annotations.J2ktIncompatible; import com.google.common.annotations.VisibleForTesting; import java.io.IOException; import java.io.ObjectInputStream; @@ -155,12 +156,14 @@ public void trimToSize() { * key, number of values for that key, and the key's values */ @GwtIncompatible // java.io.ObjectOutputStream + @J2ktIncompatible private void writeObject(ObjectOutputStream stream) throws IOException { stream.defaultWriteObject(); Serialization.writeMultimap(this, stream); } @GwtIncompatible // java.io.ObjectOutputStream + @J2ktIncompatible private void readObject(ObjectInputStream stream) throws IOException, ClassNotFoundException { stream.defaultReadObject(); expectedValuesPerKey = DEFAULT_VALUES_PER_KEY; @@ -171,5 +174,6 @@ private void readObject(ObjectInputStream stream) throws IOException, ClassNotFo } @GwtIncompatible // Not needed in emulated source. + @J2ktIncompatible private static final long serialVersionUID = 0; } diff --git a/android/guava/src/com/google/common/collect/ClassToInstanceMap.java b/android/guava/src/com/google/common/collect/ClassToInstanceMap.java index 8fbdfd9ebfc7..a34c6ad5f0c4 100644 --- a/android/guava/src/com/google/common/collect/ClassToInstanceMap.java +++ b/android/guava/src/com/google/common/collect/ClassToInstanceMap.java @@ -21,6 +21,8 @@ import com.google.errorprone.annotations.DoNotMock; import java.util.Map; import javax.annotation.CheckForNull; +import org.checkerframework.checker.nullness.qual.NonNull; +import org.checkerframework.checker.nullness.qual.Nullable; /** * A map, each entry of which maps a Java raw type to an @@ -30,17 +32,6 @@ *

    Like any other {@code Map}, this map may contain entries for primitive types, * and a primitive type and its corresponding wrapper type may map to different values. * - *

    This class's support for {@code null} requires some explanation: From release 31.0 onward, - * Guava specifies the nullness of its types through annotations. In the case of {@code - * ClassToInstanceMap}, it specifies that both the key and value types are restricted to - * non-nullable types. This specification is reasonable for keys, which must be non-null - * classes. This is in contrast to the specification for values: Null values are - * supported by the implementation {@link MutableClassToInstanceMap}, even though that - * implementation and this interface specify otherwise. Thus, if you use a nullness checker, you can - * safely suppress any warnings it produces when you write null values into a {@code - * MutableClassToInstanceMap}. Just be sure to be prepared for null values when reading from it, - * since nullness checkers will assume that values are non-null then, too. - * *

    See the Guava User Guide article on {@code * ClassToInstanceMap}. @@ -48,25 +39,22 @@ *

    To map a generic type to an instance of that type, use {@link * com.google.common.reflect.TypeToInstanceMap} instead. * - * @param the common supertype that all entries must share; often this is simply {@link Object} - * @author Kevin Bourrillion + * @param the common supertype that all values will share. When in doubt, just use {@link + * Object}, or use {@code @Nullable Object} to allow null values. * @since 2.0 */ @DoNotMock("Use ImmutableClassToInstanceMap or MutableClassToInstanceMap") @GwtCompatible @ElementTypesAreNonnullByDefault -// If we ever support non-null projections (https://github.com/jspecify/jspecify/issues/86), -// we might annotate this as... -// ClassToInstanceMap extends Map, B> -// ...and change its methods similarly ( or Class<@Nonnull T>). -public interface ClassToInstanceMap extends Map, B> { +public interface ClassToInstanceMap + extends Map, B> { /** * Returns the value the specified class is mapped to, or {@code null} if no entry for this class * is present. This will only return a value that was bound to this specific class, not a value * that may have been bound to a subtype. */ @CheckForNull - T getInstance(Class type); + T getInstance(Class type); /** * Maps the specified class to the specified value. Does not associate this value with any @@ -77,5 +65,5 @@ public interface ClassToInstanceMap extends Map, B> { */ @CanIgnoreReturnValue @CheckForNull - T putInstance(Class type, T value); + T putInstance(Class<@NonNull T> type, @ParametricNullness T value); } diff --git a/android/guava/src/com/google/common/collect/CompactHashMap.java b/android/guava/src/com/google/common/collect/CompactHashMap.java index e70596dd222d..1e5da07acc51 100644 --- a/android/guava/src/com/google/common/collect/CompactHashMap.java +++ b/android/guava/src/com/google/common/collect/CompactHashMap.java @@ -24,6 +24,7 @@ import static java.util.Objects.requireNonNull; import com.google.common.annotations.GwtIncompatible; +import com.google.common.annotations.J2ktIncompatible; import com.google.common.annotations.VisibleForTesting; import com.google.common.base.Objects; import com.google.common.base.Preconditions; @@ -997,6 +998,7 @@ public void clear() { } } + @J2ktIncompatible private void writeObject(ObjectOutputStream stream) throws IOException { stream.defaultWriteObject(); stream.writeInt(size()); @@ -1009,6 +1011,7 @@ private void writeObject(ObjectOutputStream stream) throws IOException { } @SuppressWarnings("unchecked") + @J2ktIncompatible private void readObject(ObjectInputStream stream) throws IOException, ClassNotFoundException { stream.defaultReadObject(); int elementCount = stream.readInt(); diff --git a/android/guava/src/com/google/common/collect/CompactHashSet.java b/android/guava/src/com/google/common/collect/CompactHashSet.java index 08c729423fe4..52f8a4a676ce 100644 --- a/android/guava/src/com/google/common/collect/CompactHashSet.java +++ b/android/guava/src/com/google/common/collect/CompactHashSet.java @@ -22,6 +22,7 @@ import static java.util.Objects.requireNonNull; import com.google.common.annotations.GwtIncompatible; +import com.google.common.annotations.J2ktIncompatible; import com.google.common.annotations.VisibleForTesting; import com.google.common.base.Objects; import com.google.common.base.Preconditions; @@ -669,6 +670,7 @@ public void clear() { } } + @J2ktIncompatible private void writeObject(ObjectOutputStream stream) throws IOException { stream.defaultWriteObject(); stream.writeInt(size()); @@ -678,6 +680,7 @@ private void writeObject(ObjectOutputStream stream) throws IOException { } @SuppressWarnings("unchecked") + @J2ktIncompatible private void readObject(ObjectInputStream stream) throws IOException, ClassNotFoundException { stream.defaultReadObject(); int elementCount = stream.readInt(); diff --git a/android/guava/src/com/google/common/collect/CompactLinkedHashMap.java b/android/guava/src/com/google/common/collect/CompactLinkedHashMap.java index fb648a7a4f1b..d32e38f92be8 100644 --- a/android/guava/src/com/google/common/collect/CompactLinkedHashMap.java +++ b/android/guava/src/com/google/common/collect/CompactLinkedHashMap.java @@ -19,6 +19,7 @@ import static java.util.Objects.requireNonNull; import com.google.common.annotations.GwtIncompatible; +import com.google.common.annotations.J2ktIncompatible; import com.google.common.annotations.VisibleForTesting; import com.google.errorprone.annotations.CanIgnoreReturnValue; import java.util.Arrays; @@ -47,6 +48,7 @@ * * @author Louis Wasserman */ +@J2ktIncompatible // no support for access-order mode in LinkedHashMap delegate @GwtIncompatible // not worth using in GWT for now @ElementTypesAreNonnullByDefault class CompactLinkedHashMap diff --git a/android/guava/src/com/google/common/collect/CompoundOrdering.java b/android/guava/src/com/google/common/collect/CompoundOrdering.java index 42feed373193..95ebb82bba9f 100644 --- a/android/guava/src/com/google/common/collect/CompoundOrdering.java +++ b/android/guava/src/com/google/common/collect/CompoundOrdering.java @@ -30,12 +30,14 @@ final class CompoundOrdering extends Ordering implements Serializable { final Comparator[] comparators; + @SuppressWarnings("unchecked") // Generic array creation CompoundOrdering(Comparator primary, Comparator secondary) { this.comparators = (Comparator[]) new Comparator[] {primary, secondary}; } + @SuppressWarnings("unchecked") // Generic array creation CompoundOrdering(Iterable> comparators) { - this.comparators = Iterables.toArray(comparators, new Comparator[0]); + this.comparators = Iterables.toArray(comparators, (Comparator[]) new Comparator[0]); } @Override diff --git a/android/guava/src/com/google/common/collect/ConcurrentHashMultiset.java b/android/guava/src/com/google/common/collect/ConcurrentHashMultiset.java index 47248412bffa..c01004039ca0 100644 --- a/android/guava/src/com/google/common/collect/ConcurrentHashMultiset.java +++ b/android/guava/src/com/google/common/collect/ConcurrentHashMultiset.java @@ -23,6 +23,7 @@ import com.google.common.annotations.Beta; import com.google.common.annotations.GwtIncompatible; +import com.google.common.annotations.J2ktIncompatible; import com.google.common.annotations.VisibleForTesting; import com.google.common.collect.Serialization.FieldSetter; import com.google.common.math.IntMath; @@ -55,6 +56,7 @@ * @author mike nonemacher * @since 2.0 */ +@J2ktIncompatible @GwtIncompatible @ElementTypesAreNonnullByDefault public final class ConcurrentHashMultiset extends AbstractMultiset implements Serializable { @@ -594,6 +596,7 @@ private void writeObject(ObjectOutputStream stream) throws IOException { stream.writeObject(countMap); } + @J2ktIncompatible // serialization private void readObject(ObjectInputStream stream) throws IOException, ClassNotFoundException { stream.defaultReadObject(); @SuppressWarnings("unchecked") // reading data stored by writeObject diff --git a/android/guava/src/com/google/common/collect/ConsumingQueueIterator.java b/android/guava/src/com/google/common/collect/ConsumingQueueIterator.java index 7721e1277ca8..3a923ae21f10 100644 --- a/android/guava/src/com/google/common/collect/ConsumingQueueIterator.java +++ b/android/guava/src/com/google/common/collect/ConsumingQueueIterator.java @@ -23,7 +23,7 @@ /** * An Iterator implementation which draws elements from a queue, removing them from the queue as it - * iterates. + * iterates. This class is not thread safe. */ @GwtCompatible @ElementTypesAreNonnullByDefault @@ -36,7 +36,7 @@ final class ConsumingQueueIterator extends AbstractI @Override @CheckForNull - public T computeNext() { + protected T computeNext() { // TODO(b/192579700): Use a ternary once it no longer confuses our nullness checker. if (queue.isEmpty()) { return endOfData(); diff --git a/android/guava/src/com/google/common/collect/DiscreteDomain.java b/android/guava/src/com/google/common/collect/DiscreteDomain.java index 222ebe5283f3..c32ea8408979 100644 --- a/android/guava/src/com/google/common/collect/DiscreteDomain.java +++ b/android/guava/src/com/google/common/collect/DiscreteDomain.java @@ -50,6 +50,9 @@ public abstract class DiscreteDomain { /** * Returns the discrete domain for values of type {@code Integer}. * + *

    This method always returns the same object. That object is serializable; deserializing it + * results in the same object too. + * * @since 14.0 (since 10.0 as {@code DiscreteDomains.integers()}) */ public static DiscreteDomain integers() { @@ -113,6 +116,9 @@ public String toString() { /** * Returns the discrete domain for values of type {@code Long}. * + *

    This method always returns the same object. That object is serializable; deserializing it + * results in the same object too. + * * @since 14.0 (since 10.0 as {@code DiscreteDomains.longs()}) */ public static DiscreteDomain longs() { @@ -187,6 +193,9 @@ public String toString() { /** * Returns the discrete domain for values of type {@code BigInteger}. * + *

    This method always returns the same object. That object is serializable; deserializing it + * results in the same object too. + * * @since 15.0 */ public static DiscreteDomain bigIntegers() { diff --git a/android/guava/src/com/google/common/collect/EmptyContiguousSet.java b/android/guava/src/com/google/common/collect/EmptyContiguousSet.java index 6ae7459f7bfa..5ae3d23f4b85 100644 --- a/android/guava/src/com/google/common/collect/EmptyContiguousSet.java +++ b/android/guava/src/com/google/common/collect/EmptyContiguousSet.java @@ -15,6 +15,7 @@ import com.google.common.annotations.GwtCompatible; import com.google.common.annotations.GwtIncompatible; +import com.google.common.annotations.J2ktIncompatible; import java.io.InvalidObjectException; import java.io.ObjectInputStream; import java.io.Serializable; @@ -144,6 +145,7 @@ public int hashCode() { } @GwtIncompatible // serialization + @J2ktIncompatible private static final class SerializedForm implements Serializable { private final DiscreteDomain domain; @@ -159,12 +161,14 @@ private Object readResolve() { } @GwtIncompatible // serialization + @J2ktIncompatible @Override Object writeReplace() { return new SerializedForm<>(domain); } @GwtIncompatible // serialization + @J2ktIncompatible private void readObject(ObjectInputStream stream) throws InvalidObjectException { throw new InvalidObjectException("Use SerializedForm"); } @@ -172,6 +176,6 @@ private void readObject(ObjectInputStream stream) throws InvalidObjectException @GwtIncompatible // NavigableSet @Override ImmutableSortedSet createDescendingSet() { - return ImmutableSortedSet.emptySet(Ordering.natural().reverse()); + return ImmutableSortedSet.emptySet(Ordering.natural().reverse()); } } diff --git a/android/guava/src/com/google/common/collect/EnumBiMap.java b/android/guava/src/com/google/common/collect/EnumBiMap.java index 97d3c2e7cd09..cb5ce71fd862 100644 --- a/android/guava/src/com/google/common/collect/EnumBiMap.java +++ b/android/guava/src/com/google/common/collect/EnumBiMap.java @@ -21,6 +21,7 @@ import com.google.common.annotations.GwtCompatible; import com.google.common.annotations.GwtIncompatible; +import com.google.common.annotations.J2ktIncompatible; import java.io.IOException; import java.io.ObjectInputStream; import java.io.ObjectOutputStream; @@ -38,6 +39,7 @@ * @since 2.0 */ @GwtCompatible(emulated = true) +@J2ktIncompatible @ElementTypesAreNonnullByDefault public final class EnumBiMap, V extends Enum> extends AbstractBiMap { private transient Class keyType; diff --git a/android/guava/src/com/google/common/collect/EnumHashBiMap.java b/android/guava/src/com/google/common/collect/EnumHashBiMap.java index 5fbbb70c6303..e2bc841a7776 100644 --- a/android/guava/src/com/google/common/collect/EnumHashBiMap.java +++ b/android/guava/src/com/google/common/collect/EnumHashBiMap.java @@ -20,6 +20,7 @@ import com.google.common.annotations.GwtCompatible; import com.google.common.annotations.GwtIncompatible; +import com.google.common.annotations.J2ktIncompatible; import com.google.errorprone.annotations.CanIgnoreReturnValue; import java.io.IOException; import java.io.ObjectInputStream; @@ -42,6 +43,7 @@ * @since 2.0 */ @GwtCompatible(emulated = true) +@J2ktIncompatible @ElementTypesAreNonnullByDefault public final class EnumHashBiMap, V extends @Nullable Object> extends AbstractBiMap { diff --git a/android/guava/src/com/google/common/collect/EnumMultiset.java b/android/guava/src/com/google/common/collect/EnumMultiset.java index 57a3a873e12e..493bcc73a8c9 100644 --- a/android/guava/src/com/google/common/collect/EnumMultiset.java +++ b/android/guava/src/com/google/common/collect/EnumMultiset.java @@ -21,6 +21,7 @@ import com.google.common.annotations.GwtCompatible; import com.google.common.annotations.GwtIncompatible; +import com.google.common.annotations.J2ktIncompatible; import com.google.common.primitives.Ints; import com.google.errorprone.annotations.CanIgnoreReturnValue; import java.io.IOException; @@ -43,6 +44,7 @@ * @since 2.0 */ @GwtCompatible(emulated = true) +@J2ktIncompatible @ElementTypesAreNonnullByDefault public final class EnumMultiset> extends AbstractMultiset implements Serializable { diff --git a/android/guava/src/com/google/common/collect/EvictingQueue.java b/android/guava/src/com/google/common/collect/EvictingQueue.java index 5667dfa8c054..fe95f30b6049 100644 --- a/android/guava/src/com/google/common/collect/EvictingQueue.java +++ b/android/guava/src/com/google/common/collect/EvictingQueue.java @@ -21,6 +21,7 @@ import com.google.common.annotations.Beta; import com.google.common.annotations.GwtCompatible; +import com.google.common.annotations.J2ktIncompatible; import com.google.common.annotations.VisibleForTesting; import com.google.errorprone.annotations.CanIgnoreReturnValue; import java.io.Serializable; @@ -127,6 +128,7 @@ public boolean addAll(Collection collection) { } @Override + @J2ktIncompatible // Incompatible return type change. Use inherited implementation public Object[] toArray() { /* * If we could, we'd declare the no-arg `Collection.toArray()` to return "Object[] but elements diff --git a/android/guava/src/com/google/common/collect/FluentIterable.java b/android/guava/src/com/google/common/collect/FluentIterable.java index 72794b97a4ea..d4a19cffaaf1 100644 --- a/android/guava/src/com/google/common/collect/FluentIterable.java +++ b/android/guava/src/com/google/common/collect/FluentIterable.java @@ -16,7 +16,6 @@ import static com.google.common.base.Preconditions.checkNotNull; -import com.google.common.annotations.Beta; import com.google.common.annotations.GwtCompatible; import com.google.common.annotations.GwtIncompatible; import com.google.common.base.Function; @@ -33,6 +32,7 @@ import java.util.List; import java.util.SortedSet; import javax.annotation.CheckForNull; +import org.checkerframework.checker.nullness.qual.NonNull; import org.checkerframework.checker.nullness.qual.Nullable; /** @@ -162,7 +162,6 @@ public Iterator iterator() { * * @since 20.0 (since 18.0 as an overload of {@code of}) */ - @Beta public static FluentIterable from(E[] elements) { return from(Arrays.asList(elements)); } @@ -195,7 +194,6 @@ public Iterator iterator() { * * @since 20.0 */ - @Beta public static FluentIterable concat( Iterable a, Iterable b) { return concatNoDefensiveCopy(a, b); @@ -214,7 +212,6 @@ public Iterator iterator() { * * @since 20.0 */ - @Beta public static FluentIterable concat( Iterable a, Iterable b, Iterable c) { return concatNoDefensiveCopy(a, b, c); @@ -234,7 +231,6 @@ public Iterator iterator() { * * @since 20.0 */ - @Beta public static FluentIterable concat( Iterable a, Iterable b, @@ -258,7 +254,6 @@ public Iterator iterator() { * @throws NullPointerException if any of the provided iterables is {@code null} * @since 20.0 */ - @Beta public static FluentIterable concat( Iterable... inputs) { return concatNoDefensiveCopy(Arrays.copyOf(inputs, inputs.length)); @@ -278,14 +273,13 @@ public Iterator iterator() { * * @since 20.0 */ - @Beta public static FluentIterable concat( final Iterable> inputs) { checkNotNull(inputs); return new FluentIterable() { @Override public Iterator iterator() { - return Iterators.concat(Iterators.transform(inputs.iterator(), Iterables.toIterator())); + return Iterators.concat(Iterators.transform(inputs.iterator(), Iterable::iterator)); } }; } @@ -318,7 +312,6 @@ public Iterator get(int i) { * * @since 20.0 */ - @Beta public static FluentIterable of() { return FluentIterable.from(Collections.emptyList()); } @@ -331,7 +324,6 @@ public Iterator get(int i) { * * @since 20.0 */ - @Beta public static FluentIterable of( @ParametricNullness E element, E... elements) { return from(Lists.asList(element, elements)); @@ -400,7 +392,6 @@ public final FluentIterable cycle() { * * @since 18.0 */ - @Beta public final FluentIterable append(Iterable other) { return FluentIterable.concat(getDelegate(), other); } @@ -413,7 +404,6 @@ public final FluentIterable append(Iterable other) { * * @since 18.0 */ - @Beta public final FluentIterable append(E... elements) { return FluentIterable.concat(getDelegate(), Arrays.asList(elements)); } @@ -475,8 +465,8 @@ public final boolean allMatch(Predicate predicate) { *

    {@code Stream} equivalent: {@code stream.filter(predicate).findFirst()}. */ @SuppressWarnings("nullness") // Unsafe, but we can't do much about it now. - public final Optional firstMatch(Predicate predicate) { - return Iterables.tryFind(getDelegate(), predicate); + public final Optional<@NonNull E> firstMatch(Predicate predicate) { + return Iterables.tryFind((Iterable<@NonNull E>) getDelegate(), predicate); } /** @@ -523,9 +513,9 @@ public final Optional firstMatch(Predicate predicate) { * iterator().next()} or {@link Iterables#getFirst} instead. */ @SuppressWarnings("nullness") // Unsafe, but we can't do much about it now. - public final Optional first() { + public final Optional<@NonNull E> first() { Iterator iterator = getDelegate().iterator(); - return iterator.hasNext() ? Optional.of(iterator.next()) : Optional.absent(); + return iterator.hasNext() ? Optional.of(iterator.next()) : Optional.absent(); } /** @@ -540,7 +530,7 @@ public final Optional first() { * Iterables#getLast} instead. */ @SuppressWarnings("nullness") // Unsafe, but we can't do much about it now. - public final Optional last() { + public final Optional<@NonNull E> last() { // Iterables#getLast was inlined here so we don't have to throw/catch a NSEE // TODO(kevinb): Support a concurrently modified collection? @@ -630,8 +620,8 @@ public final boolean isEmpty() { * @since 14.0 (since 12.0 as {@code toImmutableList()}). */ @SuppressWarnings("nullness") // Unsafe, but we can't do much about it now. - public final ImmutableList toList() { - return ImmutableList.copyOf(getDelegate()); + public final ImmutableList<@NonNull E> toList() { + return ImmutableList.copyOf((Iterable<@NonNull E>) getDelegate()); } /** @@ -648,8 +638,8 @@ public final ImmutableList toList() { * @since 14.0 (since 13.0 as {@code toSortedImmutableList()}). */ @SuppressWarnings("nullness") // Unsafe, but we can't do much about it now. - public final ImmutableList toSortedList(Comparator comparator) { - return Ordering.from(comparator).immutableSortedCopy(getDelegate()); + public final ImmutableList<@NonNull E> toSortedList(Comparator comparator) { + return Ordering.from(comparator).immutableSortedCopy((Iterable<@NonNull E>) getDelegate()); } /** @@ -663,8 +653,8 @@ public final ImmutableList toSortedList(Comparator comparator) { * @since 14.0 (since 12.0 as {@code toImmutableSet()}). */ @SuppressWarnings("nullness") // Unsafe, but we can't do much about it now. - public final ImmutableSet toSet() { - return ImmutableSet.copyOf(getDelegate()); + public final ImmutableSet<@NonNull E> toSet() { + return ImmutableSet.copyOf((Iterable<@NonNull E>) getDelegate()); } /** @@ -682,8 +672,8 @@ public final ImmutableSet toSet() { * @since 14.0 (since 12.0 as {@code toImmutableSortedSet()}). */ @SuppressWarnings("nullness") // Unsafe, but we can't do much about it now. - public final ImmutableSortedSet toSortedSet(Comparator comparator) { - return ImmutableSortedSet.copyOf(comparator, getDelegate()); + public final ImmutableSortedSet<@NonNull E> toSortedSet(Comparator comparator) { + return ImmutableSortedSet.copyOf(comparator, (Iterable<@NonNull E>) getDelegate()); } /** @@ -696,8 +686,8 @@ public final ImmutableSortedSet toSortedSet(Comparator comparator) * @since 19.0 */ @SuppressWarnings("nullness") // Unsafe, but we can't do much about it now. - public final ImmutableMultiset toMultiset() { - return ImmutableMultiset.copyOf(getDelegate()); + public final ImmutableMultiset<@NonNull E> toMultiset() { + return ImmutableMultiset.copyOf((Iterable<@NonNull E>) getDelegate()); } /** @@ -718,8 +708,8 @@ public final ImmutableMultiset toMultiset() { * @since 14.0 */ @SuppressWarnings("nullness") // Unsafe, but we can't do much about it now. - public final ImmutableMap toMap(Function valueFunction) { - return Maps.toMap(getDelegate(), valueFunction); + public final ImmutableMap<@NonNull E, V> toMap(Function valueFunction) { + return Maps.toMap((Iterable<@NonNull E>) getDelegate(), valueFunction); } /** @@ -741,8 +731,8 @@ public final ImmutableMap toMap(Function valueFunction) * @since 14.0 */ @SuppressWarnings("nullness") // Unsafe, but we can't do much about it now. - public final ImmutableListMultimap index(Function keyFunction) { - return Multimaps.index(getDelegate(), keyFunction); + public final ImmutableListMultimap index(Function keyFunction) { + return Multimaps.index((Iterable<@NonNull E>) getDelegate(), keyFunction); } /** @@ -778,8 +768,8 @@ public final ImmutableListMultimap index(Function keyFun * @since 14.0 */ @SuppressWarnings("nullness") // Unsafe, but we can't do much about it now. - public final ImmutableMap uniqueIndex(Function keyFunction) { - return Maps.uniqueIndex(getDelegate(), keyFunction); + public final ImmutableMap uniqueIndex(Function keyFunction) { + return Maps.uniqueIndex((Iterable<@NonNull E>) getDelegate(), keyFunction); } /** @@ -795,15 +785,7 @@ public final ImmutableMap uniqueIndex(Function keyFuncti * copied */ @GwtIncompatible // Array.newArray(Class, int) - /* - * Both the declaration of our Class parameter and its usage in a call to Iterables.toArray - * produce a nullness error: E may be a nullable type, and our nullness checker has Class's type - * parameter bounded to non-null types. To avoid that, we'd use Class<@Nonnull E> if we could. - * (Granted, this is only one of many nullness-checking problems that arise from letting - * FluentIterable support null elements, and most of the other produce outright unsoundness.) - */ - @SuppressWarnings("nullness") - public final @Nullable E[] toArray(Class type) { + public final @Nullable E[] toArray(Class<@NonNull E> type) { return Iterables.toArray(getDelegate(), type); } @@ -842,7 +824,6 @@ public final > C copyInto(C collection) { * * @since 18.0 */ - @Beta public final String join(Joiner joiner) { return joiner.join(this); } diff --git a/android/guava/src/com/google/common/collect/ForwardingBlockingDeque.java b/android/guava/src/com/google/common/collect/ForwardingBlockingDeque.java index 49d4bcf6c232..13b5b236e3fb 100644 --- a/android/guava/src/com/google/common/collect/ForwardingBlockingDeque.java +++ b/android/guava/src/com/google/common/collect/ForwardingBlockingDeque.java @@ -17,6 +17,7 @@ package com.google.common.collect; import com.google.common.annotations.GwtIncompatible; +import com.google.common.annotations.J2ktIncompatible; import java.util.Collection; import java.util.concurrent.BlockingDeque; import java.util.concurrent.TimeUnit; @@ -46,6 +47,7 @@ * com.google.common.util.concurrent.ForwardingBlockingDeque} instead. */ @Deprecated +@J2ktIncompatible @GwtIncompatible @ElementTypesAreNonnullByDefault public abstract class ForwardingBlockingDeque extends ForwardingDeque diff --git a/android/guava/src/com/google/common/collect/ForwardingDeque.java b/android/guava/src/com/google/common/collect/ForwardingDeque.java index 571535cab917..2730dad0ee8b 100644 --- a/android/guava/src/com/google/common/collect/ForwardingDeque.java +++ b/android/guava/src/com/google/common/collect/ForwardingDeque.java @@ -17,6 +17,7 @@ package com.google.common.collect; import com.google.common.annotations.GwtIncompatible; +import com.google.common.annotations.J2ktIncompatible; import com.google.errorprone.annotations.CanIgnoreReturnValue; import java.util.Deque; import java.util.Iterator; @@ -40,6 +41,7 @@ * @author Kurt Alfred Kluever * @since 12.0 */ +@J2ktIncompatible @GwtIncompatible @ElementTypesAreNonnullByDefault public abstract class ForwardingDeque extends ForwardingQueue diff --git a/android/guava/src/com/google/common/collect/HashBiMap.java b/android/guava/src/com/google/common/collect/HashBiMap.java index de0f16d52241..a2933a5cdfdd 100644 --- a/android/guava/src/com/google/common/collect/HashBiMap.java +++ b/android/guava/src/com/google/common/collect/HashBiMap.java @@ -20,6 +20,7 @@ import com.google.common.annotations.GwtCompatible; import com.google.common.annotations.GwtIncompatible; +import com.google.common.annotations.J2ktIncompatible; import com.google.common.base.Objects; import com.google.errorprone.annotations.CanIgnoreReturnValue; import com.google.errorprone.annotations.concurrent.LazyInit; @@ -1134,12 +1135,14 @@ public K setValue(@ParametricNullness K key) { * @serialData the number of entries, first key, first value, second key, second value, and so on. */ @GwtIncompatible // java.io.ObjectOutputStream + @J2ktIncompatible private void writeObject(ObjectOutputStream stream) throws IOException { stream.defaultWriteObject(); Serialization.writeMap(this, stream); } @GwtIncompatible // java.io.ObjectInputStream + @J2ktIncompatible private void readObject(ObjectInputStream stream) throws IOException, ClassNotFoundException { stream.defaultReadObject(); int size = Serialization.readCount(stream); diff --git a/android/guava/src/com/google/common/collect/HashMultimap.java b/android/guava/src/com/google/common/collect/HashMultimap.java index 9e4c1c2233f1..51567cdce4f4 100644 --- a/android/guava/src/com/google/common/collect/HashMultimap.java +++ b/android/guava/src/com/google/common/collect/HashMultimap.java @@ -18,6 +18,7 @@ import com.google.common.annotations.GwtCompatible; import com.google.common.annotations.GwtIncompatible; +import com.google.common.annotations.J2ktIncompatible; import com.google.common.annotations.VisibleForTesting; import com.google.common.base.Preconditions; import java.io.IOException; @@ -131,12 +132,14 @@ Set createCollection() { * key, number of values for that key, and the key's values */ @GwtIncompatible // java.io.ObjectOutputStream + @J2ktIncompatible private void writeObject(ObjectOutputStream stream) throws IOException { stream.defaultWriteObject(); Serialization.writeMultimap(this, stream); } @GwtIncompatible // java.io.ObjectInputStream + @J2ktIncompatible private void readObject(ObjectInputStream stream) throws IOException, ClassNotFoundException { stream.defaultReadObject(); expectedValuesPerKey = DEFAULT_VALUES_PER_KEY; @@ -147,5 +150,6 @@ private void readObject(ObjectInputStream stream) throws IOException, ClassNotFo } @GwtIncompatible // Not needed in emulated source + @J2ktIncompatible private static final long serialVersionUID = 0; } diff --git a/android/guava/src/com/google/common/collect/HashMultiset.java b/android/guava/src/com/google/common/collect/HashMultiset.java index 0748e68be4d9..0bc4ccac49ba 100644 --- a/android/guava/src/com/google/common/collect/HashMultiset.java +++ b/android/guava/src/com/google/common/collect/HashMultiset.java @@ -18,6 +18,7 @@ import com.google.common.annotations.GwtCompatible; import com.google.common.annotations.GwtIncompatible; +import com.google.common.annotations.J2ktIncompatible; import org.checkerframework.checker.nullness.qual.Nullable; /** @@ -71,5 +72,6 @@ ObjectCountHashMap newBackingMap(int distinctElements) { } @GwtIncompatible // Not needed in emulated source. + @J2ktIncompatible private static final long serialVersionUID = 0; } diff --git a/android/guava/src/com/google/common/collect/ImmutableAsList.java b/android/guava/src/com/google/common/collect/ImmutableAsList.java index c39747931796..b7c585cc2f1a 100644 --- a/android/guava/src/com/google/common/collect/ImmutableAsList.java +++ b/android/guava/src/com/google/common/collect/ImmutableAsList.java @@ -18,6 +18,7 @@ import com.google.common.annotations.GwtCompatible; import com.google.common.annotations.GwtIncompatible; +import com.google.common.annotations.J2ktIncompatible; import java.io.InvalidObjectException; import java.io.ObjectInputStream; import java.io.Serializable; @@ -60,6 +61,7 @@ boolean isPartialView() { /** Serialized form that leads to the same performance as the original list. */ @GwtIncompatible // serialization + @J2ktIncompatible static class SerializedForm implements Serializable { final ImmutableCollection collection; @@ -75,11 +77,13 @@ Object readResolve() { } @GwtIncompatible // serialization + @J2ktIncompatible private void readObject(ObjectInputStream stream) throws InvalidObjectException { throw new InvalidObjectException("Use SerializedForm"); } @GwtIncompatible // serialization + @J2ktIncompatible @Override Object writeReplace() { return new SerializedForm(delegateCollection()); diff --git a/android/guava/src/com/google/common/collect/ImmutableBiMap.java b/android/guava/src/com/google/common/collect/ImmutableBiMap.java index b3646a267842..30e293ebf80a 100644 --- a/android/guava/src/com/google/common/collect/ImmutableBiMap.java +++ b/android/guava/src/com/google/common/collect/ImmutableBiMap.java @@ -19,8 +19,8 @@ import static com.google.common.collect.CollectPreconditions.checkEntryNotNull; import static com.google.common.collect.CollectPreconditions.checkNonnegative; -import com.google.common.annotations.Beta; import com.google.common.annotations.GwtCompatible; +import com.google.common.annotations.J2ktIncompatible; import com.google.errorprone.annotations.CanIgnoreReturnValue; import com.google.errorprone.annotations.DoNotCall; import java.io.InvalidObjectException; @@ -296,7 +296,6 @@ public static Builder builder() { * * @since 23.1 */ - @Beta public static Builder builderWithExpectedSize(int expectedSize) { checkNonnegative(expectedSize, "expectedSize"); return new Builder<>(expectedSize); @@ -388,7 +387,6 @@ public Builder putAll(Map map) { * @since 19.0 */ @CanIgnoreReturnValue - @Beta @Override public Builder putAll(Iterable> entries) { super.putAll(entries); @@ -406,7 +404,6 @@ public Builder putAll(Iterable> * @since 19.0 */ @CanIgnoreReturnValue - @Beta @Override public Builder orderEntriesByValue(Comparator valueComparator) { super.orderEntriesByValue(valueComparator); @@ -514,7 +511,6 @@ public static ImmutableBiMap copyOf(Map m * @throws NullPointerException if any key, value, or entry is null * @since 19.0 */ - @Beta public static ImmutableBiMap copyOf( Iterable> entries) { int estimatedSize = @@ -571,6 +567,7 @@ public final V forcePut(K key, V value) { *

    Since the bimap is immutable, ImmutableBiMap doesn't require special logic for keeping the * bimap and its inverse in sync during serialization, the way AbstractBiMap does. */ + @J2ktIncompatible // serialization private static class SerializedForm extends ImmutableMap.SerializedForm { SerializedForm(ImmutableBiMap bimap) { super(bimap); @@ -585,10 +582,12 @@ Builder makeBuilder(int size) { } @Override + @J2ktIncompatible // serialization Object writeReplace() { return new SerializedForm<>(this); } + @J2ktIncompatible // serialization private void readObject(ObjectInputStream stream) throws InvalidObjectException { throw new InvalidObjectException("Use SerializedForm"); } diff --git a/android/guava/src/com/google/common/collect/ImmutableClassToInstanceMap.java b/android/guava/src/com/google/common/collect/ImmutableClassToInstanceMap.java index c59e9fdaba8e..5c907f7cd468 100644 --- a/android/guava/src/com/google/common/collect/ImmutableClassToInstanceMap.java +++ b/android/guava/src/com/google/common/collect/ImmutableClassToInstanceMap.java @@ -26,6 +26,7 @@ import java.io.Serializable; import java.util.Map; import javax.annotation.CheckForNull; +import org.checkerframework.checker.nullness.qual.NonNull; /** * A {@link ClassToInstanceMap} whose contents will never change, with many other important @@ -37,7 +38,9 @@ @Immutable(containerOf = "B") @GwtIncompatible @ElementTypesAreNonnullByDefault -public final class ImmutableClassToInstanceMap extends ForwardingMap, B> +// TODO(b/278589132): Remove the redundant "@NonNull" on B once it's no longer required by J2KT. +public final class ImmutableClassToInstanceMap + extends ForwardingMap, B> implements ClassToInstanceMap, Serializable { private static final ImmutableClassToInstanceMap EMPTY = @@ -154,8 +157,10 @@ public ImmutableClassToInstanceMap build() { public static ImmutableClassToInstanceMap copyOf( Map, ? extends S> map) { if (map instanceof ImmutableClassToInstanceMap) { + @SuppressWarnings("rawtypes") // JDT-based J2KT Java frontend does not permit the direct cast + Map rawMap = map; @SuppressWarnings("unchecked") // covariant casts safe (unmodifiable) - ImmutableClassToInstanceMap cast = (ImmutableClassToInstanceMap) map; + ImmutableClassToInstanceMap cast = (ImmutableClassToInstanceMap) rawMap; return cast; } return new Builder().putAll(map).build(); diff --git a/android/guava/src/com/google/common/collect/ImmutableCollection.java b/android/guava/src/com/google/common/collect/ImmutableCollection.java index 72815bd7e6b8..4ef25aa78353 100644 --- a/android/guava/src/com/google/common/collect/ImmutableCollection.java +++ b/android/guava/src/com/google/common/collect/ImmutableCollection.java @@ -21,6 +21,7 @@ import static com.google.common.collect.ObjectArrays.checkElementsNotNull; import com.google.common.annotations.GwtCompatible; +import com.google.common.annotations.J2ktIncompatible; import com.google.errorprone.annotations.CanIgnoreReturnValue; import com.google.errorprone.annotations.DoNotCall; import com.google.errorprone.annotations.DoNotMock; @@ -179,6 +180,7 @@ public abstract class ImmutableCollection extends AbstractCollection imple private static final Object[] EMPTY_ARRAY = {}; @Override + @J2ktIncompatible // Incompatible return type change. Use inherited (unoptimized) implementation public final Object[] toArray() { return toArray(EMPTY_ARRAY); } @@ -358,11 +360,13 @@ int copyIntoArray(@Nullable Object[] dst, int offset) { return offset; } + @J2ktIncompatible // serialization Object writeReplace() { // We serialize by default to ImmutableList, the simplest thing that works. return new ImmutableList.SerializedForm(toArray()); } + @J2ktIncompatible // serialization private void readObject(ObjectInputStream stream) throws InvalidObjectException { throw new InvalidObjectException("Use SerializedForm"); } diff --git a/android/guava/src/com/google/common/collect/ImmutableEntry.java b/android/guava/src/com/google/common/collect/ImmutableEntry.java index edc25f490fd5..f88fcc1c6a3f 100644 --- a/android/guava/src/com/google/common/collect/ImmutableEntry.java +++ b/android/guava/src/com/google/common/collect/ImmutableEntry.java @@ -20,7 +20,11 @@ import java.io.Serializable; import org.checkerframework.checker.nullness.qual.Nullable; -/** @see com.google.common.collect.Maps#immutableEntry(Object, Object) */ +/** + * An immutable {@code Map.Entry}, used both by {@link + * com.google.common.collect.Maps#immutableEntry(Object, Object)} and by other parts of {@code + * common.collect} as a superclass. + */ @GwtCompatible(serializable = true) @ElementTypesAreNonnullByDefault class ImmutableEntry diff --git a/android/guava/src/com/google/common/collect/ImmutableEnumMap.java b/android/guava/src/com/google/common/collect/ImmutableEnumMap.java index f4d60f5cda85..72b97d2415e1 100644 --- a/android/guava/src/com/google/common/collect/ImmutableEnumMap.java +++ b/android/guava/src/com/google/common/collect/ImmutableEnumMap.java @@ -19,6 +19,7 @@ import static com.google.common.base.Preconditions.checkArgument; import com.google.common.annotations.GwtCompatible; +import com.google.common.annotations.J2ktIncompatible; import com.google.common.collect.ImmutableMap.IteratorBasedImmutableMap; import java.io.InvalidObjectException; import java.io.ObjectInputStream; @@ -98,10 +99,12 @@ boolean isPartialView() { // All callers of the constructor are restricted to >. @Override + @J2ktIncompatible // serialization Object writeReplace() { return new EnumSerializedForm<>(delegate); } + @J2ktIncompatible // serialization private void readObject(ObjectInputStream stream) throws InvalidObjectException { throw new InvalidObjectException("Use EnumSerializedForm"); } @@ -109,6 +112,7 @@ private void readObject(ObjectInputStream stream) throws InvalidObjectException /* * This class is used to serialize ImmutableEnumMap instances. */ + @J2ktIncompatible // serialization private static class EnumSerializedForm, V> implements Serializable { final EnumMap delegate; diff --git a/android/guava/src/com/google/common/collect/ImmutableEnumSet.java b/android/guava/src/com/google/common/collect/ImmutableEnumSet.java index d7f56e106dcf..2f042f85fd23 100644 --- a/android/guava/src/com/google/common/collect/ImmutableEnumSet.java +++ b/android/guava/src/com/google/common/collect/ImmutableEnumSet.java @@ -17,6 +17,7 @@ package com.google.common.collect; import com.google.common.annotations.GwtCompatible; +import com.google.common.annotations.J2ktIncompatible; import com.google.errorprone.annotations.concurrent.LazyInit; import java.io.InvalidObjectException; import java.io.ObjectInputStream; @@ -34,15 +35,14 @@ @SuppressWarnings("serial") // we're overriding default serialization @ElementTypesAreNonnullByDefault final class ImmutableEnumSet> extends ImmutableSet { - @SuppressWarnings("rawtypes") // necessary to compile against Java 8 - static ImmutableSet asImmutable(EnumSet set) { + static > ImmutableSet asImmutable(EnumSet set) { switch (set.size()) { case 0: return ImmutableSet.of(); case 1: return ImmutableSet.of(Iterables.getOnlyElement(set)); default: - return new ImmutableEnumSet(set); + return new ImmutableEnumSet(set); } } @@ -124,10 +124,12 @@ public String toString() { // All callers of the constructor are restricted to >. @Override + @J2ktIncompatible // serialization Object writeReplace() { return new EnumSerializedForm(delegate); } + @J2ktIncompatible // serialization private void readObject(ObjectInputStream stream) throws InvalidObjectException { throw new InvalidObjectException("Use SerializedForm"); } @@ -135,6 +137,7 @@ private void readObject(ObjectInputStream stream) throws InvalidObjectException /* * This class is used to serialize ImmutableEnumSet instances. */ + @J2ktIncompatible // serialization private static class EnumSerializedForm> implements Serializable { final EnumSet delegate; diff --git a/android/guava/src/com/google/common/collect/ImmutableList.java b/android/guava/src/com/google/common/collect/ImmutableList.java index e336424f61e8..364af71f5337 100644 --- a/android/guava/src/com/google/common/collect/ImmutableList.java +++ b/android/guava/src/com/google/common/collect/ImmutableList.java @@ -25,8 +25,8 @@ import static com.google.common.collect.ObjectArrays.checkElementsNotNull; import static com.google.common.collect.RegularImmutableList.EMPTY; -import com.google.common.annotations.Beta; import com.google.common.annotations.GwtCompatible; +import com.google.common.annotations.J2ktIncompatible; import com.google.errorprone.annotations.CanIgnoreReturnValue; import com.google.errorprone.annotations.DoNotCall; import com.google.errorprone.annotations.InlineMe; @@ -655,6 +655,7 @@ public int hashCode() { * Serializes ImmutableLists as their logical contents. This ensures that * implementation types do not leak into the serialized representation. */ + @J2ktIncompatible // serialization static class SerializedForm implements Serializable { final Object[] elements; @@ -669,11 +670,13 @@ Object readResolve() { private static final long serialVersionUID = 0; } + @J2ktIncompatible // serialization private void readObject(ObjectInputStream stream) throws InvalidObjectException { throw new InvalidObjectException("Use SerializedForm"); } @Override + @J2ktIncompatible // serialization Object writeReplace() { return new SerializedForm(toArray()); } @@ -698,7 +701,6 @@ public static Builder builder() { * * @since 23.1 */ - @Beta public static Builder builderWithExpectedSize(int expectedSize) { checkNonnegative(expectedSize, "expectedSize"); return new ImmutableList.Builder(expectedSize); diff --git a/android/guava/src/com/google/common/collect/ImmutableListMultimap.java b/android/guava/src/com/google/common/collect/ImmutableListMultimap.java index 20408db80b1f..2e5099e3e7be 100644 --- a/android/guava/src/com/google/common/collect/ImmutableListMultimap.java +++ b/android/guava/src/com/google/common/collect/ImmutableListMultimap.java @@ -19,6 +19,7 @@ import com.google.common.annotations.Beta; import com.google.common.annotations.GwtCompatible; import com.google.common.annotations.GwtIncompatible; +import com.google.common.annotations.J2ktIncompatible; import com.google.errorprone.annotations.CanIgnoreReturnValue; import com.google.errorprone.annotations.DoNotCall; import com.google.errorprone.annotations.concurrent.LazyInit; @@ -32,7 +33,6 @@ import java.util.Map; import java.util.Map.Entry; import javax.annotation.CheckForNull; -import org.checkerframework.checker.nullness.qual.Nullable; /** * A {@link ListMultimap} whose contents will never change, with many other important properties @@ -280,7 +280,7 @@ public static ImmutableListMultimap copyOf( /** Creates an ImmutableListMultimap from an asMap.entrySet. */ static ImmutableListMultimap fromMapEntries( Collection>> mapEntries, - @Nullable Comparator valueComparator) { + @CheckForNull Comparator valueComparator) { if (mapEntries.isEmpty()) { return of(); } @@ -382,12 +382,14 @@ public final ImmutableList replaceValues(K key, Iterable values) * values for that key, and the key's values */ @GwtIncompatible // java.io.ObjectOutputStream + @J2ktIncompatible private void writeObject(ObjectOutputStream stream) throws IOException { stream.defaultWriteObject(); Serialization.writeMultimap(this, stream); } @GwtIncompatible // java.io.ObjectInputStream + @J2ktIncompatible private void readObject(ObjectInputStream stream) throws IOException, ClassNotFoundException { stream.defaultReadObject(); int keyCount = stream.readInt(); @@ -424,5 +426,6 @@ private void readObject(ObjectInputStream stream) throws IOException, ClassNotFo } @GwtIncompatible // Not needed in emulated source + @J2ktIncompatible private static final long serialVersionUID = 0; } diff --git a/android/guava/src/com/google/common/collect/ImmutableMap.java b/android/guava/src/com/google/common/collect/ImmutableMap.java index ba00bfec3769..94484a0d5abe 100644 --- a/android/guava/src/com/google/common/collect/ImmutableMap.java +++ b/android/guava/src/com/google/common/collect/ImmutableMap.java @@ -22,8 +22,8 @@ import static com.google.common.collect.CollectPreconditions.checkNonnegative; import static java.util.Objects.requireNonNull; -import com.google.common.annotations.Beta; import com.google.common.annotations.GwtCompatible; +import com.google.common.annotations.J2ktIncompatible; import com.google.errorprone.annotations.CanIgnoreReturnValue; import com.google.errorprone.annotations.DoNotCall; import com.google.errorprone.annotations.DoNotMock; @@ -335,7 +335,6 @@ public static Builder builder() { * * @since 23.1 */ - @Beta public static Builder builderWithExpectedSize(int expectedSize) { checkNonnegative(expectedSize, "expectedSize"); return new Builder<>(expectedSize); @@ -469,7 +468,6 @@ public Builder putAll(Map map) { * @since 19.0 */ @CanIgnoreReturnValue - @Beta public Builder putAll(Iterable> entries) { if (entries instanceof Collection) { ensureCapacity(size + ((Collection) entries).size()); @@ -491,7 +489,6 @@ public Builder putAll(Iterable> * @since 19.0 */ @CanIgnoreReturnValue - @Beta public Builder orderEntriesByValue(Comparator valueComparator) { checkState(this.valueComparator == null, "valueComparator was already set"); this.valueComparator = checkNotNull(valueComparator, "valueComparator"); @@ -697,7 +694,6 @@ public static ImmutableMap copyOf(Map map * @throws IllegalArgumentException if two entries have the same key * @since 19.0 */ - @Beta public static ImmutableMap copyOf( Iterable> entries) { int initialCapacity = @@ -1048,6 +1044,7 @@ public String toString() { * reconstructed using public factory methods. This ensures that the implementation types remain * as implementation details. */ + @J2ktIncompatible // serialization static class SerializedForm implements Serializable { // This object retains references to collections returned by keySet() and value(). This saves // bytes when the both the map and its keySet or value collection are written to the same @@ -1127,10 +1124,12 @@ Builder makeBuilder(int size) { * method. Publicly-accessible subclasses must override this method and should return a subclass * of SerializedForm whose readResolve() method returns objects of the subclass type. */ + @J2ktIncompatible // serialization Object writeReplace() { return new SerializedForm<>(this); } + @J2ktIncompatible // java.io.ObjectInputStream private void readObject(ObjectInputStream stream) throws InvalidObjectException { throw new InvalidObjectException("Use SerializedForm"); } diff --git a/android/guava/src/com/google/common/collect/ImmutableMapEntrySet.java b/android/guava/src/com/google/common/collect/ImmutableMapEntrySet.java index 6ee690e9d718..3732e2dfebc5 100644 --- a/android/guava/src/com/google/common/collect/ImmutableMapEntrySet.java +++ b/android/guava/src/com/google/common/collect/ImmutableMapEntrySet.java @@ -18,6 +18,7 @@ import com.google.common.annotations.GwtCompatible; import com.google.common.annotations.GwtIncompatible; +import com.google.common.annotations.J2ktIncompatible; import java.io.InvalidObjectException; import java.io.ObjectInputStream; import java.io.Serializable; @@ -105,17 +106,20 @@ public int hashCode() { } @GwtIncompatible // serialization + @J2ktIncompatible @Override Object writeReplace() { return new EntrySetSerializedForm<>(map()); } @GwtIncompatible // serialization + @J2ktIncompatible private void readObject(ObjectInputStream stream) throws InvalidObjectException { throw new InvalidObjectException("Use EntrySetSerializedForm"); } @GwtIncompatible // serialization + @J2ktIncompatible private static class EntrySetSerializedForm implements Serializable { final ImmutableMap map; diff --git a/android/guava/src/com/google/common/collect/ImmutableMapKeySet.java b/android/guava/src/com/google/common/collect/ImmutableMapKeySet.java index 9bd1d43386b8..056a35141805 100644 --- a/android/guava/src/com/google/common/collect/ImmutableMapKeySet.java +++ b/android/guava/src/com/google/common/collect/ImmutableMapKeySet.java @@ -18,6 +18,7 @@ import com.google.common.annotations.GwtCompatible; import com.google.common.annotations.GwtIncompatible; +import com.google.common.annotations.J2ktIncompatible; import java.io.Serializable; import javax.annotation.CheckForNull; @@ -68,6 +69,7 @@ Object writeReplace() { } @GwtIncompatible // serialization + @J2ktIncompatible private static class KeySetSerializedForm implements Serializable { final ImmutableMap map; diff --git a/android/guava/src/com/google/common/collect/ImmutableMapValues.java b/android/guava/src/com/google/common/collect/ImmutableMapValues.java index 8b7284d1e33c..ba868d1b9eea 100644 --- a/android/guava/src/com/google/common/collect/ImmutableMapValues.java +++ b/android/guava/src/com/google/common/collect/ImmutableMapValues.java @@ -18,6 +18,7 @@ import com.google.common.annotations.GwtCompatible; import com.google.common.annotations.GwtIncompatible; +import com.google.common.annotations.J2ktIncompatible; import java.io.Serializable; import java.util.Map.Entry; import javax.annotation.CheckForNull; @@ -97,6 +98,7 @@ Object writeReplace() { } @GwtIncompatible // serialization + @J2ktIncompatible private static class SerializedForm implements Serializable { final ImmutableMap map; diff --git a/android/guava/src/com/google/common/collect/ImmutableMultimap.java b/android/guava/src/com/google/common/collect/ImmutableMultimap.java index 701095e6ad5f..5484ef772abd 100644 --- a/android/guava/src/com/google/common/collect/ImmutableMultimap.java +++ b/android/guava/src/com/google/common/collect/ImmutableMultimap.java @@ -24,6 +24,7 @@ import com.google.common.annotations.Beta; import com.google.common.annotations.GwtCompatible; import com.google.common.annotations.GwtIncompatible; +import com.google.common.annotations.J2ktIncompatible; import com.google.errorprone.annotations.CanIgnoreReturnValue; import com.google.errorprone.annotations.DoNotCall; import com.google.errorprone.annotations.DoNotMock; @@ -344,6 +345,7 @@ public static ImmutableMultimap copyOf( // holder class makes sure they are not initialized unless an instance is // deserialized. @GwtIncompatible // java serialization is not supported + @J2ktIncompatible static class FieldSettersHolder { static final Serialization.FieldSetter MAP_FIELD_SETTER = Serialization.getFieldSetter(ImmutableMultimap.class, "map"); @@ -660,18 +662,21 @@ boolean isPartialView() { } @GwtIncompatible + @J2ktIncompatible @Override Object writeReplace() { return new KeysSerializedForm(ImmutableMultimap.this); } @GwtIncompatible + @J2ktIncompatible private void readObject(ObjectInputStream stream) throws InvalidObjectException { throw new InvalidObjectException("Use KeysSerializedForm"); } } @GwtIncompatible + @J2ktIncompatible private static final class KeysSerializedForm implements Serializable { final ImmutableMultimap multimap; @@ -755,8 +760,10 @@ boolean isPartialView() { return true; } + @J2ktIncompatible // serialization private static final long serialVersionUID = 0; } + @J2ktIncompatible // serialization private static final long serialVersionUID = 0; } diff --git a/android/guava/src/com/google/common/collect/ImmutableMultiset.java b/android/guava/src/com/google/common/collect/ImmutableMultiset.java index ad4fa15239e6..ecb8ae45beeb 100644 --- a/android/guava/src/com/google/common/collect/ImmutableMultiset.java +++ b/android/guava/src/com/google/common/collect/ImmutableMultiset.java @@ -21,6 +21,7 @@ import com.google.common.annotations.GwtCompatible; import com.google.common.annotations.GwtIncompatible; +import com.google.common.annotations.J2ktIncompatible; import com.google.errorprone.annotations.CanIgnoreReturnValue; import com.google.errorprone.annotations.DoNotCall; import com.google.errorprone.annotations.concurrent.LazyInit; @@ -362,20 +363,23 @@ public int hashCode() { } @GwtIncompatible + @J2ktIncompatible @Override Object writeReplace() { return new EntrySetSerializedForm(ImmutableMultiset.this); } @GwtIncompatible + @J2ktIncompatible private void readObject(ObjectInputStream stream) throws InvalidObjectException { throw new InvalidObjectException("Use EntrySetSerializedForm"); } - private static final long serialVersionUID = 0; + @J2ktIncompatible private static final long serialVersionUID = 0; } @GwtIncompatible + @J2ktIncompatible static class EntrySetSerializedForm implements Serializable { final ImmutableMultiset multiset; @@ -389,10 +393,12 @@ Object readResolve() { } @GwtIncompatible + @J2ktIncompatible @Override abstract Object writeReplace(); @GwtIncompatible + @J2ktIncompatible private void readObject(ObjectInputStream stream) throws InvalidObjectException { throw new InvalidObjectException("Use SerializedForm"); } diff --git a/android/guava/src/com/google/common/collect/ImmutableRangeMap.java b/android/guava/src/com/google/common/collect/ImmutableRangeMap.java index 1f4ee1d2b005..710c8916ec8c 100644 --- a/android/guava/src/com/google/common/collect/ImmutableRangeMap.java +++ b/android/guava/src/com/google/common/collect/ImmutableRangeMap.java @@ -18,8 +18,8 @@ import static com.google.common.base.Preconditions.checkElementIndex; import static com.google.common.base.Preconditions.checkNotNull; -import com.google.common.annotations.Beta; import com.google.common.annotations.GwtIncompatible; +import com.google.common.annotations.J2ktIncompatible; import com.google.common.collect.SortedLists.KeyAbsentBehavior; import com.google.common.collect.SortedLists.KeyPresentBehavior; import com.google.errorprone.annotations.CanIgnoreReturnValue; @@ -42,7 +42,6 @@ * @author Louis Wasserman * @since 14.0 */ -@Beta @GwtIncompatible // NavigableMap @ElementTypesAreNonnullByDefault public class ImmutableRangeMap, V> implements RangeMap, Serializable { @@ -408,6 +407,7 @@ Object writeReplace() { return new SerializedForm<>(asMapOfRanges()); } + @J2ktIncompatible // java.io.ObjectInputStream private void readObject(ObjectInputStream stream) throws InvalidObjectException { throw new InvalidObjectException("Use SerializedForm"); } diff --git a/android/guava/src/com/google/common/collect/ImmutableRangeSet.java b/android/guava/src/com/google/common/collect/ImmutableRangeSet.java index 583456bcea6a..e09bc4a8474b 100644 --- a/android/guava/src/com/google/common/collect/ImmutableRangeSet.java +++ b/android/guava/src/com/google/common/collect/ImmutableRangeSet.java @@ -22,8 +22,8 @@ import static com.google.common.collect.SortedLists.KeyPresentBehavior.ANY_PRESENT; import static java.util.Objects.requireNonNull; -import com.google.common.annotations.Beta; import com.google.common.annotations.GwtIncompatible; +import com.google.common.annotations.J2ktIncompatible; import com.google.common.collect.SortedLists.KeyAbsentBehavior; import com.google.common.collect.SortedLists.KeyPresentBehavior; import com.google.common.primitives.Ints; @@ -47,7 +47,6 @@ * @author Louis Wasserman * @since 14.0 */ -@Beta @GwtIncompatible @ElementTypesAreNonnullByDefault public final class ImmutableRangeSet extends AbstractRangeSet @@ -679,10 +678,12 @@ public String toString() { } @Override + @J2ktIncompatible // serialization Object writeReplace() { return new AsSetSerializedForm(ranges, domain); } + @J2ktIncompatible // java.io.ObjectInputStream private void readObject(ObjectInputStream stream) throws InvalidObjectException { throw new InvalidObjectException("Use SerializedForm"); } @@ -832,10 +833,12 @@ Object readResolve() { } } + @J2ktIncompatible // java.io.ObjectInputStream Object writeReplace() { return new SerializedForm(ranges); } + @J2ktIncompatible // java.io.ObjectInputStream private void readObject(ObjectInputStream stream) throws InvalidObjectException { throw new InvalidObjectException("Use SerializedForm"); } diff --git a/android/guava/src/com/google/common/collect/ImmutableSet.java b/android/guava/src/com/google/common/collect/ImmutableSet.java index bdcab9a480f6..6d9f167bcebf 100644 --- a/android/guava/src/com/google/common/collect/ImmutableSet.java +++ b/android/guava/src/com/google/common/collect/ImmutableSet.java @@ -22,8 +22,8 @@ import static com.google.common.collect.ObjectArrays.checkElementNotNull; import static java.util.Objects.requireNonNull; -import com.google.common.annotations.Beta; import com.google.common.annotations.GwtCompatible; +import com.google.common.annotations.J2ktIncompatible; import com.google.common.annotations.VisibleForTesting; import com.google.common.primitives.Ints; import com.google.errorprone.annotations.CanIgnoreReturnValue; @@ -367,6 +367,7 @@ ImmutableList createAsList() { * static factories. This is necessary to ensure that the existence of a * particular implementation type is an implementation detail. */ + @J2ktIncompatible // serialization private static class SerializedForm implements Serializable { final Object[] elements; @@ -382,10 +383,12 @@ Object readResolve() { } @Override + @J2ktIncompatible // serialization Object writeReplace() { return new SerializedForm(toArray()); } + @J2ktIncompatible // serialization private void readObject(ObjectInputStream stream) throws InvalidObjectException { throw new InvalidObjectException("Use SerializedForm"); } @@ -410,7 +413,6 @@ public static Builder builder() { * * @since 23.1 */ - @Beta public static Builder builderWithExpectedSize(int expectedSize) { checkNonnegative(expectedSize, "expectedSize"); return new Builder(expectedSize); diff --git a/android/guava/src/com/google/common/collect/ImmutableSetMultimap.java b/android/guava/src/com/google/common/collect/ImmutableSetMultimap.java index 1f655e27a177..3aa4179ba905 100644 --- a/android/guava/src/com/google/common/collect/ImmutableSetMultimap.java +++ b/android/guava/src/com/google/common/collect/ImmutableSetMultimap.java @@ -21,6 +21,7 @@ import com.google.common.annotations.Beta; import com.google.common.annotations.GwtCompatible; import com.google.common.annotations.GwtIncompatible; +import com.google.common.annotations.J2ktIncompatible; import com.google.common.base.MoreObjects; import com.google.errorprone.annotations.CanIgnoreReturnValue; import com.google.errorprone.annotations.DoNotCall; @@ -496,6 +497,7 @@ private static ImmutableSet.Builder valuesBuilder( * values for that key, and the key's values */ @GwtIncompatible // java.io.ObjectOutputStream + @J2ktIncompatible private void writeObject(ObjectOutputStream stream) throws IOException { stream.defaultWriteObject(); stream.writeObject(valueComparator()); @@ -510,12 +512,14 @@ Comparator valueComparator() { } @GwtIncompatible // java serialization + @J2ktIncompatible private static final class SetFieldSettersHolder { static final Serialization.FieldSetter EMPTY_SET_FIELD_SETTER = Serialization.getFieldSetter(ImmutableSetMultimap.class, "emptySet"); } @GwtIncompatible // java.io.ObjectInputStream + @J2ktIncompatible // Serialization type safety is at the caller's mercy. @SuppressWarnings("unchecked") private void readObject(ObjectInputStream stream) throws IOException, ClassNotFoundException { @@ -560,5 +564,6 @@ private void readObject(ObjectInputStream stream) throws IOException, ClassNotFo } @GwtIncompatible // not needed in emulated source. + @J2ktIncompatible private static final long serialVersionUID = 0; } diff --git a/android/guava/src/com/google/common/collect/ImmutableSortedMap.java b/android/guava/src/com/google/common/collect/ImmutableSortedMap.java index 796c3ac2f18f..b1f183226fbc 100644 --- a/android/guava/src/com/google/common/collect/ImmutableSortedMap.java +++ b/android/guava/src/com/google/common/collect/ImmutableSortedMap.java @@ -24,6 +24,7 @@ import com.google.common.annotations.Beta; import com.google.common.annotations.GwtCompatible; +import com.google.common.annotations.J2ktIncompatible; import com.google.errorprone.annotations.CanIgnoreReturnValue; import com.google.errorprone.annotations.DoNotCall; import java.io.InvalidObjectException; @@ -490,14 +491,11 @@ private static ImmutableSortedMap fromEntries( entryArray, 0, size, - new Comparator<@Nullable Entry>() { - @Override - public int compare(@CheckForNull Entry e1, @CheckForNull Entry e2) { - // requireNonNull is safe because the first `size` elements have been filled in. - requireNonNull(e1); - requireNonNull(e2); - return comparator.compare(e1.getKey(), e2.getKey()); - } + (e1, e2) -> { + // requireNonNull is safe because the first `size` elements have been filled in. + requireNonNull(e1); + requireNonNull(e2); + return comparator.compare(e1.getKey(), e2.getKey()); }); // requireNonNull is safe because the first `size` elements have been filled in. Entry firstEntry = requireNonNull(entryArray[0]); @@ -549,7 +547,7 @@ public static Builder orderedBy(Comparator comparator) { * their natural ordering. */ public static , V> Builder reverseOrder() { - return new Builder<>(Ordering.natural().reverse()); + return new Builder<>(Ordering.natural().reverse()); } /** @@ -1120,6 +1118,7 @@ public ImmutableSortedSet descendingKeySet() { * are reconstructed using public factory methods. This ensures that the implementation types * remain as implementation details. */ + @J2ktIncompatible // serialization private static class SerializedForm extends ImmutableMap.SerializedForm { private final Comparator comparator; @@ -1137,10 +1136,12 @@ Builder makeBuilder(int size) { } @Override + @J2ktIncompatible // serialization Object writeReplace() { return new SerializedForm<>(this); } + @J2ktIncompatible // java.io.ObjectInputStream private void readObject(ObjectInputStream stream) throws InvalidObjectException { throw new InvalidObjectException("Use SerializedForm"); } diff --git a/android/guava/src/com/google/common/collect/ImmutableSortedMultiset.java b/android/guava/src/com/google/common/collect/ImmutableSortedMultiset.java index 2fae5b315a55..ba6cb4313ebb 100644 --- a/android/guava/src/com/google/common/collect/ImmutableSortedMultiset.java +++ b/android/guava/src/com/google/common/collect/ImmutableSortedMultiset.java @@ -18,6 +18,7 @@ import static com.google.common.base.Preconditions.checkNotNull; import com.google.common.annotations.GwtIncompatible; +import com.google.common.annotations.J2ktIncompatible; import com.google.common.annotations.VisibleForTesting; import com.google.common.math.IntMath; import com.google.errorprone.annotations.CanIgnoreReturnValue; @@ -371,7 +372,7 @@ public static Builder orderedBy(Comparator comparator) { * href="http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6468354">bug 6468354. */ public static > Builder reverseOrder() { - return new Builder(Ordering.natural().reverse()); + return new Builder(Ordering.natural().reverse()); } /** @@ -640,6 +641,7 @@ public ImmutableSortedMultiset build() { } } + @J2ktIncompatible // serialization private static final class SerializedForm implements Serializable { final Comparator comparator; final E[] elements; @@ -670,10 +672,12 @@ Object readResolve() { } @Override + @J2ktIncompatible // serialization Object writeReplace() { return new SerializedForm(this); } + @J2ktIncompatible // java.io.ObjectInputStream private void readObject(ObjectInputStream stream) throws InvalidObjectException { throw new InvalidObjectException("Use SerializedForm"); } diff --git a/android/guava/src/com/google/common/collect/ImmutableSortedSet.java b/android/guava/src/com/google/common/collect/ImmutableSortedSet.java index a21227debb1b..086b45b10e6c 100644 --- a/android/guava/src/com/google/common/collect/ImmutableSortedSet.java +++ b/android/guava/src/com/google/common/collect/ImmutableSortedSet.java @@ -22,6 +22,7 @@ import com.google.common.annotations.GwtCompatible; import com.google.common.annotations.GwtIncompatible; +import com.google.common.annotations.J2ktIncompatible; import com.google.errorprone.annotations.CanIgnoreReturnValue; import com.google.errorprone.annotations.DoNotCall; import com.google.errorprone.annotations.concurrent.LazyInit; @@ -734,6 +735,7 @@ public ImmutableSortedSet descendingSet() { * only. This is necessary to ensure that the existence of a particular * implementation type is an implementation detail. */ + @J2ktIncompatible // serialization private static class SerializedForm implements Serializable { final Comparator comparator; final Object[] elements; @@ -751,11 +753,13 @@ Object readResolve() { private static final long serialVersionUID = 0; } + @J2ktIncompatible // serialization private void readObject(ObjectInputStream unused) throws InvalidObjectException { throw new InvalidObjectException("Use SerializedForm"); } @Override + @J2ktIncompatible // serialization Object writeReplace() { return new SerializedForm(comparator, toArray()); } diff --git a/android/guava/src/com/google/common/collect/ImmutableTable.java b/android/guava/src/com/google/common/collect/ImmutableTable.java index a599a030fd64..5695ffd0df8a 100644 --- a/android/guava/src/com/google/common/collect/ImmutableTable.java +++ b/android/guava/src/com/google/common/collect/ImmutableTable.java @@ -20,6 +20,7 @@ import com.google.common.annotations.GwtCompatible; import com.google.common.annotations.GwtIncompatible; +import com.google.common.annotations.J2ktIncompatible; import com.google.common.base.MoreObjects; import com.google.errorprone.annotations.CanIgnoreReturnValue; import com.google.errorprone.annotations.DoNotCall; @@ -458,6 +459,7 @@ final Object writeReplace() { } @GwtIncompatible // serialization + @J2ktIncompatible private void readObject(ObjectInputStream stream) throws InvalidObjectException { throw new InvalidObjectException("Use SerializedForm"); } diff --git a/android/guava/src/com/google/common/collect/Interner.java b/android/guava/src/com/google/common/collect/Interner.java index d98632598602..8b48fcded9ef 100644 --- a/android/guava/src/com/google/common/collect/Interner.java +++ b/android/guava/src/com/google/common/collect/Interner.java @@ -17,6 +17,7 @@ package com.google.common.collect; import com.google.common.annotations.GwtIncompatible; +import com.google.common.annotations.J2ktIncompatible; import com.google.errorprone.annotations.DoNotMock; /** @@ -31,6 +32,7 @@ * @since 3.0 */ @DoNotMock("Use Interners.new*Interner") +@J2ktIncompatible @GwtIncompatible @ElementTypesAreNonnullByDefault public interface Interner { diff --git a/android/guava/src/com/google/common/collect/Interners.java b/android/guava/src/com/google/common/collect/Interners.java index 10ae2746332b..449806b439dd 100644 --- a/android/guava/src/com/google/common/collect/Interners.java +++ b/android/guava/src/com/google/common/collect/Interners.java @@ -17,6 +17,7 @@ import static com.google.common.base.Preconditions.checkNotNull; import com.google.common.annotations.GwtIncompatible; +import com.google.common.annotations.J2ktIncompatible; import com.google.common.annotations.VisibleForTesting; import com.google.common.base.Equivalence; import com.google.common.base.Function; @@ -30,6 +31,7 @@ * @author Kevin Bourrillion * @since 3.0 */ +@J2ktIncompatible @GwtIncompatible @ElementTypesAreNonnullByDefault public final class Interners { diff --git a/android/guava/src/com/google/common/collect/Iterables.java b/android/guava/src/com/google/common/collect/Iterables.java index 08f8d45a1a17..9279e0baae12 100644 --- a/android/guava/src/com/google/common/collect/Iterables.java +++ b/android/guava/src/com/google/common/collect/Iterables.java @@ -987,10 +987,13 @@ public Iterator iterator() { * Returns a view of the supplied iterable that wraps each generated {@link Iterator} through * {@link Iterators#consumingIterator(Iterator)}. * - *

    Note: If {@code iterable} is a {@link Queue}, the returned iterable will get entries from - * {@link Queue#remove()} since {@link Queue}'s iteration order is undefined. Calling {@link - * Iterator#hasNext()} on a generated iterator from the returned iterable may cause an item to be - * immediately dequeued for return on a subsequent call to {@link Iterator#next()}. + *

    Note: If {@code iterable} is a {@link Queue}, the returned iterable will instead use {@link + * Queue#isEmpty} and {@link Queue#remove()}, since {@link Queue}'s iteration order is undefined. + * Calling {@link Iterator#hasNext()} on a generated iterator from the returned iterable may cause + * an item to be immediately dequeued for return on a subsequent call to {@link Iterator#next()}. + * + *

    Whether the input {@code iterable} is a {@link Queue} or not, the returned {@code Iterable} + * is not thread-safe. * * @param iterable the iterable to wrap * @return a view of the supplied iterable that wraps each generated iterator through {@link @@ -1061,21 +1064,9 @@ public static boolean isEmpty(Iterable iterable) { @Override public Iterator iterator() { return Iterators.mergeSorted( - Iterables.transform(iterables, Iterables.toIterator()), comparator); + Iterables.transform(iterables, Iterable::iterator), comparator); } }; return new UnmodifiableIterable<>(iterable); } - - // TODO(user): Is this the best place for this? Move to fluent functions? - // Useful as a public method? - static - Function, Iterator> toIterator() { - return new Function, Iterator>() { - @Override - public Iterator apply(Iterable iterable) { - return iterable.iterator(); - } - }; - } } diff --git a/android/guava/src/com/google/common/collect/Iterators.java b/android/guava/src/com/google/common/collect/Iterators.java index 2f9fd3b4aa11..71a93c63a129 100644 --- a/android/guava/src/com/google/common/collect/Iterators.java +++ b/android/guava/src/com/google/common/collect/Iterators.java @@ -988,7 +988,8 @@ public void remove() { * {@code iterator} as it is returned. * *

    The provided iterator must support {@link Iterator#remove()} or else the returned iterator - * will fail on the first call to {@code next}. + * will fail on the first call to {@code next}. The returned {@link Iterator} is also not + * thread-safe. * * @param iterator the iterator to remove and return elements from * @return an iterator that removes and returns elements from the supplied iterator diff --git a/android/guava/src/com/google/common/collect/LinkedHashMultimap.java b/android/guava/src/com/google/common/collect/LinkedHashMultimap.java index bf2b34212b36..0d9dc0694b5e 100644 --- a/android/guava/src/com/google/common/collect/LinkedHashMultimap.java +++ b/android/guava/src/com/google/common/collect/LinkedHashMultimap.java @@ -22,6 +22,7 @@ import com.google.common.annotations.GwtCompatible; import com.google.common.annotations.GwtIncompatible; +import com.google.common.annotations.J2ktIncompatible; import com.google.common.annotations.VisibleForTesting; import com.google.common.base.Objects; import com.google.errorprone.annotations.CanIgnoreReturnValue; @@ -592,6 +593,7 @@ public void clear() { * and the entries in order */ @GwtIncompatible // java.io.ObjectOutputStream + @J2ktIncompatible private void writeObject(ObjectOutputStream stream) throws IOException { stream.defaultWriteObject(); stream.writeInt(keySet().size()); @@ -606,6 +608,7 @@ private void writeObject(ObjectOutputStream stream) throws IOException { } @GwtIncompatible // java.io.ObjectInputStream + @J2ktIncompatible private void readObject(ObjectInputStream stream) throws IOException, ClassNotFoundException { stream.defaultReadObject(); multimapHeaderEntry = ValueEntry.newHeader(); @@ -634,5 +637,6 @@ private void readObject(ObjectInputStream stream) throws IOException, ClassNotFo } @GwtIncompatible // java serialization not supported + @J2ktIncompatible private static final long serialVersionUID = 1; } diff --git a/android/guava/src/com/google/common/collect/LinkedListMultimap.java b/android/guava/src/com/google/common/collect/LinkedListMultimap.java index be978fa9c60d..74ac4c1f3532 100644 --- a/android/guava/src/com/google/common/collect/LinkedListMultimap.java +++ b/android/guava/src/com/google/common/collect/LinkedListMultimap.java @@ -23,6 +23,7 @@ import com.google.common.annotations.GwtCompatible; import com.google.common.annotations.GwtIncompatible; +import com.google.common.annotations.J2ktIncompatible; import com.google.errorprone.annotations.CanIgnoreReturnValue; import com.google.j2objc.annotations.WeakOuter; import java.io.IOException; @@ -676,7 +677,7 @@ private List getCopy(@ParametricNullness K key) { */ @CanIgnoreReturnValue @Override - public List removeAll(@Nullable Object key) { + public List removeAll(@CheckForNull Object key) { /* * Safe because all we do is remove values for the key, not add them. (If we wanted to make sure * to call getCopy and removeAllNodes only with a true K, then we could check containsKey first. @@ -853,6 +854,7 @@ Map> createAsMap() { * from the entries() ordering */ @GwtIncompatible // java.io.ObjectOutputStream + @J2ktIncompatible private void writeObject(ObjectOutputStream stream) throws IOException { stream.defaultWriteObject(); stream.writeInt(size()); @@ -863,6 +865,7 @@ private void writeObject(ObjectOutputStream stream) throws IOException { } @GwtIncompatible // java.io.ObjectInputStream + @J2ktIncompatible private void readObject(ObjectInputStream stream) throws IOException, ClassNotFoundException { stream.defaultReadObject(); keyToKeyList = CompactLinkedHashMap.create(); @@ -877,5 +880,6 @@ private void readObject(ObjectInputStream stream) throws IOException, ClassNotFo } @GwtIncompatible // java serialization not supported + @J2ktIncompatible private static final long serialVersionUID = 0; } diff --git a/android/guava/src/com/google/common/collect/Lists.java b/android/guava/src/com/google/common/collect/Lists.java index 34fc2258cfe0..345947dda1c9 100644 --- a/android/guava/src/com/google/common/collect/Lists.java +++ b/android/guava/src/com/google/common/collect/Lists.java @@ -28,6 +28,7 @@ import com.google.common.annotations.Beta; import com.google.common.annotations.GwtCompatible; import com.google.common.annotations.GwtIncompatible; +import com.google.common.annotations.J2ktIncompatible; import com.google.common.annotations.VisibleForTesting; import com.google.common.base.Function; import com.google.common.base.Objects; @@ -250,6 +251,7 @@ static int computeArrayListCapacity(int arraySize) { * @return a new, empty {@code CopyOnWriteArrayList} * @since 12.0 */ + @J2ktIncompatible @GwtIncompatible // CopyOnWriteArrayList public static CopyOnWriteArrayList newCopyOnWriteArrayList() { return new CopyOnWriteArrayList<>(); @@ -262,6 +264,7 @@ static int computeArrayListCapacity(int arraySize) { * @return a new {@code CopyOnWriteArrayList} containing those elements * @since 12.0 */ + @J2ktIncompatible @GwtIncompatible // CopyOnWriteArrayList public static CopyOnWriteArrayList newCopyOnWriteArrayList( Iterable elements) { @@ -337,7 +340,7 @@ public E get(int index) { return (index == 0) ? first : rest[index - 1]; } - private static final long serialVersionUID = 0; + @J2ktIncompatible private static final long serialVersionUID = 0; } /** @see Lists#asList(Object, Object, Object[]) */ @@ -373,7 +376,7 @@ public E get(int index) { } } - private static final long serialVersionUID = 0; + @J2ktIncompatible private static final long serialVersionUID = 0; } /** @@ -1090,7 +1093,7 @@ public ListIterator listIterator(int index) { return backingList.listIterator(index); } - private static final long serialVersionUID = 0; + @J2ktIncompatible private static final long serialVersionUID = 0; }; } else { wrapper = @@ -1100,7 +1103,7 @@ public ListIterator listIterator(int index) { return backingList.listIterator(index); } - private static final long serialVersionUID = 0; + @J2ktIncompatible private static final long serialVersionUID = 0; }; } return wrapper.subList(fromIndex, toIndex); diff --git a/android/guava/src/com/google/common/collect/MapMaker.java b/android/guava/src/com/google/common/collect/MapMaker.java index a2612c1bd286..4fb4ec8242cf 100644 --- a/android/guava/src/com/google/common/collect/MapMaker.java +++ b/android/guava/src/com/google/common/collect/MapMaker.java @@ -20,6 +20,7 @@ import com.google.common.annotations.GwtCompatible; import com.google.common.annotations.GwtIncompatible; +import com.google.common.annotations.J2ktIncompatible; import com.google.common.base.Ascii; import com.google.common.base.Equivalence; import com.google.common.base.MoreObjects; @@ -85,6 +86,7 @@ * @author Kevin Bourrillion * @since 2.0 */ +@J2ktIncompatible @GwtCompatible(emulated = true) @ElementTypesAreNonnullByDefault public final class MapMaker { diff --git a/android/guava/src/com/google/common/collect/MapMakerInternalMap.java b/android/guava/src/com/google/common/collect/MapMakerInternalMap.java index e3a6b3b36be6..815fdb4d79db 100644 --- a/android/guava/src/com/google/common/collect/MapMakerInternalMap.java +++ b/android/guava/src/com/google/common/collect/MapMakerInternalMap.java @@ -18,6 +18,7 @@ import static com.google.common.collect.CollectPreconditions.checkRemove; import com.google.common.annotations.GwtIncompatible; +import com.google.common.annotations.J2ktIncompatible; import com.google.common.annotations.VisibleForTesting; import com.google.common.base.Equivalence; import com.google.common.collect.MapMaker.Dummy; @@ -65,6 +66,7 @@ * @author Doug Lea ({@code ConcurrentHashMap}) */ // TODO(kak): Consider removing @CanIgnoreReturnValue from this class. +@J2ktIncompatible @GwtIncompatible @SuppressWarnings({ "GuardedBy", // TODO(b/35466881): Fix or suppress. @@ -2868,6 +2870,7 @@ Object writeReplace() { this); } + @J2ktIncompatible // java.io.ObjectInputStream private void readObject(ObjectInputStream in) throws InvalidObjectException { throw new InvalidObjectException("Use SerializationProxy"); } @@ -2918,6 +2921,7 @@ void writeMapTo(ObjectOutputStream out) throws IOException { } @SuppressWarnings("deprecation") // serialization of deprecated feature + @J2ktIncompatible // java.io.ObjectInputStream MapMaker readMapMaker(ObjectInputStream in) throws IOException { int size = in.readInt(); return new MapMaker() @@ -2929,6 +2933,7 @@ MapMaker readMapMaker(ObjectInputStream in) throws IOException { } @SuppressWarnings("unchecked") + @J2ktIncompatible // java.io.ObjectInputStream void readEntries(ObjectInputStream in) throws IOException, ClassNotFoundException { while (true) { K key = (K) in.readObject(); @@ -2964,6 +2969,7 @@ private void writeObject(ObjectOutputStream out) throws IOException { writeMapTo(out); } + @J2ktIncompatible // java.io.ObjectInputStream private void readObject(ObjectInputStream in) throws IOException, ClassNotFoundException { in.defaultReadObject(); MapMaker mapMaker = readMapMaker(in); diff --git a/android/guava/src/com/google/common/collect/Maps.java b/android/guava/src/com/google/common/collect/Maps.java index b75b44f87c32..5458ce67766c 100644 --- a/android/guava/src/com/google/common/collect/Maps.java +++ b/android/guava/src/com/google/common/collect/Maps.java @@ -27,6 +27,7 @@ import com.google.common.annotations.Beta; import com.google.common.annotations.GwtCompatible; import com.google.common.annotations.GwtIncompatible; +import com.google.common.annotations.J2ktIncompatible; import com.google.common.base.Converter; import com.google.common.base.Equivalence; import com.google.common.base.Function; @@ -64,6 +65,7 @@ import java.util.concurrent.ConcurrentHashMap; import java.util.concurrent.ConcurrentMap; import javax.annotation.CheckForNull; +import org.checkerframework.checker.nullness.qual.NonNull; import org.checkerframework.checker.nullness.qual.Nullable; /** @@ -146,6 +148,7 @@ V transform(Entry entry) { * @since 14.0 */ @GwtCompatible(serializable = true) + @J2ktIncompatible public static , V> ImmutableMap immutableEnumMap( Map map) { if (map instanceof ImmutableEnumMap) { @@ -431,28 +434,15 @@ IdentityHashMap newIdentityHashMap() { * @param right the map to treat as the "right" map for purposes of comparison * @return the difference between the two maps */ - @SuppressWarnings("unchecked") public static MapDifference difference( Map left, Map right) { if (left instanceof SortedMap) { + @SuppressWarnings("unchecked") SortedMap sortedLeft = (SortedMap) left; return difference(sortedLeft, right); } - /* - * This cast is safe: The Equivalence-accepting overload of difference() (which we call below) - * has a weird signature because Equivalence is itself a little weird. Still, we know that - * Equivalence.equals() can handle all inputs, and we know that the resulting MapDifference will - * contain only Ks and Vs (as opposed to possibly containing @Nullable objects even when K and V - * are *not* @Nullable). - * - * An alternative to suppressing the warning would be to inline the body of the other - * difference() method into this one. - */ - @SuppressWarnings("nullness") - MapDifference result = - (MapDifference) difference(left, right, Equivalence.equals()); - return result; + return difference(left, right, Equivalence.equals()); } /** @@ -469,36 +459,11 @@ MapDifference difference( * @return the difference between the two maps * @since 10.0 */ - /* - * This method should really be annotated to accept maps with @Nullable value types. Fortunately, - * no existing Google callers appear to pass null values (much less pass null values *and* run a - * nullness checker). - * - * Still, if we decide that we want to make that work, we'd need to introduce a new type parameter - * for the Equivalence input type: - * - * ... difference(..., Equivalence ...) - * - * Maybe we should, even though it will break source compatibility. - * - * Alternatively, this is a case in which it would be useful to be able to express Equivalence). - * - * As things stand now, though, we have to either: - * - * - require non-null inputs so that we can guarantee non-null outputs - * - * - accept nullable inputs but force users to cope with nullable outputs - * - * And the non-null option is far more useful to existing users. - * - * (Vaguely related: Another thing we could consider is an overload that accepts a BiPredicate: - * https://github.com/google/guava/issues/3913) - */ - public static MapDifference difference( - Map left, - Map right, - Equivalence valueEquivalence) { + public static + MapDifference difference( + Map left, + Map right, + Equivalence valueEquivalence) { Preconditions.checkNotNull(valueEquivalence); Map onlyOnLeft = newLinkedHashMap(); @@ -538,26 +503,14 @@ SortedMapDifference difference( SortedMap onBoth = Maps.newTreeMap(comparator); SortedMap> differences = Maps.newTreeMap(comparator); - /* - * V is a possibly nullable type, but we decided to declare Equivalence with a type parameter - * that is restricted to non-nullable types. Still, this code is safe: We made that decision - * about Equivalence not because Equivalence is null-hostile but because *every* Equivalence can - * handle null inputs -- and thus it would be meaningless for the type system to distinguish - * between "an Equivalence for nullable Foo" and "an Equivalence for non-nullable Foo." - * - * (And the unchecked cast is safe because Equivalence is contravariant.) - */ - @SuppressWarnings({"nullness", "unchecked"}) - Equivalence equalsEquivalence = (Equivalence) Equivalence.equals(); - - doDifference(left, right, equalsEquivalence, onlyOnLeft, onlyOnRight, onBoth, differences); + doDifference(left, right, Equivalence.equals(), onlyOnLeft, onlyOnRight, onBoth, differences); return new SortedMapDifferenceImpl<>(onlyOnLeft, onlyOnRight, onBoth, differences); } private static void doDifference( Map left, Map right, - Equivalence valueEquivalence, + Equivalence valueEquivalence, Map onlyOnLeft, Map onlyOnRight, Map onBoth, @@ -1262,14 +1215,26 @@ public static ImmutableMap toMap( * ... * ImmutableSet allColors = ImmutableSet.of(red, green, blue); * - * Map colorForName = - * uniqueIndex(allColors, toStringFunction()); + * ImmutableMap colorForName = + * uniqueIndex(allColors, c -> c.toString()); * assertThat(colorForName).containsEntry("red", red); * } * *

    If your index may associate multiple values with each key, use {@link * Multimaps#index(Iterable, Function) Multimaps.index}. * + *

    Note: on Java 8 and later, it is usually better to use streams. For example: + * + *

    {@code
    +   * import static com.google.common.collect.ImmutableMap.toImmutableMap;
    +   * ...
    +   * ImmutableMap colorForName =
    +   *     allColors.stream().collect(toImmutableMap(c -> c.toString(), c -> c));
    +   * }
    + * + *

    Streams provide a more standard and flexible API and the lambdas make it clear what the keys + * and values in the map are. + * * @param values the values to use when constructing the {@code Map} * @param keyFunction the function used to produce the key for each value * @return a map mapping the result of evaluating the function {@code keyFunction} on each value @@ -1352,6 +1317,7 @@ private static ImmutableMap uniqueIndex( * @throws ClassCastException if any key in {@code properties} is not a {@code String} * @throws NullPointerException if any key or value in {@code properties} is null */ + @J2ktIncompatible @GwtIncompatible // java.util.Properties public static ImmutableMap fromProperties(Properties properties) { ImmutableMap.Builder builder = ImmutableMap.builder(); @@ -1464,7 +1430,7 @@ public Entry next() { }; } - /** @see Multimaps#unmodifiableEntries */ + /** The implementation of {@link Multimaps#unmodifiableEntries}. */ static class UnmodifiableEntries extends ForwardingCollection> { private final Collection> entries; @@ -1486,15 +1452,14 @@ public Iterator> iterator() { // See java.util.Collections.UnmodifiableEntrySet for details on attacks. @Override - public Object[] toArray() { + public @Nullable Object[] toArray() { /* - * standardToArray returns `@Nullable Object[]` rather than `Object[]` but only because it can + * standardToArray returns `@Nullable Object[]` rather than `Object[]` but because it can * be used with collections that may contain null. This collection never contains nulls, so we - * can treat it as a plain `Object[]`. + * could return `Object[]`. But this class is private and J2KT cannot change return types in + * overrides, so we declare `@Nullable Object[]` as the return type. */ - @SuppressWarnings("nullness") - Object[] result = standardToArray(); - return result; + return standardToArray(); } @Override @@ -1504,7 +1469,7 @@ public Object[] toArray() { } } - /** @see Maps#unmodifiableEntrySet(Set) */ + /** The implementation of {@link Maps#unmodifiableEntrySet(Set)}. */ static class UnmodifiableEntrySet extends UnmodifiableEntries implements Set> { UnmodifiableEntrySet(Set> entries) { @@ -1634,7 +1599,9 @@ BiMap unmodifiableBiMap(BiMap bimap) { return new UnmodifiableBiMap<>(bimap, null); } - /** @see Maps#unmodifiableBiMap(BiMap) */ + /** + * @see Maps#unmodifiableBiMap(BiMap) + */ private static class UnmodifiableBiMap extends ForwardingMap implements BiMap, Serializable { final Map unmodifiableMap; @@ -1993,6 +1960,7 @@ public interface EntryTransformer< * @throws NullPointerException if the key or value is null and this transformer does not accept * null arguments */ + @ParametricNullness V2 transformEntry(@ParametricNullness K key, @ParametricNullness V1 value); } diff --git a/android/guava/src/com/google/common/collect/MinMaxPriorityQueue.java b/android/guava/src/com/google/common/collect/MinMaxPriorityQueue.java index 3bec704191e7..5774bb4ead7b 100644 --- a/android/guava/src/com/google/common/collect/MinMaxPriorityQueue.java +++ b/android/guava/src/com/google/common/collect/MinMaxPriorityQueue.java @@ -25,6 +25,7 @@ import com.google.common.annotations.Beta; import com.google.common.annotations.GwtCompatible; +import com.google.common.annotations.J2ktIncompatible; import com.google.common.annotations.VisibleForTesting; import com.google.common.math.IntMath; import com.google.errorprone.annotations.CanIgnoreReturnValue; @@ -108,7 +109,7 @@ public final class MinMaxPriorityQueue extends AbstractQueue { * initial contents, and an initial expected size of 11. */ public static > MinMaxPriorityQueue create() { - return new Builder(Ordering.natural()).create(); + return new Builder>(Ordering.natural()).create(); } /** @@ -525,7 +526,10 @@ boolean isIntact() { @WeakOuter private class Heap { final Ordering ordering; - @Weak Heap otherHeap; // always initialized immediately after construction + + @SuppressWarnings("nullness:initialization.field.uninitialized") + @Weak + Heap otherHeap; // always initialized immediately after construction Heap(Ordering ordering) { this.ordering = ordering; @@ -644,17 +648,18 @@ int crossOverUp(int index, E x) { int parentIndex = getParentIndex(index); E parentElement = elementData(parentIndex); if (parentIndex != 0) { - // This is a guard for the case of the childless uncle. - // Since the end of the array is actually the middle of the heap, - // a smaller childless uncle can become a child of x when we - // bubble up alternate levels, violating the invariant. + /* + * This is a guard for the case of the childless aunt node. Since the end of the array is + * actually the middle of the heap, a smaller childless aunt node can become a child of x + * when we bubble up alternate levels, violating the invariant. + */ int grandparentIndex = getParentIndex(parentIndex); - int uncleIndex = getRightChildIndex(grandparentIndex); - if (uncleIndex != parentIndex && getLeftChildIndex(uncleIndex) >= size) { - E uncleElement = elementData(uncleIndex); - if (ordering.compare(uncleElement, parentElement) < 0) { - parentIndex = uncleIndex; - parentElement = uncleElement; + int auntIndex = getRightChildIndex(grandparentIndex); + if (auntIndex != parentIndex && getLeftChildIndex(auntIndex) >= size) { + E auntElement = elementData(auntIndex); + if (ordering.compare(auntElement, parentElement) < 0) { + parentIndex = auntIndex; + parentElement = auntElement; } } } @@ -667,26 +672,30 @@ int crossOverUp(int index, E x) { return index; } + // About the term "aunt node": it's better to leave gender out of it, but for this the English + // language has nothing for us. Except for the whimsical neologism "pibling" (!) which we + // obviously could not expect to increase anyone's understanding of the code. + /** * Swap {@code actualLastElement} with the conceptually correct last element of the heap. * Returns the index that {@code actualLastElement} now resides in. * *

    Since the last element of the array is actually in the middle of the sorted structure, a - * childless uncle node could be smaller, which would corrupt the invariant if this element - * becomes the new parent of the uncle. In that case, we first switch the last element with its - * uncle, before returning. + * childless aunt node could be smaller, which would corrupt the invariant if this element + * becomes the new parent of the aunt node. In that case, we first switch the last element with + * its aunt node, before returning. */ int swapWithConceptuallyLastElement(E actualLastElement) { int parentIndex = getParentIndex(size); if (parentIndex != 0) { int grandparentIndex = getParentIndex(parentIndex); - int uncleIndex = getRightChildIndex(grandparentIndex); - if (uncleIndex != parentIndex && getLeftChildIndex(uncleIndex) >= size) { - E uncleElement = elementData(uncleIndex); - if (ordering.compare(uncleElement, actualLastElement) < 0) { - queue[uncleIndex] = actualLastElement; - queue[size] = uncleElement; - return uncleIndex; + int auntIndex = getRightChildIndex(grandparentIndex); + if (auntIndex != parentIndex && getLeftChildIndex(auntIndex) >= size) { + E auntElement = elementData(auntIndex); + if (ordering.compare(auntElement, actualLastElement) < 0) { + queue[auntIndex] = actualLastElement; + queue[size] = auntElement; + return auntIndex; } } } @@ -911,6 +920,7 @@ public void clear() { } @Override + @J2ktIncompatible // Incompatible return type change. Use inherited (unoptimized) implementation public Object[] toArray() { Object[] copyTo = new Object[size]; System.arraycopy(queue, 0, copyTo, 0, size); diff --git a/android/guava/src/com/google/common/collect/Multimaps.java b/android/guava/src/com/google/common/collect/Multimaps.java index 9976b4a66cd6..ea4148801176 100644 --- a/android/guava/src/com/google/common/collect/Multimaps.java +++ b/android/guava/src/com/google/common/collect/Multimaps.java @@ -22,9 +22,9 @@ import static com.google.common.collect.NullnessCasts.uncheckedCastNullableTToT; import static java.util.Objects.requireNonNull; -import com.google.common.annotations.Beta; import com.google.common.annotations.GwtCompatible; import com.google.common.annotations.GwtIncompatible; +import com.google.common.annotations.J2ktIncompatible; import com.google.common.base.Function; import com.google.common.base.Predicate; import com.google.common.base.Predicates; @@ -171,8 +171,11 @@ Collection wrapCollection(@ParametricNullness K key, Collection collection // can't use Serialization writeMultimap and populateMultimap methods since // there's no way to generate the empty backing map. - /** @serialData the factory and the backing map */ + /** + * @serialData the factory and the backing map + */ @GwtIncompatible // java.io.ObjectOutputStream + @J2ktIncompatible private void writeObject(ObjectOutputStream stream) throws IOException { stream.defaultWriteObject(); stream.writeObject(factory); @@ -180,6 +183,7 @@ private void writeObject(ObjectOutputStream stream) throws IOException { } @GwtIncompatible // java.io.ObjectInputStream + @J2ktIncompatible @SuppressWarnings("unchecked") // reading data stored by writeObject private void readObject(ObjectInputStream stream) throws IOException, ClassNotFoundException { stream.defaultReadObject(); @@ -189,6 +193,7 @@ private void readObject(ObjectInputStream stream) throws IOException, ClassNotFo } @GwtIncompatible // java serialization not supported + @J2ktIncompatible private static final long serialVersionUID = 0; } @@ -252,8 +257,11 @@ protected List createCollection() { return factory.get(); } - /** @serialData the factory and the backing map */ + /** + * @serialData the factory and the backing map + */ @GwtIncompatible // java.io.ObjectOutputStream + @J2ktIncompatible private void writeObject(ObjectOutputStream stream) throws IOException { stream.defaultWriteObject(); stream.writeObject(factory); @@ -261,6 +269,7 @@ private void writeObject(ObjectOutputStream stream) throws IOException { } @GwtIncompatible // java.io.ObjectInputStream + @J2ktIncompatible @SuppressWarnings("unchecked") // reading data stored by writeObject private void readObject(ObjectInputStream stream) throws IOException, ClassNotFoundException { stream.defaultReadObject(); @@ -270,6 +279,7 @@ private void readObject(ObjectInputStream stream) throws IOException, ClassNotFo } @GwtIncompatible // java serialization not supported + @J2ktIncompatible private static final long serialVersionUID = 0; } @@ -355,8 +365,11 @@ Collection wrapCollection(@ParametricNullness K key, Collection collection } } - /** @serialData the factory and the backing map */ + /** + * @serialData the factory and the backing map + */ @GwtIncompatible // java.io.ObjectOutputStream + @J2ktIncompatible private void writeObject(ObjectOutputStream stream) throws IOException { stream.defaultWriteObject(); stream.writeObject(factory); @@ -364,6 +377,7 @@ private void writeObject(ObjectOutputStream stream) throws IOException { } @GwtIncompatible // java.io.ObjectInputStream + @J2ktIncompatible @SuppressWarnings("unchecked") // reading data stored by writeObject private void readObject(ObjectInputStream stream) throws IOException, ClassNotFoundException { stream.defaultReadObject(); @@ -373,6 +387,7 @@ private void readObject(ObjectInputStream stream) throws IOException, ClassNotFo } @GwtIncompatible // not needed in emulated source + @J2ktIncompatible private static final long serialVersionUID = 0; } @@ -444,8 +459,11 @@ public Comparator valueComparator() { return valueComparator; } - /** @serialData the factory and the backing map */ + /** + * @serialData the factory and the backing map + */ @GwtIncompatible // java.io.ObjectOutputStream + @J2ktIncompatible private void writeObject(ObjectOutputStream stream) throws IOException { stream.defaultWriteObject(); stream.writeObject(factory); @@ -453,6 +471,7 @@ private void writeObject(ObjectOutputStream stream) throws IOException { } @GwtIncompatible // java.io.ObjectInputStream + @J2ktIncompatible @SuppressWarnings("unchecked") // reading data stored by writeObject private void readObject(ObjectInputStream stream) throws IOException, ClassNotFoundException { stream.defaultReadObject(); @@ -463,6 +482,7 @@ private void readObject(ObjectInputStream stream) throws IOException, ClassNotFo } @GwtIncompatible // not needed in emulated source + @J2ktIncompatible private static final long serialVersionUID = 0; } @@ -585,13 +605,7 @@ public Map> asMap() { map = Collections.unmodifiableMap( Maps.transformValues( - delegate.asMap(), - new Function, Collection>() { - @Override - public Collection apply(Collection collection) { - return unmodifiableValueCollection(collection); - } - })); + delegate.asMap(), collection -> unmodifiableValueCollection(collection))); } return result; } @@ -942,7 +956,6 @@ Collection> unmodifiableEntries(Collection> entries) { * * @since 15.0 */ - @Beta @SuppressWarnings("unchecked") // safe by specification of ListMultimap.asMap() public static Map> asMap( @@ -956,7 +969,6 @@ Collection> unmodifiableEntries(Collection> entries) { * * @since 15.0 */ - @Beta @SuppressWarnings("unchecked") // safe by specification of SetMultimap.asMap() public static Map> asMap( @@ -970,7 +982,6 @@ Collection> unmodifiableEntries(Collection> entries) { * * @since 15.0 */ - @Beta @SuppressWarnings("unchecked") // safe by specification of SortedSetMultimap.asMap() public static Map> asMap( @@ -984,7 +995,6 @@ Collection> unmodifiableEntries(Collection> entries) { * * @since 15.0 */ - @Beta public static Map> asMap(Multimap multimap) { return multimap.asMap(); @@ -1401,14 +1411,7 @@ Collection transform(@ParametricNullness K key, Collection values) { @Override Map> createAsMap() { - return Maps.transformEntries( - fromMultimap.asMap(), - new EntryTransformer, Collection>() { - @Override - public Collection transformEntry(@ParametricNullness K key, Collection value) { - return transform(key, value); - } - }); + return Maps.transformEntries(fromMultimap.asMap(), (key, value) -> transform(key, value)); } @Override @@ -1779,14 +1782,7 @@ Map> map() { @Override public Iterator>> iterator() { - return Maps.asMapEntryIterator( - multimap.keySet(), - new Function>() { - @Override - public Collection apply(@ParametricNullness K key) { - return multimap.get(key); - } - }); + return Maps.asMapEntryIterator(multimap.keySet(), key -> multimap.get(key)); } @Override diff --git a/android/guava/src/com/google/common/collect/MutableClassToInstanceMap.java b/android/guava/src/com/google/common/collect/MutableClassToInstanceMap.java index 9f5e4f246425..0111ccade791 100644 --- a/android/guava/src/com/google/common/collect/MutableClassToInstanceMap.java +++ b/android/guava/src/com/google/common/collect/MutableClassToInstanceMap.java @@ -19,6 +19,7 @@ import static com.google.common.base.Preconditions.checkNotNull; import com.google.common.annotations.GwtIncompatible; +import com.google.common.annotations.J2ktIncompatible; import com.google.common.primitives.Primitives; import com.google.errorprone.annotations.CanIgnoreReturnValue; import java.io.InvalidObjectException; @@ -30,6 +31,7 @@ import java.util.Map; import java.util.Set; import javax.annotation.CheckForNull; +import org.checkerframework.checker.nullness.qual.NonNull; import org.checkerframework.checker.nullness.qual.Nullable; /** @@ -40,24 +42,23 @@ * "https://github.com/google/guava/wiki/NewCollectionTypesExplained#classtoinstancemap">{@code * ClassToInstanceMap}. * - *

    This implementation does support null values, despite how it is annotated; see - * discussion at {@link ClassToInstanceMap}. - * * @author Kevin Bourrillion * @since 2.0 */ +@J2ktIncompatible @GwtIncompatible @SuppressWarnings("serial") // using writeReplace instead of standard serialization @ElementTypesAreNonnullByDefault -public final class MutableClassToInstanceMap extends ForwardingMap, B> +public final class MutableClassToInstanceMap + extends ForwardingMap, B> implements ClassToInstanceMap, Serializable { /** * Returns a new {@code MutableClassToInstanceMap} instance backed by a {@link HashMap} using the * default initial capacity and load factor. */ - public static MutableClassToInstanceMap create() { - return new MutableClassToInstanceMap(new HashMap, B>()); + public static MutableClassToInstanceMap create() { + return new MutableClassToInstanceMap(new HashMap, B>()); } /** @@ -65,50 +66,58 @@ public static MutableClassToInstanceMap create() { * backingMap}. The caller surrenders control of the backing map, and thus should not allow any * direct references to it to remain accessible. */ - public static MutableClassToInstanceMap create(Map, B> backingMap) { + public static MutableClassToInstanceMap create( + Map, B> backingMap) { return new MutableClassToInstanceMap(backingMap); } - private final Map, B> delegate; + private final Map, B> delegate; - private MutableClassToInstanceMap(Map, B> delegate) { + private MutableClassToInstanceMap(Map, B> delegate) { this.delegate = checkNotNull(delegate); } @Override - protected Map, B> delegate() { + protected Map, B> delegate() { return delegate; } - static Entry, B> checkedEntry(final Entry, B> entry) { - return new ForwardingMapEntry, B>() { + /** + * Wraps the {@code setValue} implementation of an {@code Entry} to enforce the class constraint. + */ + private static Entry, B> checkedEntry( + final Entry, B> entry) { + return new ForwardingMapEntry, B>() { @Override - protected Entry, B> delegate() { + protected Entry, B> delegate() { return entry; } @Override - public B setValue(B value) { + @ParametricNullness + public B setValue(@ParametricNullness B value) { return super.setValue(cast(getKey(), value)); } }; } @Override - public Set, B>> entrySet() { - return new ForwardingSet, B>>() { + public Set, B>> entrySet() { + return new ForwardingSet, B>>() { @Override - protected Set, B>> delegate() { + protected Set, B>> delegate() { return MutableClassToInstanceMap.this.delegate().entrySet(); } @Override - public Iterator, B>> iterator() { - return new TransformedIterator, B>, Entry, B>>( + public Iterator, B>> iterator() { + return new TransformedIterator< + Entry, B>, Entry, B>>( delegate().iterator()) { @Override - Entry, B> transform(Entry, B> from) { + Entry, B> transform( + Entry, B> from) { return checkedEntry(from); } }; @@ -138,14 +147,14 @@ public Object[] toArray() { @Override @CanIgnoreReturnValue @CheckForNull - public B put(Class key, B value) { + public B put(Class key, @ParametricNullness B value) { return super.put(key, cast(key, value)); } @Override - public void putAll(Map, ? extends B> map) { - Map, B> copy = new LinkedHashMap<>(map); - for (Entry, B> entry : copy.entrySet()) { + public void putAll(Map, ? extends B> map) { + Map, B> copy = new LinkedHashMap<>(map); + for (Entry, B> entry : copy.entrySet()) { cast(entry.getKey(), entry.getValue()); } super.putAll(copy); @@ -154,19 +163,19 @@ public void putAll(Map, ? extends B> map) { @CanIgnoreReturnValue @Override @CheckForNull - public T putInstance(Class type, T value) { + public T putInstance(Class<@NonNull T> type, @ParametricNullness T value) { return cast(type, put(type, value)); } @Override @CheckForNull - public T getInstance(Class type) { + public T getInstance(Class type) { return cast(type, get(type)); } @CanIgnoreReturnValue @CheckForNull - private static T cast(Class type, @CheckForNull B value) { + private static T cast(Class<@NonNull T> type, @CheckForNull B value) { return Primitives.wrap(type).cast(value); } @@ -179,10 +188,10 @@ private void readObject(ObjectInputStream stream) throws InvalidObjectException } /** Serialized form of the map, to avoid serializing the constraint. */ - private static final class SerializedForm implements Serializable { - private final Map, B> backingMap; + private static final class SerializedForm implements Serializable { + private final Map, B> backingMap; - SerializedForm(Map, B> backingMap) { + SerializedForm(Map, B> backingMap) { this.backingMap = backingMap; } diff --git a/android/guava/src/com/google/common/collect/NullsFirstOrdering.java b/android/guava/src/com/google/common/collect/NullsFirstOrdering.java index 7da8938abaa2..c451ea8c0aed 100644 --- a/android/guava/src/com/google/common/collect/NullsFirstOrdering.java +++ b/android/guava/src/com/google/common/collect/NullsFirstOrdering.java @@ -19,6 +19,7 @@ import com.google.common.annotations.GwtCompatible; import java.io.Serializable; import javax.annotation.CheckForNull; +import org.checkerframework.checker.nullness.qual.NonNull; import org.checkerframework.checker.nullness.qual.Nullable; /** An ordering that treats {@code null} as less than all other values. */ @@ -50,7 +51,7 @@ public int compare(@CheckForNull T left, @CheckForNull T right) { @SuppressWarnings("nullness") // should be safe, but not sure if we can avoid the warning public Ordering reverse() { // ordering.reverse() might be optimized, so let it do its thing - return ordering.reverse().nullsLast(); + return ordering.reverse().<@NonNull S>nullsLast(); } @SuppressWarnings("unchecked") // still need the right way to explain this @@ -61,7 +62,7 @@ public int compare(@CheckForNull T left, @CheckForNull T right) { @Override public Ordering<@Nullable S> nullsLast() { - return ordering.nullsLast(); + return ordering.<@NonNull S>nullsLast(); } @Override diff --git a/android/guava/src/com/google/common/collect/NullsLastOrdering.java b/android/guava/src/com/google/common/collect/NullsLastOrdering.java index 4ccb0bd49e35..88917852e67d 100644 --- a/android/guava/src/com/google/common/collect/NullsLastOrdering.java +++ b/android/guava/src/com/google/common/collect/NullsLastOrdering.java @@ -19,6 +19,7 @@ import com.google.common.annotations.GwtCompatible; import java.io.Serializable; import javax.annotation.CheckForNull; +import org.checkerframework.checker.nullness.qual.NonNull; import org.checkerframework.checker.nullness.qual.Nullable; /** An ordering that treats {@code null} as greater than all other values. */ @@ -50,12 +51,12 @@ public int compare(@CheckForNull T left, @CheckForNull T right) { @SuppressWarnings("nullness") // should be safe, but not sure if we can avoid the warning public Ordering reverse() { // ordering.reverse() might be optimized, so let it do its thing - return ordering.reverse().nullsFirst(); + return ordering.reverse().<@NonNull S>nullsFirst(); } @Override public Ordering<@Nullable S> nullsFirst() { - return ordering.nullsFirst(); + return ordering.<@NonNull S>nullsFirst(); } @SuppressWarnings("unchecked") // still need the right way to explain this diff --git a/android/guava/src/com/google/common/collect/Ordering.java b/android/guava/src/com/google/common/collect/Ordering.java index 436eac4f7c4f..86318aa44336 100644 --- a/android/guava/src/com/google/common/collect/Ordering.java +++ b/android/guava/src/com/google/common/collect/Ordering.java @@ -20,6 +20,7 @@ import static com.google.common.collect.CollectPreconditions.checkNonnegative; import com.google.common.annotations.GwtCompatible; +import com.google.common.annotations.J2ktIncompatible; import com.google.common.annotations.VisibleForTesting; import com.google.common.base.Function; import java.util.ArrayList; @@ -38,6 +39,7 @@ import java.util.concurrent.ConcurrentMap; import java.util.concurrent.atomic.AtomicInteger; import javax.annotation.CheckForNull; +import org.checkerframework.checker.nullness.qual.NonNull; import org.checkerframework.checker.nullness.qual.Nullable; /** @@ -171,6 +173,8 @@ public static Ordering natural() { * to pass it in here. Instead, simply subclass {@code Ordering} and implement its {@code compare} * method directly. * + *

    The returned object is serializable if {@code comparator} is serializable. + * *

    Java 8 users: this class is now obsolete as explained in the class documentation, so * there is no need to use this method. * @@ -312,14 +316,17 @@ public static Ordering usingToString() { * @since 2.0 */ // TODO(kevinb): copy to Comparators, etc. + @J2ktIncompatible // MapMaker public static Ordering<@Nullable Object> arbitrary() { return ArbitraryOrderingHolder.ARBITRARY_ORDERING; } + @J2ktIncompatible // MapMaker private static class ArbitraryOrderingHolder { static final Ordering<@Nullable Object> ARBITRARY_ORDERING = new ArbitraryOrdering(); } + @J2ktIncompatible // MapMaker @VisibleForTesting static class ArbitraryOrdering extends Ordering<@Nullable Object> { @@ -410,6 +417,8 @@ public Ordering reverse() { * Returns an ordering that treats {@code null} as less than all other values and uses {@code * this} to compare non-null values. * + *

    The returned object is serializable if this object is serializable. + * *

    Java 8 users: Use {@code Comparator.nullsFirst(thisComparator)} instead. */ // type parameter lets us avoid the extra in statements like: @@ -423,6 +432,8 @@ public Ordering reverse() { * Returns an ordering that treats {@code null} as greater than all other values and uses this * ordering to compare non-null values. * + *

    The returned object is serializable if this object is serializable. + * *

    Java 8 users: Use {@code Comparator.nullsLast(thisComparator)} instead. */ // type parameter lets us avoid the extra in statements like: @@ -463,6 +474,9 @@ public Ordering reverse() { *

    An ordering produced by this method, or a chain of calls to this method, is equivalent to * one created using {@link Ordering#compound(Iterable)} on the same component comparators. * + *

    The returned object is serializable if this object and {@code secondaryComparator} are both + * serializable. + * *

    Java 8 users: Use {@code thisComparator.thenComparing(secondaryComparator)} instead. * Depending on what {@code secondaryComparator} is, one of the other overloads of {@code * thenComparing} may be even more useful. @@ -481,6 +495,8 @@ public Ordering compound(Comparator secondaryCompara *

    The returned ordering is equivalent to that produced using {@code * Ordering.from(comp1).compound(comp2).compound(comp3) . . .}. * + *

    The returned object is serializable if each of the {@code comparators} is serializable. + * *

    Warning: Supplying an argument with undefined iteration order, such as a {@link * HashSet}, will produce non-deterministic results. * @@ -807,7 +823,7 @@ public List leastOf(Iterator iterator, int k) { public List greatestOf(Iterable iterable, int k) { // TODO(kevinb): see if delegation is hurting performance noticeably // TODO(kevinb): if we change this implementation, add full unit tests. - return reverse().leastOf(iterable, k); + return this.reverse().leastOf(iterable, k); } /** @@ -827,7 +843,7 @@ public List greatestOf(Iterable iterable, int k) { * @since 14.0 */ public List greatestOf(Iterator iterator, int k) { - return reverse().leastOf(iterator, k); + return this.reverse().leastOf(iterator, k); } /** @@ -869,8 +885,7 @@ public List sortedCopy(Iterable elements) { * @since 3.0 */ // TODO(kevinb): rerun benchmarks including new options - @SuppressWarnings("nullness") // unsafe, but there's not much we can do about it now - public ImmutableList immutableSortedCopy(Iterable elements) { + public ImmutableList immutableSortedCopy(Iterable elements) { return ImmutableList.sortedCopyOf(this, elements); } diff --git a/android/guava/src/com/google/common/collect/Platform.java b/android/guava/src/com/google/common/collect/Platform.java index 0b18e1ff396e..9654502fcc2f 100644 --- a/android/guava/src/com/google/common/collect/Platform.java +++ b/android/guava/src/com/google/common/collect/Platform.java @@ -17,7 +17,7 @@ package com.google.common.collect; import com.google.common.annotations.GwtCompatible; -import java.lang.reflect.Array; +import com.google.common.annotations.J2ktIncompatible; import java.util.Arrays; import java.util.Map; import java.util.Set; @@ -89,13 +89,8 @@ Map preservesInsertionOrderOnPutsMap() { * ObjectArrays, which is the main caller of this method.) */ static T[] newArray(T[] reference, int length) { - Class type = reference.getClass().getComponentType(); - - // the cast is safe because - // result.getClass() == reference.getClass().getComponentType() - @SuppressWarnings("unchecked") - T[] result = (T[]) Array.newInstance(type, length); - return result; + T[] empty = reference.length == 0 ? reference : Arrays.copyOf(reference, 0); + return Arrays.copyOf(empty, length); } /** Equivalent to Arrays.copyOfRange(source, from, to, arrayOfType.getClass()). */ @@ -117,6 +112,7 @@ Map preservesInsertionOrderOnPutsMap() { * GWT). This is sometimes acceptable, when only server-side code could generate enough volume * that reclamation becomes important. */ + @J2ktIncompatible static MapMaker tryWeakKeys(MapMaker mapMaker) { return mapMaker.weakKeys(); } diff --git a/android/guava/src/com/google/common/collect/Queues.java b/android/guava/src/com/google/common/collect/Queues.java index 6a4dbd227ec0..86da1daf805c 100644 --- a/android/guava/src/com/google/common/collect/Queues.java +++ b/android/guava/src/com/google/common/collect/Queues.java @@ -17,6 +17,7 @@ import com.google.common.annotations.Beta; import com.google.common.annotations.GwtCompatible; import com.google.common.annotations.GwtIncompatible; +import com.google.common.annotations.J2ktIncompatible; import com.google.common.base.Preconditions; import com.google.errorprone.annotations.CanIgnoreReturnValue; import java.util.ArrayDeque; @@ -52,6 +53,7 @@ private Queues() {} * Creates an empty {@code ArrayBlockingQueue} with the given (fixed) capacity and nonfair access * policy. */ + @J2ktIncompatible @GwtIncompatible // ArrayBlockingQueue public static ArrayBlockingQueue newArrayBlockingQueue(int capacity) { return new ArrayBlockingQueue(capacity); @@ -86,6 +88,7 @@ public static ArrayDeque newArrayDeque(Iterable elements) { // ConcurrentLinkedQueue /** Creates an empty {@code ConcurrentLinkedQueue}. */ + @J2ktIncompatible @GwtIncompatible // ConcurrentLinkedQueue public static ConcurrentLinkedQueue newConcurrentLinkedQueue() { return new ConcurrentLinkedQueue(); @@ -95,6 +98,7 @@ public static ConcurrentLinkedQueue newConcurrentLinkedQueue() { * Creates a {@code ConcurrentLinkedQueue} containing the elements of the specified iterable, in * the order they are returned by the iterable's iterator. */ + @J2ktIncompatible @GwtIncompatible // ConcurrentLinkedQueue public static ConcurrentLinkedQueue newConcurrentLinkedQueue( Iterable elements) { @@ -113,6 +117,7 @@ public static ConcurrentLinkedQueue newConcurrentLinkedQueue( * * @since 12.0 */ + @J2ktIncompatible @GwtIncompatible // LinkedBlockingDeque public static LinkedBlockingDeque newLinkedBlockingDeque() { return new LinkedBlockingDeque(); @@ -124,6 +129,7 @@ public static LinkedBlockingDeque newLinkedBlockingDeque() { * @throws IllegalArgumentException if {@code capacity} is less than 1 * @since 12.0 */ + @J2ktIncompatible @GwtIncompatible // LinkedBlockingDeque public static LinkedBlockingDeque newLinkedBlockingDeque(int capacity) { return new LinkedBlockingDeque(capacity); @@ -136,6 +142,7 @@ public static LinkedBlockingDeque newLinkedBlockingDeque(int capacity) { * * @since 12.0 */ + @J2ktIncompatible @GwtIncompatible // LinkedBlockingDeque public static LinkedBlockingDeque newLinkedBlockingDeque(Iterable elements) { if (elements instanceof Collection) { @@ -149,6 +156,7 @@ public static LinkedBlockingDeque newLinkedBlockingDeque(Iterable LinkedBlockingQueue newLinkedBlockingQueue() { return new LinkedBlockingQueue(); @@ -159,6 +167,7 @@ public static LinkedBlockingQueue newLinkedBlockingQueue() { * * @throws IllegalArgumentException if {@code capacity} is less than 1 */ + @J2ktIncompatible @GwtIncompatible // LinkedBlockingQueue public static LinkedBlockingQueue newLinkedBlockingQueue(int capacity) { return new LinkedBlockingQueue(capacity); @@ -172,6 +181,7 @@ public static LinkedBlockingQueue newLinkedBlockingQueue(int capacity) { * @param elements the elements that the queue should contain, in order * @return a new {@code LinkedBlockingQueue} containing those elements */ + @J2ktIncompatible @GwtIncompatible // LinkedBlockingQueue public static LinkedBlockingQueue newLinkedBlockingQueue(Iterable elements) { if (elements instanceof Collection) { @@ -193,6 +203,7 @@ public static LinkedBlockingQueue newLinkedBlockingQueue(Iterable PriorityBlockingQueue newPriorityBlockingQueue() { return new PriorityBlockingQueue(); @@ -207,6 +218,7 @@ public static PriorityBlockingQueue newPriorityBlockin * @since 11.0 (but the bound of {@code E} was changed from {@code Object} to {@code Comparable} * in 15.0) */ + @J2ktIncompatible @GwtIncompatible // PriorityBlockingQueue public static PriorityBlockingQueue newPriorityBlockingQueue( Iterable elements) { @@ -253,6 +265,7 @@ public static PriorityQueue newPriorityQueue( // SynchronousQueue /** Creates an empty {@code SynchronousQueue} with nonfair access policy. */ + @J2ktIncompatible @GwtIncompatible // SynchronousQueue public static SynchronousQueue newSynchronousQueue() { return new SynchronousQueue(); @@ -272,6 +285,7 @@ public static SynchronousQueue newSynchronousQueue() { */ @Beta @CanIgnoreReturnValue + @J2ktIncompatible @GwtIncompatible // BlockingQueue @SuppressWarnings("GoodTime") // should accept a java.time.Duration public static int drain( @@ -320,6 +334,7 @@ public static int drain( */ @Beta @CanIgnoreReturnValue + @J2ktIncompatible @GwtIncompatible // BlockingQueue @SuppressWarnings("GoodTime") // should accept a java.time.Duration public static int drainUninterruptibly( diff --git a/android/guava/src/com/google/common/collect/Range.java b/android/guava/src/com/google/common/collect/Range.java index 21d4ea376a69..fa6607dd840b 100644 --- a/android/guava/src/com/google/common/collect/Range.java +++ b/android/guava/src/com/google/common/collect/Range.java @@ -106,6 +106,7 @@ * P if, for all ranges {@code b} also having property P, {@code a.encloses(b)}. * Likewise, {@code a} is minimal when {@code b.encloses(a)} for all {@code b} having * property P. See, for example, the definition of {@link #intersection intersection}. + *

  • A {@code Range} is serializable if it has no bounds, or if each bound is serializable. * * *

    Further reading

    @@ -335,7 +336,7 @@ public static > Range encloseAll(Iterable values) if (values instanceof SortedSet) { SortedSet set = (SortedSet) values; Comparator comparator = set.comparator(); - if (Ordering.natural().equals(comparator) || comparator == null) { + if (Ordering.natural().equals(comparator) || comparator == null) { return closed(set.first(), set.last()); } } @@ -344,8 +345,8 @@ public static > Range encloseAll(Iterable values) C max = min; while (valueIterator.hasNext()) { C value = checkNotNull(valueIterator.next()); - min = Ordering.natural().min(min, value); - max = Ordering.natural().max(max, value); + min = Ordering.natural().min(min, value); + max = Ordering.natural().max(max, value); } return closed(min, max); } diff --git a/android/guava/src/com/google/common/collect/RangeMap.java b/android/guava/src/com/google/common/collect/RangeMap.java index 112403e52ef6..4eab7e49e324 100644 --- a/android/guava/src/com/google/common/collect/RangeMap.java +++ b/android/guava/src/com/google/common/collect/RangeMap.java @@ -16,7 +16,6 @@ package com.google.common.collect; -import com.google.common.annotations.Beta; import com.google.common.annotations.GwtIncompatible; import com.google.errorprone.annotations.DoNotMock; import java.util.Collection; @@ -35,7 +34,6 @@ * @author Louis Wasserman * @since 14.0 */ -@Beta @DoNotMock("Use ImmutableRangeMap or TreeRangeMap") @GwtIncompatible @ElementTypesAreNonnullByDefault diff --git a/android/guava/src/com/google/common/collect/RangeSet.java b/android/guava/src/com/google/common/collect/RangeSet.java index 8d61cf351aed..7c74366dff3f 100644 --- a/android/guava/src/com/google/common/collect/RangeSet.java +++ b/android/guava/src/com/google/common/collect/RangeSet.java @@ -14,7 +14,6 @@ package com.google.common.collect; -import com.google.common.annotations.Beta; import com.google.common.annotations.GwtIncompatible; import com.google.errorprone.annotations.DoNotMock; import java.util.NoSuchElementException; @@ -49,7 +48,6 @@ * @author Louis Wasserman * @since 14.0 */ -@Beta @DoNotMock("Use ImmutableRangeSet or TreeRangeSet") @GwtIncompatible @ElementTypesAreNonnullByDefault diff --git a/android/guava/src/com/google/common/collect/RegularContiguousSet.java b/android/guava/src/com/google/common/collect/RegularContiguousSet.java index 5eb9340927bc..9c2e5a26f1d3 100644 --- a/android/guava/src/com/google/common/collect/RegularContiguousSet.java +++ b/android/guava/src/com/google/common/collect/RegularContiguousSet.java @@ -22,6 +22,7 @@ import com.google.common.annotations.GwtCompatible; import com.google.common.annotations.GwtIncompatible; +import com.google.common.annotations.J2ktIncompatible; import java.io.InvalidObjectException; import java.io.ObjectInputStream; import java.io.Serializable; @@ -183,8 +184,8 @@ public ContiguousSet intersection(ContiguousSet other) { if (other.isEmpty()) { return other; } else { - C lowerEndpoint = Ordering.natural().max(this.first(), other.first()); - C upperEndpoint = Ordering.natural().min(this.last(), other.last()); + C lowerEndpoint = Ordering.natural().max(this.first(), other.first()); + C upperEndpoint = Ordering.natural().min(this.last(), other.last()); return (lowerEndpoint.compareTo(upperEndpoint) <= 0) ? ContiguousSet.create(Range.closed(lowerEndpoint, upperEndpoint), domain) : new EmptyContiguousSet(domain); @@ -223,6 +224,7 @@ public int hashCode() { } @GwtIncompatible // serialization + @J2ktIncompatible private static final class SerializedForm implements Serializable { final Range range; final DiscreteDomain domain; @@ -238,12 +240,14 @@ private Object readResolve() { } @GwtIncompatible // serialization + @J2ktIncompatible @Override Object writeReplace() { return new SerializedForm<>(range, domain); } @GwtIncompatible // serialization + @J2ktIncompatible private void readObject(ObjectInputStream stream) throws InvalidObjectException { throw new InvalidObjectException("Use SerializedForm"); } diff --git a/android/guava/src/com/google/common/collect/RegularImmutableMap.java b/android/guava/src/com/google/common/collect/RegularImmutableMap.java index fc8082c7bbb2..d6d214b65f88 100644 --- a/android/guava/src/com/google/common/collect/RegularImmutableMap.java +++ b/android/guava/src/com/google/common/collect/RegularImmutableMap.java @@ -22,6 +22,7 @@ import static java.util.Objects.requireNonNull; import com.google.common.annotations.GwtCompatible; +import com.google.common.annotations.J2ktIncompatible; import com.google.common.annotations.VisibleForTesting; import java.util.AbstractMap; import java.util.Arrays; @@ -549,5 +550,6 @@ boolean isPartialView() { // This class is never actually serialized directly, but we have to make the // warning go away (and suppressing would suppress for all nested classes too) + @J2ktIncompatible // serialization private static final long serialVersionUID = 0; } diff --git a/android/guava/src/com/google/common/collect/Serialization.java b/android/guava/src/com/google/common/collect/Serialization.java index 4ab53f2d7808..e12e84cd2b2a 100644 --- a/android/guava/src/com/google/common/collect/Serialization.java +++ b/android/guava/src/com/google/common/collect/Serialization.java @@ -17,6 +17,7 @@ package com.google.common.collect; import com.google.common.annotations.GwtIncompatible; +import com.google.common.annotations.J2ktIncompatible; import java.io.IOException; import java.io.ObjectInputStream; import java.io.ObjectOutputStream; @@ -34,6 +35,7 @@ * @author Jared Levy */ @GwtIncompatible +@J2ktIncompatible @ElementTypesAreNonnullByDefault final class Serialization { private Serialization() {} diff --git a/android/guava/src/com/google/common/collect/Sets.java b/android/guava/src/com/google/common/collect/Sets.java index 9948630998dd..c00245e28138 100644 --- a/android/guava/src/com/google/common/collect/Sets.java +++ b/android/guava/src/com/google/common/collect/Sets.java @@ -23,6 +23,7 @@ import com.google.common.annotations.Beta; import com.google.common.annotations.GwtCompatible; import com.google.common.annotations.GwtIncompatible; +import com.google.common.annotations.J2ktIncompatible; import com.google.common.base.Predicate; import com.google.common.base.Predicates; import com.google.common.collect.Collections2.FilteredCollection; @@ -50,6 +51,7 @@ import java.util.concurrent.ConcurrentHashMap; import java.util.concurrent.CopyOnWriteArraySet; import javax.annotation.CheckForNull; +import org.checkerframework.checker.nullness.qual.NonNull; import org.checkerframework.checker.nullness.qual.Nullable; /** @@ -425,6 +427,7 @@ public static TreeSet newTreeSet(Iterable * @return a new, empty {@code CopyOnWriteArraySet} * @since 12.0 */ + @J2ktIncompatible @GwtIncompatible // CopyOnWriteArraySet public static CopyOnWriteArraySet newCopyOnWriteArraySet() { return new CopyOnWriteArraySet(); @@ -437,6 +440,7 @@ public static TreeSet newTreeSet(Iterable * @return a new {@code CopyOnWriteArraySet} containing those elements * @since 12.0 */ + @J2ktIncompatible @GwtIncompatible // CopyOnWriteArraySet public static CopyOnWriteArraySet newCopyOnWriteArraySet( Iterable elements) { @@ -462,6 +466,7 @@ public static TreeSet newTreeSet(Iterable * @throws IllegalArgumentException if {@code collection} is not an {@code EnumSet} instance and * contains no elements */ + @J2ktIncompatible public static > EnumSet complementOf(Collection collection) { if (collection instanceof EnumSet) { return EnumSet.complementOf((EnumSet) collection); @@ -553,8 +558,8 @@ private SetView() {} // no subclasses but our own * that is inconsistent with {@link Object#equals(Object)}. */ @SuppressWarnings("nullness") // Unsafe, but we can't fix it now. - public ImmutableSet immutableCopy() { - return ImmutableSet.copyOf(this); + public ImmutableSet<@NonNull E> immutableCopy() { + return ImmutableSet.copyOf((SetView<@NonNull E>) this); } /** @@ -732,9 +737,13 @@ public > S copyInto(S set) { } @Override - @SuppressWarnings("nullness") // see supertype - public ImmutableSet immutableCopy() { - return new ImmutableSet.Builder().addAll(set1).addAll(set2).build(); + @SuppressWarnings({"nullness", "unchecked"}) // see supertype + public ImmutableSet<@NonNull E> immutableCopy() { + ImmutableSet.Builder<@NonNull E> builder = + new ImmutableSet.Builder<@NonNull E>() + .addAll((Iterable<@NonNull E>) set1) + .addAll((Iterable<@NonNull E>) set2); + return (ImmutableSet<@NonNull E>) builder.build(); } }; } diff --git a/android/guava/src/com/google/common/collect/Synchronized.java b/android/guava/src/com/google/common/collect/Synchronized.java index 42bf6114c840..a53a1f5af707 100644 --- a/android/guava/src/com/google/common/collect/Synchronized.java +++ b/android/guava/src/com/google/common/collect/Synchronized.java @@ -20,6 +20,7 @@ import com.google.common.annotations.GwtCompatible; import com.google.common.annotations.GwtIncompatible; +import com.google.common.annotations.J2ktIncompatible; import com.google.common.annotations.VisibleForTesting; import com.google.j2objc.annotations.RetainedWith; import java.io.IOException; @@ -96,6 +97,7 @@ public String toString() { // following writeObject() handles the SynchronizedObject members. @GwtIncompatible // java.io.ObjectOutputStream + @J2ktIncompatible private void writeObject(ObjectOutputStream stream) throws IOException { synchronized (mutex) { stream.defaultWriteObject(); @@ -103,6 +105,7 @@ private void writeObject(ObjectOutputStream stream) throws IOException { } @GwtIncompatible // not needed in emulated source + @J2ktIncompatible private static final long serialVersionUID = 0; } @@ -459,7 +462,7 @@ public int count(@CheckForNull Object o) { } @Override - public int add(E e, int n) { + public int add(@ParametricNullness E e, int n) { synchronized (mutex) { return delegate().add(e, n); } @@ -473,14 +476,14 @@ public int remove(@CheckForNull Object o, int n) { } @Override - public int setCount(E element, int count) { + public int setCount(@ParametricNullness E element, int count) { synchronized (mutex) { return delegate().setCount(element, count); } } @Override - public boolean setCount(E element, int oldCount, int newCount) { + public boolean setCount(@ParametricNullness E element, int oldCount, int newCount) { synchronized (mutex) { return delegate().setCount(element, oldCount, newCount); } @@ -588,21 +591,21 @@ public boolean containsEntry(@CheckForNull Object key, @CheckForNull Object valu } @Override - public Collection get(K key) { + public Collection get(@ParametricNullness K key) { synchronized (mutex) { return typePreservingCollection(delegate().get(key), mutex); } } @Override - public boolean put(K key, V value) { + public boolean put(@ParametricNullness K key, @ParametricNullness V value) { synchronized (mutex) { return delegate().put(key, value); } } @Override - public boolean putAll(K key, Iterable values) { + public boolean putAll(@ParametricNullness K key, Iterable values) { synchronized (mutex) { return delegate().putAll(key, values); } @@ -616,7 +619,7 @@ public boolean putAll(Multimap multimap) { } @Override - public Collection replaceValues(K key, Iterable values) { + public Collection replaceValues(@ParametricNullness K key, Iterable values) { synchronized (mutex) { return delegate().replaceValues(key, values); // copy not synchronized } @@ -922,16 +925,15 @@ public Collection getValue() { // See Collections.CheckedMap.CheckedEntrySet for details on attacks. @Override - public Object[] toArray() { + public @Nullable Object[] toArray() { synchronized (mutex) { /* * toArrayImpl returns `@Nullable Object[]` rather than `Object[]` but only because it can * be used with collections that may contain null. This collection never contains nulls, so - * we can treat it as a plain `Object[]`. + * we could return `Object[]`. But this class is private and J2KT cannot change return types + * in overrides, so we declare `@Nullable Object[]` as the return type. */ - @SuppressWarnings("nullness") - Object[] result = (Object[]) ObjectArrays.toArrayImpl(delegate()); - return result; + return ObjectArrays.toArrayImpl(delegate()); } } @@ -1229,7 +1231,7 @@ public Set values() { @Override @CheckForNull - public V forcePut(K key, V value) { + public V forcePut(@ParametricNullness K key, @ParametricNullness V value) { synchronized (mutex) { return delegate().forcePut(key, value); } @@ -1989,7 +1991,10 @@ public void clear() { @Override @CheckForNull - public V put(R rowKey, C columnKey, V value) { + public V put( + @ParametricNullness R rowKey, + @ParametricNullness C columnKey, + @ParametricNullness V value) { synchronized (mutex) { return delegate().put(rowKey, columnKey, value); } @@ -2011,14 +2016,14 @@ public V remove(@CheckForNull Object rowKey, @CheckForNull Object columnKey) { } @Override - public Map row(R rowKey) { + public Map row(@ParametricNullness R rowKey) { synchronized (mutex) { return map(delegate().row(rowKey), mutex); } } @Override - public Map column(C columnKey) { + public Map column(@ParametricNullness C columnKey) { synchronized (mutex) { return map(delegate().column(columnKey), mutex); } diff --git a/android/guava/src/com/google/common/collect/Tables.java b/android/guava/src/com/google/common/collect/Tables.java index ab67fae9fabd..7a170be4b10c 100644 --- a/android/guava/src/com/google/common/collect/Tables.java +++ b/android/guava/src/com/google/common/collect/Tables.java @@ -257,7 +257,7 @@ public Collection values() { } // Will cast TRANSPOSE_CELL to a type that always succeeds - private static final Function, Cell> TRANSPOSE_CELL = + private static final Function TRANSPOSE_CELL = new Function, Cell>() { @Override public Cell apply(Cell cell) { @@ -268,7 +268,8 @@ public Collection values() { @SuppressWarnings("unchecked") @Override Iterator> cellIterator() { - return Iterators.transform(original.cellSet().iterator(), (Function) TRANSPOSE_CELL); + return Iterators.transform( + original.cellSet().iterator(), (Function, Cell>) TRANSPOSE_CELL); } } diff --git a/android/guava/src/com/google/common/collect/TopKSelector.java b/android/guava/src/com/google/common/collect/TopKSelector.java index 32959630bdda..9cc916e433e6 100644 --- a/android/guava/src/com/google/common/collect/TopKSelector.java +++ b/android/guava/src/com/google/common/collect/TopKSelector.java @@ -273,7 +273,9 @@ public List topK() { bufferSize = k; threshold = buffer[k - 1]; } + // Up to bufferSize, all elements of buffer are real Ts (not null unless T includes null) + T[] topK = Arrays.copyOf(castBuffer, bufferSize); // we have to support null elements, so no ImmutableList for us - return Collections.unmodifiableList(Arrays.asList(Arrays.copyOf(buffer, bufferSize))); + return Collections.unmodifiableList(Arrays.asList(topK)); } } diff --git a/android/guava/src/com/google/common/collect/TreeMultimap.java b/android/guava/src/com/google/common/collect/TreeMultimap.java index 99d31e7e0b13..e449caa30014 100644 --- a/android/guava/src/com/google/common/collect/TreeMultimap.java +++ b/android/guava/src/com/google/common/collect/TreeMultimap.java @@ -20,6 +20,7 @@ import com.google.common.annotations.GwtCompatible; import com.google.common.annotations.GwtIncompatible; +import com.google.common.annotations.J2ktIncompatible; import java.io.IOException; import java.io.ObjectInputStream; import java.io.ObjectOutputStream; @@ -201,6 +202,7 @@ public NavigableMap> asMap() { * distinct key: the key, number of values for that key, and key values */ @GwtIncompatible // java.io.ObjectOutputStream + @J2ktIncompatible private void writeObject(ObjectOutputStream stream) throws IOException { stream.defaultWriteObject(); stream.writeObject(keyComparator()); @@ -209,6 +211,7 @@ private void writeObject(ObjectOutputStream stream) throws IOException { } @GwtIncompatible // java.io.ObjectInputStream + @J2ktIncompatible @SuppressWarnings("unchecked") // reading data stored by writeObject private void readObject(ObjectInputStream stream) throws IOException, ClassNotFoundException { stream.defaultReadObject(); @@ -219,5 +222,6 @@ private void readObject(ObjectInputStream stream) throws IOException, ClassNotFo } @GwtIncompatible // not needed in emulated source + @J2ktIncompatible private static final long serialVersionUID = 0; } diff --git a/android/guava/src/com/google/common/collect/TreeMultiset.java b/android/guava/src/com/google/common/collect/TreeMultiset.java index 32059439cd3e..f3367ef9a757 100644 --- a/android/guava/src/com/google/common/collect/TreeMultiset.java +++ b/android/guava/src/com/google/common/collect/TreeMultiset.java @@ -24,6 +24,7 @@ import com.google.common.annotations.GwtCompatible; import com.google.common.annotations.GwtIncompatible; +import com.google.common.annotations.J2ktIncompatible; import com.google.common.base.MoreObjects; import com.google.common.primitives.Ints; import com.google.errorprone.annotations.CanIgnoreReturnValue; @@ -1061,6 +1062,7 @@ public String toString() { * @serialData the comparator, the number of distinct elements, the first element, its count, the * second element, its count, and so on */ + @J2ktIncompatible @GwtIncompatible // java.io.ObjectOutputStream private void writeObject(ObjectOutputStream stream) throws IOException { stream.defaultWriteObject(); @@ -1068,6 +1070,7 @@ private void writeObject(ObjectOutputStream stream) throws IOException { Serialization.writeMultiset(this, stream); } + @J2ktIncompatible @GwtIncompatible // java.io.ObjectInputStream private void readObject(ObjectInputStream stream) throws IOException, ClassNotFoundException { stream.defaultReadObject(); @@ -1086,5 +1089,6 @@ private void readObject(ObjectInputStream stream) throws IOException, ClassNotFo } @GwtIncompatible // not needed in emulated source + @J2ktIncompatible private static final long serialVersionUID = 1; } diff --git a/android/guava/src/com/google/common/collect/TreeRangeMap.java b/android/guava/src/com/google/common/collect/TreeRangeMap.java index 4259bb989832..0797f8964ae8 100644 --- a/android/guava/src/com/google/common/collect/TreeRangeMap.java +++ b/android/guava/src/com/google/common/collect/TreeRangeMap.java @@ -23,7 +23,6 @@ import static com.google.common.base.Predicates.not; import static java.util.Objects.requireNonNull; -import com.google.common.annotations.Beta; import com.google.common.annotations.GwtIncompatible; import com.google.common.base.MoreObjects; import com.google.common.base.Predicate; @@ -49,7 +48,6 @@ * @author Louis Wasserman * @since 14.0 */ -@Beta @GwtIncompatible // NavigableMap @ElementTypesAreNonnullByDefault public final class TreeRangeMap implements RangeMap { diff --git a/android/guava/src/com/google/common/collect/TreeRangeSet.java b/android/guava/src/com/google/common/collect/TreeRangeSet.java index 7ba71139eb96..967981ff6d59 100644 --- a/android/guava/src/com/google/common/collect/TreeRangeSet.java +++ b/android/guava/src/com/google/common/collect/TreeRangeSet.java @@ -17,7 +17,6 @@ import static com.google.common.base.Preconditions.checkArgument; import static com.google.common.base.Preconditions.checkNotNull; -import com.google.common.annotations.Beta; import com.google.common.annotations.GwtIncompatible; import com.google.common.annotations.VisibleForTesting; import com.google.common.base.MoreObjects; @@ -38,7 +37,6 @@ * @author Louis Wasserman * @since 14.0 */ -@Beta @GwtIncompatible // uses NavigableMap @ElementTypesAreNonnullByDefault public class TreeRangeSet> extends AbstractRangeSet @@ -802,7 +800,7 @@ Iterator, Range>> entryIterator() { .iterator(); } Cut> upperBoundOnLowerBounds = - Ordering.natural() + Ordering.>>natural() .min(lowerBoundWindow.upperBound, Cut.belowValue(restriction.upperBound)); return new AbstractIterator, Range>>() { @Override @@ -828,7 +826,7 @@ Iterator, Range>> descendingEntryIterator() { return Iterators.emptyIterator(); } Cut> upperBoundOnLowerBounds = - Ordering.natural() + Ordering.>>natural() .min(lowerBoundWindow.upperBound, Cut.belowValue(restriction.upperBound)); Iterator> completeRangeItr = rangesByLowerBound diff --git a/android/guava/src/com/google/common/graph/AbstractNetwork.java b/android/guava/src/com/google/common/graph/AbstractNetwork.java index 5dfeaf2242dc..0e59378d3a27 100644 --- a/android/guava/src/com/google/common/graph/AbstractNetwork.java +++ b/android/guava/src/com/google/common/graph/AbstractNetwork.java @@ -23,7 +23,6 @@ import static java.util.Collections.unmodifiableSet; import com.google.common.annotations.Beta; -import com.google.common.base.Function; import com.google.common.base.Predicate; import com.google.common.collect.ImmutableSet; import com.google.common.collect.Iterators; @@ -71,13 +70,7 @@ public Set> edges() { @Override public Iterator> iterator() { return Iterators.transform( - AbstractNetwork.this.edges().iterator(), - new Function>() { - @Override - public EndpointPair apply(E edge) { - return incidentNodes(edge); - } - }); + AbstractNetwork.this.edges().iterator(), edge -> incidentNodes(edge)); } @Override @@ -280,13 +273,6 @@ public String toString() { } private static Map> edgeIncidentNodesMap(final Network network) { - Function> edgeToIncidentNodesFn = - new Function>() { - @Override - public EndpointPair apply(E edge) { - return network.incidentNodes(edge); - } - }; - return Maps.asMap(network.edges(), edgeToIncidentNodesFn); + return Maps.asMap(network.edges(), network::incidentNodes); } } diff --git a/android/guava/src/com/google/common/graph/AbstractValueGraph.java b/android/guava/src/com/google/common/graph/AbstractValueGraph.java index 940aeffc525d..d8316ef894d6 100644 --- a/android/guava/src/com/google/common/graph/AbstractValueGraph.java +++ b/android/guava/src/com/google/common/graph/AbstractValueGraph.java @@ -19,7 +19,6 @@ import static java.util.Objects.requireNonNull; import com.google.common.annotations.Beta; -import com.google.common.base.Function; import com.google.common.collect.Maps; import java.util.Map; import java.util.Set; @@ -141,14 +140,10 @@ public String toString() { } private static Map, V> edgeValueMap(final ValueGraph graph) { - Function, V> edgeToValueFn = - new Function, V>() { - @Override - public V apply(EndpointPair edge) { + return Maps.asMap( + graph.edges(), + edge -> // requireNonNull is safe because the endpoint pair comes from the graph. - return requireNonNull(graph.edgeValueOrDefault(edge.nodeU(), edge.nodeV(), null)); - } - }; - return Maps.asMap(graph.edges(), edgeToValueFn); + requireNonNull(graph.edgeValueOrDefault(edge.nodeU(), edge.nodeV(), null))); } } diff --git a/android/guava/src/com/google/common/graph/Graphs.java b/android/guava/src/com/google/common/graph/Graphs.java index bad8580ac859..e608eebc002d 100644 --- a/android/guava/src/com/google/common/graph/Graphs.java +++ b/android/guava/src/com/google/common/graph/Graphs.java @@ -21,7 +21,6 @@ import static java.util.Objects.requireNonNull; import com.google.common.annotations.Beta; -import com.google.common.base.Function; import com.google.common.base.Objects; import com.google.common.collect.ImmutableSet; import com.google.common.collect.Iterables; @@ -288,12 +287,7 @@ public Set> incidentEdges(N node) { public Iterator> iterator() { return Iterators.transform( delegate().incidentEdges(node).iterator(), - new Function, EndpointPair>() { - @Override - public EndpointPair apply(EndpointPair edge) { - return EndpointPair.of(delegate(), edge.nodeV(), edge.nodeU()); - } - }); + edge -> EndpointPair.of(delegate(), edge.nodeV(), edge.nodeU())); } }; } diff --git a/android/guava/src/com/google/common/hash/Hashing.java b/android/guava/src/com/google/common/hash/Hashing.java index f740b25d923f..1d9d1e741ef5 100644 --- a/android/guava/src/com/google/common/hash/Hashing.java +++ b/android/guava/src/com/google/common/hash/Hashing.java @@ -57,7 +57,8 @@ public final class Hashing { *

    Repeated calls to this method on the same loaded {@code Hashing} class, using the same value * for {@code minimumBits}, will return identically-behaving {@link HashFunction} instances. * - * @param minimumBits a positive integer (can be arbitrarily large) + * @param minimumBits a positive integer. This can be arbitrarily large. The returned {@link + * HashFunction} instance may use memory proportional to this integer. * @return a hash function, described above, that produces hash codes of length {@code * minimumBits} or greater */ diff --git a/android/guava/src/com/google/common/io/AppendableWriter.java b/android/guava/src/com/google/common/io/AppendableWriter.java index d9aab342f29e..8566569a96d1 100644 --- a/android/guava/src/com/google/common/io/AppendableWriter.java +++ b/android/guava/src/com/google/common/io/AppendableWriter.java @@ -17,6 +17,7 @@ import static com.google.common.base.Preconditions.checkNotNull; import com.google.common.annotations.GwtIncompatible; +import com.google.common.annotations.J2ktIncompatible; import java.io.Closeable; import java.io.Flushable; import java.io.IOException; @@ -31,6 +32,7 @@ * @author Sebastian Kanthak * @since 1.0 */ +@J2ktIncompatible @GwtIncompatible @ElementTypesAreNonnullByDefault class AppendableWriter extends Writer { diff --git a/android/guava/src/com/google/common/io/BaseEncoding.java b/android/guava/src/com/google/common/io/BaseEncoding.java index c228979f5f9e..ebb26ee9c252 100644 --- a/android/guava/src/com/google/common/io/BaseEncoding.java +++ b/android/guava/src/com/google/common/io/BaseEncoding.java @@ -26,6 +26,7 @@ import com.google.common.annotations.GwtCompatible; import com.google.common.annotations.GwtIncompatible; +import com.google.common.annotations.J2ktIncompatible; import com.google.common.base.Ascii; import com.google.errorprone.annotations.concurrent.LazyInit; import java.io.IOException; @@ -169,12 +170,14 @@ public final String encode(byte[] bytes, int off, int len) { * {@code Writer}. When the returned {@code OutputStream} is closed, so is the backing {@code * Writer}. */ + @J2ktIncompatible @GwtIncompatible // Writer,OutputStream public abstract OutputStream encodingStream(Writer writer); /** * Returns a {@code ByteSink} that writes base-encoded bytes to the specified {@code CharSink}. */ + @J2ktIncompatible @GwtIncompatible // ByteSink,CharSink public final ByteSink encodingSink(CharSink encodedSink) { checkNotNull(encodedSink); @@ -239,6 +242,7 @@ final byte[] decodeChecked(CharSequence chars) * Returns an {@code InputStream} that decodes base-encoded input from the specified {@code * Reader}. The returned stream throws a {@link DecodingException} upon decoding-specific errors. */ + @J2ktIncompatible @GwtIncompatible // Reader,InputStream public abstract InputStream decodingStream(Reader reader); @@ -246,6 +250,7 @@ final byte[] decodeChecked(CharSequence chars) * Returns a {@code ByteSource} that reads base-encoded bytes from the specified {@code * CharSource}. */ + @J2ktIncompatible @GwtIncompatible // ByteSource,CharSource public final ByteSource decodingSource(CharSource encodedSource) { checkNotNull(encodedSource); @@ -631,6 +636,7 @@ int maxEncodedSize(int bytes) { return alphabet.charsPerChunk * divide(bytes, alphabet.bytesPerChunk, CEILING); } + @J2ktIncompatible @GwtIncompatible // Writer,OutputStream @Override public OutputStream encodingStream(Writer out) { @@ -772,6 +778,7 @@ int decodeTo(byte[] target, CharSequence chars) throws DecodingException { } @Override + @J2ktIncompatible @GwtIncompatible // Reader,InputStream public InputStream decodingStream(Reader reader) { checkNotNull(reader); @@ -1047,6 +1054,7 @@ BaseEncoding newInstance(Alphabet alphabet, @CheckForNull Character paddingChar) } } + @J2ktIncompatible @GwtIncompatible static Reader ignoringReader(Reader delegate, String toIgnore) { checkNotNull(delegate); @@ -1104,6 +1112,7 @@ public Appendable append(@CheckForNull CharSequence chars) { }; } + @J2ktIncompatible @GwtIncompatible // Writer static Writer separatingWriter(Writer delegate, String separator, int afterEveryChars) { Appendable separatingAppendable = separatingAppendable(delegate, separator, afterEveryChars); @@ -1155,6 +1164,7 @@ int maxEncodedSize(int bytes) { + separator.length() * divide(Math.max(0, unseparatedSize - 1), afterEveryChars, FLOOR); } + @J2ktIncompatible @GwtIncompatible // Writer,OutputStream @Override public OutputStream encodingStream(Writer output) { @@ -1196,6 +1206,7 @@ int decodeTo(byte[] target, CharSequence chars) throws DecodingException { } @Override + @J2ktIncompatible @GwtIncompatible // Reader,InputStream public InputStream decodingStream(Reader reader) { return delegate.decodingStream(ignoringReader(reader, separator)); diff --git a/android/guava/src/com/google/common/io/ByteArrayDataInput.java b/android/guava/src/com/google/common/io/ByteArrayDataInput.java index cf84fcc136b7..9fa295904d48 100644 --- a/android/guava/src/com/google/common/io/ByteArrayDataInput.java +++ b/android/guava/src/com/google/common/io/ByteArrayDataInput.java @@ -15,6 +15,7 @@ package com.google.common.io; import com.google.common.annotations.GwtIncompatible; +import com.google.common.annotations.J2ktIncompatible; import com.google.errorprone.annotations.CanIgnoreReturnValue; import java.io.DataInput; import java.io.IOException; @@ -32,6 +33,7 @@ * @author Kevin Bourrillion * @since 1.0 */ +@J2ktIncompatible @GwtIncompatible @ElementTypesAreNonnullByDefault public interface ByteArrayDataInput extends DataInput { diff --git a/android/guava/src/com/google/common/io/ByteArrayDataOutput.java b/android/guava/src/com/google/common/io/ByteArrayDataOutput.java index 373907361d8c..487783531601 100644 --- a/android/guava/src/com/google/common/io/ByteArrayDataOutput.java +++ b/android/guava/src/com/google/common/io/ByteArrayDataOutput.java @@ -15,6 +15,7 @@ package com.google.common.io; import com.google.common.annotations.GwtIncompatible; +import com.google.common.annotations.J2ktIncompatible; import java.io.DataOutput; import java.io.IOException; @@ -25,6 +26,7 @@ * @author Jayaprabhakar Kadarkarai * @since 1.0 */ +@J2ktIncompatible @GwtIncompatible @ElementTypesAreNonnullByDefault public interface ByteArrayDataOutput extends DataOutput { diff --git a/android/guava/src/com/google/common/io/ByteProcessor.java b/android/guava/src/com/google/common/io/ByteProcessor.java index 98ea3ffbb27d..5271c409579a 100644 --- a/android/guava/src/com/google/common/io/ByteProcessor.java +++ b/android/guava/src/com/google/common/io/ByteProcessor.java @@ -16,6 +16,7 @@ import com.google.common.annotations.Beta; import com.google.common.annotations.GwtIncompatible; +import com.google.common.annotations.J2ktIncompatible; import com.google.errorprone.annotations.CanIgnoreReturnValue; import com.google.errorprone.annotations.DoNotMock; import java.io.IOException; @@ -32,6 +33,7 @@ */ @Beta @DoNotMock("Implement it normally") +@J2ktIncompatible @GwtIncompatible @ElementTypesAreNonnullByDefault public interface ByteProcessor { diff --git a/android/guava/src/com/google/common/io/ByteSink.java b/android/guava/src/com/google/common/io/ByteSink.java index 7a6af6fc588b..230216919a24 100644 --- a/android/guava/src/com/google/common/io/ByteSink.java +++ b/android/guava/src/com/google/common/io/ByteSink.java @@ -17,6 +17,7 @@ import static com.google.common.base.Preconditions.checkNotNull; import com.google.common.annotations.GwtIncompatible; +import com.google.common.annotations.J2ktIncompatible; import com.google.errorprone.annotations.CanIgnoreReturnValue; import java.io.BufferedOutputStream; import java.io.IOException; @@ -45,6 +46,7 @@ * @since 14.0 * @author Colin Decker */ +@J2ktIncompatible @GwtIncompatible @ElementTypesAreNonnullByDefault public abstract class ByteSink { diff --git a/android/guava/src/com/google/common/io/ByteSource.java b/android/guava/src/com/google/common/io/ByteSource.java index bf99ee0ca8ae..cda48af84cd0 100644 --- a/android/guava/src/com/google/common/io/ByteSource.java +++ b/android/guava/src/com/google/common/io/ByteSource.java @@ -21,6 +21,7 @@ import com.google.common.annotations.Beta; import com.google.common.annotations.GwtIncompatible; +import com.google.common.annotations.J2ktIncompatible; import com.google.common.base.Ascii; import com.google.common.base.Optional; import com.google.common.collect.ImmutableList; @@ -73,6 +74,7 @@ * @since 14.0 * @author Colin Decker */ +@J2ktIncompatible @GwtIncompatible @ElementTypesAreNonnullByDefault public abstract class ByteSource { @@ -316,6 +318,7 @@ public byte[] read() throws IOException { */ @Beta @CanIgnoreReturnValue // some processors won't return a useful result + @ParametricNullness public T read(ByteProcessor processor) throws IOException { checkNotNull(processor); diff --git a/android/guava/src/com/google/common/io/ByteStreams.java b/android/guava/src/com/google/common/io/ByteStreams.java index 99213bf16bef..dcd0d48221f6 100644 --- a/android/guava/src/com/google/common/io/ByteStreams.java +++ b/android/guava/src/com/google/common/io/ByteStreams.java @@ -21,8 +21,8 @@ import static java.lang.Math.max; import static java.lang.Math.min; -import com.google.common.annotations.Beta; import com.google.common.annotations.GwtIncompatible; +import com.google.common.annotations.J2ktIncompatible; import com.google.common.math.IntMath; import com.google.errorprone.annotations.CanIgnoreReturnValue; import java.io.ByteArrayInputStream; @@ -53,6 +53,7 @@ * @author Colin Decker * @since 1.0 */ +@J2ktIncompatible @GwtIncompatible @ElementTypesAreNonnullByDefault public final class ByteStreams { @@ -283,7 +284,6 @@ static byte[] toByteArray(InputStream in, long expectedSize) throws IOException * @since 20.0 */ @CanIgnoreReturnValue - @Beta public static long exhaust(InputStream in) throws IOException { long total = 0; long read; @@ -298,7 +298,6 @@ public static long exhaust(InputStream in) throws IOException { * Returns a new {@link ByteArrayDataInput} instance to read from the {@code bytes} array from the * beginning. */ - @Beta public static ByteArrayDataInput newDataInput(byte[] bytes) { return newDataInput(new ByteArrayInputStream(bytes)); } @@ -310,7 +309,6 @@ public static ByteArrayDataInput newDataInput(byte[] bytes) { * @throws IndexOutOfBoundsException if {@code start} is negative or greater than the length of * the array */ - @Beta public static ByteArrayDataInput newDataInput(byte[] bytes, int start) { checkPositionIndex(start, bytes.length); return newDataInput(new ByteArrayInputStream(bytes, start, bytes.length - start)); @@ -323,7 +321,6 @@ public static ByteArrayDataInput newDataInput(byte[] bytes, int start) { * * @since 17.0 */ - @Beta public static ByteArrayDataInput newDataInput(ByteArrayInputStream byteArrayInputStream) { return new ByteArrayDataInputStream(checkNotNull(byteArrayInputStream)); } @@ -475,7 +472,6 @@ public String readUTF() { } /** Returns a new {@link ByteArrayDataOutput} instance with a default size. */ - @Beta public static ByteArrayDataOutput newDataOutput() { return newDataOutput(new ByteArrayOutputStream()); } @@ -486,7 +482,6 @@ public static ByteArrayDataOutput newDataOutput() { * * @throws IllegalArgumentException if {@code size} is negative */ - @Beta public static ByteArrayDataOutput newDataOutput(int size) { // When called at high frequency, boxing size generates too much garbage, // so avoid doing that if we can. @@ -508,7 +503,6 @@ public static ByteArrayDataOutput newDataOutput(int size) { * * @since 17.0 */ - @Beta public static ByteArrayDataOutput newDataOutput(ByteArrayOutputStream byteArrayOutputStream) { return new ByteArrayDataOutputStream(checkNotNull(byteArrayOutputStream)); } @@ -685,7 +679,6 @@ public String toString() { * * @since 14.0 (since 1.0 as com.google.common.io.NullOutputStream) */ - @Beta public static OutputStream nullOutputStream() { return NULL_OUTPUT_STREAM; } @@ -698,7 +691,6 @@ public static OutputStream nullOutputStream() { * @return a length-limited {@link InputStream} * @since 14.0 (since 1.0 as com.google.common.io.LimitInputStream) */ - @Beta public static InputStream limit(InputStream in, long limit) { return new LimitedInputStream(in, limit); } @@ -785,7 +777,6 @@ public long skip(long n) throws IOException { * @throws EOFException if this stream reaches the end before reading all the bytes. * @throws IOException if an I/O error occurs. */ - @Beta public static void readFully(InputStream in, byte[] b) throws IOException { readFully(in, b, 0, b.length); } @@ -802,7 +793,6 @@ public static void readFully(InputStream in, byte[] b) throws IOException { * @throws EOFException if this stream reaches the end before reading all the bytes. * @throws IOException if an I/O error occurs. */ - @Beta public static void readFully(InputStream in, byte[] b, int off, int len) throws IOException { int read = read(in, b, off, len); if (read != len) { @@ -820,7 +810,6 @@ public static void readFully(InputStream in, byte[] b, int off, int len) throws * @throws EOFException if this stream reaches the end before skipping all the bytes * @throws IOException if an I/O error occurs, or the stream does not support skipping */ - @Beta public static void skipFully(InputStream in, long n) throws IOException { long skipped = skipUpTo(in, n); if (skipped < n) { @@ -886,7 +875,6 @@ private static long skipSafely(InputStream in, long n) throws IOException { * @throws IOException if an I/O error occurs * @since 14.0 */ - @Beta @CanIgnoreReturnValue // some processors won't return a useful result @ParametricNullness public static T readBytes( @@ -926,7 +914,6 @@ private static long skipSafely(InputStream in, long n) throws IOException { * @throws IndexOutOfBoundsException if {@code off} is negative, if {@code len} is negative, or if * {@code off + len} is greater than {@code b.length} */ - @Beta @CanIgnoreReturnValue // Sometimes you don't care how many bytes you actually read, I guess. // (You know that it's either going to read len bytes or stop at EOF.) diff --git a/android/guava/src/com/google/common/io/CharSequenceReader.java b/android/guava/src/com/google/common/io/CharSequenceReader.java index 790e26623625..152743fecafa 100644 --- a/android/guava/src/com/google/common/io/CharSequenceReader.java +++ b/android/guava/src/com/google/common/io/CharSequenceReader.java @@ -20,6 +20,7 @@ import static java.util.Objects.requireNonNull; import com.google.common.annotations.GwtIncompatible; +import com.google.common.annotations.J2ktIncompatible; import java.io.IOException; import java.io.Reader; import java.nio.CharBuffer; @@ -32,6 +33,7 @@ * @author Colin Decker */ // TODO(cgdecker): make this public? as a type, or a method in CharStreams? +@J2ktIncompatible @GwtIncompatible @ElementTypesAreNonnullByDefault final class CharSequenceReader extends Reader { diff --git a/android/guava/src/com/google/common/io/CharSink.java b/android/guava/src/com/google/common/io/CharSink.java index bdf5f38c3c32..2ea37c92952a 100644 --- a/android/guava/src/com/google/common/io/CharSink.java +++ b/android/guava/src/com/google/common/io/CharSink.java @@ -17,6 +17,7 @@ import static com.google.common.base.Preconditions.checkNotNull; import com.google.common.annotations.GwtIncompatible; +import com.google.common.annotations.J2ktIncompatible; import com.google.errorprone.annotations.CanIgnoreReturnValue; import java.io.BufferedWriter; import java.io.IOException; @@ -47,6 +48,7 @@ * @since 14.0 * @author Colin Decker */ +@J2ktIncompatible @GwtIncompatible @ElementTypesAreNonnullByDefault public abstract class CharSink { diff --git a/android/guava/src/com/google/common/io/CharSource.java b/android/guava/src/com/google/common/io/CharSource.java index b7623ff62176..1ced1100b602 100644 --- a/android/guava/src/com/google/common/io/CharSource.java +++ b/android/guava/src/com/google/common/io/CharSource.java @@ -18,6 +18,7 @@ import com.google.common.annotations.Beta; import com.google.common.annotations.GwtIncompatible; +import com.google.common.annotations.J2ktIncompatible; import com.google.common.base.Ascii; import com.google.common.base.Optional; import com.google.common.base.Splitter; @@ -76,6 +77,7 @@ * @since 14.0 * @author Colin Decker */ +@J2ktIncompatible @GwtIncompatible @ElementTypesAreNonnullByDefault public abstract class CharSource { diff --git a/android/guava/src/com/google/common/io/CharStreams.java b/android/guava/src/com/google/common/io/CharStreams.java index d36f9a3c5cd6..0f7dae83ecac 100644 --- a/android/guava/src/com/google/common/io/CharStreams.java +++ b/android/guava/src/com/google/common/io/CharStreams.java @@ -19,6 +19,7 @@ import com.google.common.annotations.Beta; import com.google.common.annotations.GwtIncompatible; +import com.google.common.annotations.J2ktIncompatible; import com.google.errorprone.annotations.CanIgnoreReturnValue; import java.io.Closeable; import java.io.EOFException; @@ -43,6 +44,7 @@ * @author Colin Decker * @since 1.0 */ +@J2ktIncompatible @GwtIncompatible @ElementTypesAreNonnullByDefault public final class CharStreams { diff --git a/android/guava/src/com/google/common/io/Closeables.java b/android/guava/src/com/google/common/io/Closeables.java index b45f5f0fde65..1da5f279a452 100644 --- a/android/guava/src/com/google/common/io/Closeables.java +++ b/android/guava/src/com/google/common/io/Closeables.java @@ -16,6 +16,7 @@ import com.google.common.annotations.Beta; import com.google.common.annotations.GwtIncompatible; +import com.google.common.annotations.J2ktIncompatible; import com.google.common.annotations.VisibleForTesting; import java.io.Closeable; import java.io.IOException; @@ -32,6 +33,7 @@ * @since 1.0 */ @Beta +@J2ktIncompatible @GwtIncompatible @ElementTypesAreNonnullByDefault public final class Closeables { diff --git a/android/guava/src/com/google/common/io/Closer.java b/android/guava/src/com/google/common/io/Closer.java index 12998eff95bb..a74e084ee79e 100644 --- a/android/guava/src/com/google/common/io/Closer.java +++ b/android/guava/src/com/google/common/io/Closer.java @@ -18,6 +18,7 @@ import com.google.common.annotations.Beta; import com.google.common.annotations.GwtIncompatible; +import com.google.common.annotations.J2ktIncompatible; import com.google.common.annotations.VisibleForTesting; import com.google.common.base.Throwables; import com.google.errorprone.annotations.CanIgnoreReturnValue; @@ -88,6 +89,7 @@ */ // Coffee's for {@link Closer closers} only. @Beta +@J2ktIncompatible @GwtIncompatible @ElementTypesAreNonnullByDefault public final class Closer implements Closeable { diff --git a/android/guava/src/com/google/common/io/CountingInputStream.java b/android/guava/src/com/google/common/io/CountingInputStream.java index a37807ae7341..1624cf537b66 100644 --- a/android/guava/src/com/google/common/io/CountingInputStream.java +++ b/android/guava/src/com/google/common/io/CountingInputStream.java @@ -18,6 +18,7 @@ import com.google.common.annotations.Beta; import com.google.common.annotations.GwtIncompatible; +import com.google.common.annotations.J2ktIncompatible; import java.io.FilterInputStream; import java.io.IOException; import java.io.InputStream; @@ -29,6 +30,7 @@ * @since 1.0 */ @Beta +@J2ktIncompatible @GwtIncompatible @ElementTypesAreNonnullByDefault public final class CountingInputStream extends FilterInputStream { diff --git a/android/guava/src/com/google/common/io/CountingOutputStream.java b/android/guava/src/com/google/common/io/CountingOutputStream.java index cf62b9c377a4..1cbfe081fdfb 100644 --- a/android/guava/src/com/google/common/io/CountingOutputStream.java +++ b/android/guava/src/com/google/common/io/CountingOutputStream.java @@ -17,6 +17,7 @@ import static com.google.common.base.Preconditions.checkNotNull; import com.google.common.annotations.GwtIncompatible; +import com.google.common.annotations.J2ktIncompatible; import java.io.FilterOutputStream; import java.io.IOException; import java.io.OutputStream; @@ -27,6 +28,7 @@ * @author Chris Nokleberg * @since 1.0 */ +@J2ktIncompatible @GwtIncompatible @ElementTypesAreNonnullByDefault public final class CountingOutputStream extends FilterOutputStream { diff --git a/android/guava/src/com/google/common/io/FileBackedOutputStream.java b/android/guava/src/com/google/common/io/FileBackedOutputStream.java index 9912e2fcd19c..dc89ba772835 100644 --- a/android/guava/src/com/google/common/io/FileBackedOutputStream.java +++ b/android/guava/src/com/google/common/io/FileBackedOutputStream.java @@ -18,6 +18,7 @@ import com.google.common.annotations.Beta; import com.google.common.annotations.GwtIncompatible; +import com.google.common.annotations.J2ktIncompatible; import com.google.common.annotations.VisibleForTesting; import com.google.errorprone.annotations.concurrent.GuardedBy; import java.io.ByteArrayInputStream; @@ -51,6 +52,7 @@ * @since 1.0 */ @Beta +@J2ktIncompatible @GwtIncompatible @ElementTypesAreNonnullByDefault public final class FileBackedOutputStream extends OutputStream { diff --git a/android/guava/src/com/google/common/io/FileWriteMode.java b/android/guava/src/com/google/common/io/FileWriteMode.java index 86872d1badb2..47cf251e76eb 100644 --- a/android/guava/src/com/google/common/io/FileWriteMode.java +++ b/android/guava/src/com/google/common/io/FileWriteMode.java @@ -15,6 +15,7 @@ package com.google.common.io; import com.google.common.annotations.GwtIncompatible; +import com.google.common.annotations.J2ktIncompatible; /** * Modes for opening a file for writing. The default when mode when none is specified is to truncate @@ -22,6 +23,7 @@ * * @author Colin Decker */ +@J2ktIncompatible @GwtIncompatible @ElementTypesAreNonnullByDefault public enum FileWriteMode { diff --git a/android/guava/src/com/google/common/io/Files.java b/android/guava/src/com/google/common/io/Files.java index ebe7024fc786..940dcbde2804 100644 --- a/android/guava/src/com/google/common/io/Files.java +++ b/android/guava/src/com/google/common/io/Files.java @@ -20,6 +20,7 @@ import com.google.common.annotations.Beta; import com.google.common.annotations.GwtIncompatible; +import com.google.common.annotations.J2ktIncompatible; import com.google.common.base.Joiner; import com.google.common.base.Optional; import com.google.common.base.Predicate; @@ -66,6 +67,7 @@ * @author Colin Decker * @since 1.0 */ +@J2ktIncompatible @GwtIncompatible @ElementTypesAreNonnullByDefault public final class Files { diff --git a/android/guava/src/com/google/common/io/Flushables.java b/android/guava/src/com/google/common/io/Flushables.java index 1f795a24ab24..7d4b06efc13e 100644 --- a/android/guava/src/com/google/common/io/Flushables.java +++ b/android/guava/src/com/google/common/io/Flushables.java @@ -16,6 +16,7 @@ import com.google.common.annotations.Beta; import com.google.common.annotations.GwtIncompatible; +import com.google.common.annotations.J2ktIncompatible; import java.io.Flushable; import java.io.IOException; import java.util.logging.Level; @@ -28,6 +29,7 @@ * @since 1.0 */ @Beta +@J2ktIncompatible @GwtIncompatible @ElementTypesAreNonnullByDefault public final class Flushables { diff --git a/android/guava/src/com/google/common/io/Java8Compatibility.java b/android/guava/src/com/google/common/io/Java8Compatibility.java index 705d97b4dfa5..bd3e6e055339 100644 --- a/android/guava/src/com/google/common/io/Java8Compatibility.java +++ b/android/guava/src/com/google/common/io/Java8Compatibility.java @@ -15,12 +15,14 @@ package com.google.common.io; import com.google.common.annotations.GwtIncompatible; +import com.google.common.annotations.J2ktIncompatible; import java.nio.Buffer; /** * Wrappers around {@link Buffer} methods that are covariantly overridden in Java 9+. See * https://github.com/google/guava/issues/3990 */ +@J2ktIncompatible @GwtIncompatible @ElementTypesAreNonnullByDefault final class Java8Compatibility { diff --git a/android/guava/src/com/google/common/io/LineBuffer.java b/android/guava/src/com/google/common/io/LineBuffer.java index f944abc49099..201dfd61617d 100644 --- a/android/guava/src/com/google/common/io/LineBuffer.java +++ b/android/guava/src/com/google/common/io/LineBuffer.java @@ -15,6 +15,7 @@ package com.google.common.io; import com.google.common.annotations.GwtIncompatible; +import com.google.common.annotations.J2ktIncompatible; import com.google.errorprone.annotations.CanIgnoreReturnValue; import java.io.IOException; @@ -29,6 +30,7 @@ * @author Chris Nokleberg * @since 1.0 */ +@J2ktIncompatible @GwtIncompatible @ElementTypesAreNonnullByDefault abstract class LineBuffer { diff --git a/android/guava/src/com/google/common/io/LineProcessor.java b/android/guava/src/com/google/common/io/LineProcessor.java index e28bebcc5f2b..5886c8d7737c 100644 --- a/android/guava/src/com/google/common/io/LineProcessor.java +++ b/android/guava/src/com/google/common/io/LineProcessor.java @@ -16,6 +16,7 @@ import com.google.common.annotations.Beta; import com.google.common.annotations.GwtIncompatible; +import com.google.common.annotations.J2ktIncompatible; import com.google.errorprone.annotations.CanIgnoreReturnValue; import java.io.IOException; import org.checkerframework.checker.nullness.qual.Nullable; @@ -30,6 +31,7 @@ * @since 1.0 */ @Beta +@J2ktIncompatible @GwtIncompatible @ElementTypesAreNonnullByDefault public interface LineProcessor { diff --git a/android/guava/src/com/google/common/io/LineReader.java b/android/guava/src/com/google/common/io/LineReader.java index 2c57ac4546b7..a42a02296127 100644 --- a/android/guava/src/com/google/common/io/LineReader.java +++ b/android/guava/src/com/google/common/io/LineReader.java @@ -19,6 +19,7 @@ import com.google.common.annotations.Beta; import com.google.common.annotations.GwtIncompatible; +import com.google.common.annotations.J2ktIncompatible; import com.google.errorprone.annotations.CanIgnoreReturnValue; import java.io.IOException; import java.io.Reader; @@ -36,6 +37,7 @@ * @since 1.0 */ @Beta +@J2ktIncompatible @GwtIncompatible @ElementTypesAreNonnullByDefault public final class LineReader { diff --git a/android/guava/src/com/google/common/io/LittleEndianDataInputStream.java b/android/guava/src/com/google/common/io/LittleEndianDataInputStream.java index 88c8e27bc3f9..76f674f84d83 100644 --- a/android/guava/src/com/google/common/io/LittleEndianDataInputStream.java +++ b/android/guava/src/com/google/common/io/LittleEndianDataInputStream.java @@ -16,6 +16,7 @@ import com.google.common.annotations.Beta; import com.google.common.annotations.GwtIncompatible; +import com.google.common.annotations.J2ktIncompatible; import com.google.common.base.Preconditions; import com.google.common.primitives.Ints; import com.google.common.primitives.Longs; @@ -40,6 +41,7 @@ * @since 8.0 */ @Beta +@J2ktIncompatible @GwtIncompatible @ElementTypesAreNonnullByDefault public final class LittleEndianDataInputStream extends FilterInputStream implements DataInput { diff --git a/android/guava/src/com/google/common/io/LittleEndianDataOutputStream.java b/android/guava/src/com/google/common/io/LittleEndianDataOutputStream.java index 6e51aff49d92..2adf6f76e79f 100644 --- a/android/guava/src/com/google/common/io/LittleEndianDataOutputStream.java +++ b/android/guava/src/com/google/common/io/LittleEndianDataOutputStream.java @@ -16,6 +16,7 @@ import com.google.common.annotations.Beta; import com.google.common.annotations.GwtIncompatible; +import com.google.common.annotations.J2ktIncompatible; import com.google.common.base.Preconditions; import com.google.common.primitives.Longs; import java.io.DataOutput; @@ -36,6 +37,7 @@ * @since 8.0 */ @Beta +@J2ktIncompatible @GwtIncompatible @ElementTypesAreNonnullByDefault public final class LittleEndianDataOutputStream extends FilterOutputStream implements DataOutput { diff --git a/android/guava/src/com/google/common/io/MultiInputStream.java b/android/guava/src/com/google/common/io/MultiInputStream.java index 9a7e0fd1c0e7..068baf679010 100644 --- a/android/guava/src/com/google/common/io/MultiInputStream.java +++ b/android/guava/src/com/google/common/io/MultiInputStream.java @@ -17,6 +17,7 @@ import static com.google.common.base.Preconditions.checkNotNull; import com.google.common.annotations.GwtIncompatible; +import com.google.common.annotations.J2ktIncompatible; import java.io.IOException; import java.io.InputStream; import java.util.Iterator; @@ -29,6 +30,7 @@ * @author Chris Nokleberg * @since 1.0 */ +@J2ktIncompatible @GwtIncompatible @ElementTypesAreNonnullByDefault final class MultiInputStream extends InputStream { diff --git a/android/guava/src/com/google/common/io/MultiReader.java b/android/guava/src/com/google/common/io/MultiReader.java index cc36e527b620..9e3a7eccbb9e 100644 --- a/android/guava/src/com/google/common/io/MultiReader.java +++ b/android/guava/src/com/google/common/io/MultiReader.java @@ -17,6 +17,7 @@ import static com.google.common.base.Preconditions.checkNotNull; import com.google.common.annotations.GwtIncompatible; +import com.google.common.annotations.J2ktIncompatible; import com.google.common.base.Preconditions; import java.io.IOException; import java.io.Reader; @@ -29,6 +30,7 @@ * @author Bin Zhu * @since 1.0 */ +@J2ktIncompatible @GwtIncompatible @ElementTypesAreNonnullByDefault class MultiReader extends Reader { diff --git a/android/guava/src/com/google/common/io/PatternFilenameFilter.java b/android/guava/src/com/google/common/io/PatternFilenameFilter.java index 3cb2371e2fd4..59e816842756 100644 --- a/android/guava/src/com/google/common/io/PatternFilenameFilter.java +++ b/android/guava/src/com/google/common/io/PatternFilenameFilter.java @@ -16,6 +16,7 @@ import com.google.common.annotations.Beta; import com.google.common.annotations.GwtIncompatible; +import com.google.common.annotations.J2ktIncompatible; import com.google.common.base.Preconditions; import java.io.File; import java.io.FilenameFilter; @@ -30,6 +31,7 @@ * @since 1.0 */ @Beta +@J2ktIncompatible @GwtIncompatible @ElementTypesAreNonnullByDefault public final class PatternFilenameFilter implements FilenameFilter { diff --git a/android/guava/src/com/google/common/io/ReaderInputStream.java b/android/guava/src/com/google/common/io/ReaderInputStream.java index b8222a7a518d..af84686ecfd7 100644 --- a/android/guava/src/com/google/common/io/ReaderInputStream.java +++ b/android/guava/src/com/google/common/io/ReaderInputStream.java @@ -19,6 +19,7 @@ import static com.google.common.base.Preconditions.checkPositionIndexes; import com.google.common.annotations.GwtIncompatible; +import com.google.common.annotations.J2ktIncompatible; import com.google.common.primitives.UnsignedBytes; import java.io.IOException; import java.io.InputStream; @@ -43,6 +44,7 @@ * * @author Chris Nokleberg */ +@J2ktIncompatible @GwtIncompatible @ElementTypesAreNonnullByDefault final class ReaderInputStream extends InputStream { diff --git a/android/guava/src/com/google/common/io/Resources.java b/android/guava/src/com/google/common/io/Resources.java index d1e37070a91c..aedf3ade2f56 100644 --- a/android/guava/src/com/google/common/io/Resources.java +++ b/android/guava/src/com/google/common/io/Resources.java @@ -18,6 +18,7 @@ import static com.google.common.base.Preconditions.checkNotNull; import com.google.common.annotations.GwtIncompatible; +import com.google.common.annotations.J2ktIncompatible; import com.google.common.base.Charsets; import com.google.common.base.MoreObjects; import com.google.common.collect.Lists; @@ -40,6 +41,7 @@ * @author Colin Decker * @since 1.0 */ +@J2ktIncompatible @GwtIncompatible @ElementTypesAreNonnullByDefault public final class Resources { diff --git a/android/guava/src/com/google/common/math/BigDecimalMath.java b/android/guava/src/com/google/common/math/BigDecimalMath.java index 33a55d356312..d7094047999f 100644 --- a/android/guava/src/com/google/common/math/BigDecimalMath.java +++ b/android/guava/src/com/google/common/math/BigDecimalMath.java @@ -15,6 +15,7 @@ package com.google.common.math; import com.google.common.annotations.GwtIncompatible; +import com.google.common.annotations.J2ktIncompatible; import java.math.BigDecimal; import java.math.RoundingMode; @@ -24,6 +25,7 @@ * @author Louis Wasserman * @since 30.0 */ +@J2ktIncompatible @GwtIncompatible @ElementTypesAreNonnullByDefault public class BigDecimalMath { diff --git a/android/guava/src/com/google/common/math/BigIntegerMath.java b/android/guava/src/com/google/common/math/BigIntegerMath.java index 6ef1e81ed4d7..3ba5685ccde5 100644 --- a/android/guava/src/com/google/common/math/BigIntegerMath.java +++ b/android/guava/src/com/google/common/math/BigIntegerMath.java @@ -28,6 +28,7 @@ import com.google.common.annotations.Beta; import com.google.common.annotations.GwtCompatible; import com.google.common.annotations.GwtIncompatible; +import com.google.common.annotations.J2ktIncompatible; import com.google.common.annotations.VisibleForTesting; import java.math.BigDecimal; import java.math.BigInteger; @@ -146,6 +147,7 @@ public static int log2(BigInteger x, RoundingMode mode) { * @throws ArithmeticException if {@code mode} is {@link RoundingMode#UNNECESSARY} and {@code x} * is not a power of ten */ + @J2ktIncompatible @GwtIncompatible // TODO @SuppressWarnings("fallthrough") public static int log10(BigInteger x, RoundingMode mode) { @@ -224,6 +226,7 @@ public static int log10(BigInteger x, RoundingMode mode) { * @throws ArithmeticException if {@code mode} is {@link RoundingMode#UNNECESSARY} and {@code * sqrt(x)} is not an integer */ + @J2ktIncompatible @GwtIncompatible // TODO @SuppressWarnings("fallthrough") public static BigInteger sqrt(BigInteger x, RoundingMode mode) { @@ -260,6 +263,7 @@ public static BigInteger sqrt(BigInteger x, RoundingMode mode) { } } + @J2ktIncompatible @GwtIncompatible // TODO private static BigInteger sqrtFloor(BigInteger x) { /* @@ -304,6 +308,7 @@ private static BigInteger sqrtFloor(BigInteger x) { return sqrt0; } + @J2ktIncompatible @GwtIncompatible // TODO private static BigInteger sqrtApproxWithDoubles(BigInteger x) { return DoubleMath.roundToBigInteger(Math.sqrt(DoubleUtils.bigToDouble(x)), HALF_EVEN); @@ -330,11 +335,13 @@ private static BigInteger sqrtApproxWithDoubles(BigInteger x) { * is not precisely representable as a {@code double} * @since 30.0 */ + @J2ktIncompatible @GwtIncompatible public static double roundToDouble(BigInteger x, RoundingMode mode) { return BigIntegerToDoubleRounder.INSTANCE.roundToDouble(x, mode); } + @J2ktIncompatible @GwtIncompatible private static class BigIntegerToDoubleRounder extends ToDoubleRounder { static final BigIntegerToDoubleRounder INSTANCE = new BigIntegerToDoubleRounder(); @@ -369,6 +376,7 @@ BigInteger minus(BigInteger a, BigInteger b) { * @throws ArithmeticException if {@code q == 0}, or if {@code mode == UNNECESSARY} and {@code a} * is not an integer multiple of {@code b} */ + @J2ktIncompatible @GwtIncompatible // TODO public static BigInteger divide(BigInteger p, BigInteger q, RoundingMode mode) { BigDecimal pDec = new BigDecimal(p); @@ -521,6 +529,7 @@ public static BigInteger binomial(int n, int k) { } // Returns true if BigInteger.valueOf(x.longValue()).equals(x). + @J2ktIncompatible @GwtIncompatible // TODO static boolean fitsInLong(BigInteger x) { return x.bitLength() <= Long.SIZE - 1; diff --git a/android/guava/src/com/google/common/math/DoubleMath.java b/android/guava/src/com/google/common/math/DoubleMath.java index cdd0a4b39e3b..36de5378f345 100644 --- a/android/guava/src/com/google/common/math/DoubleMath.java +++ b/android/guava/src/com/google/common/math/DoubleMath.java @@ -32,6 +32,7 @@ import com.google.common.annotations.GwtCompatible; import com.google.common.annotations.GwtIncompatible; +import com.google.common.annotations.J2ktIncompatible; import com.google.common.annotations.VisibleForTesting; import com.google.common.primitives.Booleans; import com.google.errorprone.annotations.CanIgnoreReturnValue; @@ -52,6 +53,7 @@ public final class DoubleMath { * This method returns a value y such that rounding y DOWN (towards zero) gives the same result as * rounding x according to the specified mode. */ + @J2ktIncompatible @GwtIncompatible // #isMathematicalInteger, com.google.common.math.DoubleUtils static double roundIntermediate(double x, RoundingMode mode) { if (!isFinite(x)) { @@ -128,6 +130,7 @@ static double roundIntermediate(double x, RoundingMode mode) { * RoundingMode#UNNECESSARY} * */ + @J2ktIncompatible @GwtIncompatible // #roundIntermediate public static int roundToInt(double x, RoundingMode mode) { double z = roundIntermediate(x, mode); @@ -153,6 +156,7 @@ public static int roundToInt(double x, RoundingMode mode) { * RoundingMode#UNNECESSARY} * */ + @J2ktIncompatible @GwtIncompatible // #roundIntermediate public static long roundToLong(double x, RoundingMode mode) { double z = roundIntermediate(x, mode); @@ -180,6 +184,7 @@ public static long roundToLong(double x, RoundingMode mode) { * */ // #roundIntermediate, java.lang.Math.getExponent, com.google.common.math.DoubleUtils + @J2ktIncompatible @GwtIncompatible public static BigInteger roundToBigInteger(double x, RoundingMode mode) { x = roundIntermediate(x, mode); @@ -196,6 +201,7 @@ public static BigInteger roundToBigInteger(double x, RoundingMode mode) { * Returns {@code true} if {@code x} is exactly equal to {@code 2^k} for some finite integer * {@code k}. */ + @J2ktIncompatible @GwtIncompatible // com.google.common.math.DoubleUtils public static boolean isPowerOfTwo(double x) { if (x > 0.0 && isFinite(x)) { @@ -234,6 +240,7 @@ public static double log2(double x) { * @throws IllegalArgumentException if {@code x <= 0.0}, {@code x} is NaN, or {@code x} is * infinite */ + @J2ktIncompatible @GwtIncompatible // java.lang.Math.getExponent, com.google.common.math.DoubleUtils @SuppressWarnings("fallthrough") public static int log2(double x, RoundingMode mode) { @@ -404,6 +411,7 @@ public static int fuzzyCompare(double a, double b, double tolerance) { */ @Deprecated // com.google.common.math.DoubleUtils + @J2ktIncompatible @GwtIncompatible public static double mean(double... values) { checkArgument(values.length > 0, "Cannot take mean of 0 values"); @@ -484,6 +492,7 @@ public static double mean(long... values) { */ @Deprecated // com.google.common.math.DoubleUtils + @J2ktIncompatible @GwtIncompatible public static double mean(Iterable values) { return mean(values.iterator()); @@ -504,6 +513,7 @@ public static double mean(Iterable values) { */ @Deprecated // com.google.common.math.DoubleUtils + @J2ktIncompatible @GwtIncompatible public static double mean(Iterator values) { checkArgument(values.hasNext(), "Cannot take mean of 0 values"); @@ -518,6 +528,7 @@ public static double mean(Iterator values) { return mean; } + @J2ktIncompatible @GwtIncompatible // com.google.common.math.DoubleUtils @CanIgnoreReturnValue private static double checkFinite(double argument) { diff --git a/android/guava/src/com/google/common/math/IntMath.java b/android/guava/src/com/google/common/math/IntMath.java index 17a18c69999a..1ceaa7e00e65 100644 --- a/android/guava/src/com/google/common/math/IntMath.java +++ b/android/guava/src/com/google/common/math/IntMath.java @@ -28,6 +28,7 @@ import com.google.common.annotations.Beta; import com.google.common.annotations.GwtCompatible; import com.google.common.annotations.GwtIncompatible; +import com.google.common.annotations.J2ktIncompatible; import com.google.common.annotations.VisibleForTesting; import com.google.common.primitives.Ints; import java.math.BigInteger; @@ -155,6 +156,7 @@ public static int log2(int x, RoundingMode mode) { * @throws ArithmeticException if {@code mode} is {@link RoundingMode#UNNECESSARY} and {@code x} * is not a power of ten */ + @J2ktIncompatible @GwtIncompatible // need BigIntegerMath to adequately test @SuppressWarnings("fallthrough") public static int log10(int x, RoundingMode mode) { @@ -224,6 +226,7 @@ private static int log10Floor(int x) { * * @throws IllegalArgumentException if {@code k < 0} */ + @J2ktIncompatible @GwtIncompatible // failing tests public static int pow(int b, int k) { checkNonNegative("exponent", k); @@ -719,6 +722,7 @@ public static int mean(int x, int y) { * @throws IllegalArgumentException if {@code n} is negative * @since 20.0 */ + @J2ktIncompatible @GwtIncompatible // TODO @Beta public static boolean isPrime(int n) { diff --git a/android/guava/src/com/google/common/math/LinearTransformation.java b/android/guava/src/com/google/common/math/LinearTransformation.java index 4cc1eb87dbe9..1dee78e8b8f6 100644 --- a/android/guava/src/com/google/common/math/LinearTransformation.java +++ b/android/guava/src/com/google/common/math/LinearTransformation.java @@ -20,6 +20,7 @@ import com.google.common.annotations.Beta; import com.google.common.annotations.GwtIncompatible; +import com.google.common.annotations.J2ktIncompatible; import com.google.errorprone.annotations.concurrent.LazyInit; import javax.annotation.CheckForNull; @@ -35,6 +36,7 @@ * @since 20.0 */ @Beta +@J2ktIncompatible @GwtIncompatible @ElementTypesAreNonnullByDefault public abstract class LinearTransformation { diff --git a/android/guava/src/com/google/common/math/LongMath.java b/android/guava/src/com/google/common/math/LongMath.java index f4995133a924..620e2bd48ee6 100644 --- a/android/guava/src/com/google/common/math/LongMath.java +++ b/android/guava/src/com/google/common/math/LongMath.java @@ -28,6 +28,7 @@ import com.google.common.annotations.Beta; import com.google.common.annotations.GwtCompatible; import com.google.common.annotations.GwtIncompatible; +import com.google.common.annotations.J2ktIncompatible; import com.google.common.annotations.VisibleForTesting; import com.google.common.primitives.Longs; import com.google.common.primitives.UnsignedLongs; @@ -157,6 +158,7 @@ public static int log2(long x, RoundingMode mode) { * @throws ArithmeticException if {@code mode} is {@link RoundingMode#UNNECESSARY} and {@code x} * is not a power of ten */ + @J2ktIncompatible @GwtIncompatible // TODO @SuppressWarnings("fallthrough") // TODO(kevinb): remove after this warning is disabled globally @@ -183,6 +185,7 @@ public static int log10(long x, RoundingMode mode) { throw new AssertionError(); } + @J2ktIncompatible @GwtIncompatible // TODO static int log10Floor(long x) { /* @@ -208,6 +211,7 @@ static int log10Floor(long x) { 3, 2, 2, 2, 1, 1, 1, 0, 0, 0 }; + @J2ktIncompatible @GwtIncompatible // TODO @VisibleForTesting static final long[] powersOf10 = { @@ -233,6 +237,7 @@ static int log10Floor(long x) { }; // halfPowersOf10[i] = largest long less than 10^(i + 0.5) + @J2ktIncompatible @GwtIncompatible // TODO @VisibleForTesting static final long[] halfPowersOf10 = { @@ -264,6 +269,7 @@ static int log10Floor(long x) { * * @throws IllegalArgumentException if {@code k < 0} */ + @J2ktIncompatible @GwtIncompatible // TODO public static long pow(long b, int k) { checkNonNegative("exponent", k); @@ -307,6 +313,7 @@ public static long pow(long b, int k) { * @throws ArithmeticException if {@code mode} is {@link RoundingMode#UNNECESSARY} and {@code * sqrt(x)} is not an integer */ + @J2ktIncompatible @GwtIncompatible // TODO public static long sqrt(long x, RoundingMode mode) { checkNonNegative("x", x); @@ -377,6 +384,7 @@ public static long sqrt(long x, RoundingMode mode) { * @throws ArithmeticException if {@code q == 0}, or if {@code mode == UNNECESSARY} and {@code a} * is not an integer multiple of {@code b} */ + @J2ktIncompatible @GwtIncompatible // TODO @SuppressWarnings("fallthrough") public static long divide(long p, long q, RoundingMode mode) { @@ -450,6 +458,7 @@ public static long divide(long p, long q, RoundingMode mode) { * @see * Remainder Operator */ + @J2ktIncompatible @GwtIncompatible // TODO public static int mod(long x, int m) { // Cast is safe because the result is guaranteed in the range [0, m) @@ -474,6 +483,7 @@ public static int mod(long x, int m) { * @see * Remainder Operator */ + @J2ktIncompatible @GwtIncompatible // TODO public static long mod(long x, long m) { if (m <= 0) { @@ -551,6 +561,7 @@ public static long checkedAdd(long a, long b) { * * @throws ArithmeticException if {@code a - b} overflows in signed {@code long} arithmetic */ + @J2ktIncompatible @GwtIncompatible // TODO @SuppressWarnings("ShortCircuitBoolean") public static long checkedSubtract(long a, long b) { @@ -598,6 +609,7 @@ public static long checkedMultiply(long a, long b) { * @throws ArithmeticException if {@code b} to the {@code k}th power overflows in signed {@code * long} arithmetic */ + @J2ktIncompatible @GwtIncompatible // TODO @SuppressWarnings("ShortCircuitBoolean") public static long checkedPow(long b, int k) { @@ -774,6 +786,7 @@ public static long saturatedPow(long b, int k) { * * @throws IllegalArgumentException if {@code n < 0} */ + @J2ktIncompatible @GwtIncompatible // TODO public static long factorial(int n) { checkNonNegative("n", n); @@ -1002,6 +1015,7 @@ public static long mean(long x, long y) { * @throws IllegalArgumentException if {@code n} is negative * @since 20.0 */ + @J2ktIncompatible @GwtIncompatible // TODO @Beta public static boolean isPrime(long n) { @@ -1246,6 +1260,7 @@ private boolean testWitness(long base, long n) { * @since 30.0 */ @SuppressWarnings("deprecation") + @J2ktIncompatible @GwtIncompatible public static double roundToDouble(long x, RoundingMode mode) { // Logic adapted from ToDoubleRounder. diff --git a/android/guava/src/com/google/common/math/PairedStats.java b/android/guava/src/com/google/common/math/PairedStats.java index 31ab9b71966f..82b657f451ee 100644 --- a/android/guava/src/com/google/common/math/PairedStats.java +++ b/android/guava/src/com/google/common/math/PairedStats.java @@ -23,6 +23,7 @@ import com.google.common.annotations.Beta; import com.google.common.annotations.GwtIncompatible; +import com.google.common.annotations.J2ktIncompatible; import com.google.common.base.MoreObjects; import com.google.common.base.Objects; import java.io.Serializable; @@ -38,6 +39,7 @@ * @since 20.0 */ @Beta +@J2ktIncompatible @GwtIncompatible @ElementTypesAreNonnullByDefault public final class PairedStats implements Serializable { diff --git a/android/guava/src/com/google/common/math/PairedStatsAccumulator.java b/android/guava/src/com/google/common/math/PairedStatsAccumulator.java index 072ef13b3b17..f6aa10f3d4fe 100644 --- a/android/guava/src/com/google/common/math/PairedStatsAccumulator.java +++ b/android/guava/src/com/google/common/math/PairedStatsAccumulator.java @@ -21,6 +21,7 @@ import com.google.common.annotations.Beta; import com.google.common.annotations.GwtIncompatible; +import com.google.common.annotations.J2ktIncompatible; import com.google.common.primitives.Doubles; /** @@ -31,6 +32,7 @@ * @since 20.0 */ @Beta +@J2ktIncompatible @GwtIncompatible @ElementTypesAreNonnullByDefault public final class PairedStatsAccumulator { diff --git a/android/guava/src/com/google/common/math/Quantiles.java b/android/guava/src/com/google/common/math/Quantiles.java index 6ddea9bcfdc7..563ec2911752 100644 --- a/android/guava/src/com/google/common/math/Quantiles.java +++ b/android/guava/src/com/google/common/math/Quantiles.java @@ -23,6 +23,7 @@ import com.google.common.annotations.Beta; import com.google.common.annotations.GwtIncompatible; +import com.google.common.annotations.J2ktIncompatible; import com.google.common.primitives.Doubles; import com.google.common.primitives.Ints; import java.math.RoundingMode; @@ -127,6 +128,7 @@ * @since 20.0 */ @Beta +@J2ktIncompatible @GwtIncompatible @ElementTypesAreNonnullByDefault public final class Quantiles { diff --git a/android/guava/src/com/google/common/math/Stats.java b/android/guava/src/com/google/common/math/Stats.java index 7b20b000fa72..a4ee99179dd6 100644 --- a/android/guava/src/com/google/common/math/Stats.java +++ b/android/guava/src/com/google/common/math/Stats.java @@ -26,6 +26,7 @@ import com.google.common.annotations.Beta; import com.google.common.annotations.GwtIncompatible; +import com.google.common.annotations.J2ktIncompatible; import com.google.common.base.MoreObjects; import com.google.common.base.Objects; import java.io.Serializable; @@ -59,6 +60,7 @@ * @since 20.0 */ @Beta +@J2ktIncompatible @GwtIncompatible @ElementTypesAreNonnullByDefault public final class Stats implements Serializable { diff --git a/android/guava/src/com/google/common/math/StatsAccumulator.java b/android/guava/src/com/google/common/math/StatsAccumulator.java index f7d7a629032d..b83e203497f8 100644 --- a/android/guava/src/com/google/common/math/StatsAccumulator.java +++ b/android/guava/src/com/google/common/math/StatsAccumulator.java @@ -22,6 +22,7 @@ import com.google.common.annotations.Beta; import com.google.common.annotations.GwtIncompatible; +import com.google.common.annotations.J2ktIncompatible; import java.util.Iterator; /** @@ -33,6 +34,7 @@ * @since 20.0 */ @Beta +@J2ktIncompatible @GwtIncompatible @ElementTypesAreNonnullByDefault public final class StatsAccumulator { diff --git a/android/guava/src/com/google/common/math/ToDoubleRounder.java b/android/guava/src/com/google/common/math/ToDoubleRounder.java index 2e7e7fae0944..5bfcd12caa80 100644 --- a/android/guava/src/com/google/common/math/ToDoubleRounder.java +++ b/android/guava/src/com/google/common/math/ToDoubleRounder.java @@ -18,12 +18,14 @@ import static com.google.common.math.MathPreconditions.checkRoundingUnnecessary; import com.google.common.annotations.GwtIncompatible; +import com.google.common.annotations.J2ktIncompatible; import java.math.RoundingMode; /** * Helper type to implement rounding {@code X} to a representable {@code double} value according to * a {@link RoundingMode}. */ +@J2ktIncompatible @GwtIncompatible @ElementTypesAreNonnullByDefault abstract class ToDoubleRounder> { diff --git a/android/guava/src/com/google/common/net/HostSpecifier.java b/android/guava/src/com/google/common/net/HostSpecifier.java index c57f3d97593c..65194112ebb8 100644 --- a/android/guava/src/com/google/common/net/HostSpecifier.java +++ b/android/guava/src/com/google/common/net/HostSpecifier.java @@ -15,6 +15,7 @@ package com.google.common.net; import com.google.common.annotations.GwtIncompatible; +import com.google.common.annotations.J2ktIncompatible; import com.google.common.base.Preconditions; import com.google.errorprone.annotations.CanIgnoreReturnValue; import java.net.InetAddress; @@ -41,6 +42,7 @@ * @author Craig Berry * @since 5.0 */ +@J2ktIncompatible @GwtIncompatible @ElementTypesAreNonnullByDefault public final class HostSpecifier { diff --git a/android/guava/src/com/google/common/net/InetAddresses.java b/android/guava/src/com/google/common/net/InetAddresses.java index 012d1c8ab59e..6d83093812d9 100644 --- a/android/guava/src/com/google/common/net/InetAddresses.java +++ b/android/guava/src/com/google/common/net/InetAddresses.java @@ -18,6 +18,7 @@ import static com.google.common.base.Preconditions.checkNotNull; import com.google.common.annotations.GwtIncompatible; +import com.google.common.annotations.J2ktIncompatible; import com.google.common.base.CharMatcher; import com.google.common.base.MoreObjects; import com.google.common.hash.Hashing; @@ -95,6 +96,7 @@ * @author Erik Kline * @since 5.0 */ +@J2ktIncompatible @GwtIncompatible @ElementTypesAreNonnullByDefault public final class InetAddresses { diff --git a/android/guava/src/com/google/common/primitives/Booleans.java b/android/guava/src/com/google/common/primitives/Booleans.java index e637550ad91b..f6bea3d8329d 100644 --- a/android/guava/src/com/google/common/primitives/Booleans.java +++ b/android/guava/src/com/google/common/primitives/Booleans.java @@ -361,9 +361,10 @@ public static boolean[] toArray(Collection collection) { * Arrays#asList(Object[])}. The list supports {@link List#set(int, Object)}, but any attempt to * set a value to {@code null} will result in a {@link NullPointerException}. * - *

    The returned list maintains the values, but not the identities, of {@code Boolean} objects - * written to or read from it. For example, whether {@code list.get(0) == list.get(0)} is true for - * the returned list is unspecified. + *

    There are at most two distinct objects in this list, {@code (Boolean) true} and {@code + * (Boolean) false}. Java guarantees that those are always represented by the same objects. + * + *

    The returned list is serializable. * * @param backingArray the array to back the list * @return a list view of the array diff --git a/android/guava/src/com/google/common/primitives/Bytes.java b/android/guava/src/com/google/common/primitives/Bytes.java index 11832742e5fa..0ab0328fbf6d 100644 --- a/android/guava/src/com/google/common/primitives/Bytes.java +++ b/android/guava/src/com/google/common/primitives/Bytes.java @@ -227,6 +227,8 @@ public static byte[] toArray(Collection collection) { * written to or read from it. For example, whether {@code list.get(0) == list.get(0)} is true for * the returned list is unspecified. * + *

    The returned list is serializable. + * * @param backingArray the array to back the list * @return a list view of the array */ diff --git a/android/guava/src/com/google/common/primitives/Chars.java b/android/guava/src/com/google/common/primitives/Chars.java index c677021f1aa4..67fb77ed9d83 100644 --- a/android/guava/src/com/google/common/primitives/Chars.java +++ b/android/guava/src/com/google/common/primitives/Chars.java @@ -547,6 +547,8 @@ public static void rotate(char[] array, int distance, int fromIndex, int toIndex * written to or read from it. For example, whether {@code list.get(0) == list.get(0)} is true for * the returned list is unspecified. * + *

    The returned list is serializable. + * * @param backingArray the array to back the list * @return a list view of the array */ diff --git a/android/guava/src/com/google/common/primitives/Doubles.java b/android/guava/src/com/google/common/primitives/Doubles.java index c6bf2f138723..605ca2109271 100644 --- a/android/guava/src/com/google/common/primitives/Doubles.java +++ b/android/guava/src/com/google/common/primitives/Doubles.java @@ -557,6 +557,8 @@ public static double[] toArray(Collection collection) { *

    The returned list may have unexpected behavior if it contains {@code NaN}, or if {@code NaN} * is used as a parameter to any of its methods. * + *

    The returned list is serializable. + * *

    Note: when possible, you should represent your data as an {@link * ImmutableDoubleArray} instead, which has an {@link ImmutableDoubleArray#asList asList} view. * @@ -751,7 +753,6 @@ public String toString() { * @throws NullPointerException if {@code string} is {@code null} * @since 14.0 */ - @Beta @GwtIncompatible // regular expressions @CheckForNull public static Double tryParse(String string) { diff --git a/android/guava/src/com/google/common/primitives/Floats.java b/android/guava/src/com/google/common/primitives/Floats.java index a9a44d6e3532..1ea5fb20dad3 100644 --- a/android/guava/src/com/google/common/primitives/Floats.java +++ b/android/guava/src/com/google/common/primitives/Floats.java @@ -554,6 +554,8 @@ public static float[] toArray(Collection collection) { *

    The returned list may have unexpected behavior if it contains {@code NaN}, or if {@code NaN} * is used as a parameter to any of its methods. * + *

    The returned list is serializable. + * * @param backingArray the array to back the list * @return a list view of the array */ @@ -710,7 +712,6 @@ float[] toFloatArray() { * @throws NullPointerException if {@code string} is {@code null} * @since 14.0 */ - @Beta @GwtIncompatible // regular expressions @CheckForNull public static Float tryParse(String string) { diff --git a/android/guava/src/com/google/common/primitives/Ints.java b/android/guava/src/com/google/common/primitives/Ints.java index f840e9042db3..25b673ad29a5 100644 --- a/android/guava/src/com/google/common/primitives/Ints.java +++ b/android/guava/src/com/google/common/primitives/Ints.java @@ -623,6 +623,8 @@ public static int[] toArray(Collection collection) { * written to or read from it. For example, whether {@code list.get(0) == list.get(0)} is true for * the returned list is unspecified. * + *

    The returned list is serializable. + * *

    Note: when possible, you should represent your data as an {@link ImmutableIntArray} * instead, which has an {@link ImmutableIntArray#asList asList} view. * @@ -782,7 +784,6 @@ int[] toIntArray() { * @throws NullPointerException if {@code string} is {@code null} * @since 11.0 */ - @Beta @CheckForNull public static Integer tryParse(String string) { return tryParse(string, 10); @@ -808,7 +809,6 @@ public static Integer tryParse(String string) { * @throws NullPointerException if {@code string} is {@code null} * @since 19.0 */ - @Beta @CheckForNull public static Integer tryParse(String string, int radix) { Long result = Longs.tryParse(string, radix); diff --git a/android/guava/src/com/google/common/primitives/Longs.java b/android/guava/src/com/google/common/primitives/Longs.java index 6bfcc02c0867..85b01fba4287 100644 --- a/android/guava/src/com/google/common/primitives/Longs.java +++ b/android/guava/src/com/google/common/primitives/Longs.java @@ -361,7 +361,6 @@ static int digit(char c) { * @throws NullPointerException if {@code string} is {@code null} * @since 14.0 */ - @Beta @CheckForNull public static Long tryParse(String string) { return tryParse(string, 10); @@ -387,7 +386,6 @@ public static Long tryParse(String string) { * @throws NullPointerException if {@code string} is {@code null} * @since 19.0 */ - @Beta @CheckForNull public static Long tryParse(String string, int radix) { if (checkNotNull(string).isEmpty()) { @@ -693,6 +691,8 @@ public static long[] toArray(Collection collection) { * written to or read from it. For example, whether {@code list.get(0) == list.get(0)} is true for * the returned list is unspecified. * + *

    The returned list is serializable. + * *

    Note: when possible, you should represent your data as an {@link ImmutableLongArray} * instead, which has an {@link ImmutableLongArray#asList asList} view. * diff --git a/android/guava/src/com/google/common/primitives/Shorts.java b/android/guava/src/com/google/common/primitives/Shorts.java index a53108672134..5713adcf4325 100644 --- a/android/guava/src/com/google/common/primitives/Shorts.java +++ b/android/guava/src/com/google/common/primitives/Shorts.java @@ -599,6 +599,8 @@ public static short[] toArray(Collection collection) { * written to or read from it. For example, whether {@code list.get(0) == list.get(0)} is true for * the returned list is unspecified. * + *

    The returned list is serializable. + * * @param backingArray the array to back the list * @return a list view of the array */ diff --git a/android/guava/src/com/google/common/primitives/UnsignedBytes.java b/android/guava/src/com/google/common/primitives/UnsignedBytes.java index db4f489e491f..becd6b8e9491 100644 --- a/android/guava/src/com/google/common/primitives/UnsignedBytes.java +++ b/android/guava/src/com/google/common/primitives/UnsignedBytes.java @@ -21,6 +21,7 @@ import com.google.common.annotations.Beta; import com.google.common.annotations.GwtIncompatible; +import com.google.common.annotations.J2ktIncompatible; import com.google.common.annotations.VisibleForTesting; import com.google.errorprone.annotations.CanIgnoreReturnValue; import java.nio.ByteOrder; @@ -43,6 +44,7 @@ * @author Louis Wasserman * @since 1.0 */ +@J2ktIncompatible @GwtIncompatible @ElementTypesAreNonnullByDefault public final class UnsignedBytes { diff --git a/android/guava/src/com/google/common/primitives/UnsignedInteger.java b/android/guava/src/com/google/common/primitives/UnsignedInteger.java index 0b30cef3f4c6..52b05e4e7dd1 100644 --- a/android/guava/src/com/google/common/primitives/UnsignedInteger.java +++ b/android/guava/src/com/google/common/primitives/UnsignedInteger.java @@ -22,6 +22,7 @@ import com.google.common.annotations.GwtCompatible; import com.google.common.annotations.GwtIncompatible; +import com.google.common.annotations.J2ktIncompatible; import java.math.BigInteger; import javax.annotation.CheckForNull; @@ -143,6 +144,7 @@ public UnsignedInteger minus(UnsignedInteger val) { * * @since 14.0 */ + @J2ktIncompatible @GwtIncompatible // Does not truncate correctly public UnsignedInteger times(UnsignedInteger val) { // TODO(lowasser): make this GWT-compatible diff --git a/android/guava/src/com/google/common/primitives/UnsignedLongs.java b/android/guava/src/com/google/common/primitives/UnsignedLongs.java index 31c51cc3464d..04631ee9d3c7 100644 --- a/android/guava/src/com/google/common/primitives/UnsignedLongs.java +++ b/android/guava/src/com/google/common/primitives/UnsignedLongs.java @@ -18,7 +18,6 @@ import static com.google.common.base.Preconditions.checkNotNull; import static com.google.common.base.Preconditions.checkPositionIndexes; -import com.google.common.annotations.Beta; import com.google.common.annotations.GwtCompatible; import com.google.errorprone.annotations.CanIgnoreReturnValue; import java.math.BigInteger; @@ -48,7 +47,6 @@ * @author Colin Evans * @since 10.0 */ -@Beta @GwtCompatible @ElementTypesAreNonnullByDefault public final class UnsignedLongs { diff --git a/android/guava/src/com/google/common/reflect/IgnoreJRERequirement.java b/android/guava/src/com/google/common/reflect/IgnoreJRERequirement.java new file mode 100644 index 000000000000..8b03ca33209b --- /dev/null +++ b/android/guava/src/com/google/common/reflect/IgnoreJRERequirement.java @@ -0,0 +1,30 @@ +/* + * Copyright 2019 The Guava Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ + +package com.google.common.reflect; + +import static java.lang.annotation.ElementType.CONSTRUCTOR; +import static java.lang.annotation.ElementType.METHOD; +import static java.lang.annotation.ElementType.TYPE; + +import java.lang.annotation.Target; + +/** + * Disables Animal Sniffer's checking of compatibility with older versions of Java/Android. + * + *

    Each package's copy of this annotation needs to be listed in our {@code pom.xml}. + */ +@Target({METHOD, CONSTRUCTOR, TYPE}) +@ElementTypesAreNonnullByDefault +@interface IgnoreJRERequirement {} diff --git a/android/guava/src/com/google/common/reflect/Invokable.java b/android/guava/src/com/google/common/reflect/Invokable.java index 8e75aa856a3e..236c29627441 100644 --- a/android/guava/src/com/google/common/reflect/Invokable.java +++ b/android/guava/src/com/google/common/reflect/Invokable.java @@ -19,9 +19,11 @@ import com.google.common.annotations.Beta; import com.google.common.collect.ImmutableList; import com.google.errorprone.annotations.CanIgnoreReturnValue; +import com.google.errorprone.annotations.DoNotCall; import java.lang.annotation.Annotation; import java.lang.reflect.AccessibleObject; import java.lang.reflect.AnnotatedElement; +import java.lang.reflect.AnnotatedType; import java.lang.reflect.Constructor; import java.lang.reflect.InvocationTargetException; import java.lang.reflect.Member; @@ -62,7 +64,6 @@ * @since 14.0 (no longer implements {@link AccessibleObject} or {@code GenericDeclaration} since * 31.0) */ -@Beta @ElementTypesAreNonnullByDefault public abstract class Invokable implements AnnotatedElement, Member { private final AccessibleObject accessibleObject; @@ -272,12 +273,17 @@ public final TypeToken getReturnType() { * of a non-static inner class, unlike {@link Constructor#getParameterTypes}, the hidden {@code * this} parameter of the enclosing class is excluded from the returned parameters. */ + @IgnoreJRERequirement public final ImmutableList getParameters() { Type[] parameterTypes = getGenericParameterTypes(); Annotation[][] annotations = getParameterAnnotations(); + @Nullable Object[] annotatedTypes = + ANNOTATED_TYPE_EXISTS ? getAnnotatedParameterTypes() : new Object[parameterTypes.length]; ImmutableList.Builder builder = ImmutableList.builder(); for (int i = 0; i < parameterTypes.length; i++) { - builder.add(new Parameter(this, i, TypeToken.of(parameterTypes[i]), annotations[i])); + builder.add( + new Parameter( + this, i, TypeToken.of(parameterTypes[i]), annotations[i], annotatedTypes[i])); } return builder.build(); } @@ -337,6 +343,10 @@ abstract Object invokeInternal(@CheckForNull Object receiver, @Nullable Object[] abstract Type[] getGenericParameterTypes(); + @SuppressWarnings({"Java7ApiChecker", "AndroidJdkLibsChecker"}) + @IgnoreJRERequirement + abstract AnnotatedType[] getAnnotatedParameterTypes(); + /** This should never return a type that's not a subtype of Throwable. */ abstract Type[] getGenericExceptionTypes(); @@ -344,6 +354,22 @@ abstract Object invokeInternal(@CheckForNull Object receiver, @Nullable Object[] abstract Type getGenericReturnType(); + /** + * Returns the {@link AnnotatedType} for the return type. + * + *

    This method will fail if run under an Android VM. + * + * @since NEXT for guava-android (available since 14.0 in guava-jre) + * @deprecated This method does not work under Android VMs. It is safe to use from guava-jre, but + * this copy in guava-android is not safe to use. + */ + @SuppressWarnings({"Java7ApiChecker", "AndroidJdkLibsChecker"}) + @DoNotCall("fails under Android VMs; do not use from guava-android") + @Deprecated + @IgnoreJRERequirement + @Beta + public abstract AnnotatedType getAnnotatedReturnType(); + static class MethodInvokable extends Invokable { final Method method; @@ -370,6 +396,21 @@ Type[] getGenericParameterTypes() { return method.getGenericParameterTypes(); } + @Override + @SuppressWarnings({"Java7ApiChecker", "AndroidJdkLibsChecker"}) + @IgnoreJRERequirement + AnnotatedType[] getAnnotatedParameterTypes() { + return method.getAnnotatedParameterTypes(); + } + + @Override + @SuppressWarnings({"Java7ApiChecker", "AndroidJdkLibsChecker", "DoNotCall"}) + @DoNotCall + @IgnoreJRERequirement + public AnnotatedType getAnnotatedReturnType() { + return method.getAnnotatedReturnType(); + } + @Override Type[] getGenericExceptionTypes() { return method.getGenericExceptionTypes(); @@ -447,6 +488,21 @@ Type[] getGenericParameterTypes() { return types; } + @Override + @SuppressWarnings({"Java7ApiChecker", "AndroidJdkLibsChecker"}) + @IgnoreJRERequirement + AnnotatedType[] getAnnotatedParameterTypes() { + return constructor.getAnnotatedParameterTypes(); + } + + @Override + @SuppressWarnings({"Java7ApiChecker", "AndroidJdkLibsChecker", "DoNotCall"}) + @DoNotCall + @IgnoreJRERequirement + public AnnotatedType getAnnotatedReturnType() { + return constructor.getAnnotatedReturnType(); + } + @Override Type[] getGenericExceptionTypes() { return constructor.getGenericExceptionTypes(); @@ -510,4 +566,15 @@ private boolean mayNeedHiddenThis() { } } } + + private static final boolean ANNOTATED_TYPE_EXISTS = initAnnotatedTypeExists(); + + private static boolean initAnnotatedTypeExists() { + try { + Class.forName("java.lang.reflect.AnnotatedType"); + } catch (ClassNotFoundException e) { + return false; + } + return true; + } } diff --git a/android/guava/src/com/google/common/reflect/MutableTypeToInstanceMap.java b/android/guava/src/com/google/common/reflect/MutableTypeToInstanceMap.java index 9542e0a7ed51..7690d2eef928 100644 --- a/android/guava/src/com/google/common/reflect/MutableTypeToInstanceMap.java +++ b/android/guava/src/com/google/common/reflect/MutableTypeToInstanceMap.java @@ -27,47 +27,45 @@ import java.util.Map; import java.util.Set; import javax.annotation.CheckForNull; +import org.checkerframework.checker.nullness.qual.NonNull; import org.checkerframework.checker.nullness.qual.Nullable; /** * A mutable type-to-instance map. See also {@link ImmutableTypeToInstanceMap}. * - *

    This implementation does support null values, despite how it is annotated; see - * discussion at {@link TypeToInstanceMap}. - * * @author Ben Yu * @since 13.0 */ @ElementTypesAreNonnullByDefault -public final class MutableTypeToInstanceMap extends ForwardingMap, B> - implements TypeToInstanceMap { +public final class MutableTypeToInstanceMap + extends ForwardingMap, B> implements TypeToInstanceMap { - private final Map, B> backingMap = Maps.newHashMap(); + private final Map, B> backingMap = Maps.newHashMap(); @Override @CheckForNull - public T getInstance(Class type) { + public T getInstance(Class type) { return trustedGet(TypeToken.of(type)); } @Override @CheckForNull - public T getInstance(TypeToken type) { + public T getInstance(TypeToken type) { return trustedGet(type.rejectTypeVariables()); } @Override @CanIgnoreReturnValue @CheckForNull - public T putInstance(Class type, T value) { + public T putInstance(Class<@NonNull T> type, @ParametricNullness T value) { return trustedPut(TypeToken.of(type), value); } @Override @CanIgnoreReturnValue @CheckForNull - public T putInstance(TypeToken type, T value) { - return trustedPut(type.rejectTypeVariables(), value); + public T putInstance(TypeToken<@NonNull T> type, @ParametricNullness T value) { + return this.trustedPut(type.rejectTypeVariables(), value); } /** @@ -81,7 +79,7 @@ public T putInstance(TypeToken type, T value) { @Override @DoNotCall("Always throws UnsupportedOperationException") @CheckForNull - public B put(TypeToken key, B value) { + public B put(TypeToken key, @ParametricNullness B value) { throw new UnsupportedOperationException("Please use putInstance() instead."); } @@ -94,37 +92,39 @@ public B put(TypeToken key, B value) { @Deprecated @Override @DoNotCall("Always throws UnsupportedOperationException") - public void putAll(Map, ? extends B> map) { + public void putAll(Map, ? extends B> map) { throw new UnsupportedOperationException("Please use putInstance() instead."); } @Override - public Set, B>> entrySet() { + public Set, B>> entrySet() { return UnmodifiableEntry.transformEntries(super.entrySet()); } @Override - protected Map, B> delegate() { + protected Map, B> delegate() { return backingMap; } @SuppressWarnings("unchecked") // value could not get in if not a T @CheckForNull - private T trustedPut(TypeToken type, T value) { + private T trustedPut(TypeToken<@NonNull T> type, @ParametricNullness T value) { return (T) backingMap.put(type, value); } @SuppressWarnings("unchecked") // value could not get in if not a T @CheckForNull - private T trustedGet(TypeToken type) { + private T trustedGet(TypeToken type) { return (T) backingMap.get(type); } - private static final class UnmodifiableEntry extends ForwardingMapEntry { + private static final class UnmodifiableEntry + extends ForwardingMapEntry { private final Entry delegate; - static Set> transformEntries(Set> entries) { + static Set> transformEntries( + Set> entries) { return new ForwardingSet>() { @Override protected Set> delegate() { @@ -157,7 +157,8 @@ public Object[] toArray() { }; } - private static Iterator> transformEntries(Iterator> entries) { + private static Iterator> transformEntries( + Iterator> entries) { return Iterators.transform(entries, UnmodifiableEntry::new); } @@ -171,7 +172,8 @@ protected Entry delegate() { } @Override - public V setValue(V value) { + @ParametricNullness + public V setValue(@ParametricNullness V value) { throw new UnsupportedOperationException(); } } diff --git a/android/guava/src/com/google/common/reflect/Parameter.java b/android/guava/src/com/google/common/reflect/Parameter.java index a5be09d41d70..efe429110b42 100644 --- a/android/guava/src/com/google/common/reflect/Parameter.java +++ b/android/guava/src/com/google/common/reflect/Parameter.java @@ -15,12 +15,15 @@ package com.google.common.reflect; import static com.google.common.base.Preconditions.checkNotNull; +import static java.util.Objects.requireNonNull; import com.google.common.annotations.Beta; import com.google.common.collect.FluentIterable; import com.google.common.collect.ImmutableList; +import com.google.errorprone.annotations.DoNotCall; import java.lang.annotation.Annotation; import java.lang.reflect.AnnotatedElement; +import java.lang.reflect.AnnotatedType; import javax.annotation.CheckForNull; import org.checkerframework.checker.nullness.qual.Nullable; @@ -43,12 +46,26 @@ public final class Parameter implements AnnotatedElement { private final TypeToken type; private final ImmutableList annotations; + /** + * An {@link AnnotatedType} instance, or {@code null} under Android VMs (possible only when using + * the Android flavor of Guava). The field is declared with a type of {@code Object} to avoid + * compatibility problems on Android VMs. The corresponding accessor method, however, can have the + * more specific return type as long as users are careful to guard calls to it with version checks + * or reflection: Android VMs ignore the types of elements that aren't used. + */ + private final @Nullable Object annotatedType; + Parameter( - Invokable declaration, int position, TypeToken type, Annotation[] annotations) { + Invokable declaration, + int position, + TypeToken type, + Annotation[] annotations, + @Nullable Object annotatedType) { this.declaration = declaration; this.position = position; this.type = type; this.annotations = ImmutableList.copyOf(annotations); + this.annotatedType = annotatedType; } /** Returns the type of the parameter. */ @@ -83,29 +100,34 @@ public Annotation[] getAnnotations() { return getDeclaredAnnotations(); } - /** @since 18.0 */ - // @Override on JDK8 + /** + * @since 18.0 + */ + @Override public A[] getAnnotationsByType(Class annotationType) { return getDeclaredAnnotationsByType(annotationType); } /** @since 18.0 */ - // @Override on JDK8 @Override public Annotation[] getDeclaredAnnotations() { return annotations.toArray(new Annotation[0]); } - /** @since 18.0 */ - // @Override on JDK8 + /** + * @since 18.0 + */ + @Override @CheckForNull public A getDeclaredAnnotation(Class annotationType) { checkNotNull(annotationType); return FluentIterable.from(annotations).filter(annotationType).first().orNull(); } - /** @since 18.0 */ - // @Override on JDK8 + /** + * @since 18.0 + */ + @Override public A[] getDeclaredAnnotationsByType(Class annotationType) { @Nullable A[] result = FluentIterable.from(annotations).filter(annotationType).toArray(annotationType); @@ -114,6 +136,23 @@ public A[] getDeclaredAnnotationsByType(Class annotati return cast; } + /** + * Returns the {@link AnnotatedType} of the parameter. + * + *

    This method will fail if run under an Android VM. + * + * @since NEXT for guava-android (available since 25.1 in guava-jre) + * @deprecated This method does not work under Android VMs. It is safe to use from guava-jre, but + * this copy in guava-android is not safe to use. + */ + @SuppressWarnings({"Java7ApiChecker", "AndroidJdkLibsChecker"}) + @Deprecated + @DoNotCall("fails under Android VMs; do not use from guava-android") + @IgnoreJRERequirement + public AnnotatedType getAnnotatedType() { + return requireNonNull((AnnotatedType) annotatedType); + } + @Override public boolean equals(@CheckForNull Object obj) { if (obj instanceof Parameter) { diff --git a/android/guava/src/com/google/common/reflect/TypeToInstanceMap.java b/android/guava/src/com/google/common/reflect/TypeToInstanceMap.java index 0134dffcb036..fe61a2cc510b 100644 --- a/android/guava/src/com/google/common/reflect/TypeToInstanceMap.java +++ b/android/guava/src/com/google/common/reflect/TypeToInstanceMap.java @@ -18,6 +18,8 @@ import com.google.errorprone.annotations.DoNotMock; import java.util.Map; import javax.annotation.CheckForNull; +import org.checkerframework.checker.nullness.qual.NonNull; +import org.checkerframework.checker.nullness.qual.Nullable; /** * A map, each entry of which maps a {@link TypeToken} to an instance of that type. In addition to @@ -34,17 +36,14 @@ *

    Like any other {@code Map}, this map may contain entries for primitive types, * and a primitive type and its corresponding wrapper type may map to different values. * - *

    This class's support for {@code null} requires some explanation. For details, see {@link - * com.google.common.collect.ClassToInstanceMap}. Its explanation applies equally well to {@code - * TypeToInstanceMap}. - * * @param the common supertype that all entries must share; often this is simply {@link Object} * @author Ben Yu * @since 13.0 */ @DoNotMock("Use ImmutableTypeToInstanceMap or MutableTypeToInstanceMap") @ElementTypesAreNonnullByDefault -public interface TypeToInstanceMap extends Map, B> { +public interface TypeToInstanceMap + extends Map, B> { /** * Returns the value the specified class is mapped to, or {@code null} if no entry for this class @@ -55,7 +54,7 @@ public interface TypeToInstanceMap extends Map, B> { * getInstance(TypeToken.of(Foo.class))}. */ @CheckForNull - T getInstance(Class type); + T getInstance(Class type); /** * Returns the value the specified type is mapped to, or {@code null} if no entry for this type is @@ -63,7 +62,7 @@ public interface TypeToInstanceMap extends Map, B> { * may have been bound to a subtype. */ @CheckForNull - T getInstance(TypeToken type); + T getInstance(TypeToken type); /** * Maps the specified class to the specified value. Does not associate this value with any @@ -77,7 +76,7 @@ public interface TypeToInstanceMap extends Map, B> { */ @CanIgnoreReturnValue @CheckForNull - T putInstance(Class type, T value); + T putInstance(Class<@NonNull T> type, @ParametricNullness T value); /** * Maps the specified type to the specified value. Does not associate this value with any @@ -88,5 +87,5 @@ public interface TypeToInstanceMap extends Map, B> { */ @CanIgnoreReturnValue @CheckForNull - T putInstance(TypeToken type, T value); + T putInstance(TypeToken<@NonNull T> type, @ParametricNullness T value); } diff --git a/android/guava/src/com/google/common/reflect/TypeToken.java b/android/guava/src/com/google/common/reflect/TypeToken.java index 1ec9e28506cb..8abec1a57cab 100644 --- a/android/guava/src/com/google/common/reflect/TypeToken.java +++ b/android/guava/src/com/google/common/reflect/TypeToken.java @@ -19,7 +19,6 @@ import static com.google.common.base.Preconditions.checkState; import static java.util.Objects.requireNonNull; -import com.google.common.annotations.Beta; import com.google.common.annotations.VisibleForTesting; import com.google.common.base.Joiner; import com.google.common.base.Predicate; @@ -590,7 +589,6 @@ public final TypeToken getComponentType() { * * @since 14.0 */ - @Beta public final Invokable method(Method method) { checkArgument( this.someRawTypeIsSubclassOf(method.getDeclaringClass()), @@ -630,7 +628,6 @@ public String toString() { * * @since 14.0 */ - @Beta public final Invokable constructor(Constructor constructor) { checkArgument( constructor.getDeclaringClass() == getRawType(), diff --git a/android/guava/src/com/google/common/util/concurrent/AbstractExecutionThreadService.java b/android/guava/src/com/google/common/util/concurrent/AbstractExecutionThreadService.java index 86691539cff8..455d8a1b9e09 100644 --- a/android/guava/src/com/google/common/util/concurrent/AbstractExecutionThreadService.java +++ b/android/guava/src/com/google/common/util/concurrent/AbstractExecutionThreadService.java @@ -18,7 +18,7 @@ import com.google.common.annotations.Beta; import com.google.common.annotations.GwtIncompatible; -import com.google.common.base.Supplier; +import com.google.common.annotations.J2ktIncompatible; import com.google.errorprone.annotations.CanIgnoreReturnValue; import java.util.concurrent.Executor; import java.util.concurrent.TimeUnit; @@ -35,6 +35,7 @@ * @since 1.0 */ @GwtIncompatible +@J2ktIncompatible @ElementTypesAreNonnullByDefault public abstract class AbstractExecutionThreadService implements Service { private static final Logger logger = @@ -45,52 +46,41 @@ public abstract class AbstractExecutionThreadService implements Service { new AbstractService() { @Override protected final void doStart() { - Executor executor = - MoreExecutors.renamingDecorator( - executor(), - new Supplier() { - @Override - public String get() { - return serviceName(); - } - }); + Executor executor = MoreExecutors.renamingDecorator(executor(), () -> serviceName()); executor.execute( - new Runnable() { - @Override - public void run() { - try { - startUp(); - notifyStarted(); - // If stopAsync() is called while starting we may be in the STOPPING state in - // which case we should skip right down to shutdown. - if (isRunning()) { + () -> { + try { + startUp(); + notifyStarted(); + // If stopAsync() is called while starting we may be in the STOPPING state in + // which case we should skip right down to shutdown. + if (isRunning()) { + try { + AbstractExecutionThreadService.this.run(); + } catch (Throwable t) { + restoreInterruptIfIsInterruptedException(t); try { - AbstractExecutionThreadService.this.run(); - } catch (Throwable t) { - restoreInterruptIfIsInterruptedException(t); - try { - shutDown(); - } catch (Exception ignored) { - restoreInterruptIfIsInterruptedException(ignored); - // TODO(lukes): if guava ever moves to java7, this would be a good - // candidate for a suppressed exception, or maybe we could generalize - // Closer.Suppressor - logger.log( - Level.WARNING, - "Error while attempting to shut down the service after failure.", - ignored); - } - notifyFailed(t); - return; + shutDown(); + } catch (Exception ignored) { + restoreInterruptIfIsInterruptedException(ignored); + // TODO(lukes): if guava ever moves to java7, this would be a good + // candidate for a suppressed exception, or maybe we could generalize + // Closer.Suppressor + logger.log( + Level.WARNING, + "Error while attempting to shut down the service after failure.", + ignored); } + notifyFailed(t); + return; } - - shutDown(); - notifyStopped(); - } catch (Throwable t) { - restoreInterruptIfIsInterruptedException(t); - notifyFailed(t); } + + shutDown(); + notifyStopped(); + } catch (Throwable t) { + restoreInterruptIfIsInterruptedException(t); + notifyFailed(t); } }); } @@ -166,12 +156,7 @@ protected void triggerShutdown() {} * to the string returned by {@link #serviceName} */ protected Executor executor() { - return new Executor() { - @Override - public void execute(Runnable command) { - MoreExecutors.newThread(serviceName(), command).start(); - } - }; + return command -> MoreExecutors.newThread(serviceName(), command).start(); } @Override diff --git a/android/guava/src/com/google/common/util/concurrent/AbstractIdleService.java b/android/guava/src/com/google/common/util/concurrent/AbstractIdleService.java index dab8b446f4e9..0bf690a56728 100644 --- a/android/guava/src/com/google/common/util/concurrent/AbstractIdleService.java +++ b/android/guava/src/com/google/common/util/concurrent/AbstractIdleService.java @@ -17,6 +17,7 @@ import static com.google.common.util.concurrent.Platform.restoreInterruptIfIsInterruptedException; import com.google.common.annotations.GwtIncompatible; +import com.google.common.annotations.J2ktIncompatible; import com.google.common.base.Supplier; import com.google.errorprone.annotations.CanIgnoreReturnValue; import com.google.j2objc.annotations.WeakOuter; @@ -33,6 +34,7 @@ * @since 1.0 */ @GwtIncompatible +@J2ktIncompatible @ElementTypesAreNonnullByDefault public abstract class AbstractIdleService implements Service { @@ -56,16 +58,13 @@ private final class DelegateService extends AbstractService { protected final void doStart() { MoreExecutors.renamingDecorator(executor(), threadNameSupplier) .execute( - new Runnable() { - @Override - public void run() { - try { - startUp(); - notifyStarted(); - } catch (Throwable t) { - restoreInterruptIfIsInterruptedException(t); - notifyFailed(t); - } + () -> { + try { + startUp(); + notifyStarted(); + } catch (Throwable t) { + restoreInterruptIfIsInterruptedException(t); + notifyFailed(t); } }); } @@ -74,16 +73,13 @@ public void run() { protected final void doStop() { MoreExecutors.renamingDecorator(executor(), threadNameSupplier) .execute( - new Runnable() { - @Override - public void run() { - try { - shutDown(); - notifyStopped(); - } catch (Throwable t) { - restoreInterruptIfIsInterruptedException(t); - notifyFailed(t); - } + () -> { + try { + shutDown(); + notifyStopped(); + } catch (Throwable t) { + restoreInterruptIfIsInterruptedException(t); + notifyFailed(t); } }); } @@ -111,12 +107,7 @@ protected AbstractIdleService() {} * stopped, and should return promptly. */ protected Executor executor() { - return new Executor() { - @Override - public void execute(Runnable command) { - MoreExecutors.newThread(threadNameSupplier.get(), command).start(); - } - }; + return command -> MoreExecutors.newThread(threadNameSupplier.get(), command).start(); } @Override diff --git a/android/guava/src/com/google/common/util/concurrent/AbstractListeningExecutorService.java b/android/guava/src/com/google/common/util/concurrent/AbstractListeningExecutorService.java index f6dad81807c6..72334be2e033 100644 --- a/android/guava/src/com/google/common/util/concurrent/AbstractListeningExecutorService.java +++ b/android/guava/src/com/google/common/util/concurrent/AbstractListeningExecutorService.java @@ -16,6 +16,7 @@ import com.google.common.annotations.Beta; import com.google.common.annotations.GwtIncompatible; +import com.google.common.annotations.J2ktIncompatible; import com.google.errorprone.annotations.CanIgnoreReturnValue; import com.google.errorprone.annotations.CheckReturnValue; import java.util.concurrent.AbstractExecutorService; @@ -37,6 +38,7 @@ @CheckReturnValue @Beta @GwtIncompatible +@J2ktIncompatible @ElementTypesAreNonnullByDefault public abstract class AbstractListeningExecutorService extends AbstractExecutorService implements ListeningExecutorService { diff --git a/android/guava/src/com/google/common/util/concurrent/AbstractScheduledService.java b/android/guava/src/com/google/common/util/concurrent/AbstractScheduledService.java index 639fd7409943..0b7d34e6ba4d 100644 --- a/android/guava/src/com/google/common/util/concurrent/AbstractScheduledService.java +++ b/android/guava/src/com/google/common/util/concurrent/AbstractScheduledService.java @@ -22,7 +22,7 @@ import static java.util.Objects.requireNonNull; import com.google.common.annotations.GwtIncompatible; -import com.google.common.base.Supplier; +import com.google.common.annotations.J2ktIncompatible; import com.google.errorprone.annotations.CanIgnoreReturnValue; import com.google.errorprone.annotations.concurrent.GuardedBy; import com.google.j2objc.annotations.WeakOuter; @@ -99,6 +99,7 @@ * @since 11.0 */ @GwtIncompatible +@J2ktIncompatible @ElementTypesAreNonnullByDefault public abstract class AbstractScheduledService implements Service { private static final Logger logger = Logger.getLogger(AbstractScheduledService.class.getName()); @@ -227,33 +228,28 @@ public void run() { @Override protected final void doStart() { executorService = - MoreExecutors.renamingDecorator( - executor(), - new Supplier() { - @Override - public String get() { - return serviceName() + " " + state(); - } - }); + MoreExecutors.renamingDecorator(executor(), () -> serviceName() + " " + state()); executorService.execute( - new Runnable() { - @Override - public void run() { - lock.lock(); - try { - startUp(); - runningTask = scheduler().schedule(delegate, executorService, task); - notifyStarted(); - } catch (Throwable t) { - restoreInterruptIfIsInterruptedException(t); - notifyFailed(t); - if (runningTask != null) { - // prevent the task from running if possible - runningTask.cancel(false); - } - } finally { - lock.unlock(); + () -> { + lock.lock(); + try { + startUp(); + /* + * requireNonNull is safe because executorService is never cleared after the + * assignment above. + */ + requireNonNull(executorService); + runningTask = scheduler().schedule(delegate, executorService, task); + notifyStarted(); + } catch (Throwable t) { + restoreInterruptIfIsInterruptedException(t); + notifyFailed(t); + if (runningTask != null) { + // prevent the task from running if possible + runningTask.cancel(false); } + } finally { + lock.unlock(); } }); } @@ -265,28 +261,25 @@ protected final void doStop() { requireNonNull(executorService); runningTask.cancel(false); executorService.execute( - new Runnable() { - @Override - public void run() { + () -> { + try { + lock.lock(); try { - lock.lock(); - try { - if (state() != State.STOPPING) { - // This means that the state has changed since we were scheduled. This implies - // that an execution of runOneIteration has thrown an exception and we have - // transitioned to a failed state, also this means that shutDown has already - // been called, so we do not want to call it again. - return; - } - shutDown(); - } finally { - lock.unlock(); + if (state() != State.STOPPING) { + // This means that the state has changed since we were scheduled. This implies + // that an execution of runOneIteration has thrown an exception and we have + // transitioned to a failed state, also this means that shutDown has already + // been called, so we do not want to call it again. + return; } - notifyStopped(); - } catch (Throwable t) { - restoreInterruptIfIsInterruptedException(t); - notifyFailed(t); + shutDown(); + } finally { + lock.unlock(); } + notifyStopped(); + } catch (Throwable t) { + restoreInterruptIfIsInterruptedException(t); + notifyFailed(t); } }); } diff --git a/android/guava/src/com/google/common/util/concurrent/AbstractService.java b/android/guava/src/com/google/common/util/concurrent/AbstractService.java index bd62643974ef..a7c474c02d25 100644 --- a/android/guava/src/com/google/common/util/concurrent/AbstractService.java +++ b/android/guava/src/com/google/common/util/concurrent/AbstractService.java @@ -28,6 +28,7 @@ import com.google.common.annotations.Beta; import com.google.common.annotations.GwtIncompatible; +import com.google.common.annotations.J2ktIncompatible; import com.google.common.util.concurrent.Monitor.Guard; import com.google.common.util.concurrent.Service.State; // javadoc needs this import com.google.errorprone.annotations.CanIgnoreReturnValue; @@ -50,6 +51,7 @@ * @since 1.0 */ @GwtIncompatible +@J2ktIncompatible @ElementTypesAreNonnullByDefault public abstract class AbstractService implements Service { private static final ListenerCallQueue.Event STARTING_EVENT = diff --git a/android/guava/src/com/google/common/util/concurrent/AtomicDoubleArray.java b/android/guava/src/com/google/common/util/concurrent/AtomicDoubleArray.java index fc8deed3b0d1..b03fba5274cf 100644 --- a/android/guava/src/com/google/common/util/concurrent/AtomicDoubleArray.java +++ b/android/guava/src/com/google/common/util/concurrent/AtomicDoubleArray.java @@ -17,6 +17,7 @@ import static java.lang.Double.longBitsToDouble; import com.google.common.annotations.GwtIncompatible; +import com.google.common.annotations.J2ktIncompatible; import com.google.common.primitives.ImmutableLongArray; import com.google.errorprone.annotations.CanIgnoreReturnValue; import java.util.concurrent.atomic.AtomicLongArray; @@ -44,6 +45,7 @@ * @since 11.0 */ @GwtIncompatible +@J2ktIncompatible @ElementTypesAreNonnullByDefault public class AtomicDoubleArray implements java.io.Serializable { private static final long serialVersionUID = 0L; diff --git a/android/guava/src/com/google/common/util/concurrent/AtomicLongMap.java b/android/guava/src/com/google/common/util/concurrent/AtomicLongMap.java index bac02c1436fe..e29f61de712f 100644 --- a/android/guava/src/com/google/common/util/concurrent/AtomicLongMap.java +++ b/android/guava/src/com/google/common/util/concurrent/AtomicLongMap.java @@ -18,6 +18,7 @@ import com.google.common.annotations.Beta; import com.google.common.annotations.GwtCompatible; +import com.google.common.annotations.J2ktIncompatible; import com.google.common.base.Function; import com.google.common.collect.Maps; import com.google.errorprone.annotations.CanIgnoreReturnValue; @@ -43,6 +44,8 @@ *

    Instances of this class may be used by multiple threads concurrently. All operations are * atomic unless otherwise noted. * + *

    Instances of this class are serializable if the keys are serializable. + * *

    Note: If your values are always positive and less than 2^31, you may wish to use a * {@link com.google.common.collect.Multiset} such as {@link * com.google.common.collect.ConcurrentHashMultiset} instead. @@ -54,6 +57,7 @@ * @since 11.0 */ @GwtCompatible +@J2ktIncompatible @ElementTypesAreNonnullByDefault public final class AtomicLongMap implements Serializable { private final ConcurrentHashMap map; diff --git a/android/guava/src/com/google/common/util/concurrent/Callables.java b/android/guava/src/com/google/common/util/concurrent/Callables.java index 3b52c2e98217..0533605dd1b8 100644 --- a/android/guava/src/com/google/common/util/concurrent/Callables.java +++ b/android/guava/src/com/google/common/util/concurrent/Callables.java @@ -19,6 +19,7 @@ import com.google.common.annotations.Beta; import com.google.common.annotations.GwtCompatible; import com.google.common.annotations.GwtIncompatible; +import com.google.common.annotations.J2ktIncompatible; import com.google.common.base.Supplier; import java.util.concurrent.Callable; import org.checkerframework.checker.nullness.qual.Nullable; @@ -48,6 +49,7 @@ private Callables() {} * @since 20.0 */ @Beta + @J2ktIncompatible @GwtIncompatible public static AsyncCallable asAsyncCallable( Callable callable, ListeningExecutorService listeningExecutorService) { @@ -64,6 +66,7 @@ private Callables() {} * @param nameSupplier The supplier of thread names, {@link Supplier#get get} will be called once * for each invocation of the wrapped callable. */ + @J2ktIncompatible @GwtIncompatible // threads static Callable threadRenaming( Callable callable, Supplier nameSupplier) { @@ -91,6 +94,7 @@ private Callables() {} * @param nameSupplier The supplier of thread names, {@link Supplier#get get} will be called once * for each invocation of the wrapped callable. */ + @J2ktIncompatible @GwtIncompatible // threads static Runnable threadRenaming(Runnable task, Supplier nameSupplier) { checkNotNull(nameSupplier); @@ -110,6 +114,7 @@ static Runnable threadRenaming(Runnable task, Supplier nameSupplier) { } /** Tries to set name of the given {@link Thread}, returns true if successful. */ + @J2ktIncompatible @GwtIncompatible // threads private static boolean trySetName(String threadName, Thread currentThread) { /* diff --git a/android/guava/src/com/google/common/util/concurrent/ClosingFuture.java b/android/guava/src/com/google/common/util/concurrent/ClosingFuture.java index 3681c3669c49..43157c7a4398 100644 --- a/android/guava/src/com/google/common/util/concurrent/ClosingFuture.java +++ b/android/guava/src/com/google/common/util/concurrent/ClosingFuture.java @@ -36,8 +36,8 @@ import static java.util.logging.Level.SEVERE; import static java.util.logging.Level.WARNING; +import com.google.common.annotations.J2ktIncompatible; import com.google.common.annotations.VisibleForTesting; -import com.google.common.base.Function; import com.google.common.collect.FluentIterable; import com.google.common.collect.ImmutableList; import com.google.common.util.concurrent.ClosingFuture.Combiner.AsyncCombiningCallable; @@ -191,6 +191,7 @@ */ // TODO(dpb): Consider reusing one CloseableList for the entire pipeline, modulo combinations. @DoNotMock("Use ClosingFuture.from(Futures.immediate*Future)") +@J2ktIncompatible @ElementTypesAreNonnullByDefault // TODO(dpb): GWT compatibility. public final class ClosingFuture { @@ -1378,16 +1379,11 @@ public String toString() { : Futures.whenAllComplete(inputFutures()); } - private static final Function, FluentFuture> INNER_FUTURE = - new Function, FluentFuture>() { - @Override - public FluentFuture apply(ClosingFuture future) { - return future.future; - } - }; private ImmutableList> inputFutures() { - return FluentIterable.from(inputs).transform(INNER_FUTURE).toList(); + return FluentIterable.from(inputs) + .>transform(future -> future.future) + .toList(); } } @@ -2146,14 +2142,11 @@ private static void closeQuietly(@CheckForNull final Closeable closeable, Execut } try { executor.execute( - new Runnable() { - @Override - public void run() { - try { - closeable.close(); - } catch (IOException | RuntimeException e) { - logger.log(WARNING, "thrown by close()", e); - } + () -> { + try { + closeable.close(); + } catch (IOException | RuntimeException e) { + logger.log(WARNING, "thrown by close()", e); } }); } catch (RejectedExecutionException e) { diff --git a/android/guava/src/com/google/common/util/concurrent/CollectionFuture.java b/android/guava/src/com/google/common/util/concurrent/CollectionFuture.java index 1fd18523db04..062aee7a79dc 100644 --- a/android/guava/src/com/google/common/util/concurrent/CollectionFuture.java +++ b/android/guava/src/com/google/common/util/concurrent/CollectionFuture.java @@ -102,9 +102,9 @@ static final class ListFuture /** The result of a successful {@code Future}. */ private static final class Present { - final V value; + @ParametricNullness final V value; - Present(V value) { + Present(@ParametricNullness V value) { this.value = value; } } diff --git a/android/guava/src/com/google/common/util/concurrent/CycleDetectingLockFactory.java b/android/guava/src/com/google/common/util/concurrent/CycleDetectingLockFactory.java index 51a36e822c41..21c77e8f9ef1 100644 --- a/android/guava/src/com/google/common/util/concurrent/CycleDetectingLockFactory.java +++ b/android/guava/src/com/google/common/util/concurrent/CycleDetectingLockFactory.java @@ -19,6 +19,7 @@ import com.google.common.annotations.Beta; import com.google.common.annotations.GwtIncompatible; +import com.google.common.annotations.J2ktIncompatible; import com.google.common.annotations.VisibleForTesting; import com.google.common.base.MoreObjects; import com.google.common.base.Preconditions; @@ -160,6 +161,7 @@ * @since 13.0 */ @Beta +@J2ktIncompatible @GwtIncompatible @ElementTypesAreNonnullByDefault public class CycleDetectingLockFactory { diff --git a/android/guava/src/com/google/common/util/concurrent/ExecutionList.java b/android/guava/src/com/google/common/util/concurrent/ExecutionList.java index 96fc51ca88d0..645817c4af36 100644 --- a/android/guava/src/com/google/common/util/concurrent/ExecutionList.java +++ b/android/guava/src/com/google/common/util/concurrent/ExecutionList.java @@ -17,6 +17,7 @@ import static com.google.common.base.Preconditions.checkNotNull; import com.google.common.annotations.GwtIncompatible; +import com.google.common.annotations.J2ktIncompatible; import com.google.errorprone.annotations.concurrent.GuardedBy; import java.util.concurrent.Executor; import java.util.logging.Level; @@ -39,6 +40,7 @@ * @author Sven Mawson * @since 1.0 */ +@J2ktIncompatible @GwtIncompatible @ElementTypesAreNonnullByDefault public final class ExecutionList { diff --git a/android/guava/src/com/google/common/util/concurrent/ExecutionSequencer.java b/android/guava/src/com/google/common/util/concurrent/ExecutionSequencer.java index 6a58dab2cea6..c335711c064f 100644 --- a/android/guava/src/com/google/common/util/concurrent/ExecutionSequencer.java +++ b/android/guava/src/com/google/common/util/concurrent/ExecutionSequencer.java @@ -25,6 +25,7 @@ import static com.google.common.util.concurrent.MoreExecutors.directExecutor; import static java.util.Objects.requireNonNull; +import com.google.common.annotations.J2ktIncompatible; import java.util.concurrent.Callable; import java.util.concurrent.Executor; import java.util.concurrent.Future; @@ -85,6 +86,7 @@ * @since 26.0 */ @ElementTypesAreNonnullByDefault +@J2ktIncompatible public final class ExecutionSequencer { private ExecutionSequencer() {} diff --git a/android/guava/src/com/google/common/util/concurrent/FakeTimeLimiter.java b/android/guava/src/com/google/common/util/concurrent/FakeTimeLimiter.java index 5528b8ff443a..ddaca50f5e3a 100644 --- a/android/guava/src/com/google/common/util/concurrent/FakeTimeLimiter.java +++ b/android/guava/src/com/google/common/util/concurrent/FakeTimeLimiter.java @@ -19,6 +19,7 @@ import com.google.common.annotations.Beta; import com.google.common.annotations.GwtIncompatible; +import com.google.common.annotations.J2ktIncompatible; import com.google.errorprone.annotations.CanIgnoreReturnValue; import java.util.concurrent.Callable; import java.util.concurrent.ExecutionException; @@ -36,6 +37,7 @@ * @since 1.0 */ @Beta +@J2ktIncompatible @GwtIncompatible @ElementTypesAreNonnullByDefault public final class FakeTimeLimiter implements TimeLimiter { diff --git a/android/guava/src/com/google/common/util/concurrent/FluentFuture.java b/android/guava/src/com/google/common/util/concurrent/FluentFuture.java index 683944c9e557..77b40b0fcc2f 100644 --- a/android/guava/src/com/google/common/util/concurrent/FluentFuture.java +++ b/android/guava/src/com/google/common/util/concurrent/FluentFuture.java @@ -16,9 +16,9 @@ import static com.google.common.base.Preconditions.checkNotNull; -import com.google.common.annotations.Beta; import com.google.common.annotations.GwtCompatible; import com.google.common.annotations.GwtIncompatible; +import com.google.common.annotations.J2ktIncompatible; import com.google.common.base.Function; import com.google.errorprone.annotations.CanIgnoreReturnValue; import com.google.errorprone.annotations.DoNotMock; @@ -182,8 +182,8 @@ public final boolean cancel(boolean mayInterruptIfRunning) { * {@code get()} throws a different kind of exception, that exception itself. * @param executor the executor that runs {@code fallback} if the input fails */ + @J2ktIncompatible @Partially.GwtIncompatible("AVAILABLE but requires exceptionType to be Throwable.class") - @Beta public final FluentFuture catching( Class exceptionType, Function fallback, Executor executor) { return (FluentFuture) Futures.catching(this, exceptionType, fallback, executor); @@ -247,8 +247,8 @@ public final FluentFuture catching( * {@code get()} throws a different kind of exception, that exception itself. * @param executor the executor that runs {@code fallback} if the input fails */ + @J2ktIncompatible @Partially.GwtIncompatible("AVAILABLE but requires exceptionType to be Throwable.class") - @Beta public final FluentFuture catchingAsync( Class exceptionType, AsyncFunction fallback, Executor executor) { return (FluentFuture) Futures.catchingAsync(this, exceptionType, fallback, executor); @@ -264,9 +264,9 @@ public final FluentFuture catchingAsync( * @param unit the time unit of the time parameter * @param scheduledExecutor The executor service to enforce the timeout. */ + @J2ktIncompatible @GwtIncompatible // ScheduledExecutorService @SuppressWarnings("GoodTime") // should accept a java.time.Duration - @Beta public final FluentFuture withTimeout( long timeout, TimeUnit unit, ScheduledExecutorService scheduledExecutor) { return (FluentFuture) Futures.withTimeout(this, timeout, unit, scheduledExecutor); @@ -311,7 +311,6 @@ public final FluentFuture withTimeout( * @return A future that holds result of the function (if the input succeeded) or the original * input's failure (if not) */ - @Beta public final FluentFuture transformAsync( AsyncFunction function, Executor executor) { return (FluentFuture) Futures.transformAsync(this, function, executor); @@ -349,7 +348,6 @@ public final FluentFuture withTimeout( * @param executor Executor to run the function in. * @return A future that holds result of the transformation. */ - @Beta public final FluentFuture transform( Function function, Executor executor) { return (FluentFuture) Futures.transform(this, function, executor); diff --git a/android/guava/src/com/google/common/util/concurrent/ForwardingBlockingDeque.java b/android/guava/src/com/google/common/util/concurrent/ForwardingBlockingDeque.java index d0d72a815918..13aa80b5129b 100644 --- a/android/guava/src/com/google/common/util/concurrent/ForwardingBlockingDeque.java +++ b/android/guava/src/com/google/common/util/concurrent/ForwardingBlockingDeque.java @@ -17,6 +17,7 @@ package com.google.common.util.concurrent; import com.google.common.annotations.GwtIncompatible; +import com.google.common.annotations.J2ktIncompatible; import com.google.common.collect.ForwardingDeque; import java.util.Collection; import java.util.concurrent.BlockingDeque; @@ -44,6 +45,7 @@ * @author Emily Soldal * @since 21.0 (since 14.0 as {@link com.google.common.collect.ForwardingBlockingDeque}) */ +@J2ktIncompatible @GwtIncompatible @ElementTypesAreNonnullByDefault public abstract class ForwardingBlockingDeque extends ForwardingDeque diff --git a/android/guava/src/com/google/common/util/concurrent/ForwardingBlockingQueue.java b/android/guava/src/com/google/common/util/concurrent/ForwardingBlockingQueue.java index 2c9bdebe3129..79ec94a1e5db 100644 --- a/android/guava/src/com/google/common/util/concurrent/ForwardingBlockingQueue.java +++ b/android/guava/src/com/google/common/util/concurrent/ForwardingBlockingQueue.java @@ -15,6 +15,7 @@ package com.google.common.util.concurrent; import com.google.common.annotations.GwtIncompatible; +import com.google.common.annotations.J2ktIncompatible; import com.google.common.collect.ForwardingQueue; import com.google.errorprone.annotations.CanIgnoreReturnValue; import java.util.Collection; @@ -36,6 +37,7 @@ * @param the type of elements held in this collection * @since 4.0 */ +@J2ktIncompatible @GwtIncompatible @ElementTypesAreNonnullByDefault public abstract class ForwardingBlockingQueue extends ForwardingQueue diff --git a/android/guava/src/com/google/common/util/concurrent/ForwardingCondition.java b/android/guava/src/com/google/common/util/concurrent/ForwardingCondition.java index d17f98cf2aa1..885cca7fcd3a 100644 --- a/android/guava/src/com/google/common/util/concurrent/ForwardingCondition.java +++ b/android/guava/src/com/google/common/util/concurrent/ForwardingCondition.java @@ -14,11 +14,13 @@ package com.google.common.util.concurrent; +import com.google.common.annotations.J2ktIncompatible; import java.util.Date; import java.util.concurrent.TimeUnit; import java.util.concurrent.locks.Condition; /** Forwarding wrapper around a {@code Condition}. */ +@J2ktIncompatible @ElementTypesAreNonnullByDefault abstract class ForwardingCondition implements Condition { abstract Condition delegate(); diff --git a/android/guava/src/com/google/common/util/concurrent/ForwardingExecutorService.java b/android/guava/src/com/google/common/util/concurrent/ForwardingExecutorService.java index 9a87b5c981ad..986278dafa02 100644 --- a/android/guava/src/com/google/common/util/concurrent/ForwardingExecutorService.java +++ b/android/guava/src/com/google/common/util/concurrent/ForwardingExecutorService.java @@ -15,6 +15,7 @@ package com.google.common.util.concurrent; import com.google.common.annotations.GwtIncompatible; +import com.google.common.annotations.J2ktIncompatible; import com.google.common.collect.ForwardingObject; import com.google.errorprone.annotations.CanIgnoreReturnValue; import com.google.errorprone.annotations.CheckReturnValue; @@ -33,9 +34,14 @@ * should override one or more methods to modify the behavior of the backing executor service as * desired per the decorator pattern. * + *

    {@code default} method warning: This class does not forward calls to {@code + * default} methods. Instead, it inherits their default implementations. When those implementations + * invoke methods, they invoke methods on the {@code ForwardingExecutorService}. + * * @author Kurt Alfred Kluever * @since 10.0 */ +@J2ktIncompatible @GwtIncompatible @ElementTypesAreNonnullByDefault public abstract class ForwardingExecutorService extends ForwardingObject diff --git a/android/guava/src/com/google/common/util/concurrent/ForwardingListeningExecutorService.java b/android/guava/src/com/google/common/util/concurrent/ForwardingListeningExecutorService.java index 592a9f5eed74..25dbf0de76f5 100644 --- a/android/guava/src/com/google/common/util/concurrent/ForwardingListeningExecutorService.java +++ b/android/guava/src/com/google/common/util/concurrent/ForwardingListeningExecutorService.java @@ -15,6 +15,7 @@ package com.google.common.util.concurrent; import com.google.common.annotations.GwtIncompatible; +import com.google.common.annotations.J2ktIncompatible; import java.util.concurrent.Callable; import org.checkerframework.checker.nullness.qual.Nullable; @@ -24,9 +25,14 @@ * executor service as desired per the decorator pattern. * + *

    {@code default} method warning: This class does not forward calls to {@code + * default} methods. Instead, it inherits their default implementations. When those implementations + * invoke methods, they invoke methods on the {@code ForwardingListeningExecutorService}. + * * @author Isaac Shum * @since 10.0 */ +@J2ktIncompatible @GwtIncompatible @ElementTypesAreNonnullByDefault public abstract class ForwardingListeningExecutorService extends ForwardingExecutorService diff --git a/android/guava/src/com/google/common/util/concurrent/ForwardingLock.java b/android/guava/src/com/google/common/util/concurrent/ForwardingLock.java index db2026ab414c..558b6e3decc0 100644 --- a/android/guava/src/com/google/common/util/concurrent/ForwardingLock.java +++ b/android/guava/src/com/google/common/util/concurrent/ForwardingLock.java @@ -14,11 +14,13 @@ package com.google.common.util.concurrent; +import com.google.common.annotations.J2ktIncompatible; import java.util.concurrent.TimeUnit; import java.util.concurrent.locks.Condition; import java.util.concurrent.locks.Lock; /** Forwarding wrapper around a {@code Lock}. */ +@J2ktIncompatible @ElementTypesAreNonnullByDefault abstract class ForwardingLock implements Lock { abstract Lock delegate(); diff --git a/android/guava/src/com/google/common/util/concurrent/Futures.java b/android/guava/src/com/google/common/util/concurrent/Futures.java index ba86c0d37166..39b6dfeb7677 100644 --- a/android/guava/src/com/google/common/util/concurrent/Futures.java +++ b/android/guava/src/com/google/common/util/concurrent/Futures.java @@ -20,9 +20,9 @@ import static com.google.common.util.concurrent.Uninterruptibles.getUninterruptibly; import static java.util.Objects.requireNonNull; -import com.google.common.annotations.Beta; import com.google.common.annotations.GwtCompatible; import com.google.common.annotations.GwtIncompatible; +import com.google.common.annotations.J2ktIncompatible; import com.google.common.base.Function; import com.google.common.base.MoreObjects; import com.google.common.base.Preconditions; @@ -223,6 +223,7 @@ private Futures() {} * @throws RejectedExecutionException if the task cannot be scheduled for execution * @since 23.0 */ + @J2ktIncompatible @GwtIncompatible // java.util.concurrent.ScheduledExecutorService @SuppressWarnings("GoodTime") // should accept a java.time.Duration // TODO(cpovirk): Return ListenableScheduledFuture? @@ -232,16 +233,12 @@ private Futures() {} TimeUnit timeUnit, ScheduledExecutorService executorService) { TrustedListenableFutureTask task = TrustedListenableFutureTask.create(callable); - final Future scheduled = executorService.schedule(task, delay, timeUnit); - task.addListener( - new Runnable() { - @Override - public void run() { - // Don't want to interrupt twice - scheduled.cancel(false); - } - }, - directExecutor()); + Future scheduled = executorService.schedule(task, delay, timeUnit); + /* + * Even when the user interrupts the task, we pass `false` to `cancel` so that we don't + * interrupt a second time after the interruption performed by TrustedListenableFutureTask. + */ + task.addListener(() -> scheduled.cancel(false), directExecutor()); return task; } @@ -281,7 +278,7 @@ public void run() { * @param executor the executor that runs {@code fallback} if {@code input} fails * @since 19.0 */ - @Beta + @J2ktIncompatible @Partially.GwtIncompatible("AVAILABLE but requires exceptionType to be Throwable.class") public static ListenableFuture catching( ListenableFuture input, @@ -346,7 +343,7 @@ public void run() { * @param executor the executor that runs {@code fallback} if {@code input} fails * @since 19.0 (similar functionality in 14.0 as {@code withFallback}) */ - @Beta + @J2ktIncompatible @Partially.GwtIncompatible("AVAILABLE but requires exceptionType to be Throwable.class") public static ListenableFuture catchingAsync( ListenableFuture input, @@ -363,12 +360,11 @@ public void run() { *

    The delegate future is interrupted and cancelled if it times out. * * @param delegate The future to delegate to. - * @param time when to timeout the future * @param unit the time unit of the time parameter * @param scheduledExecutor The executor service to enforce the timeout. * @since 19.0 */ - @Beta + @J2ktIncompatible @GwtIncompatible // java.util.concurrent.ScheduledExecutorService @SuppressWarnings("GoodTime") // should accept a java.time.Duration public static ListenableFuture withTimeout( @@ -414,7 +410,6 @@ public void run() { * input's failure (if not) * @since 19.0 (in 11.0 as {@code transform}) */ - @Beta public static ListenableFuture transformAsync( ListenableFuture input, @@ -452,7 +447,6 @@ ListenableFuture transformAsync( * @return A future that holds result of the transformation. * @since 9.0 (in 2.0 as {@code compose}) */ - @Beta public static ListenableFuture transform( ListenableFuture input, Function function, Executor executor) { @@ -479,7 +473,7 @@ ListenableFuture transform( * @return A future that returns the result of the transformation. * @since 10.0 */ - @Beta + @J2ktIncompatible @GwtIncompatible // TODO public static Future lazyTransform( final Future input, final Function function) { @@ -539,7 +533,6 @@ private O applyTransformation(I input) throws ExecutionException { * @return a future that provides a list of the results of the component futures * @since 10.0 */ - @Beta @SafeVarargs public static ListenableFuture> allAsList( ListenableFuture... futures) { @@ -567,7 +560,6 @@ private O applyTransformation(I input) throws ExecutionException { * @return a future that provides a list of the results of the component futures * @since 10.0 */ - @Beta public static ListenableFuture> allAsList( Iterable> futures) { ListenableFuture> nullable = @@ -586,7 +578,6 @@ private O applyTransformation(I input) throws ExecutionException { * * @since 20.0 */ - @Beta @SafeVarargs public static FutureCombiner whenAllComplete( ListenableFuture... futures) { @@ -601,7 +592,6 @@ private O applyTransformation(I input) throws ExecutionException { * * @since 20.0 */ - @Beta public static FutureCombiner whenAllComplete( Iterable> futures) { return new FutureCombiner(false, ImmutableList.copyOf(futures)); @@ -614,7 +604,6 @@ private O applyTransformation(I input) throws ExecutionException { * * @since 20.0 */ - @Beta @SafeVarargs public static FutureCombiner whenAllSucceed( ListenableFuture... futures) { @@ -628,7 +617,6 @@ private O applyTransformation(I input) throws ExecutionException { * * @since 20.0 */ - @Beta public static FutureCombiner whenAllSucceed( Iterable> futures) { return new FutureCombiner(true, ImmutableList.copyOf(futures)); @@ -660,7 +648,6 @@ private O applyTransformation(I input) throws ExecutionException { * * @since 20.0 */ - @Beta @GwtCompatible public static final class FutureCombiner { private final boolean allMustSucceed; @@ -822,7 +809,6 @@ protected void afterDone() { * @return a future that provides a list of the results of the component futures * @since 10.0 */ - @Beta @SafeVarargs public static ListenableFuture> successfulAsList( ListenableFuture... futures) { @@ -859,7 +845,6 @@ protected void afterDone() { * @return a future that provides a list of the results of the component futures * @since 10.0 */ - @Beta public static ListenableFuture> successfulAsList( Iterable> futures) { return new ListFuture(ImmutableList.copyOf(futures), false); @@ -899,14 +884,7 @@ protected void afterDone() { final ImmutableList> delegates = delegatesBuilder.build(); for (int i = 0; i < copy.length; i++) { final int localI = i; - copy[i].addListener( - new Runnable() { - @Override - public void run() { - state.recordInputCompletion(delegates, localI); - } - }, - directExecutor()); + copy[i].addListener(() -> state.recordInputCompletion(delegates, localI), directExecutor()); } @SuppressWarnings("unchecked") @@ -1205,8 +1183,8 @@ public String toString() { * does not have a suitable constructor * @since 19.0 (in 10.0 as {@code get}) */ - @Beta @CanIgnoreReturnValue + @J2ktIncompatible @GwtIncompatible // reflection @ParametricNullness public static V getChecked( @@ -1257,8 +1235,8 @@ public String toString() { * does not have a suitable constructor * @since 19.0 (in 10.0 as {@code get} and with different parameter order) */ - @Beta @CanIgnoreReturnValue + @J2ktIncompatible @GwtIncompatible // reflection @SuppressWarnings("GoodTime") // should accept a java.time.Duration @ParametricNullness diff --git a/android/guava/src/com/google/common/util/concurrent/FuturesGetChecked.java b/android/guava/src/com/google/common/util/concurrent/FuturesGetChecked.java index ed02f5b3d816..9be9e21e8b33 100644 --- a/android/guava/src/com/google/common/util/concurrent/FuturesGetChecked.java +++ b/android/guava/src/com/google/common/util/concurrent/FuturesGetChecked.java @@ -19,6 +19,7 @@ import static java.util.Arrays.asList; import com.google.common.annotations.GwtIncompatible; +import com.google.common.annotations.J2ktIncompatible; import com.google.common.annotations.VisibleForTesting; import com.google.common.base.Function; import com.google.common.collect.Ordering; @@ -38,6 +39,7 @@ import org.checkerframework.checker.nullness.qual.Nullable; /** Static methods used to implement {@link Futures#getChecked(Future, Class)}. */ +@J2ktIncompatible @GwtIncompatible @ElementTypesAreNonnullByDefault final class FuturesGetChecked { @@ -215,12 +217,8 @@ private static List> preferringStrings( private static final Ordering> WITH_STRING_PARAM_FIRST = Ordering.natural() .onResultOf( - new Function, Boolean>() { - @Override - public Boolean apply(Constructor input) { - return asList(input.getParameterTypes()).contains(String.class); - } - }) + (Function, Boolean>) + input -> asList(input.getParameterTypes()).contains(String.class)) .reverse(); @CheckForNull diff --git a/android/guava/src/com/google/common/util/concurrent/GwtFluentFutureCatchingSpecialization.java b/android/guava/src/com/google/common/util/concurrent/GwtFluentFutureCatchingSpecialization.java index d29a673dd854..fdbe50909a7d 100644 --- a/android/guava/src/com/google/common/util/concurrent/GwtFluentFutureCatchingSpecialization.java +++ b/android/guava/src/com/google/common/util/concurrent/GwtFluentFutureCatchingSpecialization.java @@ -15,6 +15,7 @@ package com.google.common.util.concurrent; import com.google.common.annotations.GwtCompatible; +import com.google.common.annotations.J2ktIncompatible; import org.checkerframework.checker.nullness.qual.Nullable; /** @@ -23,6 +24,7 @@ * FluentFuture.catching} family of methods. Those versions have slightly different signatures. */ @GwtCompatible(emulated = true) +@J2ktIncompatible // Super-sourced @ElementTypesAreNonnullByDefault abstract class GwtFluentFutureCatchingSpecialization extends AbstractFuture { diff --git a/android/guava/src/com/google/common/util/concurrent/GwtFuturesCatchingSpecialization.java b/android/guava/src/com/google/common/util/concurrent/GwtFuturesCatchingSpecialization.java index 95131cec33f6..35adfdb67201 100644 --- a/android/guava/src/com/google/common/util/concurrent/GwtFuturesCatchingSpecialization.java +++ b/android/guava/src/com/google/common/util/concurrent/GwtFuturesCatchingSpecialization.java @@ -15,6 +15,7 @@ package com.google.common.util.concurrent; import com.google.common.annotations.GwtCompatible; +import com.google.common.annotations.J2ktIncompatible; /** * Hidden superclass of {@link Futures} that provides us a place to declare special GWT versions of @@ -23,6 +24,7 @@ * different signatures. */ @GwtCompatible(emulated = true) +@J2ktIncompatible // Super-sourced @ElementTypesAreNonnullByDefault abstract class GwtFuturesCatchingSpecialization { /* diff --git a/android/guava/src/com/google/common/util/concurrent/ImmediateFuture.java b/android/guava/src/com/google/common/util/concurrent/ImmediateFuture.java index 8b1c17ae48be..f09816c4e3cb 100644 --- a/android/guava/src/com/google/common/util/concurrent/ImmediateFuture.java +++ b/android/guava/src/com/google/common/util/concurrent/ImmediateFuture.java @@ -23,6 +23,7 @@ import java.util.concurrent.TimeUnit; import java.util.logging.Level; import java.util.logging.Logger; +import javax.annotation.CheckForNull; import org.checkerframework.checker.nullness.qual.Nullable; /** Implementation of {@link Futures#immediateFuture}. */ @@ -98,7 +99,8 @@ static final class ImmediateFailedFuture extends Tru } static final class ImmediateCancelledFuture extends TrustedFuture { - static final @Nullable ImmediateCancelledFuture INSTANCE = + @CheckForNull + static final ImmediateCancelledFuture INSTANCE = AbstractFuture.GENERATE_CANCELLATION_CAUSES ? null : new ImmediateCancelledFuture<>(); ImmediateCancelledFuture() { diff --git a/android/guava/src/com/google/common/util/concurrent/JdkFutureAdapters.java b/android/guava/src/com/google/common/util/concurrent/JdkFutureAdapters.java index 5e951aa1d2b9..b91b5fe7ebc3 100644 --- a/android/guava/src/com/google/common/util/concurrent/JdkFutureAdapters.java +++ b/android/guava/src/com/google/common/util/concurrent/JdkFutureAdapters.java @@ -19,6 +19,7 @@ import com.google.common.annotations.Beta; import com.google.common.annotations.GwtIncompatible; +import com.google.common.annotations.J2ktIncompatible; import java.util.concurrent.ExecutionException; import java.util.concurrent.Executor; import java.util.concurrent.Executors; @@ -32,10 +33,14 @@ * that, whenever possible, it is strongly preferred to modify those libraries to return {@code * ListenableFuture} directly. * + *

    For interoperability between {@code ListenableFuture} and {@code CompletableFuture}, + * consider Future Converter. + * * @author Sven Mawson * @since 10.0 (replacing {@code Futures.makeListenable}, which existed in 1.0) */ @Beta +@J2ktIncompatible @GwtIncompatible @ElementTypesAreNonnullByDefault public final class JdkFutureAdapters { diff --git a/android/guava/src/com/google/common/util/concurrent/ListenableFutureTask.java b/android/guava/src/com/google/common/util/concurrent/ListenableFutureTask.java index 678a6c671a46..161fa895f416 100644 --- a/android/guava/src/com/google/common/util/concurrent/ListenableFutureTask.java +++ b/android/guava/src/com/google/common/util/concurrent/ListenableFutureTask.java @@ -18,6 +18,7 @@ import static java.util.concurrent.TimeUnit.NANOSECONDS; import com.google.common.annotations.GwtIncompatible; +import com.google.common.annotations.J2ktIncompatible; import com.google.errorprone.annotations.CanIgnoreReturnValue; import java.util.concurrent.Callable; import java.util.concurrent.ExecutionException; @@ -40,6 +41,7 @@ * @author Sven Mawson * @since 1.0 */ +@J2ktIncompatible @GwtIncompatible @ElementTypesAreNonnullByDefault public class ListenableFutureTask extends FutureTask diff --git a/android/guava/src/com/google/common/util/concurrent/ListenerCallQueue.java b/android/guava/src/com/google/common/util/concurrent/ListenerCallQueue.java index 451d13c2ad7a..4ef7ed36c056 100644 --- a/android/guava/src/com/google/common/util/concurrent/ListenerCallQueue.java +++ b/android/guava/src/com/google/common/util/concurrent/ListenerCallQueue.java @@ -17,6 +17,7 @@ import static com.google.common.base.Preconditions.checkNotNull; import com.google.common.annotations.GwtIncompatible; +import com.google.common.annotations.J2ktIncompatible; import com.google.common.base.Preconditions; import com.google.common.collect.Queues; import com.google.errorprone.annotations.concurrent.GuardedBy; @@ -52,6 +53,7 @@ * the listeners can be delayed slightly so that locks can be dropped. Also, because {@link * #dispatch} is expected to be called concurrently, it is idempotent. */ +@J2ktIncompatible @GwtIncompatible @ElementTypesAreNonnullByDefault final class ListenerCallQueue { diff --git a/android/guava/src/com/google/common/util/concurrent/ListeningScheduledExecutorService.java b/android/guava/src/com/google/common/util/concurrent/ListeningScheduledExecutorService.java index a6be949e574f..3b5fad2e2ea9 100644 --- a/android/guava/src/com/google/common/util/concurrent/ListeningScheduledExecutorService.java +++ b/android/guava/src/com/google/common/util/concurrent/ListeningScheduledExecutorService.java @@ -15,6 +15,7 @@ package com.google.common.util.concurrent; import com.google.common.annotations.GwtIncompatible; +import com.google.common.annotations.J2ktIncompatible; import java.util.concurrent.Callable; import java.util.concurrent.ScheduledExecutorService; import java.util.concurrent.TimeUnit; @@ -29,6 +30,7 @@ * @author Chris Povirk * @since 10.0 */ +@J2ktIncompatible @GwtIncompatible @ElementTypesAreNonnullByDefault public interface ListeningScheduledExecutorService diff --git a/android/guava/src/com/google/common/util/concurrent/Monitor.java b/android/guava/src/com/google/common/util/concurrent/Monitor.java index 42adaf36928c..5542b0bd5522 100644 --- a/android/guava/src/com/google/common/util/concurrent/Monitor.java +++ b/android/guava/src/com/google/common/util/concurrent/Monitor.java @@ -17,6 +17,7 @@ import static com.google.common.base.Preconditions.checkNotNull; import com.google.common.annotations.GwtIncompatible; +import com.google.common.annotations.J2ktIncompatible; import com.google.common.primitives.Longs; import com.google.errorprone.annotations.concurrent.GuardedBy; import com.google.j2objc.annotations.Weak; @@ -196,6 +197,7 @@ * @author Martin Buchholz * @since 10.0 */ +@J2ktIncompatible @GwtIncompatible @SuppressWarnings("GuardedBy") // TODO(b/35466881): Fix or suppress. @ElementTypesAreNonnullByDefault diff --git a/android/guava/src/com/google/common/util/concurrent/MoreExecutors.java b/android/guava/src/com/google/common/util/concurrent/MoreExecutors.java index a607d583a7e3..b3b22865095b 100644 --- a/android/guava/src/com/google/common/util/concurrent/MoreExecutors.java +++ b/android/guava/src/com/google/common/util/concurrent/MoreExecutors.java @@ -20,6 +20,7 @@ import com.google.common.annotations.Beta; import com.google.common.annotations.GwtCompatible; import com.google.common.annotations.GwtIncompatible; +import com.google.common.annotations.J2ktIncompatible; import com.google.common.annotations.VisibleForTesting; import com.google.common.base.Supplier; import com.google.common.base.Throwables; @@ -79,6 +80,7 @@ private MoreExecutors() {} * @return an unmodifiable version of the input which will not hang the JVM */ @Beta + @J2ktIncompatible @GwtIncompatible // TODO @SuppressWarnings("GoodTime") // should accept a java.time.Duration public static ExecutorService getExitingExecutorService( @@ -100,6 +102,7 @@ public static ExecutorService getExitingExecutorService( * @return an unmodifiable version of the input which will not hang the JVM */ @Beta + @J2ktIncompatible @GwtIncompatible // concurrency public static ExecutorService getExitingExecutorService(ThreadPoolExecutor executor) { return new Application().getExitingExecutorService(executor); @@ -119,6 +122,7 @@ public static ExecutorService getExitingExecutorService(ThreadPoolExecutor execu * @return an unmodifiable version of the input which will not hang the JVM */ @Beta + @J2ktIncompatible @GwtIncompatible // TODO @SuppressWarnings("GoodTime") // should accept a java.time.Duration public static ScheduledExecutorService getExitingScheduledExecutorService( @@ -141,6 +145,7 @@ public static ScheduledExecutorService getExitingScheduledExecutorService( * @return an unmodifiable version of the input which will not hang the JVM */ @Beta + @J2ktIncompatible @GwtIncompatible // TODO public static ScheduledExecutorService getExitingScheduledExecutorService( ScheduledThreadPoolExecutor executor) { @@ -159,6 +164,7 @@ public static ScheduledExecutorService getExitingScheduledExecutorService( * @param timeUnit unit of time for the time parameter */ @Beta + @J2ktIncompatible @GwtIncompatible // TODO @SuppressWarnings("GoodTime") // should accept a java.time.Duration public static void addDelayedShutdownHook( @@ -167,6 +173,7 @@ public static void addDelayedShutdownHook( } /** Represents the current application to register shutdown hooks. */ + @J2ktIncompatible @GwtIncompatible // TODO @VisibleForTesting static class Application { @@ -227,6 +234,7 @@ void addShutdownHook(Thread hook) { } } + @J2ktIncompatible @GwtIncompatible // TODO private static void useDaemonThreadFactory(ThreadPoolExecutor executor) { executor.setThreadFactory( @@ -237,6 +245,7 @@ private static void useDaemonThreadFactory(ThreadPoolExecutor executor) { } // See newDirectExecutorService javadoc for behavioral notes. + @J2ktIncompatible @GwtIncompatible // TODO private static final class DirectExecutorService extends AbstractListeningExecutorService { /** Lock used whenever accessing the state variables (runningTasks, shutdown) of the executor */ @@ -365,6 +374,7 @@ private void endTask() { * * @since 18.0 (present as MoreExecutors.sameThreadExecutor() since 10.0) */ + @J2ktIncompatible @GwtIncompatible // TODO public static ListeningExecutorService newDirectExecutorService() { return new DirectExecutorService(); @@ -479,6 +489,7 @@ public static Executor directExecutor() { * * @since 23.3 (since 23.1 as {@code sequentialExecutor}) */ + @J2ktIncompatible @GwtIncompatible public static Executor newSequentialExecutor(Executor delegate) { return new SequentialExecutor(delegate); @@ -499,6 +510,7 @@ public static Executor newSequentialExecutor(Executor delegate) { * * @since 10.0 */ + @J2ktIncompatible @GwtIncompatible // TODO public static ListeningExecutorService listeningDecorator(ExecutorService delegate) { return (delegate instanceof ListeningExecutorService) @@ -524,6 +536,7 @@ public static ListeningExecutorService listeningDecorator(ExecutorService delega * * @since 10.0 */ + @J2ktIncompatible @GwtIncompatible // TODO public static ListeningScheduledExecutorService listeningDecorator( ScheduledExecutorService delegate) { @@ -532,6 +545,7 @@ public static ListeningScheduledExecutorService listeningDecorator( : new ScheduledListeningDecorator(delegate); } + @J2ktIncompatible @GwtIncompatible // TODO private static class ListeningDecorator extends AbstractListeningExecutorService { private final ExecutorService delegate; @@ -576,6 +590,7 @@ public final String toString() { } } + @J2ktIncompatible @GwtIncompatible // TODO private static final class ScheduledListeningDecorator extends ListeningDecorator implements ListeningScheduledExecutorService { @@ -654,6 +669,7 @@ public int compareTo(Delayed other) { } } + @J2ktIncompatible @GwtIncompatible // TODO private static final class NeverSuccessfulListenableFutureTask extends AbstractFuture.TrustedFuture<@Nullable Void> implements Runnable { @@ -696,6 +712,7 @@ protected String pendingToString() { * implementations. */ @SuppressWarnings("GoodTime") // should accept a java.time.Duration + @J2ktIncompatible @GwtIncompatible @ParametricNullness static T invokeAnyImpl( @@ -777,6 +794,7 @@ protected String pendingToString() { /** * Submits the task and adds a listener that adds the future to {@code queue} when it completes. */ + @J2ktIncompatible @GwtIncompatible // TODO private static ListenableFuture submitAndAddQueueListener( ListeningExecutorService executorService, @@ -805,6 +823,7 @@ public void run() { * @since 14.0 */ @Beta + @J2ktIncompatible @GwtIncompatible // concurrency public static ThreadFactory platformThreadFactory() { if (!isAppEngineWithApiClasses()) { @@ -831,6 +850,7 @@ public static ThreadFactory platformThreadFactory() { } } + @J2ktIncompatible @GwtIncompatible // TODO private static boolean isAppEngineWithApiClasses() { if (System.getProperty("com.google.appengine.runtime.environment") == null) { @@ -866,6 +886,7 @@ private static boolean isAppEngineWithApiClasses() { * Creates a thread using {@link #platformThreadFactory}, and sets its name to {@code name} unless * changing the name is forbidden by the security manager. */ + @J2ktIncompatible @GwtIncompatible // concurrency static Thread newThread(String name, Runnable runnable) { checkNotNull(name); @@ -893,6 +914,7 @@ static Thread newThread(String name, Runnable runnable) { * @param executor The executor to decorate * @param nameSupplier The source of names for each task */ + @J2ktIncompatible @GwtIncompatible // concurrency static Executor renamingDecorator(final Executor executor, final Supplier nameSupplier) { checkNotNull(executor); @@ -916,6 +938,7 @@ public void execute(Runnable command) { * @param service The executor to decorate * @param nameSupplier The source of names for each task */ + @J2ktIncompatible @GwtIncompatible // concurrency static ExecutorService renamingDecorator( final ExecutorService service, final Supplier nameSupplier) { @@ -945,6 +968,7 @@ protected Runnable wrapTask(Runnable command) { * @param service The executor to decorate * @param nameSupplier The source of names for each task */ + @J2ktIncompatible @GwtIncompatible // concurrency static ScheduledExecutorService renamingDecorator( final ScheduledExecutorService service, final Supplier nameSupplier) { @@ -989,6 +1013,7 @@ protected Runnable wrapTask(Runnable command) { */ @Beta @CanIgnoreReturnValue + @J2ktIncompatible @GwtIncompatible // concurrency @SuppressWarnings("GoodTime") // should accept a java.time.Duration public static boolean shutdownAndAwaitTermination( diff --git a/android/guava/src/com/google/common/util/concurrent/OverflowAvoidingLockSupport.java b/android/guava/src/com/google/common/util/concurrent/OverflowAvoidingLockSupport.java index 3038ab7bd004..905726597fcb 100644 --- a/android/guava/src/com/google/common/util/concurrent/OverflowAvoidingLockSupport.java +++ b/android/guava/src/com/google/common/util/concurrent/OverflowAvoidingLockSupport.java @@ -16,6 +16,7 @@ import static java.lang.Math.min; +import com.google.common.annotations.J2ktIncompatible; import java.util.concurrent.locks.LockSupport; import javax.annotation.CheckForNull; @@ -23,6 +24,7 @@ * Works around an android bug, where parking for more than INT_MAX seconds can produce an abort * signal on 32 bit devices running Android Q. */ +@J2ktIncompatible @ElementTypesAreNonnullByDefault final class OverflowAvoidingLockSupport { // Represents the max nanoseconds representable on a linux timespec with a 32 bit tv_sec diff --git a/android/guava/src/com/google/common/util/concurrent/RateLimiter.java b/android/guava/src/com/google/common/util/concurrent/RateLimiter.java index 9bcf118160d5..d51ab2b795d6 100644 --- a/android/guava/src/com/google/common/util/concurrent/RateLimiter.java +++ b/android/guava/src/com/google/common/util/concurrent/RateLimiter.java @@ -22,6 +22,7 @@ import com.google.common.annotations.Beta; import com.google.common.annotations.GwtIncompatible; +import com.google.common.annotations.J2ktIncompatible; import com.google.common.annotations.VisibleForTesting; import com.google.common.base.Stopwatch; import com.google.common.util.concurrent.SmoothRateLimiter.SmoothBursty; @@ -91,6 +92,7 @@ // TODO(user): switch to nano precision. A natural unit of cost is "bytes", and a micro precision // would mean a maximum rate of "1MB/s", which might be small in some cases. @Beta +@J2ktIncompatible @GwtIncompatible @ElementTypesAreNonnullByDefault public abstract class RateLimiter { diff --git a/android/guava/src/com/google/common/util/concurrent/SequentialExecutor.java b/android/guava/src/com/google/common/util/concurrent/SequentialExecutor.java index d0b600be840e..c842d7e07d56 100644 --- a/android/guava/src/com/google/common/util/concurrent/SequentialExecutor.java +++ b/android/guava/src/com/google/common/util/concurrent/SequentialExecutor.java @@ -22,6 +22,7 @@ import static java.lang.System.identityHashCode; import com.google.common.annotations.GwtIncompatible; +import com.google.common.annotations.J2ktIncompatible; import com.google.common.base.Preconditions; import com.google.errorprone.annotations.concurrent.GuardedBy; import com.google.j2objc.annotations.RetainedWith; @@ -47,6 +48,7 @@ * If an {@code Error} is thrown, the error will propagate and execution will stop until it is * restarted by a call to {@link #execute}. */ +@J2ktIncompatible @GwtIncompatible @ElementTypesAreNonnullByDefault final class SequentialExecutor implements Executor { diff --git a/android/guava/src/com/google/common/util/concurrent/Service.java b/android/guava/src/com/google/common/util/concurrent/Service.java index 0999a30ae5f4..b04d88ac43ad 100644 --- a/android/guava/src/com/google/common/util/concurrent/Service.java +++ b/android/guava/src/com/google/common/util/concurrent/Service.java @@ -15,6 +15,7 @@ package com.google.common.util.concurrent; import com.google.common.annotations.GwtIncompatible; +import com.google.common.annotations.J2ktIncompatible; import com.google.errorprone.annotations.CanIgnoreReturnValue; import com.google.errorprone.annotations.DoNotMock; import java.util.concurrent.Executor; @@ -52,6 +53,7 @@ * @since 9.0 (in 1.0 as {@code com.google.common.base.Service}) */ @DoNotMock("Create an AbstractIdleService") +@J2ktIncompatible @GwtIncompatible @ElementTypesAreNonnullByDefault public interface Service { diff --git a/android/guava/src/com/google/common/util/concurrent/ServiceManager.java b/android/guava/src/com/google/common/util/concurrent/ServiceManager.java index 5177b5ac05dd..dd4828cb876f 100644 --- a/android/guava/src/com/google/common/util/concurrent/ServiceManager.java +++ b/android/guava/src/com/google/common/util/concurrent/ServiceManager.java @@ -31,6 +31,7 @@ import static java.util.concurrent.TimeUnit.MILLISECONDS; import com.google.common.annotations.GwtIncompatible; +import com.google.common.annotations.J2ktIncompatible; import com.google.common.base.Function; import com.google.common.base.MoreObjects; import com.google.common.base.Stopwatch; @@ -117,6 +118,7 @@ * @author Luke Sandberg * @since 14.0 */ +@J2ktIncompatible @GwtIncompatible @ElementTypesAreNonnullByDefault public final class ServiceManager implements ServiceManagerBridge { diff --git a/android/guava/src/com/google/common/util/concurrent/ServiceManagerBridge.java b/android/guava/src/com/google/common/util/concurrent/ServiceManagerBridge.java index 7ae430e3d251..71fe01c0bb63 100644 --- a/android/guava/src/com/google/common/util/concurrent/ServiceManagerBridge.java +++ b/android/guava/src/com/google/common/util/concurrent/ServiceManagerBridge.java @@ -17,6 +17,7 @@ package com.google.common.util.concurrent; import com.google.common.annotations.GwtIncompatible; +import com.google.common.annotations.J2ktIncompatible; import com.google.common.collect.ImmutableMultimap; import com.google.common.util.concurrent.Service.State; @@ -25,6 +26,7 @@ * servicesByState()}, to ensure binary compatibility with older Guava versions that specified * {@code servicesByState()} to return {@code ImmutableMultimap}. */ +@J2ktIncompatible @GwtIncompatible @ElementTypesAreNonnullByDefault interface ServiceManagerBridge { diff --git a/android/guava/src/com/google/common/util/concurrent/SimpleTimeLimiter.java b/android/guava/src/com/google/common/util/concurrent/SimpleTimeLimiter.java index c6ade6a3a0a5..551d598d0357 100644 --- a/android/guava/src/com/google/common/util/concurrent/SimpleTimeLimiter.java +++ b/android/guava/src/com/google/common/util/concurrent/SimpleTimeLimiter.java @@ -19,6 +19,7 @@ import com.google.common.annotations.Beta; import com.google.common.annotations.GwtIncompatible; +import com.google.common.annotations.J2ktIncompatible; import com.google.common.collect.ObjectArrays; import com.google.common.collect.Sets; import com.google.errorprone.annotations.CanIgnoreReturnValue; @@ -46,6 +47,7 @@ * @since 1.0 */ @Beta +@J2ktIncompatible @GwtIncompatible @ElementTypesAreNonnullByDefault public final class SimpleTimeLimiter implements TimeLimiter { @@ -111,6 +113,7 @@ private static T newProxy(Class interfaceType, InvocationHandler handler) return interfaceType.cast(object); } + @ParametricNullness private T callWithTimeout( Callable callable, long timeoutDuration, TimeUnit timeoutUnit, boolean amInterruptible) throws Exception { @@ -141,6 +144,7 @@ private static T newProxy(Class interfaceType, InvocationHandler handler) @CanIgnoreReturnValue @Override + @ParametricNullness public T callWithTimeout( Callable callable, long timeoutDuration, TimeUnit timeoutUnit) throws TimeoutException, InterruptedException, ExecutionException { @@ -163,6 +167,7 @@ private static T newProxy(Class interfaceType, InvocationHandler handler) @CanIgnoreReturnValue @Override + @ParametricNullness public T callUninterruptiblyWithTimeout( Callable callable, long timeoutDuration, TimeUnit timeoutUnit) throws TimeoutException, ExecutionException { diff --git a/android/guava/src/com/google/common/util/concurrent/SmoothRateLimiter.java b/android/guava/src/com/google/common/util/concurrent/SmoothRateLimiter.java index ca78905908ed..6f21ab6a3364 100644 --- a/android/guava/src/com/google/common/util/concurrent/SmoothRateLimiter.java +++ b/android/guava/src/com/google/common/util/concurrent/SmoothRateLimiter.java @@ -18,9 +18,11 @@ import static java.util.concurrent.TimeUnit.SECONDS; import com.google.common.annotations.GwtIncompatible; +import com.google.common.annotations.J2ktIncompatible; import com.google.common.math.LongMath; import java.util.concurrent.TimeUnit; +@J2ktIncompatible @GwtIncompatible @ElementTypesAreNonnullByDefault abstract class SmoothRateLimiter extends RateLimiter { diff --git a/android/guava/src/com/google/common/util/concurrent/Striped.java b/android/guava/src/com/google/common/util/concurrent/Striped.java index 2ea61cb3248a..37fa2fd7ef97 100644 --- a/android/guava/src/com/google/common/util/concurrent/Striped.java +++ b/android/guava/src/com/google/common/util/concurrent/Striped.java @@ -16,8 +16,8 @@ import static com.google.common.collect.Lists.newArrayList; -import com.google.common.annotations.Beta; import com.google.common.annotations.GwtIncompatible; +import com.google.common.annotations.J2ktIncompatible; import com.google.common.annotations.VisibleForTesting; import com.google.common.base.MoreObjects; import com.google.common.base.Preconditions; @@ -82,7 +82,7 @@ * @author Dimitris Andreou * @since 13.0 */ -@Beta +@J2ktIncompatible @GwtIncompatible @ElementTypesAreNonnullByDefault public abstract class Striped { diff --git a/android/guava/src/com/google/common/util/concurrent/ThreadFactoryBuilder.java b/android/guava/src/com/google/common/util/concurrent/ThreadFactoryBuilder.java index 6847b6ba1197..c0116f80b3d1 100644 --- a/android/guava/src/com/google/common/util/concurrent/ThreadFactoryBuilder.java +++ b/android/guava/src/com/google/common/util/concurrent/ThreadFactoryBuilder.java @@ -19,6 +19,7 @@ import static java.util.Objects.requireNonNull; import com.google.common.annotations.GwtIncompatible; +import com.google.common.annotations.J2ktIncompatible; import com.google.errorprone.annotations.CanIgnoreReturnValue; import java.lang.Thread.UncaughtExceptionHandler; import java.util.Locale; @@ -44,6 +45,7 @@ * @author Kurt Alfred Kluever * @since 4.0 */ +@J2ktIncompatible @GwtIncompatible @ElementTypesAreNonnullByDefault public final class ThreadFactoryBuilder { diff --git a/android/guava/src/com/google/common/util/concurrent/TimeLimiter.java b/android/guava/src/com/google/common/util/concurrent/TimeLimiter.java index 0883bccee0c1..43294d9e520e 100644 --- a/android/guava/src/com/google/common/util/concurrent/TimeLimiter.java +++ b/android/guava/src/com/google/common/util/concurrent/TimeLimiter.java @@ -16,6 +16,7 @@ import com.google.common.annotations.Beta; import com.google.common.annotations.GwtIncompatible; +import com.google.common.annotations.J2ktIncompatible; import com.google.errorprone.annotations.CanIgnoreReturnValue; import com.google.errorprone.annotations.DoNotMock; import java.util.concurrent.Callable; @@ -33,6 +34,7 @@ */ @Beta @DoNotMock("Use FakeTimeLimiter") +@J2ktIncompatible @GwtIncompatible @SuppressWarnings("GoodTime") // should have java.time.Duration overloads @ElementTypesAreNonnullByDefault @@ -99,6 +101,7 @@ public interface TimeLimiter { * @since 22.0 */ @CanIgnoreReturnValue + @ParametricNullness T callWithTimeout( Callable callable, long timeoutDuration, TimeUnit timeoutUnit) throws TimeoutException, InterruptedException, ExecutionException; @@ -123,6 +126,7 @@ public interface TimeLimiter { * @since 22.0 */ @CanIgnoreReturnValue + @ParametricNullness T callUninterruptiblyWithTimeout( Callable callable, long timeoutDuration, TimeUnit timeoutUnit) throws TimeoutException, ExecutionException; diff --git a/android/guava/src/com/google/common/util/concurrent/TimeoutFuture.java b/android/guava/src/com/google/common/util/concurrent/TimeoutFuture.java index ed8a7bfdbe70..aca62305463f 100644 --- a/android/guava/src/com/google/common/util/concurrent/TimeoutFuture.java +++ b/android/guava/src/com/google/common/util/concurrent/TimeoutFuture.java @@ -17,6 +17,7 @@ import static com.google.common.util.concurrent.MoreExecutors.directExecutor; import com.google.common.annotations.GwtIncompatible; +import com.google.common.annotations.J2ktIncompatible; import com.google.common.base.Preconditions; import java.util.concurrent.ExecutionException; import java.util.concurrent.Future; @@ -34,6 +35,7 @@ * in an {@link ExecutionException}) if the specified duration expires. The delegate future is * interrupted and cancelled if it times out. */ +@J2ktIncompatible @GwtIncompatible @ElementTypesAreNonnullByDefault final class TimeoutFuture extends FluentFuture.TrustedFuture { diff --git a/android/guava/src/com/google/common/util/concurrent/UncaughtExceptionHandlers.java b/android/guava/src/com/google/common/util/concurrent/UncaughtExceptionHandlers.java index 58c01c998122..1dc1094d4f94 100644 --- a/android/guava/src/com/google/common/util/concurrent/UncaughtExceptionHandlers.java +++ b/android/guava/src/com/google/common/util/concurrent/UncaughtExceptionHandlers.java @@ -17,6 +17,7 @@ import static java.util.logging.Level.SEVERE; import com.google.common.annotations.GwtIncompatible; +import com.google.common.annotations.J2ktIncompatible; import com.google.common.annotations.VisibleForTesting; import java.lang.Thread.UncaughtExceptionHandler; import java.util.Locale; @@ -28,6 +29,7 @@ * @author Gregory Kick * @since 8.0 */ +@J2ktIncompatible @GwtIncompatible @ElementTypesAreNonnullByDefault public final class UncaughtExceptionHandlers { diff --git a/android/guava/src/com/google/common/util/concurrent/UncheckedTimeoutException.java b/android/guava/src/com/google/common/util/concurrent/UncheckedTimeoutException.java index 8e30fca37fd1..181de101f3ba 100644 --- a/android/guava/src/com/google/common/util/concurrent/UncheckedTimeoutException.java +++ b/android/guava/src/com/google/common/util/concurrent/UncheckedTimeoutException.java @@ -15,6 +15,7 @@ package com.google.common.util.concurrent; import com.google.common.annotations.GwtIncompatible; +import com.google.common.annotations.J2ktIncompatible; import javax.annotation.CheckForNull; /** @@ -23,6 +24,7 @@ * @author Kevin Bourrillion * @since 1.0 */ +@J2ktIncompatible @GwtIncompatible @ElementTypesAreNonnullByDefault public class UncheckedTimeoutException extends RuntimeException { diff --git a/android/guava/src/com/google/common/util/concurrent/Uninterruptibles.java b/android/guava/src/com/google/common/util/concurrent/Uninterruptibles.java index b41edc135b25..8428f67d7404 100644 --- a/android/guava/src/com/google/common/util/concurrent/Uninterruptibles.java +++ b/android/guava/src/com/google/common/util/concurrent/Uninterruptibles.java @@ -19,6 +19,7 @@ import com.google.common.annotations.GwtCompatible; import com.google.common.annotations.GwtIncompatible; +import com.google.common.annotations.J2ktIncompatible; import com.google.common.base.Preconditions; import com.google.errorprone.annotations.CanIgnoreReturnValue; import java.util.concurrent.BlockingQueue; @@ -50,6 +51,7 @@ public final class Uninterruptibles { // methods is identical, save for method being invoked. /** Invokes {@code latch.}{@link CountDownLatch#await() await()} uninterruptibly. */ + @J2ktIncompatible @GwtIncompatible // concurrency public static void awaitUninterruptibly(CountDownLatch latch) { boolean interrupted = false; @@ -73,6 +75,7 @@ public static void awaitUninterruptibly(CountDownLatch latch) { * Invokes {@code latch.}{@link CountDownLatch#await(long, TimeUnit) await(timeout, unit)} * uninterruptibly. */ + @J2ktIncompatible @GwtIncompatible // concurrency @SuppressWarnings("GoodTime") // should accept a java.time.Duration public static boolean awaitUninterruptibly(CountDownLatch latch, long timeout, TimeUnit unit) { @@ -103,6 +106,7 @@ public static boolean awaitUninterruptibly(CountDownLatch latch, long timeout, T * * @since 23.6 */ + @J2ktIncompatible @GwtIncompatible // concurrency @SuppressWarnings("GoodTime") // should accept a java.time.Duration public static boolean awaitUninterruptibly(Condition condition, long timeout, TimeUnit unit) { @@ -127,6 +131,7 @@ public static boolean awaitUninterruptibly(Condition condition, long timeout, Ti } /** Invokes {@code toJoin.}{@link Thread#join() join()} uninterruptibly. */ + @J2ktIncompatible @GwtIncompatible // concurrency public static void joinUninterruptibly(Thread toJoin) { boolean interrupted = false; @@ -150,6 +155,7 @@ public static void joinUninterruptibly(Thread toJoin) { * Invokes {@code unit.}{@link TimeUnit#timedJoin(Thread, long) timedJoin(toJoin, timeout)} * uninterruptibly. */ + @J2ktIncompatible @GwtIncompatible // concurrency @SuppressWarnings("GoodTime") // should accept a java.time.Duration public static void joinUninterruptibly(Thread toJoin, long timeout, TimeUnit unit) { @@ -231,6 +237,7 @@ public static void joinUninterruptibly(Thread toJoin, long timeout, TimeUnit uni * @throws TimeoutException if the wait timed out */ @CanIgnoreReturnValue + @J2ktIncompatible @GwtIncompatible // TODO @SuppressWarnings("GoodTime") // should accept a java.time.Duration @ParametricNullness @@ -258,6 +265,7 @@ public static void joinUninterruptibly(Thread toJoin, long timeout, TimeUnit uni } /** Invokes {@code queue.}{@link BlockingQueue#take() take()} uninterruptibly. */ + @J2ktIncompatible @GwtIncompatible // concurrency public static E takeUninterruptibly(BlockingQueue queue) { boolean interrupted = false; @@ -284,6 +292,7 @@ public static E takeUninterruptibly(BlockingQueue queue) { * @throws IllegalArgumentException if some property of the specified element prevents it from * being added to the given queue */ + @J2ktIncompatible @GwtIncompatible // concurrency public static void putUninterruptibly(BlockingQueue queue, E element) { boolean interrupted = false; @@ -305,6 +314,7 @@ public static void putUninterruptibly(BlockingQueue queue, E element) { // TODO(user): Support Sleeper somehow (wrapper or interface method)? /** Invokes {@code unit.}{@link TimeUnit#sleep(long) sleep(sleepFor)} uninterruptibly. */ + @J2ktIncompatible @GwtIncompatible // concurrency @SuppressWarnings("GoodTime") // should accept a java.time.Duration public static void sleepUninterruptibly(long sleepFor, TimeUnit unit) { @@ -335,6 +345,7 @@ public static void sleepUninterruptibly(long sleepFor, TimeUnit unit) { * * @since 18.0 */ + @J2ktIncompatible @GwtIncompatible // concurrency @SuppressWarnings("GoodTime") // should accept a java.time.Duration public static boolean tryAcquireUninterruptibly( @@ -348,6 +359,7 @@ public static boolean tryAcquireUninterruptibly( * * @since 18.0 */ + @J2ktIncompatible @GwtIncompatible // concurrency @SuppressWarnings("GoodTime") // should accept a java.time.Duration public static boolean tryAcquireUninterruptibly( @@ -379,6 +391,7 @@ public static boolean tryAcquireUninterruptibly( * * @since 30.0 */ + @J2ktIncompatible @GwtIncompatible // concurrency @SuppressWarnings("GoodTime") // should accept a java.time.Duration public static boolean tryLockUninterruptibly(Lock lock, long timeout, TimeUnit unit) { @@ -408,6 +421,7 @@ public static boolean tryLockUninterruptibly(Lock lock, long timeout, TimeUnit u * * @since 30.0 */ + @J2ktIncompatible @GwtIncompatible // concurrency public static void awaitTerminationUninterruptibly(ExecutorService executor) { // TODO(cpovirk): We could optimize this to avoid calling nanoTime() at all. @@ -420,6 +434,7 @@ public static void awaitTerminationUninterruptibly(ExecutorService executor) { * * @since 30.0 */ + @J2ktIncompatible @GwtIncompatible // concurrency @SuppressWarnings("GoodTime") public static boolean awaitTerminationUninterruptibly( diff --git a/android/guava/src/com/google/common/util/concurrent/WrappingExecutorService.java b/android/guava/src/com/google/common/util/concurrent/WrappingExecutorService.java index e28231d9a2f9..d6684b80980b 100644 --- a/android/guava/src/com/google/common/util/concurrent/WrappingExecutorService.java +++ b/android/guava/src/com/google/common/util/concurrent/WrappingExecutorService.java @@ -19,6 +19,7 @@ import static com.google.common.util.concurrent.Platform.restoreInterruptIfIsInterruptedException; import com.google.common.annotations.GwtIncompatible; +import com.google.common.annotations.J2ktIncompatible; import com.google.common.collect.ImmutableList; import com.google.errorprone.annotations.CanIgnoreReturnValue; import java.util.Collection; @@ -42,6 +43,7 @@ * * @author Chris Nokleberg */ +@J2ktIncompatible @GwtIncompatible @ElementTypesAreNonnullByDefault abstract class WrappingExecutorService implements ExecutorService { diff --git a/android/guava/src/com/google/common/util/concurrent/WrappingScheduledExecutorService.java b/android/guava/src/com/google/common/util/concurrent/WrappingScheduledExecutorService.java index 6c2e4848146b..d533fc632bd0 100644 --- a/android/guava/src/com/google/common/util/concurrent/WrappingScheduledExecutorService.java +++ b/android/guava/src/com/google/common/util/concurrent/WrappingScheduledExecutorService.java @@ -15,6 +15,7 @@ package com.google.common.util.concurrent; import com.google.common.annotations.GwtIncompatible; +import com.google.common.annotations.J2ktIncompatible; import java.util.concurrent.Callable; import java.util.concurrent.ScheduledExecutorService; import java.util.concurrent.ScheduledFuture; @@ -29,6 +30,7 @@ * * @author Luke Sandberg */ +@J2ktIncompatible @GwtIncompatible @ElementTypesAreNonnullByDefault abstract class WrappingScheduledExecutorService extends WrappingExecutorService diff --git a/android/guava/src/com/google/thirdparty/publicsuffix/PublicSuffixPatterns.java b/android/guava/src/com/google/thirdparty/publicsuffix/PublicSuffixPatterns.java index a486eca8cb9a..fea7ed48a481 100644 --- a/android/guava/src/com/google/thirdparty/publicsuffix/PublicSuffixPatterns.java +++ b/android/guava/src/com/google/thirdparty/publicsuffix/PublicSuffixPatterns.java @@ -42,13 +42,13 @@ private PublicSuffixPatterns() {} /** If a hostname is contained as a key in this map, it is a public suffix. */ public static final ImmutableMap EXACT = TrieParser.parseTrie( - "a&0&0trk9--nx?27qjf--nx?e9ebgn--nx?nbb0c7abgm--nx??1&2oa08--nx?apg6qpcbgm--nx?hbbgm--nx?rdceqa08--nx??2&8ugbgm--nx?eyh3la2ckx--nx?qbd9--nx??3&2wqq1--nx?60a0y8--nx??4x1d77xrck--nx?6&1f4a3abgm--nx?2yqyn--nx?5b06t--nx?axq--nx?ec7q--nx?lbgw--nx??883xnn--nx?9d2c24--nx?a&a?it??b!.&gro?lim?moc?sr,t&en?opsgolb,?ude?vog??abila?c?ihsot?m?n??c!.&b&a?m?n??c&b?g?q??ep?fn?k&s?y??ln?no?oc,p&i-on,ohsdaerpsym,?sn?t&n?opsgolb,?un?ysrab,?i&ma?r&emarp?fa??sroc??naiva?s??d&ats?n&eit?oh??om?sa?tl??eg?f&c?ob??g!emo?naripi?oy??hskihs?i&cnal?dem!.remarf,?hs?k!on??sa!.snduolc,??jnin?k&aso?dov?ede?usto??l!.&c,gro?moc?ofni?r&ep?nb,?t&en?ni??ude?vog??irgnahs?le&nisiuc?rbmuder???m!.&ca?gro?oc?sserp?ten?vog??ahokoy?e00sf7vqn--nx?m??n!.&ac?cc?eman?gro?ibom?loohcs?moc?ni?o&c?fni?rp??r&d?o??s&u?w??vt?xm??av?is?olecrab?tea??p!.&bog?ca?d&em?ls??g&ni?ro??mo&c?n??oba?ten?ude??c?g7hyabgm--nx?ra!.&461e?6pi?iru?nru?rdda-ni?siri???s??q!.&eman?gro?hcs?lim?moc?t&en?opsgolb,?ude?vog???r&az?emac?f4a3abgm--nx?n!d5uhf8le58r4w--nx??u&kas?tan???s!.&bup?dem?gro?hcs?moc?ten?ude?vog??ac!.uban.iu,?iv??t&ad?elhta?led?oyot??u!.&a&cinniv?emirc?i&hzhziropaz?stynniv??s&edo?sedo??tlay?vatlop??bs?cc,d&argovorik?o!roghzu??tl,?e&hzhziropaz?nvir?t??f&i?ni,?g&l?ro??hk?i&stvinrehc?ykstynlemhk??k&c?m?s&nagul?t&enod?ul??v&iknarf-onavi?orteporp&end?ind?????l&iponret?opotsa&bes?ves??p??m&k?oc?s?yrk??n&c?d?i?osrehk?v?ylov??o&c,nvor??p&d?p,z??r&c?imotihz?k?ymotyhz??sk?t&en?l?z??ude?v:c?e&alokin?ik??i&alokym?hinrehc?krahk?vl?yk??k?l?o&g!inrehc??krahk??r?,xc,y&ikstinlemhk?mus?s&akrehc?sakrehc?tvonrehc???z&ib,u????v!aj?bb?et?iv??waniko?x&a?iacal??yogan?z&.&bew?c&a?i&n?rga???gro?l&im?oohcs??m&on?t??o&c!.topsgolb,?gn??radnorg?sin?t&en?la??ude?vog?wal??zip???b&00ave5a9iabgm--nx?1&25qhx--nx?68quv--nx?e2kc1--nx??2xtbgm--nx?3&b2kcc--nx?jca1d--nx??4&6&1rfz--nx?qif--nx??96rzc--nx??7w9u16qlj--nx?88uvor--nx?a&0dc4xbgm--nx?c?her?n?ra?t??b!.&erots?gro?moc?o&c?fni??ten?ude?v&og?t??zib??a??c&j?s??d&hesa08--nx?mi??g?l!.&gro?moc?ten?ude?vog??m??s!.&gro?moc?ten?ude?vog???tc-retarebsnegmrev--nx?u&lc!.&elej,snduolc,y&nop,srab,??smas??p!.ysrab,??wp-gnutarebsnegmrev--nx??c&1&1q54--nx?hbgw--nx??2e9c2czf--nx?4&4ub1km--nx?a1e--nx?byj9q--nx?erd5a9b1kcb--nx??8&4xx2g--nx?c9jrb2h--nx??9jr&b&2h--nx?54--nx?9s--nx??c&eg--nx?h3--nx?s2--nx???a!.&gro?lim?moc?rrd,ten?ude?vog??3a09--nx!.&ca1o--nx?gva1c--nx?h&ca1o--nx?za09--nx??ta1d--nx?ua08--nx???da??b&a?b?ci?f76a0c7ylqbgm--nx?sh??c!.&eugaelysatnaf,gnipparcs,liamwt,nwaps.secnatsni,revres-emag,s&nduolc,otohpym,seccaptf,?xsc,?0atf7b45--nx?a1l--nx??e!.&21k?bog?dem?esab,gro?l&aiciffo,im??moc?nif?o&fni?rp??ten?ude?vog??beuq?n?smoc??fdh?i&l&buperananab?ohtac??n&agro?ilc?osanap??sum?tic??l!.&gro?moc?oc?ten?ude?vog?yo,?l??m!.&mt?ossa??p1akcq--nx??n!.&mon?ossa??i?p??relcel?s!.&gro?moc?ten?ude?vog???t!.&e&m,w,?hc,?s?w??v!.&e0,gro?lim?moc?ten?ude?v&g:.d,,og????wp?yn??d&2urzc--nx?3&1wrpk--nx?c&4b11--nx?9jrcpf--nx???5xq55--nx?697uto--nx?75yrpk--nx?9ctdvkce--nx?a!.mon?d?er?olnwod??b2babgm--nx?c!.vog?g9a2g2b0ae0chclc--nx??e&m!bulc??r!k??sopxe?timil?w??fc?g!.&ude?vog???h&d3tbgm--nx?p?t??i!.&ased?bew?ca?etrof,hcs?lim?o&c!.topsgolb,?g??palf,ro?sepnop?ten?ym?zib??b?ordna?p?rdam??l&iub?og?row??m!.&ed,ot,pj,t&a,opsgolb,???n&a&b?l!.citats:.&setis,ved,?,raas???ob?uf??o&of?rp??r&a&c&tiderc?yalcrab??ugnav??ef506w4b--nx?k!.&oc,ude,?jh3a1habgm--nx??of??s!.&dem?gro?moc?ofni?ten?ude?v&og?t???m!kcrem???t!.topsgolb,excwkcc--nx?l??uolc!.&a&bura-vnej.&1ti,abura.rue.1ti,?tcepsrep,xo:.&ku,nt,?,?b&dnevar,ewilek:.sc,,?citsalej.piv,drayknil,elej,gnitsohdnert.&ed,hc,?letemirp:.ku,,m&edaid,ialcer.&ac,ku,su,??n&evueluk,woru,?r&epolroov,o&pav,tnemele,??tenraxa.1-se,ululetoj,wcs.&gnilebaltrams,koobelacs,latemerab.&1-&rap-rf,sma-ln,?2-rap-rf,?rap-rf.&3s,cnf:.snoitcnuf,,etisbew-3s,mhw,s8k:.sedon,,?s&8k,ecnatsni.&bup,virp,?ma-ln.&3s,etisbew-3s,mhw,s8k:.sedon,,??waw-lp.&3s,etisbew-3s,s8k:.sedon,,??xelpciffart,yawocne.ue,??za5cbgn--nx??e&1&53wlf--nx?7a1hbbgm--nx?ta3kg--nx??2a6a1b6b1i--nx?3ma0e1cvr--nx?418txh--nx?707b0e3--nx?a!.&ca?gro?hcs?lim?oc?t&en?opsgolb,?vog??09--nx??b!.&ca?gnitsohbew,nevueluk.yxorpze,pohsdaerpsym,snoitulostsohretni.duolc,topsgolb,?ortal?ut!uoy???c&0krbd4--nx!.&a2qbd8--nx?b8adbeh--nx?c6ytdgbd4--nx?d8lhbd5--nx???a&lp!.oc,?ps!.&lla4sx,rebu,tsafym,?artxe??sla??i!ffo??n&a&d?iler?nif?rusni!efil?srelevart???eics!.oby,??rofria??d!.&1sndnyd,42pi-nyd,7erauqs,amil4,b&ow-nrefeilgitsng--nx,rb-ni,vz-nelletsebgitsng--nx,?decalpb,e&daregtmueart,luhcsvresi,mohsnd,nihcamyek,?hcierebsnoissuksid,keegnietsi,lsd-ni,m&oc,rofttalpluhcs,?n&-i-g-o-l,aw-ym,e&lletsebgitsnüg,sgnutiel,?i&emtsi,lreb-n&i,yd,??norblieh-sh.ti.segap,oitatsksid-ygolonys,pv&-n&i,yd,?nyd,?refeilgitsnüg,?orp-ytinummoc,p&h21,iog:ol,,ohsdaerpsym,?r&e&ntrapdeeps.remotsuc,su&-lautriv,lautriv,?t&adpusnd,tub-ni,uor-ym,?vres&-e&bucl,mohym,?bew-emoh:.nyd,,luhcs,??ogiv-&niem,ym,??s&d-&onys,ygolonys,?nd&-&dd,nufiat,sehcsimanyd,tenretni,yard,?isoc.nyd,ps,yard,?oper-&nvs,tig,?sndd:.&nyd,sndnyd,?,?topsgolb,vresi-&niem,tset,?xi2,y&awetag-&llawerif,ym,?srab,tic-amil,?zten&mitbel,sadtretteuf,??art!.oby,?i&sdoow?ug??nil?on--nx??e!.&bil?dem?eif?gro?irp?kiir?moc!.topsgolb,?pia?ude?vog??ei?ffoc?gg?r&f?ged???f&a&c?s??il??g!.&gro?lim?moc?t&en?vp??ude?vog??a&f?gtrom?p!.&3xlh,detalsnart,grebedoc,kselp,sndp,tengam,xlh,y&cvrp,kcor,???rots?yov??elloc?na&hcxe?ro!.hcet,??roeg?ug??i!.&pohsdaerpsym,topsgolb,vog??tilop?v&bba?om???j!.&fo,gro?oc?ten???k!.&c&a?s??e&m?n??ibom?o&c!.topsgolb,?fni?g??ro??i&b?l?n???l&a&dmrif?s!.rof,rof???b&a?i&b?dua???c&aro?ric??dnik?g!oog??i&bom?ms??l&asal?erauqa??ppa?uhcs?yts!efil???m!.&4&32i,p&ct,v,??66c,ailisarb,b&dnevar,g-raegelif,?ca?duolcsd,e&d-raegelif,i&-raegelif,lpad:.tsohlacol,,?pcm,?g&ro?s-raegelif,?hctilg,kcatsegde,noitatsksid,o&bmoy,c?t&nigol,poh,??p&i&on,snart.etis,?j-raegelif,ohbew,?r&aegelif,idcm,ofsnd,?s&dym,ndd,ti!bt,?umhol,?t&en?s&acdnuos,ohon,??u&a-raegelif,de??v&irp?og??y&golonys,olpedew,srab,??a&g?n!.&reh.togrof,sih.togrof,???em?i&rp?twohs??orhc?w??n!goloc?i&lno!.&egats-oree,oree,ysrab,??w??o!.&derno:.gnigats,,ecivres,knilemoh,r&ednu,of,??hp?latipac?ts&der?e&gdirb?rif???z!.&66duolc,amil,sh,???ruoblem??om?p!.&bog?gro?lim?mo&c?n??t&en?opsgolb,?ude??irg?yks??r!.&mo&c?n??ossa?topsgolb,?a&c!htlaeh??pmoc?wtfos??bc?eh?if?ots!.&e&rawpohs,saberots,?yflles,??taeht?u&ces?sni?t&inruf?necca??za???s!.&a!bap.us,?b!ibnal?rofmok??c!a??d!b?n&arb?ubroflanummok???e?f!noc,?g!ro??h!f??i!trap??k!shf??l?m!oc,t??n!mygskurbrutan??o?p!ohsdaerpsym,p??r!owebdluocti,?s!serp?yspoi,?t!opsgolb,?u?vhf?w?x!uvmok??y?z??a&c?el?hc??i&er?urc??nesemoh?roh?uoh??t&a&d?ts&e!laer??lla???is!.&e&lej,nilnigol,r&etnim,ocevon,?winmo,?k&rowtenoilof,wnf,?laicosnepo,n&eyb,oyc,?spvtsaf,thrs,xulel,ysrab,?bew!.remarf,??ov?ra?t&ioled?ol??utitsni??u&lb?qi&nilc?tuob???v!.&21e?b&ew?ib?og??ce&r?t??erots?gro?lim?m&o&c?n??rif??o&c?fni??rar?stra?t&en?ni??ude?vog??as?e3gerb2h--nx?i&l!.xlh,?rd?ssergorp??ol??w&kct--nx?r??xul?y!.&gro?lim?moc?ten?ude?vog????f&0f3rkcg--nx?198xim--nx?280xim--nx?7vqn--nx?a!.&gro?moc?ten?ude?vog???b!.vog?wa9bgm--nx??c!.topsgolb,a1p--nx!.&a14--nx,b8lea1j--nx,c&avc0aaa08--nx,ma09--nx,?f&a1a09--nx,ea1j--nx,?gva1c--nx,nha1h--nx,pda1j--nx,zila1h--nx,??ns??ea1j--nx?g?iam?l&a1d--nx?og??n!.&bew?cer?erots?m&oc?rif??ofni?re&hto?p??stra?ten???orp?p!.&gro?moc?ude???rus?t!.hcs,w??vd7ckaabgm--nx?w!.&hcs,zib,???g&2&4wq55--nx?8zrf6--nx??3&44sd3--nx?91w6j--nx!.&a5wqmg--nx?d&22svcw--nx?5xq55--nx??gla0do--nx?m1qtxm--nx?vta0cu--nx????455ses--nx?5mzt5--nx?69vqhr--nx?7&8a4d5a4prebgm--nx?rb2c--nx??a!.&gro?mo&c?n??oc?ten??vd??b!.&0?1?2?3?4?5?6?7?8?9?a?b?c?d?e?f?g?h?i?j?k?l?m?n?o?p?q?r?s?t!opsgolb,?u?v?w?x?y!srab,?z???c!b?za9a0cbgm--nx??e!.&eman?gro?ics?lim?moc!.topsgolb,?nue?ten?ude?vog??a??g!.&ayc,gro?lenap:.nomead,,oc?saak,ten???i&a?v??k!.&g&olb,ro??ku,lim?moc?oi,pj,su,ten?ude?v&og?t,???m!.&drp?gro?lim?m&o&c?n??t??oc?ude?vog??pk??n!.&dtl,eman?gro?hcs?i!bom??l&im?oc,?m&oc!.topsgolb,?rif,?neg,ogn,ten?ude?vog??aw?i!b!mulp??car?d&art?dew??h&sif?tolc??k&iv?oo&b?c???ls?n&aelc?iart??p!pohs??re&enigne?tac??t&ad?ekram!.&htiw,morf,??hgil?lusnoc?neg?ov?soh!.tfarcnepo,??vi&g?l???o!s??u&rehcisrev?smas?tarebsnegömrev???o&d?lb?og!.&duolc,etalsnart,???r&2n084qlj--nx?ebmoolb?o!.&77ndc.c:sr,,a&remacytirucesym,t&neimip,sivretla,?z,?bew-llams,d&ab-yrev-si,e&sufnocsim,vas-si,?nuof-si,oog-yrev-si,uolc&arfniarodef,mw,??e&a,cin-yrev-si,grof&loot,peh,?l&as-4-ffuts,poeparodef,?m&-morf,agevres,ohruoyslles,?n&ozdop,uma.elet,?r&ehwongniogyldlob,iwym,uces-77ndc.nigiro.lss,?t&adidnac-a-si,is&-ybboh,golb,???fehc-a-si,golbymdaer,k&eeg-a&-si,si,?h,nut,?l&i&amwt,ve-yrev-si,?lawerif&-ym,ym,?sd-ni,?m&acssecca,edom-elbac,?n&af&blm,cfu,egelloc,lfn,s&citlec-a-si,niurb-a-si,tap-a-si,?xos-a-si,?ibptth,o&itatsksid,rviop,?pv-ni,?o&jodsnd,tp&az,oh,??p&i&-on,fles,?o&hbew,tksedeerf,?tf&e&moh,vres,?ym,??r&e&gatop,ppepteews,su-xunil-a-si,?gmtrec,vdmac,?s&a&ila&nyd,snd,?nymsd,?b&alfmw,bevres,?d&ikcet.3s,ylimaf,?eirfotatophcuoc,j,koob-daer,ltbup,nd&-won,deerf,emoh,golb,kcud,mood,nyd:.&emoh,og,?,ps,rvd,tog,uolc,?s&a-skcik,ndd,?tnemhcattaomb,u,?t&ce&jorparodef.&duolc,gts.so.ppa,so.ppa,?riderbew,?e&ews-yrev-si,nretni&ehtfodne,fodne,??hgink-a-si,oi-allizom,s&ixetn&od,seod,?o&h-emag,l-si,?rifyam,??ue:.&a&-q,c,?cm,dc,e&b,d,e,i,m,s,?g&b,n,?hc,i&f,s,?k&d,m,s,u,?l&a,i,n,p,?n&c,i,?o&n,r,ssa,?pj,r&f,g,h,k,t,?s&e,i:rap,,u,?t&a,en,i,l,m,ni,p,?u&a,de,h,l,r,?vl,y&c,m,?z&c,n,??,vresnyd,x&inuemoh,unilemoh,?y&limafxut,srab,???ub&mah?oj???s!.&delacsne,gro?moc?rep?t&en?opsgolb,?ude?vog??gb639j43us5--nx??t?u!.&c&a?s??en?gro?moc?o&c?g??ro?topsgolb,??v!.ta,a1c--nx??wsa08--nx??h&0ee5a3ld2ckx--nx?4wc3o--nx!.&a&2xyc3o--nx?3j0hc3m--nx?ve4b3c0oc21--nx??id1kzuc3h--nx?l8bxi8ifc21--nx?rb0ef1c21--nx???8&8yvfe--nx?a7maabgm--nx??b!.&gro?moc?ten?ude?vog??mg??c!.&7erauqs,amil4,duolc-drayknil,gniksnd,p&h21,ohsdaerpsym,?sndtog,topsgolb,wolf.e&a.1pla,nigneppa,?xi2,ytic-amil,?aoc?et?ir!euz??r&aes?uhc??sob?taw!s???d0sbgp--nx?f&2lpbgm--nx?k??g!.&gro?lim?moc?ude?vog???m!a1j--nx??ocir?p!.&gro?i?lim?moc?ogn?ten?ude?vog???s!.&g&nabhsah,ro??l&im?xv,?m&oc?roftalp.&cb,su,tne,ue,??pib,ten", - "?vog?won,yolpedew,?a&c?nom??i&d?f?ri???t!.&ca?enilno,im?ni?o&c?g??pohs,ro?ten??iaf!.oby,?laeh!.arh,?orxer?ra&ba?e???vo!.lopdren,?zb??i&3tupk--nx?7a0oi--nx?a!.&ffo?gro?moc?ten?uwu,?1p--nx?bud?dnuyh?tnihc??b!.&gro?moc?oc?ro?ude??ahduba?o!m!.&duolcsd,ysrab,???s??c!.&ayb-tropora--nx?ca?d&e?m??esserp?gro?ln,moc?nif,o&c?g?ssa??ro?t&en?ni?roporéa??ude?vuog??cug?t??d&dk?ua??e&bhf--nx?piat??f!.&aw5-nenikkh--nx,dnala?i&ki,spak,?mroftalpduolc.if,nenikkäh,pohsdaerpsym,retnecatad.&omed,saap,?topsgolb,yd,?onas??g!.&d&om?tl??gro?moc?ude?vog???h&c&atih?ra??s&abodoy?ibustim???juohs?k!.&gro?moc?ofni?ten?ude?vog?zib??b4gc--nx?iw!.remarf,?nisleh?s?uzus??l!.&aac,topsgolb,?drahcir?iamsi??maim?n!.&b&ew?og??ca?gro?lim?mo&c?n??ni?o&c?fni??pp?t&en?ni??ude?zib??airpic?i&hgrobmal?m??re??om?rarref?s!.&egaptig,ppatig,topsgolb,?ed??t&aresam?i&c?nifni??rahb?tagub??ut?v!.&21k?gro?moc?oc?ten???wik?xa&rp?t??yf??j&6pqgza9iabgm--nx?8da1tabbgl--nx?b!.&ossa?topsgolb,uaerrab?vuog???d?f!.&ca?eman?gro?lim?moc?o&fni?rp??ten?vog?zib???nj?s?t!.&bew?c&a?in??eman?gro?lim?moc?o&c?g??t&en?ni?set??ude?vog?zib???yqx94qit--nx??k&8uxp3--nx?924tcf--nx?arfel?c&a&bdeef?lb??ebdnul?ilc?reme??d!.&erots,ger,mrif,oc,pohsdaerpsym,topsgolb,zib,?t??e&es?samet??h!.&a&4ya0cu--nx?5wqmg--nx??b3qa0do--nx?cni,d&2&2svcw--nx?3rvcl--nx??5xq55--nx?tl,?g&a0nt--nx?la0do--nx?ro??i&050qmg--nx?7a0oi--nx?xa0km--nx??m&1qtxm--nx?oc??npqic--nx?saaces,t&en?opsgolb,?ude?v&di?og?ta0cu--nx??xva0fz--nx?人&个?個?箇??司公?府政?絡&網?网??織&組?组??织&組?组??络&網?网??育&敎?教???n??i&tsob?vdnas??l!.&bew?c&a?os??dtl?gro?hcs?letoh?moc?nssa?ogn?prg?t&en?ni??ude?vog??at?cd?is??m!.&eman?fni?gro?moc?t&en?opsgolb,?ude?vog???n&ab!cfdh?etats?mmoc?t&en?fos??u??i!l!.&noyc,pepym,??p???oob?p!.&b&ew?og??gro?kog?m&af?oc??nog?ofni?pog?sog?ten?ude?vog?zib???row!.&morf,ot,?ten!.&htumiza,nolt,o&c,vra,??doof???s!.topsgolb,?t?u!.&c&a?lp??dtl?e&cilop?m??gro!.&gul:g,,sgul,yr&ettoly&lkeew,tiniffa,?tneelffar,???lenap-tnednepedni,n&noc,oissimmoc-&layor,tnednepedni,??o&c!.&bunsorter.tsuc,e&lddiwg,n&ilnoysrab,ozgniebllew,??krametyb.&hd,mv,?omida,p&i-on,ohsdaerpsym,?t&fihsreyal.j,opsgolb,?vres-hn,ysrab,??rpoc,?psoh,shn?t&en?nmyp,seuqni-tnednepedni,?vog!.&eci&ffoemoh,vres,?ipa,ngiapmac,??weiver-tnednepedni,y&riuqni-&cilbup,tnednepedni,?srab,????l&04sr4w--nx?a!.&gro?lim?moc?t&en?opsgolb,?ude?vog??bolg?c?ed?g!el??i&c&nanif!.oc,lpl??os??romem?tnedurp??n&if?oitanretni??t&i&gid!.sppaduolc:.nodnol,,?p&ac?soh???ned?ot??utum!nretsewhtron???c!.&bog?lim?oc?topsgolb,vog???dil?e&datic?n&ahc?nahc!gnikooc?levart?rehtaew???t!ria?tam??vart??f&8f&pbgo--nx?tbgm--nx??a?n??g!.&gro?moc?oc?ten?ude?xx,zib,??h&d?op??i!.&21k?ca?fdi?gro?inum?oc!.&egapvar,redrotibat,topsgolb,??ten?vog??a&f?m&e?g?toh???m?r??l&a&b&esab?t&eksab!.&sua,zn,??oof???c?mt??e&d?hs??ihmailliw?j??m!.&esserp?gro?moc?ten?ude?v&og?uog????n!.&no&med,rtsic,?oc,pohsdaerpsym,retsulc-gnitsoh,topsgolb,vog,yalphk,?o??o&a?btuf?l!.gmo,?o&c!.&ed,rotnemele,??hcs??rit?u??p!.&a&cin&diws?gel??d&g,ortso?urawon??i&dem?mraw?nydg,?k&elo&guld?rtso??slopolam?tsu?ytsyrut??l&ip?o&kzs?w&-awolats?oksnok????n&erapohs,img?zcel,?rog&-ai&bab?nelej??j?z??syn?tsaim?w&a&l&eib?i?o??zsraw??o&namil?tainop,??z&eiwolaib?mol???c&e&iw&alselob?o&nsos?rtso???le&im?zrogz???orw,p??d&em,ia?ragrats?uolc&inu,sds,??e&c&i&lrog?w&ilg,o&hc&arats?orp??klop?tak????yzreibok??i&csjuoniws?ksromop?saldop??l&ahdop?opo??napokaz,tatselaer?z&romop?swozam???g&alble?ezrbo&lok?nrat??ro??hcyzrblaw?i&csomohcurein?grat?klawus??k&e&rut?walcolw??in&byr?diws,sark,?le?o&nas?tsylaib??rob&el?lam??s&als?jazel?nadg,puls?rowezrp???l&colw?e&r?vart??i&am?m???m&o&c?dar?n?tyb??s&g?iruot??t!a???n&a&gaz?nzop,?i&bul?cezczs?lbul,molow?nok?zd&eb?obeiws???uleiw?y&tzslo?z&rtek?seic????o&c,fni?k&celo?zdolk??lkan?n&leim?pek?t&uk?yzczs??z&copo?eing?rowaj???rga?tua?w&ejarg?ogarm???p&e&eb,lks!emoh,??klwwortso?ohs!-ecremmoce,daerpsym,??romophcaz?sos?t&aiwop?en?opos,ra,sezc??ude?v&irp?og!.&a&p?s!w???bni&p?w??ci?dtiw?essp?fiw?g&imu?u??hiiw?m&igu?rio?u!o???nds?o&ks?p!pu??s?wtsorats??p&a?sp!mk?pk?wk??u&m?p??wk?z??r&ksw?s??s&i?oiw?u?zu??talusnok?w&gzr?i&p?rg?w??m?opu?u!imzw???zouw????w&a&l&corw?sizdow??w??o&golg?k&ark,ul?zsurp??r&az?gew??t&rabul,sugua??z&coks?sezr????xes?y&buzsak?d&azczseib?ikseb??hcyt?n&jes?lod-zreimizak??pal?r&ogt?uzam??walup?zutrak??z&am-awar?c&aprak?iwol?zsogdyb??dalezc?ib?s&i&lak?p??uklo????l??r&as?f?s??s!.&gro?moc?ten?ude?vog???t!.vog??ubnatsi?x3b689qq6--nx?yc5rb54--nx??m&00tsb3--nx?1qtxm--nx?981rvj--nx?a!.&aayn,enummoc?gro?moc?o&c?idar,ken,?t&en?opsgolb,??c!bew??dretsma?e&rts?t!.&citsalej,esruocsid,???fma?xq--nx??b!.&gro?moc?ten?ude?vog??i??c!.&moc?oc?ten?vog???d!.&gro?moc?ten?ude?vog???f!.&gro?moc?oidar,ten?ude??i??g!vu96d8syzf--nx??h?i!.&ca?gro?moc?o&c!.&clp?dtl???r,?t&en?t??vt??k?rbg4--nx??k!.&drp?e&rianiretev?sserp??gro?lim?m&o&c?n??t??nicedem?ossa?pooc?s&eriaton?neicamrahp?sa??ude?v&og?uog????l&if?ohkcots??o!.&dem?gro?m&oc?uesum??o&c?rp??ten?ude?vog??b?c!.&2aq,3pmevres,5sndd,a&c&-morf,ir&bafno,fa,??g&-morf,oy-sehcaet,?i-morf,m&-morf,all&-a-si,amai,??p&-morf,c-a-si,?r&emacytirucesym,odih,?s,tadtsudgniht,v-morf,w-morf,z,?b&dnevarym,ew&-sndnyd,draiw.segap,ottad,?ildts.ipa,?c&amytirucesemoh,d-morf,esyrcs,itsalej.omed,n&-morf,vym,?p&kroweht,ytirucesemoh,?q,rievres,s-morf,?d&aerotffuts,e&calpb,ifitrec-&si,ton-si,?llortnocduolc,rewopenignepw:.sj,,tsohecapsppa,?i&-morf,rgevissam.saap,?m-morf,n&-morf,abeht-htiw-si,?s-morf,uolc&-noitatsyalp,hr,iafaw.&d&ej,yr,?nol,?meaeboda,nevia,panqym:-&ahpla,ved,?,smetsystuo,tekcilc,ved&j,pw,??vreser,wetomer,?e&butuoyhtiw,ciffo-sndnyd,d:-morf,o&celgoog,n&il.srebmem,neve.&1-&su,ue,?2-&su,ue,?3-&su,ue,?4-&su,ue,????,erf&-sndnyd,sndd,?filflahevres,gnahcxeevres,i&hcet-a-si,p-sekil,?k&auqevres,irtsretnuocevres,?l&bitpa-no,googhtiw,?m&agevres,ina-otni-si,oh-&sndnyd,ta-sndnyd,??n&-morf,ilno&-evreser,ysrab,?og-si,?r&alfduolcyrt,ehwynanohtyp:.ue,,ihcec,?srun-a-si,t&i&nuarepo,s&-ybboh,aloy,tipohs,xiw,??omer-sndnyd,upmocsma,ysgolb,?v&als-elcibuc-a-si,i&lsndd,tavresnoc-a-si,??z&amkcar,eelg,iig,??fehc-a-si,g&ni&gats-&raeghtua,swennwot,?ksndd,robsikrow,tsoh-bt.etis,?o&fgp,lb&-sndnyd,sihtsetirw,???h&n-morf,o-morf,?i&fiwehtno,h-morf,kiw-sndnyd,m-morf,p&aerocne,detsoh,?r-morf,w-morf,z&ihcppa,nilppa,??jn-morf,k&a&-morf,erfocsic,?cils-si,eeg&-a&-si,si,?sndd,?h,latsnaebcitsale:.&1-&htuos-pa,lartnec-&ac,ue,?ts&ae&-&as,su,?ht&ron-pa,uos-pa,??ew-&su,ue,vog-su,???2-ts&ae&-su,ht&ron-pa,uos-pa,??ew-&su,ue,??3-ts&aehtron-pa,ew-ue,??,o-morf,r&adhtiwtliub,ow&-&sndnyd,ta-sndnyd,?ten-orehkcats,??u,?l&a&-morf,colottad,rebil-a-si,?f-morf,i&-morf,am&-sndnyd,detsohpw,??l&ecelffaw,uf-ytnuob:.a&hpla,teb,?,?ppmswa,ru-&elpmis,taen,?ssukoreh,xegap,?m&n-morf,pml.ppa,rofe&pyt.orp,rerac-htlaeh,?sacrasevres,uirarret-yltsaf,?n&a&cilbuper-a-si,f&-sllub-a-si,racsan-a-si,?i&cisum-a-si,ratrebil-a-si,??c,dc&hsums,umpw,xirtrepmi,?eerg-a-si,i-morf,m-morf,o&ehtnaptog,isam-al-a-tse,r&italik,tap-el-tse,?s&iam-al-a-tse,replausunu,??pj,t-morf,?o&bordym,c,hce-namtsop,jodsnd,m&-morf,ed-baltlow,?n:iloxip,,ttadym,?p&2pevres,aelutym,i&-sndnyd,fles,ogol,ruoy&esol,hctid,?ym&eerf,teg,??ohsdaerpsym,pa&-rettalp,anis:piv,,esaberif,k1,lortnocduolc,oifilauq,r&aegyks,oetem:.ue,,?t&ilmaerts,norfegap,?ukoreh,?t&fevres,thevres,??r&a:-morf,tskcor-a-si,,b,e&d&iv&erp-yb-detsoh.saap,orpnwo,?ner&.ppa,no,??e&bevres,nigne-na-si,?ggolb-a-si,h&caet-a-si,pargotohp-a-si,?krow-drah-a-si,n&gised-a-si,ia&rtlanosrep-a-si,tretne-na-si,??p&acsdnal-a-si,eekkoob-a-si,?retac-a-si,subq,tn&ecysrab,iap-a-si,uh-a-si,?vres&-&ki.&cpj-rev-duolcj,duolcj,?s&ndnyd,pvtsaf,??inim,nmad,sak,?y&alp-a-si,wal-a-si,?zilibomdeepsegap,?g,ituob,k,mgrp.nex,o&-morf,sivdalaicnanif-a-si,t&areleccalabolgswa,c&a-na-si,od-a-si,?susaym,??p-morf,u&as-o-nyd,e&tsoh.&duolc-gar,hc-duolc-gar,?ugolb-nom-tse,?omuhevres,??s&a&apod,ila&nyd,snd,?nymsd,vnacremarf,?bbevres,ci&p&-sndnyd,evres,?tcatytiruces,?dylimaf,e&cived-anelab,itilitu3,lahw-eht-sevas,mag-otni-si,t&i&iis,sro,?yskciuq,??i&ht2tniop,pa&elgoog,tneltneg,??jfac,k&-morf,aerf-ten,colb&egrof,pohsym,??m&-morf,cxolb,?n&d&-pmet,dyard,golb,htiwssem,mood,tog,?kselp,nyd,ootrac-otni-si,?o&-xobeerf,xobeerf,?ppa&raeghtua,t&ikria,neg,??r&ac-otni-si,e&ntrap-paelut,tsohmaerd,??s&e&l-rof-slles,rtca-na-si,?ibodym,?tsaeb-cihtym.&a&llicno,zno,?ilay,lacarac,re&gitnef,motsuc,?sv,toleco,x:n&ihps,yl,?,?u,wanozama.&1-&ht&ron-ue.9duolc.s&fv,tessa-weivbew,?uos-&em.9duolc.s&fv,tessa-weivbew,?fa.9duolc.s&fv,tessa-weivbew,?pa&-3s,.&3s,9duolc.s&fv,tessa-weivbew,?etisbew-3s,kcatslaud.3s,??ue.9duolc.s&fv,tessa-weivbew,???la&nretxe-3s,rtnec-&ac&-3s,.&3s,9duolc.s&fv,tessa-weivbew,?etisbew-3s,kcatslaud.3s,??ue&-3s,.&3s,9duolc.s&fv,tessa-weivbew,?etisbew-3s,kcatslaud.3s,????ts&ae&-&as&-&3s,etisbew-3s,?.&9duolc.s&fv,tessa-weivbew,?kcatslaud.3s,??pa.9duolc.s&fv,tessa-weivbew,?su:-etisbew-3s,.&9duolc.s&fv,tessa-weivbew,?kcatslaud.3s,?,?ht&ron-pa&-&3s,etisbew-3s,?.&9duolc.s&fv,tessa-weivbew,?kcatslaud.3s,??uos-pa&-&3s,etisbew-3s,?.&9duolc.s&fv,tessa-weivbew,?kcatslaud.3s,????ew-&su&-&3s,etisbew-3s,?.9duolc.s&fv,tessa-weivbew,??ue&-&3s,etisbew-3s,?.&9duolc.s&fv,tessa-weivbew,?kcatslaud.3s,??vog-su-&3s,spif-3s,????2-ts&ae&-su&-3s,.&3s,9duolc.s&fv,tessa-weivbew,?etisbew-3s,kcatslaud.3s,??ht&ron-pa&-3s,.&3s,9duolc.s&fv,tessa-weivbew,?etisbew-3s,kcatslaud.3s,??uos-pa&-&3s,etisbew-3s,?.&9duolc.s&fv,tessa-weivbew,?kcatslaud.3s,????ew-&su&-&3s,etisbew-3s,?.9duolc.s&fv,tessa-weivbew,??ue&-3s,.&3s,9duolc.s&fv,tessa-weivbew,?etisbew-3s,kcatslaud.3s,????3&-ts&aehtron-pa.9duolc.s&fv,tessa-weivbew,?ew-ue&-3s,.&3s,9duolc.s&fv,tessa-weivbew,?etisbew-3s,kcatslaud.3s,???s,??yasdrocsid,?t&arcomed-a-si,c&-morf,etedatad.&ecnatsni,omed,??eel&-si,rebu-si,?hgilfhtiwletoh,m-morf,n&atnuocca-na-si,e&duts-a-si,r-ot-ecaps,tnocresu&buhtig,e&capsppa,donil.pi,lbavresbo.citats,?pl,???ops&edoc,golb,ppa,?s&i&hcrana-&a-si,na-si,?laicos-a-si,pareht-a-si,tra-na-si,xetn&od,seod,??oh&piym,sfn,??u&-morf,nyekcoh-asi,?v-morf,?u&-rof-slles,4,a-sppatikria,e,h,oynahtretramssi,r:ug-a-si,,?v&n-morf,rdlf,w-morf,?w&o&lpwons-yrt,zok,?ww100,?x&bsbf.sppa,em,i&nuemoh,rtrepmi,?obaniateb,t-morf,unilemoh,?y&a&bnx:.&", - "2u,lacol-2u,?,l&erottad,pezam,?wetag-llawerif,?dnacsekil,fipohsym,k&-morf,niksisnd,?rot&ceridevitcaym,sitk,?u:goo,,w-morf,x&alagkeeg,orp&hsilbup,mapson.duolc,???zesdrocsid,?inu??m!.&dna,rof,??or?tsla??p!.&eman,nwo,??raf!.jrots,etats??s?t!.&gro?lim?mo&c?n??oc?ten?ude?vog???u&esum!.&a&92chg-seacinumocelet-e-soierroc--nx?atnav?c&i&aduj?rfatsae??rollam??d&anac?enomaledasac?irolf??e&raaihpledalihp?srednu??g&hannavas?oonattahc??hamo?i&auhsu?bmuloc!hsitirb??dem?groeg?hpledalihp?l&artsua?etalif??n&igriv?rofilac??ssur?tsonod??ksa&la?rben??l&lojal?q-snl--nx?uossim!trof???m&a&bala?nap??enic?o&m?r???n&a&cirema?idni??edasap?ilorachtuos?olecrab??r&abrabatnas?ezzivs??su?t&nalta?osennim??zalp??c&dnotgnihsaw?ebeuq?i&depolcycne?ficap?hpargonaeco?lbup?sum?t&carporihc?lec?naltadim??vu??yn??d&a&dhgab?etsmraf?m?orliar??i&rdam?ulegnedleeb??leif?n&a!l&gne?nif?ragyduj?t&ocs?rop??yram???u&brofsdgybmeh?osdnaegami???r&augria?ofxo???e&c&a&l&ap?phtrib??ps??n&a&lubma?tsiser??e&fedlatsaoc?gilletni?ics!foyrotsih????pein?rof??d&nukneklov?revasem??e&rt?tsurt??f&atnas?ildliw??g&a&lliv?tireh!lanoitan???dirbmac?rog??i&cnum?nollaw??koorbrehs?l&ab?bib?cycrotom?i&ssim?txet??oks?tsac??m&affollah?it!iram??utsoc??n&golos?ilno?recul??r&a&uqs?waled!foetats???i&hs&acnal?kroy?pmahwen??otsih??omitlab?ut&an?cetihcra?inruf?luc!irga?su???vuol??s&abatad?iacnarf?sius?uoh!lum???t&a&locohc?rak?ts!e!yrtnuoc!su?????imesoy?tevroc??u&qihpargonaeco?velleb??vit&caretni?omotua???f&iuj?ohgrub??g&n&i&dliub?ginerevmuesum?kiv?lahw?nim?peekemit?vil??ulmmastsnuk??orf?r&ebnrats?u&b&ierf?le?m&ah?uan??ram?s&mailliw!lainoloc??naitsirhc?retepts??zlas??ob&irf?mexul?????h&atu?c&raeser?sirotsih?uot??g&ea1h--nx?rubsttip??si&tirb?wej??t&laeh?ro&n?wtrof??uo&mnom?y????i&d6glbhbd9--nx?iawah?k&nisleh?s??lad!rodavlas??sissa?tannicnic??k&c&nivleeg?olc!-dna-hctaw?dnahctaw???fj?inebis?l&is?ofron??na&rfenna?t??oorbnarc?r&am&ned?reiets??oy!wen????l&a&ci&dem?golo&eahcra?meg?oz??natob?rotsih??ertnom?iromem?noita&cude?n??oc?rutluc?trop?utriv?van??e&nurb?s&ab?surb??utriv??i&artnogero?sarb??l&a&besab?hsnoegrus??e&hs?rdnevle??i&b?m!dniw????o&bup?ohcs?tsirb???m&a&dretsma?ets?h&netlehc?rud???ct?elas!urej??l&if?ohkcots?u??raf?silanruoj?u&esumyrotsihlarutan?ira&tenalp?uqa??terobra???n&a&c!irema!evitan???gihcim?i&dni?tpyge??mfoelsi?wehctaksas??e&d&alokohcs?ews?rag!cinatob?lacinatob?s&nerdlihc?u????gahnepoc?hcneum?laftsew?ppahcsnetewruutan?r&dlihc?ednaalv?hu!dnutamieh???sseig??gised!dn&atra?utsnuk???h&ab!nesie??ojts??i&lreb?tsua??l&eok?ocnil??n&ob?urbneohcs??o&dnol?gero?i&s&iv&dnadnuos?elet??nam??t&a&c&inummoc?ude!tra???dnuof?erc?i&cossa?va??kinummokelet?nissassa?r&belectsevrah?oproc?tsulli??silivic?t&nalp?s??vres&erp?noclatnemnorivne??zilivic??c&elloc?if-ecneics??ibihxe???ri?s&dnah?imaj?reffej?sral??t&erbepac?nilc?sob???r&e&b?dom?tsew?uab?zul??obredap??vahnebeok?wot??o&2a6v-seacinumoc--nx?ablib?c&edtra?ixemwen?sicnarfnas??elap?g&a&cihc?to??eidnas??i&cadnuf?diserp?ratno??llecitnom?mitiram?nirot?r&htna?ienajedoir???pohskrow?qari?r&aw!dloc?livic??dd?e&b&ma?yc??irrac?llimsiwel?naksiznarf?papswen?t&aeht?exe?nec!ecneics?larutluc?muesum?tra??s&ehc&nam?or??neum??upmoc???ia!nepo??obal?u&asonid?obal?takirak???s&a&l&g?l&ad?eh???xet??di&k?pardnarg??e&cneics!larutan??dnal?hcsi&deuj?rotsih!nizidem?rutan??selhcs??itinamuh?l&aw?egnasol?l&e&rutansecneics?xurb??iasrev???r&e&em?ugif??tsac??suohcirotsih?u&en?q&adac?itna!nacirema?su????õçacinumoc!elet-e-soierroc???gnirpsmlap?htab?i&lopanaidni?rap?uoltnias?xa??l&essurb?lod??mraeriflanoitan?n&a&blats?l??erdlihc?oi&snam?tacinummoc!elet-dna-stsop???äl??re&dnalf?lttes?mraf?nim?tnececneics??s&alg?erp??t&farc!dnastra??nalp?olip?ra!e&nif?vitaroced!su???su?xuaeb???u&b!muloc??cric???t&agilltrop?cejorp?dats?e&esum?kramnaidni??iorted?ne&m&elttes?norivne?piuqemraf??vnoc??oped?r&a!drib?enif?gttuts?hsiwej?kcor?n&acirema?ootrac??tamsa?yraropmetnoc??op&aes?snart?wen??ufknarf??s&a&cdaorb?octsae??ewhtuos?ilayol?nuk?r&ohnemled?uhlyram??urt???u&a&bgreb?etalpodaroloc??rmyc??w&ocsom?rn??x&esse?ineohp?nam?tas??y&a&bekaepasehc?w&etag?liar???camrahp?doc?e&hsub?l&ekreb?l&av!eniwydnarb??ort???n&dys?om??rrus?s&nreug?rejwen???golo&e&ahcra?g??motne?nh&cet?te??oz?po&rhtna?t??roh??hpargotohp?l&etalihp?imaf??m&edaca?onortsa??n&atob?yn??ps?r&a&ropmetnoc?tilim??e&diorbme?llag!tra??vocsid??lewej?nosameerf?otsih!dnaecneics?ecneics?gnivil!su??la&col?rutan??retupmoc?su??tsudnidnaecneics??spelipe?t&eicos!lacirotsih??i&nummoc?srevinu??nuoc???z&arg?iewhcs?nil?ojadab?urcatnas??моки?םילשורי???rof??z!.&ca?gro?hcs?lim?moc?o&c?fni??ten?ude?vog?zib????n&315rmi--nx?a&brud?cilbuper?f?grompj?hkaga?idraug?m?ol?ssin?u&hix?qna??varac?yalo??b!.&gro?moc?oc,ten?ude?vog??c??c!.&ah?bh?c&a?s??d&5xq55--nx?g?s?uolctnatsni,?eh?g&la0do--nx?ro??h&a?q?s??i&7a0oi--nx?h??j&b?f?t?x?z??kh?l&h?im?j??m&n?oc!.swanozama.&1-htron-nc.3s,be.1-&htron-nc,tsewhtron-nc,????n&h?l?s?y??om?qc?s&g?j??t&cennockciuq.tcerid,en??ude?vog?wt?x&g?j?n?s??z&g?x??司公?絡網?络网??b??d&g!.ypnc,?ka??e&drag?erg?fuak?gawsklov?hctik?i&libommi?w??m!.r&iaper,of,??po?r!ednaalv??sier?ves??g!.&ca?gro?moc?ten?ude?vog??is&ed!.ssb,?irev???h!.&bog?cc,gro?lim?moc?ten?ude???i!.&ac?bew,c&a?in??dni?e&m?sabapus,?g&5?6?p?ro??i&a?hled??ku?l&evart?im??m&a?oc?rif??n&c?eg??o&c?fni?i?rp??p&ooc?u??r&ahib?d?e??s&c?er?nduolc,senisub?u??t&arajug?en!retni??ni?opsgolb,sop??ude?v&og?t??ysrab,zib??elknivlac?griv?ks?lreb?p?v?w!.taht,?x??k!.&gro?ten?ude?vog???l&eok?ocnil??m!.&cyn,gro?ude?vog???o&dnol!.&fo,ni,??i&hsaf!.fo,?n&o?utiderc??siv!orue??t&a&cude!.oc,?dnuof?tsyalp??c&etorp?u&a?rtsnoc?????kin?las?mrom?nac?p&q?uoc??s&iam?pe?scire??t&ron?sob??zama??p!.&gro?oc?ten?ude?vog??k??r&e&c?yab??op!.eidni,??s!.&gro?moc?osrep?t&opsgolb,ra??ude?v&inu?uog????t!.&d&ni?uolcegnaro,?gro?ltni?m&oc!nim??siruot??nif?o&fni?srep??sne?t&an?en??vog??m??u&f?r!.&bdnevar,lper,retropno,s&h,revres,?tnempoleved,??stad?xamay?y??v!.&ca?eman?gro?htlaeh?moc?o&fni?rp??t&en?ni?opsgolb,?ude?vog?zib???wo&rc?t!epac????o&76i4orfy--nx?a!.&bp?de?go?oc?ti?vg??boat??b!.&a&ci&sum?tilop??i&c&arcomed?neic??golo&ce?ncet??m&edaca?onoce??rt&ap?sudni??vilob??n&egidni?icidem??serpme?tsiver?vitarepooc??b&ew?og??dulas?e&rbmon?tr&a?op&ed?snart????g&olb?ro??ikiw?l&a&noi&canirulp?seforp??rutan??im??moc?o&fni?lbeup?rga?tneimivom??saiciton?t&askt?en?ni??ude?vt??h?iew?olg??c!.&bew?cer?dr&c,rac,?esabapus,gro?ipym,l&im?per:.di,,?m&o&c!.topsgolb,?n??rif??ofni?s&egap&dael,l,?tra??t&4n,en?ilperdellawerif:.di,,ni??ude?vog??a?e?in?mara?s&edarb?ic???d!.&b&ew?og??dls?gro?lim?moc?t&en?ra??ude?vog??agoba?if?zd7acbgm--nx??e&c?d&iv?or??morafla??f!ni!.&e&g&delwonk-fo-l&errab,lerrab,?ellocevoli,?ht-skorg,rom-rof-ereh,tadpusn:d,,?llatiswonk,macrvd,ofni-v,p&i&-on,fles,?ohbew,?ruo-rof,s&iht-skorg,nd&-cimanyd,nyd,uolc,??tsrifyam,ysrab,zmurof,???g&el?n!am?ib???hwsohw?i!.&35nyd,8302,a&minifed,tad-b,?b&altig,uhtig,?czh,d&in,raobelgaeb,u&olc&iaznab.ppa,ropav,?rd,??e&c&apsinu.1rf-duolc,ivedniser,?donppad.sndnyd,egipa,lej,nilnigol,sufxob,t&i&beulb,snoehtnap,?newtu,ybeeb.saap,??gni&gatsniser.secived,tsohytsoh,?ilpu,k&coregrof.di,orgn,ramytefasresworb,?moc?n&aicisum,mtsp:.kcom,,yded,?ot&oq,pyrctfihs,?p&opilol,pa&-arusah,e&nalpkcab,tybeeb.1dkes,???r&e&tsneum-hf,vres&cisab,lautriv,??ial.sppa,?s&codehtdaer,gnihtbew,nemeis-om,pparevelc,t&acdnas,ekcit,??t&e&kcubtib,notorp,?i&belet,detfihs,gude,kecaps,?raedon.egats,s&ohg,udgniht.&cersid.&dvreser,tsuc,?dorp.tsuc,gnitset.&dvreser,tsuc,?ved.&dvreser,tsuc,????vgib.0ku,whs,x&bslprbv.g,cq,rotide,?y&olpedew,srab,??b?d&ar?u&a?ts???j?r?syhp??j!.&eman?gro?hcs?lim?moc?ten?ude?vog???ll&ag?o??m!.&gro?moc?ten?ude?vog??g?il?mi?orp??n!.&a&0&b-ekhgnark--nx?c-iehsrgev--nx?g-lksedlig--nx?k-negnanvk--nx??1&p-nedragy--nx?q-&asierrs--nx?grebsnt--nx?lado-rs--nx?n&egnidl--nx?orf-rs--nx??regnayh--nx?ssofenh--nx??r-datsgrt--nx?s-ladrjts--nx?v-y&senner--nx?vrejks--nx???3g-datsobegh--nx?4&5-&dnaleprj--nx?goksnerl--nx?tednalyh--nx??6-neladnjm--nx?s-&antouvachb--nx?impouvtalm--nx??y-&agrjnevvad--nx?ikhvlaraeb--nx???7k-antouvacchb--nx?8&k-rekie-erv--nx?l-ladrua-rs--nx?m-darehsdrk--nx??a!.sg??bct-eimeuvejsemn--nx?d&do?iisevvad?lov?narts?uas??f&1-&l--nx?s--nx??2-h--nx??g&10aq0-ineve--nx?av?ev?lot?r&ajn&evvad?u??ájn&evvad?u????h?iz-lf--nx?j&ddadab?sel??k&el?hoj&sarak?šárák??iiv&ag&na&el?g??ŋ&ael?ág???ran???l&f?lahrevo?o&ms?s??sennev?t-&ilm--nx?tom--nx??u&-edr--nx?s??øms??muar?n&0-tsr--nx?2-dob--nx?5-&asir--nx?tals--nx??a&r!-i-om?f?t??t??douvsatvid?kiv?m&os?øs??n&od?ød??ra?sen?t&aouvatheig?ouv&a&c&ch&ab?áb??h&ab?áb???n??i&ag?ág??sa&mo?ttvid??án???z-rey--nx?ær&f?t???o&p-&ladr--nx?sens--nx??q-nagv--nx?r-asns--nx?s-kjks--nx?v-murb--nx?w-&anr&f--nx?t--nx??ublk--nx???ppol?q&0-t&baol--nx?soum--nx?veib--nx??x-&ipphl--nx?r&embh--nx?imph--nx???y-tinks--nx??r&f-atsr--nx?g-&an&ms--nx?nd--nx??e&drf--nx?ngs--nx??murs--nx?netl--nx?olmb--nx?sorr--nx??h-&a&lms--nx?yrf--nx??emjt--nx??i&-&lboh--nx?rsir--nx?y&d&ar--nx?na--nx??ksa--nx?lem--nx?r&ul--nx?yd--nx????stu??j-&drav--nx?rolf--nx?sdav--nx??kua?l-&drojf--nx?lares--nx??m-tlohr--nx?n-esans--nx?olf?p-sdnil--nx?s-ladrl--nx?tih?v-rvsyt--nx??s&a&ns?ons??i&ar?er&dron?r&os?øs???ár??la&g?h??mor!t??sir?uf?åns??t&koulo&nka?ŋká??la?p-raddjb--nx?r-agrjnu--nx?s&aefr&ammah?ámmáh??orf?r&o?ø???u-vreiks--nx??u&h-dnusel--nx?i-&drojfk--nx?vleslm--nx??j-ekerom--nx?k-rekrem--nx?u-&dnalr--nx?goksr--nx?sensk--nx??v-nekyr--nx?w-&k&abrd--nx?ivjg--nx??oryso--nx??y-y&dnas--nx?mrak--nx?n&art--nx?nif--nx??reva--nx??z-smort--nx??v!.sg?ledatskork?reiks??wh-antouvn--nx?x&9-dlofts--nx.aoq-relv--nx?d-nmaherk--nx?f-dnalnks--nx?h-neltloh--nx?i-drgeppo--nx?j-gve&gnal--nx?lreb--nx??m-negnilr--nx?n-drojfvk--nx??y&7-ujdaehal--nx?8-antouvig--nx?b-&dlofrs--nx?goksmr--nx?kivryr--nx?retslj--nx??e-nejsom--nx?f-y&krajb--nx?re&dni--nx?tso--nx??stivk--nx??g-regark--nx?orf?ørf??z9-drojfstb--nx??b&25-akiivagael--nx?53ay7-olousech--nx?a&iy-gv--nx?le-tl&b--nx?s--nx??n0-ydr--nx??c&0-dnal-erdns--nx?z-netot-erts--nx??g&g-regnarav-rs--nx?o-nejssendnas--nx??ju-erdils-ertsy--nx?nj-dnalh-goksrua--nx?q&q-ladsmor-go-erm--nx.&ari-yreh--nx?ednas??s-neslahsladrjts--nx???ca&4s-atsaefrmmh--nx?8m-dnusynnrb--nx?il-t", - "l--nx?le-slg--nx?n5-rdib--nx?op-drgl--nx?uw-ynnrb--nx??d&a&qx-tggrv--nx?reh!nnivk?sd&ork?ørk??uas??ts&e&bi?kkar?llyh?nnan??g&ort?ørt??k&alf?irderf??levev?mirg?obeg&ah?æh??r&ah?ejg????barm-jdddb--nx?ie!rah?s&etivk?ladman???lof&r&os?øs??ts&ev.ednas?o.relav?ø.relåv???n&a&l&-erd&n&os?øs??ron??adroh.so?dron.&a&g5-b--nx?ri-yreh--nx??ob?y&oreh?øreh??øb??e&m!lejh??pr&oj?øj??vi??gyb?n&aks?åks??o&h-goksrua?rf??r&o?ua?ø??tros?øh-goksrua??rts!e&devt?lab?mloh???s&ellil?naitsirk?rof???u&l!os??s!d&im?lejt??e&guah?l&a?å???kkoh?lavk?naitsirk?r&af?eg&e?ie???tef?y&onnorb?ønnørb?????r&a&blavs!.sg??g&eppo?la???o&j&f&a!dniv?k?vk??die?e&dnas?kkelf??llins?r&iel?ots??s&lab?t&ab?åb??yt??å!k??ævk??les??ts??åg&eppo?lå???ureksub.sen??e&ayb-yrettn--nx?d&ar?lom?r&of?øf??år??g&gyr?nats??i&meuv&ejsem&aan?åån??sekaal??rjea??j&d&ef?oks??les??k&er&aom?åom??hgna&ark?årk??iregnir?kot!s??s&ig?uaf???l&bmab?kyb?l&av?ehtats??oh??m&it?ojt?øjt??n&arg?g&os?øs??meh?reil?te?ummok?yrb??r&dils-erts&ev?y&o?ø???ua?vod??sa&ans?åns??t&robraa?spaav??urg??f&62ats-ugsrop--nx?a&10-ujvrekkhr--nx?7k-tajjrv-attm--nx??o!.sg?h??s!.sg??v!.sg???g&5aly-yr&n--nx?v--nx??a&llor?ve&gnal?lreb???n&av!snellu??org??oks&die?m&or?ør??ner&ol?øl??r&o?ø???r&eb!adnar?edyps?s&die?elf?gnok?n&ot?øt????obspras??uahatsla?åve&gnal?lreb???h&0alu-ysm--nx?7&4ay8-akiivagg--nx?5ay7-atkoulok--nx??a!.sg???i&e&hsr&agev?ågev??rf??k&h&avlaraeb?ávlaraeb??s??lm&a?å??mpouvtal&am?ám??pph&al?ál??rrounaddleid?ssaneve?ššáneve??j&0aoq-ysgv--nx?94bawh-akhojrk--nx??k&a&b&ord?ørd??jks?lleis??iv!aklejps?l&am?evs?u??mag?nel?ojg?r&a&l?n??epok?iel?y&or?ør???s&ah?kel?om??øjg??kabene?ojsarak?ram&deh.&aoq-relv--nx?rel&av?åv??so??e&let.&ag5-b--nx?ob?øb??ra???åjks??l&a!d&anrus?d&numurb?ron??e&gnard?nte?s&meh?sin??ttin??g&is?nyl??kro?l&em?l&ejfttah?of??u&ag-ertdim?s???n&am?era?gos?i&b?nroh?r??kos?nus?oj??o-&dron?r&os?øs???ppo?r&a!l?nram??e&gne?l?v??is?o&jts?ts??u&a-&dron?r&os?øs???h??å?æl?øjts??s&e&jg?nivk?ryf??kav?mor-go-er&om.&ednas?yoreh??øm.&ednas?yøreh???uag??t&las?rajh?suan??v&l&a?e-rots??u-go-eron??yt??ksedlig?res&a?å???bib&eklof?seklyf??es!dah??h!.sg??i&m?syrt??l&ejf?ov&etsua?gnit?ksa?sdie???n!.sg??o!.sg?boh?g?h??r!.sg??å!ksedlig??øboh??m&a&rah?vk??f!.sg??h!.sg??i&e&h&dnort?rtsua?ssej??rkrejb??ksa??ol?t!.sg??u&dom?esum?r&ab?drejg?evle?os?uh?æb?øs??ttals???n&a&g&av?okssman?åv??jlis?or?r&g?rev???e&d&do&sen?ton??lah?r&agy&o?ø??ojfsam???g&iets?n&a&l&as?lab??n&avk?ævk??t&arg?ddosen??v&al?essov???i&d&ol?øl??l&ar?ær???yl??reb??iks?k&srot?y&or?ør???l&a&d&gnos?n&er?ojm?øjm??om??tloh??ug?åtloh??mmard?ojs&om?sendnas??ppolg?s&lahsladr&ojts?øjts??o??t&o&l?t-erts&ev?o?ø???roh?øl??vly&kkys?nav??yam-naj!.sg??øjs&om?sendnas???g&orf?ujb??i&dnaort?vnarg??kob?ladendua?maherk&a?å??n&it?urgsrop??orf-&dron?r&os?øs???r&aieb?evats??sfev?uaks?yrts??o&6axi-ygvtsev--nx?c,d&ob?rav??ievs?kssouf?l&m&ob?øb??ous&adna?ech&ac?áč???so!.sg???msdeks?niekotuak?r&egark?olf?y&oso?øso???s&dav?mort???p&ed?ohsdaerpsym,p&akdron?elk???r&a&d&dj&ab?áb??iab??jtif?luag?mah?vsyt??e&gn&a&k&iel?ro??merb?n&at?mas??rav-r&os?øs??srop?talf?v&ats?el??y&oh?øh???ivsgnok??il?jkniets?k&a&nvej?rem?s&gnir?nellu???ie-er&den?v&o?ø???ram?sa?årem??la&jf?vh??m&b&ah?áh??mahellil??nnul?ts&l&oj?øj??ul??y&o?ø???imp&ah?áh??m!.sg??osir?t!.sg??ádiáb?ævsyt?øsir??s&adnil?en&dnas?e&dga?k&ri&b?k??som??ve??me&h?jg??nroh-go-ejve?s&a?ednil?k&o?ø??of?yt?å??tsev??gv?hf?igaval?o&r&or?ør??sman??so&fen&oh?øh??m?v??uh&lem?sreka.sen??å!dnil???t&a&baol?g&aov?grav??jjr&av-attam?áv-attám??l&a&b?s??ás??soum?ts?v&eib?our???e&dnaly&oh?øh??f?s&nyt?rokomsdeks?sen??vtpiks??in&aks?áks??loh&ar?år??n!.sg??o&m&a?å??psgolb,?s!.sg?efremmah?or?ør??terdi?á&baol?ggráv?lá&b?s??soum?veib???u&b!.sg?alk?e&dna?gnir?nner??les?ælk??dra&b?eb??g&nasrop?vi?ŋásrop??j&daehal&a?á??jedub?v&arekkhar?árekkhár???ksiouf?n&diaegadvoug?taed???v&irp?lesl&am?åm???y&b&essen?nart?sebel?tsev??o&d&ar?na!s??or??gavtsev?k&rajb?sa??lem?mrak?n&art?n&if?orb???r&a&mah?n?v??e&dni?t&so?ton??va??ul?yd??s&am?enner?gav?lrak?tivk??vrejks??ø&d&ar?na!s??ør??gåvtsev?k&rajb?sa??lem?mrak?n&art?n&if?ørb???r&e&dni?t&so?tøn??va??ul?yd?æ&n?v???s&enner?gåv?tivk?åm??vrejks???á&slág?tlá?vreiks??å&gåv?h?jddådåb?lf??ø&d&ob?rav??r&egark?olf??s&dav?mort????aki?i&sac?tal??u??o&b?f?g?hay?o?ttat??r!.&cer?erots?gro?m&o&c?n??rif?t??o&c,fni??pohs,stra?t&n?opsgolb,?www?ysrab,?e&a!.&a&ac?cgd?idem??bulc!orea??ci&ffartria?taborea??e&cn&a&l&lievrus-ria?ubma??netniam?rusni??erefnoc??gnahcxe?mordorea?ni&gne?lria?zagam??rawtfos??gni&d&art?ilg!arap?gnah???l&dnahdnuorg?ledom??noollab?retac?sael?t&lusnoc?uhcarap??vidyks??hcraeser?l&anruoj?euf?icnuoc?ortnoc!-ciffart-ria???n&gised?oi&nu?t&a&cifitrec?ercer?gi&tsevni-tnedicca?van??i&cossa!-regnessap??valivic??redef??cudorp?neverp-tnedicca????ograc?p&ihsnoipmahc?uorg!gnikrow???r&e&dart?enigne?korb?niart?trahc??o&htua?tacude???s&citsigol?e&civres?r??krow?serp!xe??tnega??t&farcr&ia?otor??hgil&f?orcim??liubemoh?n&atlusnoc?e&duts?m&esuma?n&iatretne?revog??piuqe????olip?ropria?si&lanruoj?tneics???w&erc?ohs??y&cnegreme?dobper?tefas????rref?z??p!.&a&aa?ca?pc??dem?ecartsnd.icb,gne?r&ab?uj??snduolc,t&acova?cca?hcer??wal?ysrab,???s!.&em?gro?hcs,moc?ten?ude?vog???t!.&116,ayo,gro?lim?moc?nayn,sulpnpv,t&cennockciuq.tcerid,en??ude?v&dr,og???o&hp?m?v?yk??tol?ua??v&iv?lov??xas?ykot??p&a&ehc?g?m?s??eej?g!.&gro?ibom?moc?ossa?ppa,ten?ude???i&r!.nalc,?v?z??j!.&a&3&5xq6f--nx?xqi0ostn--nx??5wtb6--nx?85uwuu--nx?9xtlk--nx?ad,b&ats,ihc!.&a&bihciakoy?don?ma&him?ye&ragan?tat???r&a&bom?gan?hihci??u&agedos?kas?ustak???s&os?ufomihs??t&amihcay?iran??w&a&g&im&anah?o??omak??kihci?zustum??ihsak??y&agamak?imonihci???e&akas?nagot??i&azni?esohc?h&asa?s&abanuf?ohc???ka&to?zok??musi?orihs?r&akihabihsokoy?o&dim?tak??ukujuk??usihs??nano&hc?yk??o&d&iakustoy?ustam??hsonhot?k&a&rihs?t??iba??nihsaran?sobimanim?tas&arihsimao?imot??uhc?yihcay??u&kujno?s&ayaru?t&imik?tuf???zarasik?????c&cah,ed,?g&as!.&a&gas?m&a&tamah?yik??ihsak??rat?t&a&gatik?hatik??ira!ihsin????e&kaira?nimimak??i&akneg?g&aruyk?o??h&c&amo?uo??siorihs??kaznak?modukuf?ra&gonihsoy?mi???nezih?u&k&at?ohuok??s&ot?tarak?????ihs!.&a&kok?m&a&hagan?yirom??ihsakat??rabiam?wagoton??e&miharot?nokih??houyr?i&azaihsin?esok?kustakat?moihsagih??na&mihcahimo?nok??o&hsia?mag?t&asoyot?ok?tir???us&ay?t&asuk?o??????k&aso!.&a&d&awihsik?eki??k&a&noyot?s&akaayahihc?oihsagih???oadat?uziak??m&ayas!akaso??odak??r&a&bustam?wihsak??ediijuf??t&akarih?i&k?us???wag&ayen?odoyihsagih???e&son?tawanojihs??honim?i&akas?h&cugirom?s&ayabadnot?i&a&kat?t??n??oyimusihsagih???k&a&rabi?sim??ustakat??muzi?r&ijat?otamuk???nan&ak?n&ah?es???o&ay?n&a&ganihcawak?simuzi?tak??eba?ikibah?oyot??t&anim?iad?omamihs??uhc??ust&oimuzi?tes????ou&kuf!.&a&d&amay?eos??g&no?ok?usak??hiku?k&awayim?uzii??ma&kan?y&asih?im???rawak?t&a&gon?ka&h?num?t???umo??wa&g&a&kan?nay?t??ias??ko!rih???y&ihsa?usak???e&m&ay?uruk??taruk?us??i&a&nohs?raihcat??goruk?h&cukuf?s&a&gih?hukuy??in???k&a&gako?muzim??iust?o?ustani??m&anim?otihsoynihs?u??r&ogo?ugasas??usu??ne&siek?zu&b?kihc???o&gukihc?h&ak?ot?ukihc??j&ono?ukihc??kayim?nihsukihc?to?uhc??u&fiazad?gnihs?stoyot????zihs!.&a&bmetog?d&amihs?eijuf?ihsoy?omihs??kouzihs?mihsim?ra&biah?honikam??tawi?wa&g&ekak?ukik??kijuf??yimonijuf??i&a&ra?sok??hcamirom?juf?kaz&eamo?ustam??ma&nnak?ta??nukonuzi?orukuf??nohenawak?o&nosus?ti??u&stamamah?z&a&mun?wak??i!ay?i&hs&agih?in??manim??mihs????????m&a&tias!.&a&d&ihsoy?ot?usah??k&a&dih?sa??o&arihs?s???m&a&tias?y&as?o&rom?tah??ustamihsagih???i&hsagurust?jawak??uri??ni?wa&g&e&ko?man??ikot?o??k&ara?i&hsoy?mak???ru?zorokot??y&a&g&amuk?ihsok?otah??kuf??imo??ziin??e&bakusak?ogawak?sogo?ttas?zokoy??i&baraw?h&cugawak?s&oyim?ubustam???iroy?k&ato?ihs?u&k?stawi???m&akoyr?i&hsoy?juf??uziimak???naznar?o&dakas?ihsay?jnoh?n&a&go?nim??imijuf?nah?oy??r&ihsayim?otagan??t&asim!ak??igus?omatik??zak??u&bihcihc!ihsagih??sonuok?ynah????y&ak&aw!.&a&d&ira?notimak??kadih?ma&h&arihs?im??y&a&kaw?tik??oduk???ru&ustakihcan?y??sauy?wa&g&a&dira?zok??orih??konik??yok?zok??e&banat?dawi??i&garustak?jiat?mani??naniak?o&bog?nimik?t&asim?omihs&ah?uk????ugnihs???o!.&a&jos?koasak?m&ay&ako?ust??ihsayah??r&abi?ukawaihsin??wi&aka?nam???e&gakay?kaw??i&gan?h&cu&kasa?otes??sahakat??k&asim?ihsaruk??miin??n&anemuk?ezib??o&hsotas?jnihs?n&amat?imagak??ohs?uhcibik?????ot!.&a&damay?got?koakat?may&etat?ot??nahoj?riat?waki&inakan?reman???eb&ayo?oruk??i&h&asa?ciimak?sahanuf??kuzanu?m&an&i?ot??ih???nezuyn?otnan?u&hcuf?stimukuf?z&imi?ou???????ihs&o&gak!.&a&m&ayuok?ihsogak??si?yonak??e&banawak?n&at&akan?imanim??uka??tomoonihsin??i&adnesamustas?k&azarukam?oih??m&ama?uzi??usuy??nesi?o&knik?os?tomustam??uzimurat???rih!.&a&ka&n?s??m&ayukuf?i&hsorihihsagih?j&ate?imakikaso????r&a&bohs?h&ekat?im???es??tiak?wiad??e&kato?ruk??i&h&ci&akustah?mono?nihs??s&inares?oyim???manimasa?uk??negokikesnij?o&gnoh?namuk??uhcuf????uk&ot!.&a&bihci?mi&hsu&kot?stamok??m??wagakan??egihsustam?i&gum?h&coganas?soyim??kijaw?m&anim?uzia??ukihsihs??nan&a?iak??o&nati?turan????uf!.&a&batuf?m&a&to?y&enak?irok???ihs&im?ukuf??os?uko??r&aboihsatik?uganat??ta&katik?mawak?rih??w&a&g&akus?emas?uy??k&a&mat?rihs?sa??ihsi??nah??ohs???e&gnabuzia?iman?ta&d?tii???i&adnab?enet?hs&agih?iimagak??k&a&wi?zimuzi??ubay??minuk?r&ook?ustamay???nihsiat?o&g&etomo?ihsin?nan?omihs??no!duruf?rih??rihsawani?ta&may?simuzia???u&rahim?stamakawuzia?zia&ihsin?nay???????nug!.&a&bawak?doyihc?k&anna?oi&hsoy?juf?mot???m&ayakat?ustagaihsagih??n&ihsatak?nak??r&ahonagan?nak?o?u&kati?mamat???t&amun?inomihs?o??w&akubihs?iem?ohs???i&hsa&beam?yabetat??kas&akat?esi??m&akanim?uzio??ogamust?rodim??o&jonakan?n&eu?oyikust??tnihs??u&komnan?stasuk?yrik????rep,?n&ibmab,nog,?ppacihc,ra&n!.&a&bihsak?d&akatotamay?u!o???guraki?m&ay&atik&imak?omihs??irokotamay??oki??ra&hihsak?n??wa&geson?knet???e&kayim?ozamay?sog?ustim??i&a&rukas?wak??garustak?h&ciomihs?sinawak??jo?ka&mnak?toruk??makawak?nos?r&net?otakat?ugeh???o&d&na?oyo??gnas?jnihs?nihsoy!ihsagih??tomarawat?yrok????rikik,?t&ag&amay!.&a&dihsio?k&atarihs?ourust??may&a&kan?rum??enak?onimak??rukho?ta&ga&may?nuf??hakat?kas??wa&g&ekas?orumam??ki&hsin?m??z&anabo?enoy?ot???zuy??e&agas?bonamay?dii?nihsagih?o??i&a&gan?nohs??h&asa?sinawa", - "k??nugo??o&dnet?jnihs?ynan??ukohak???iin!.&a&ga?k&ium?oagan??munou!imanim??t&a&bihs?giin??ioy??w&a&gioti?kikes?zuy??irak??yijo??e&kustim?mabust??i&aniat?hcamakot?kaz&awihsak?omuzi??m&a&gat?karum??o???n&anust?esog??o&das?ihcot?jnas?k&ihay?oym??mak?naga?ries??u&ories?steoj?????i&k&a!.&a&go?k&asok?oimak??t&ago!rihcah??ika!atik???w&aki?oyk???e&mojog?natim?suranihsagih?t&ado?okoy???i&hsoyirom?magatak?naokimak??nesiad?o&hakin?jnoh!iruy??nuzak?rihson?tasi&juf?m??yjnoh??u&kobmes?oppah????in,?o!.&a&dakatognub?m&asah?ihsemih??su?t&ekat?i&h?o????e&onokok?ustimak??i&jih?k&asinuk?ias?usu??mukust??onoognub?u&fuy?juk?ppeb?suk??????wa&ga&k!.&a&mihsoan?rihotok?waga&kihsagih?ya???emaguram?i&j&nonak?ustnez??kunas?monihcu??o&hsonot?nnam?yotim??u&st&amakat?odat??zatu????nak!.&a&dustam?kus&okoy?tarih??maz?nibe?r&a&gihsaimanim?h&esi?imagas??wa&do?guy???u&im?kamak???tikamay?wa&k&ia?oyik?umas??sijuf??yimonin??e&nokah?saya??i&akan?esiak?gusta?hsuz?kasagihc?o?ukust??o&nadah?sio?tamay?????kihsi!.&a&danihcu?gak?kihs?mijaw?t&abust?ikawak??wazanak??i&gurust?hcionon?mon?ukah??nasukah?o&anan?ton!akan???u&kohak?stamok?z&imana?us?????niko!.&a&han?m&arat?ijemuk?uru??n&e&dak?zi??no??ra&hihsin?rih??wa&kihsi?niko??yehi?zonig??e&osaru?seay??i&hsagih?jomihs?k&a&gihsi?not??ihsakot??m&a&ginuk?kihsug?maz??igo?otekat??nuga!noy???n&a&moti?timoy?wonig??i&jikan?k???o&gan?jnan?tiad&atik?imanim???u&botom?kusug&akan!atik??imot??rab&anoy?eah??????yp,?bus,c&204ugv--nx?462a0t7--nx?678z7vq5d--nx?94ptr5--nx?a?mpopilol,?d&17sql1--nx?3thr--nx?5&20xbz--nx?40sj5--nx??7&87tlk--nx?ptlk--nx??861ti4--nx?a?e!tfarcdnah,?n&eirf&lrig,yob,?om,?ooftac,?e&16thr--nx?5&1a4m2--nx?9ny7k--nx??damydaer,eweep,i&bmoz,m!.&a&bot?k&asustam?uzus??m&a&him?y&emak?im???ihs??nawuk?wi&em?k???e&bani?ogawak?si!imanim???i&arataw?gusim?h&asa?ciakkoy??k&a&mat?sosik?t??iat??raban??o&dat?hik?n&amuk?ihseru?o&du?mok????ust????kilbew,lasrepus,mihe!.&a&m&a&h&ataway?iin??yustam??ij&awu?imak???taki!man???ebot?i&anoh?kasam?rabami??n&ania?egokamuk?oot??o&jias?kihcu?nustam?uhcukokihs?yi!es???u&kohik?zo????n!.&nriheg,teniesa.resu,?amihs!.&a&d&amah?ho?usam??kustay?m&a?ihsoni&hsin?ko???wakih??e&namihs?ustam??i&g&aka?usay??konikak?mikih??nannu?o&mu&kay?zi!ihsagih?uko???nawust?tasim??u&stog?yamat????nep,?rotsnoihsaf,srev,t&awi!.&a&bahay?d&amay?on??koirom?t&a&honat?katnezukir??imus??w&as&ijuf?uzim??ihs???e&hon&i&hci?n??uk??tawi??i&a&duf?murak?wak??h&custo?si&amak?ukuzihs???j&oboj?uk??k&a&m&anah?uzuk??sagenak??esonihci??m&akatik?uzia&rih?wi????o&kayim?no&rih?t??tanufo??uhso???isarap,saman,tococ,?ulbybab,?g&3zsiu--nx?71qstn--nx?l?olblooc,?h&03pv23--nx?13ynr--nx?22tsiu--nx?61qqle--nx?sulb,?i&54urkm--nx?ced,g&ayim!.&a&dukak?m&a&goihs?kihs??ihsustam!ihsagih??unawi??r&awago?iho??ta&bihs?rum??w&a&gano?kuruf??iat??y&imot?ukaw???e&mot?nimes??i&hsiorihs?ka&monihsi?s&awak?o???mak?r&ataw?o&muram?tan????o&az?jagat?t&asim?omamay???u&fir?k&irnasimanim?uhsakihcihs?????ihcot!.&a&g&a&h?kihsa??ust??kom?m&ay&o?usarak??unak??r&a&boihsusan?watho??iho?ukas??t&akihsin?iay??wa&konimak?zenakat??y&imonustu?oihs???e&iiju?kustomihs?nufawi??i&akihci?g&etom?ihcot?on???o&k&ihsam?kin??nas?sioruk?tab??u&bim?san?????h&c&ia!.&a&dnah?m&a!h&akat?im??yuni??ihs&ibot?ust???r&a&hat?tihs??ik?u&ihsagih?kawi???t&ihc?o&k?yot???wa&koyot?zani??yi&monihci?rak???e&inak?k&aoyot?usa??manokot?noyot??i&a&gusak?kot?sia??eot?h&asairawo?cugo?s&ahoyot?oyim???k&a&mok?zako??ihssi??motay?rogamag??n&an&ikeh?ok??ihssin??o&got?ihsin?jna?rihsnihs?suf?tes??u&bo?raho?s&oyik?takihs??yrihc?zah????ok!.&a&dusay?kadih?mayotom?r&ah&im?usuy??umakan??sot!ihsin??wa&g&atik?odoyin??k&as?o????i&esieg?hco!k??jamu?k&a!sus??usto??ma&gak?k??rahan??o&mukus?n&i?ust!ihsagih???torum?yot!o???u&koknan?zimihsasot????ugamay!.&a&m&ayukot?ihso??toyot??e&bu?subat??i&gah?kesonomihs?nukawi?rakih??nanuhs?otagan?u&ba?foh?otim?stamaduk?uy?????s&anamay!.&a&dihsoyijuf?mayabat?r&ahoneu?ustakihsin??w&a&k&ayah?ijuf??suran??ohs???egusok?i&ak?h&cimakan?s&anamay?od???k&asarin?u&feuf?sto????o&k&akanamay?ihcugawakijuf??nihso?t&asimawakihci?ukoh??uhc??spla-imanim?u&b&nan?onim??fok?hsok?rust????ubon,??ka&rabi!.&a&bukust?gok?kan!ihcatih??m&a&sak?timo?wi??ihsak?ustomihs??ni?r&a&hihcu?way??u&agimusak?ihcust???t&ag&amay?eman??oihcatih??w&ag&arukas?o??os??yi&moihcatih?rom???e&bomot?dirot?not?tadomihs??i&a&k&as?ot??rao??esukihc?gahakat?h&asa?catih??k&a&rabi?saguyr??ihsani?uy??ma?rukustamat??o&dnab?giad?him?kati?rihsijuf?soj?t&asorihs?im??yihcay??u&fius?kihsu?simak????sagan!.&a&m&abo?ihsust??natawak?r&abamihs?u&mo?ustam???wijihc?yahasi??i&akias?hies?k&asagan?i??masah??neznu?o&besas?darih?t&eso?og!imaknihs????ust&igot?onihcuk?uf????zayim!.&a&biihs?guyh?k&oebon?ustorom??mihsuk?r&emihsin?uatik??ta&katik?mim??wag&atik?odak??ya??e&banakat?sakog??i&hsayabok?kaza&kat?yim??m&animawak?ot&inuk?nihs????nanihcin?o&j&ik?onokayim??n&ibe?ust??tias??urahakat????ro&cep,moa!.&a&dawot?turust?wasim??e&hon&ihc&ah?ihs??nas?og?ukor??sario??i&anarih?ganayati?hsioruk?jehon?kasorih?makihsah?nawo?r&amodakan?omoa???o&gnihs?kkat??u&ragust?stum????ttot!.&a&r&ahawak?uotok??sa&kaw?sim???egok?irottot?nanihcin?o&ganoy?nih?tanimiakas??u&bnan?z&ay?ihc??????ukuf!.&a&deki?gurust?ma&bo?h&akat?im??yustak??sakaw??eabas?i&akas?ho?jiehie?ukuf??nezihce!imanim??ono????k&26rtl8--nx?4&3qtr5--nx?ytjd--nx??522tin--nx?797ti4--nx?ci&gid,ht,sevol,?limybab,nupatilol,?l&33ussp--nx?ellarap,lik,oof,rigetuc,?m&11tqqq--nx?41s3c--nx?ef,sioge,?n&30sql1--nx?65zqhe--nx?a&ebyllej,i&lognom,viv,??iam,n7p7qrt0--nx?o&ruk,staw,??o&131rot--nx?7qrbk--nx?aic,c?diakkoh!.&a&deki?gakihset?hcebihs?k&adih?u&fib?narihs???m&ayiruk?hot?ihs&orihatik?ukuf??oras?usta??r&ib&a!ka??o?uruf??ozo?u&gakihsagih?oyot???sakim?ta&gikust?mun??w&a&ga&k&an?uf??nus!imak???k&aru?i&h&asa?sagih??kat?mak??omihs?um??zimawi??ine?oyk??yot??e&a&mustam?nan??b&a&kihs?yak??o&noroh?to???ian?k&ihsam?ufoto??nakami?ppoko!ihsin??sotihc?tad!okah??uonikat??i&a&bib?mokamot?n&a&k&kaw?oroh??wi??eomak?ihsatu?okik?usta&moruk?sakan????eib?h&c&ioy?u&bmek?irihs???s&ase?ekka?oknar?uesom???jufirihsir?k&amamihs?i&at?n???m&atik?otoyot??oa&kihs?rihs??r&a&hs?kihsi?mot??ihs&aba?ir??otarib???n&a&hctuk?rorum?se?tokahs??uber??o&kayot?m&ire?ukay??naruf!ima&k?nim???orih?r&ih&ibo?suk??o&bah?h&i&b?hsimak??sa??pnan?yan??umen??t&asoyik?eko?ukoh???u&bassa?kotnihs?m&assaw?uo??pp&akiin?en&ioto?nuk??ip??rato?s&akat?t&eb&e?i&a?hs!a??robon??m&e?o&m?takan???no&h?tamah??o&mik?s?t??u&kir?ppihc?st???onihsnihs?ufuras??uaru??yru!koh??zimihs!ok?????g!iti,oyh!.&a&bmat?dnas?gusak?k&at?o&oyot?y??uzarakat??m&ayasas?irah??wa&g&ani?okak??k&i&hci?mak??oy???yi&hsa?monihsin???i&asak?hs&aka?i&at?nawak???j&awa!imanim??emih??k&a&goa?s&agama?ukuf??wihsin??i&hsog?m???mati?oia?rogimak??n&annas?esnonihs??o&gasa!kat??ka?n&ikat?o?ustat??rihsay?sihs?tomus?yas??u&bay?gnihs?????hih,konip,lik,mol,nagan!.&a&bukah?d&a&w?yim??e&ki?u??ii??k&a&s&ay?uki??zus??ihsoo?ousay??m&ay&akat?ii??i&hsukufosik?jii??ukihc??n&i!hsetat??uzii??r&ah?ugot??saim?t&agamay?oyim??w&a&g&a&kan?n??o??kustam?ziurak??onim!imanim??u&koo?s!omihs????ya&ko?rih???e&akas?nagamok?subo??i&gakat?h&asa?c&a!mo!nanihs???uonamay??sukagot??k&a&kas?mimanim?to??ia&atik?imanim??oa?uzihcom??m&akawak?ijuf?o!t???r&ato?ijoihs?omakat???n&ana?esnoawazon??o&hukas?n&a&gan?kan??i&hc?muza??ustat??romok?si&gan?k??tomustam??u&k&as?ohukihc??stamega????o&b,m,pac,?to&mamuk!.&a&gamay?rahihsin?sukama!imak??tamanim??enufim?i&hcukik?k&ihsam?u??nugo!imanim??romakat??o&ara?rihsustay?sa?t&amay?om&amuk?us??u!koyg???yohc??u&sagan?zo????yk!.&a&bmatoyk?k&ies?oemak?uzaw??mayi&h&cukuf?sagih??muk??nihsamay?rawatiju?t&away?ik???e&ba&nat!oyk??ya??di?ni??i&ju?kazamayo?manim??natnan?o&gnatoyk?kum?mak?rihsamayimanim?y&gakan?ka&koagan?s??oj???u&ruziam?z&ayim?ik??????wtc1--nx?ykot!.&a&d&i&hcam?mus??oyihc??k&atim?ihsustak??m&a&t!uko??yarumihsa&gih?sum???i&hs&agoa?ika?o!t??uzuok??ren???r&a&honih?wasago??iadok?umah??ssuf?t&ik?o??wa&g&anihs?ode??k&ara?ihcat???y&agates?ubihs???e&amok?donih?m&o?urukihsagih??soyik??i&enagok?gani?h&ca&da?tinuk??sabati??j&nubukok?oihcah??manigus??o&huzim?jihcah?n&akan?ih!sasum??urika??rugem?t&a&mayihsagih?nim??iat?ok??uhc?yknub??u&fohc?hcuf?kujnihs?????p&aehc,o&hs&eht,iiawak,yub,?p&evol,ydnac,?rd&kcab,niar,???r&2xro6--nx?atselttil,e&d&nu,wohc,?h,ilf,pp&ep,irts,u,?t&aerg,tib,??g?o!on,?ufekaf,?s&9nvfe--nx?dom,p&ihc,oo,?sikhcnerf,u&bloohcs,ruci,srev,?xvp4--nx??t&a&cyssup,obgip,?e&rces,vlev,?netnocresu,opsgolb,sidas,u&b,ollihc,??u&4rvp8--nx?fig!.&a&d&eki?ih??kimot?m&ayakat?ihsah??ne?raha&gi&kes?makak??sak??taga&may?tik??wa&g&ibi?ustakan??karihs!ihsagih????e&katim?uawak??i&gohakas?hc&apna?uonaw??k&ago?es?ot??m&anuzim?ijat??nak?urat??nanig?o&dog?jug?makonim?nim?roy?sihcih??u&fig?s&otom?t&amasak?oay??????hc,pup,stoknot,ynup,?wonsetihw,x5ytlk--nx?y&adynnus,knarc,l&oh,rig,?moolg,ob,pp&ih,olf,?rgn&a,uh,?u6d27srjd--nx?vaeh,?z72thr--nx?井福?京東?分大?取鳥?口山?城&宮?茨??媛愛?山&富?岡?歌和??岡&福?静??島&児鹿?広?徳?福??崎&宮?長??川&奈神?石?香??庫兵?形山?手岩?木栃?本熊?根島?梨山?森青?潟新?玉埼?田秋?知&愛?高??縄沖?良奈?葉千?賀&佐?滋??道海北?都京?重三?野長?阜岐?阪大?馬群???k!.&art?gro?moc?per?ude?vog???l&eh?l??m!.uj,ac?j??nd?o&g?h&pih?s!.&esab,xilpoh,ysrab,???lnud?oc?t!.&lldtn,snd-won,???pa!.&0mroftalp,a&rusah,ted,?bew:erif,,e&gatskrelc,niln&igol,okoob,?tupmocegde,virdhsalfno,?ilressem,krelc,le&crev,napysae,?maerdepyt,n&aecolatigidno,ur:.a,,?poon,r&cne,emarf,?t&ibelet,xenw,?yfilten,??ra&a?hs??u&ekam?llag?org!.esruocsid,cts?kouk?nayalo???vsr?xece4ibgm--nx??q&a!3a9y--nx??g?i!.&gro?lim?moc?ten?ude?vog???m?se??r&a!.&a&cisum?sanes??bog?gro?l&autum?im??moc!.topsgolb,?pooc?rut?t&e&b?n??ni??ude?vog??4d5a4prebgm--nx?b?c?eydoog?los?t&at?s!uen???ugaj??b!.&21g?a&b&a&coros?iuc??itiruc??cnogoas?dicerapa?gniram?i&naiog?ramatnas??n&erom?irdnol??op?p&acam?irolf?ma&j?s???rief?tsivaob??b!aj?ib?mi?sb??c&ba?e&r?t??js?sp?t!e???d&em?mb?n&f?i??rt??e&dnarganipmac?ficer?ht?llivnioj?rdnaotnas??f&dj?ed?gg?n&e?i???g&e&l!.&a&b,m,p,?bp,c&a,s,?e&c,p,s,?fd,gm,ip,jr,la,ma,nr,o&g,r,t,?p&a,s,?r&p,r,?s&e,m,r,?tm,??s??l&s?z??n&c?e?o??ol!b?f?v??pp?ro??hvp?i&du?kiw?nana?oretin?r&c?eurab??sp?te?xat??l&at&an?rof??el?im?sq??m&a?da?e&gatnoc?leb??f?ic?oc!.&duolclautriv.elacs.sresu,topsgolb,???nce?o&ariebir?c", - "&e?narboir?saso??d&o?ranreboas??e&g?t??i&b?dar?ecam?r??rp?t&a?erpoir???p&er?m!e?t??ooc?pa?se??qra?r&af?ga?o&davlas?j??tn?ut??s&a&ixac?mlap?nipmac??ed?u&anam?j?m???t&am?e&d?n?v??nc?o&f?n??ra?sf??u&caug9?de?ja?rg??v&da?ed?og!.&a&b?m?p??bp?c&a?s??e&c?p?s??fd?gm?ip?jr?la?ma?nr?o&g?r?t??p&a?s??r&p?r??s&e?m?r??tm???rs?t??xiv?z&hb?ls?o&c?f?????c!.&as?ca?de?if?o&c?g??ro???e&bew?ccos?dnik?e&b?n&igne?oip??rac??gni&arg?rheob??h&cor?sok?t&aew?orb???itnorf?k&col?o&p?rb???l&aed?ffeahcs??mal?nes?pinuj?t&a&eht?rebsnegömrev??law?nec?s&acnal?nom?ubkcolb??upmoc??v&o&csid?rdnal??resbo??wulksretlow?ywal?zifp??f!.&aterg?bew-no,drp?e&c&itsuj-reissiuh?narf-ne-setsitned-sneigrurihc,?lipuog,rianiretev??hny,i&cc?rgabmahc??m&o&c?n??t??n&eicamrahp?icedem??ossa?pohsdaerpsym,s&e&lbatpmoc-strepxe?riaton?tsitned-sneigrurihc?uova??o&-x&bf,obeerf,?x&bf,obeerf,???t&acova?o&or-ne,psgolb,?r&epxe-ertemoeg?op!orea????vuog?xobided,?avc7ylqbgm--nx?s??g!.&gro?moc?t&en?opsgolb,?ude?vog???h!.&e&erf,man??mo&c?rf??topsgolb,zi??ur??i!.&a&61f4a3abgm--nx?rf4a3abgm--nx??ca?di?gro?hcs?oc?ten?vog?نار&يا?یا???a&h?per??ew?lf??k!.&c&a?s??e&n?p?r??gk?iggnoeyg?kub&gn&oeyg?uhc??noej??l&im?uoes??man&gn&oeyg?uhc??noej??n&as&lu?ub??o&e&hcni?jead??wgnag???o&c?g??ro?s&e?h?m??topsgolb,u&gead?j&ej?gnawg????cilf??l!.&gro?moc?ten?ude?vog???m!.&topsgolb,vog???n!.&gro?moc?ofni?ten?ude?vog?zib???o&htua?odtnorf?t&c&a?od??laer???p!.&alsi?ca?eman?forp?gro?moc?o&fni?rp??t&en?se??ude?vog?zib???s?t!.&21k?bew?cn!.vog??eman?gro?kst?l&e&b?t??im?op??moc!.topsgolb,?neg?ofni?pek?rd?sbb?ten?ude?v&a?og?t??zib??f?m??ubad?vd??s&8sqif--nx?9zqif--nx?a!.vog?birappnb?gev?lliv?mtsirhc?s??b!.&ew,gro?moc?ten?ude?vog??c?oj?s?u??c&i&hparg?p?t&sigolyrrek?ylana???od??d&a?d?ik?l?n&iwriaf?omaid??oogemoh?rac??e!.&bog?gro?mo&c!.topsgolb,?n??pohsdaerpsym,ude??civres!.enilnigol,?d&d2bgm--nx?oc??h&ctaw?guh??i&lppus?rtsudni?treporp!yrrek???jaiv?l&aw?cycrotom?etoh?gnis?pats??m&ag?oh?reh??nut?ohs?picer?r&it?ut&cip!.7331,?nev???s!i&rpretne?urc??ruoc??taicossa?vig??g!nidloh??h5c822qif--nx?i!.&ekacpuc,gro?moc?t&en?ni?opsgolb,?ude?vog??a09--nx?nnet?rap?targ??k&c&or!.&ecapsbew,snddym,ytic-amil,??us??hxda08--nx?row??l!.&c&a?s??ed,gro?o&c?fni??ten?ude?vog?zib??a&ed?tner??e&ssurb?toh!yrrek???lahsram?m?oot??m!.&bal,etisinim,gro?moc?ten?ude?vog??b?etsys!.tniopthgink,?ialc??n&a&f?gorf?ol??egassap?i&a&grab?mod??giro??o&it&acav?cudorp?ulos??puoc???o&dnoc?geuj?leuv?ppaz?t&ohp!.remarf,?ua???p!.&ces?gro?moc?olp?ten?ude?vog??i&hsralohcs?lihp?t??u??r!.&au,ca?gro?ni?oc?topsgolb,ude?vog?xo,yldnerb.pohs,?a&c?p?tiug??c?e&dliub!.etisduolc,?erac?gor?levart?mraf?n&niw?trap??wolf??ot&cartnoc?omatat??pj?uot??s!.&em?gro?hcs?moc?ten?ude?vog?zib??alg?e&n&isub!.oc,?tif??rp!xe!nacirema???xnal??iws??t&a&e&b?ytic??ob??ek&cit?ram??fig?h&cay?gilf??n&atnuocca?e&mt&rapa?sevni??ve!.&nibook,oc,????rap??u!.&a&c!.&21k?bil?cc???g!.&21k?bil?cc???i!.&21k?bil?cc???l!.&21k?bil?cc???m!.&21k!.&hcorap?rthc?tvp???bil?cc???p!.&21k?bil?cc???si?v!.&21k?bil?cc???w!.&21k?bil?cc????c&d!.&21k?bil?cc???n!.&21k?bil?cc???s!.&21k?bil?cc????d&e&f?lacsne.xhp,?i!.&21k?bil?cc???m!.&21k?bil?cc???n!.&bil?cc???s!.&bil?cc???u&olcrim,rd,??e&d!.&21k?bil,cc???las-4-&dnal,ffuts,?m!.&21k?bil?cc???n!.&21k?bil?cc????h&n!.&21k?bil?cc???o!.&21k?bil?cc????i&h!.&bil?cc???m!.&21k?bil?c&c?et??goc?n&eg?otae??robra-nna?sum?tsd?wanethsaw???nd?r!.&bil?cc???v!.&21k?bil?cc???w!.&21k?bil?cc????jn!.&21k?bil?cc???k&a!.&21k?bil?cc???o!.&21k?bil?cc????l&a!.&21k?bil?cc???f!.&21k?bil?cc???i!.&21k?bil?cc????mn!.&21k?bil?cc???n&afflog,i!.&21k?bil?cc???m!.&21k?bil?cc???sn?t!.&21k?bil?cc????o&c!.&21k?bil?cc???m!.&21k?bil?cc???ttniop,?p&ion,rettalp,?r&a!.&21k?bil?cc???o!.&21k?bil?cc???p!.&21k?bil?cc????s&a!.&21k?bil?cc???dik?k!.&21k?bil?cc???m!.&21k?bil?cc???nd&deerf,uolc,??t&c!.&21k?bil?cc???m!.&21k?bil?cc???u!.&21k?bil?cc???v!.&21k?bil?cc????ug!.&21k?bil?cc???v&n!.&21k?bil?cc???w!.cc???x&ohparg,t!.&21k?bil?cc????y&b-si,k!.&21k?bil?cc???n!.&21k?bil?cc???w!.&21k?bil?cc????za!.&21k?bil?cc????ah!uab??bria?col?e!.ytrap.resu,?ineserf?lp?xe&l?n???vt?w!.&66duolc,gro?moc?s&ndnyd,tepym,?ten?ude?vog??a?e&iver?n!.elbaeciton,??odniw??y&alcrab?cam?ot???t&0srzc--nx?a!.&amil4,ca!.hts??gni&liamerutuf,tsoherutuf,?o&c!.topsgolb,?fni,?p&h21,ohsdaerpsym,?r&euefknuf.neiw,o??v&g?irp,?xi2,ytic-amil,zib,?c?e!s??hc?if?l!asite??mami?rcomed??b!.&gro?moc?ten?ude?vog??b?gl??c&atnoc?e&les?rid!txen????dimhcs?e!.&eman?gro?moc?ofni?ten?ude?vog?zib??b?em?grat?id?k&circ?ram??n!.&0rab,1rab,2rab,5inu,6vnyd,7&7ndc.r,erauqs,?a&l&-morf,moob,?minifed,remacytirucesym,tadsyawla,z,?b&boi,g,lyltsaf:.pam,,?c&inagro-gnitae,paidemym,?d&ecalpb,irgevissam.saap.&1-&gs,nol,rf,yn,?2-&nol,yn,??nab-eht-ni,uolc&meaeboda,nievas.c&di-etsedron,itsalej,?xednay:.e&garots,tisbew,?,??e&c&narusnihtlaehezitavirp,rofelacs.j,?gdirbtib,ht-no-eciffo,l&acs&liat.ateb,noom,?ibom-eruza,?m&ecnuob,ohtanyd,tcerider,?n&ilno-evreser,ozdop,?rehurht,s:abapus,,tis-repparcs,zamkcar,?f&aeletis,crs.&cos,resu,?ehc-a-si,?g&ni&reesnes,sirkcilc,tsohnnylf,?olbevres,?k&catsvano,eeg-a&-si,si,?u,?l&acolottad,iamwt,meteh,s&d-ni,s-77ndc,??m&ac&asac,ih,?urofniem,?n&a&f&agp,lhn,?i&bed,llerk,??dcduabkcalb,i,pv-ni,?o&c-morf,duppa,jodsnd,rp-ytinummoc,ttadym,?p&i&-&etsef,on,?emoh,fles,nwo,?j,mac-dnab-ta,o&-oidar-mah,h&bew,sdaerpsym,??pa&duolc,egde,?tfe&moh,vres,?usnd,?r&e&tsulcyduolc,vres-xnk,?vdslennahc:.u,,?s&a&ila&nyd,snd,?nymsd,?bbevres,dylimaf,e&gde-ndc,suohsyub,t&isbeweruza,ys,??k&catstsaf,ekokohcs,?n&d&-won,d,golb,npv,?oitcnufduolc,?ppacitatseruza:.&1,2:suts&ae,ew,?,aisatsae,eporuetsew,sulartnec,?,s&a-skcik,ecca&-citats,duolc,??t,?t&adies,ce&ffeym,jorprot:.segap,,lespohs,?e&nretnifodne,smem,?farcenimevres,i-&ekorb,s&eod,lles,teg,??n&essidym,orfduolc,?r0p3l3t,s&ixetnod,oh&-spv:.citsalej.&cir,lta,sjn,?,gnik,???u&h,nyd,r:eakust.citsalej,,?ved-naissalta.dorp.ndc,x&inuemoh,spym,tsale.&1ots-slj,2ots-slj,3ots-slj,?unilemoh,?y&awetag-llawerif,ffijduolc:.&ed-1arf,su-1tsew,?,ltsaf.&dorp.&a,labolg,?lss.&a,b,labolg,?pam,slteerf,?n&-morf,ofipi,?srab,?z&a-morf,tirfym,???p?tcip?v??f&ig?o&l?sorcim???g!.&bog?dni?ed,g&olb,ro??lim?moc?ot,ten?ude???h!.&dem?gro?l&er?op??m&oc?rif??o&fni?rp?s&rep?sa???po&hs?oc??t&en?luda?ra??ude?vuog???i!.&a&2n-loritds--nx?7e-etsoaellav--nx?8&c-aneseclrof--nx?i-lrofanesec--nx??at?b?c!cul??dv?i&blo&-oipmet?oipmet??cserb?drabmol?g&gof?urep??l&gup?i&cis?me&-oigger?oigger???uig&-&aizenev&-iluirf?iluirf??ev&-iluirf?iluirf??v&-iluirf?iluirf???aizenev&-iluirf?iluirf??ev&-iluirf?iluirf??v&-iluirf?iluirf????n&a&brev?cul?pmac?tac??idras?obrac&-saiselgi?saiselgi??resi??otsip?r&b&alac!-oigger?oigger??mu??dna&-&attelrab-inart?inart-attelrab??attelrabinart?inartattelrab?ssela??epmi?ugil??tnelav&-obiv?obiv??vap?z&e&nev?ps&-al?al???irog???l&iuqa!l??leib??m&or?rap??n!acsot?e&dom?is?sec&-&ilrof?ìlrof??ilrof?ìlrof???g&amor&-ailime?ailime??edras?olob??i&ssem?tal??ne!var??o&cna?merc?rev?vas???oneg?p?r!a&csep?rr&ac&-assam?assam??ef??von??etam?tsailgo!-lled?lled???s!ip?sam&-ararrac?ararrac??u&caris?gar???t!a&cilisab?recam??resac?soa!-&d&-&ellav?lav??ellav?lav??ellav??d&-&ellav?lav??ellav?lav??ellav??te&lrab&-&airdna-inart?inart-airdna??airdnainart?inartairdna??ssinatlac???udap?v!o&dap?neg?tnam???zn&airb&-a&lled-e-aznom?znom??a&lledeaznom?znom??eaznom??e&c&aip?iv??soc?top??om???b&-&23,46,61,?3c-lorit-ds-onitnert--nx?be-etsoa&-ellav--nx?dellav--nx??c!f-anesec-lrof--nx?m-lrof-anesec--nx??he-etsoa-d-ellav--nx?m!u??o2-loritds-nezob--nx?sn-loritds&-nasl&ab--nx?ub--nx??nitnert--nx??v!6-lorit-dsnitnert--nx?7-loritds&-nitnert--nx?onitnert--nx???z&r-lorit-ds&-nitnert--nx?onitnert--nx??s-loritds-onitnert--nx???c&f?is?l?m?p?r?v??d&p?u!olcnys,??e&c!cel?inev?nerolf??f?g!ida&-&a&-onitnert?onitnert??otla!-onitnert?onitnert???a&-onitnert?onitnert??otla!-on&azlob?itnert??onitnert????hcram?l?m!or??n&idu?o&n&edrop?isorf??torc???p?r?s&erav?ilom??t!nomeip?s&eirt?oa!-&d-e&ellav?éllav??e&ellav?éllav???de&ellav?éllav??e&ellav?éllav?????v?znerif??g&a?b?f?il?o?p?r?up?vf??hc?i&b?c?dol?f?l!lecrev?opan?rof&-anesec?anesec???m?n&a&part?rt&-attelrab-airdna?attelrabairdna???imir?ret??p?r!a&b?ilgac?ssas???s!idnirb??t&ei&hc?r??sa??v??l&a!c??b?c?o&m?rit&-&d&eus&-&nitnert?onitnert??nitnert?onitnert??us&-&nitnert?onitnert??nitnert?onitnert??üs&-&nitnert?onitnert??nitnert?onitnert???s&-onitnert?onitnert???d&eus!-&n&asl&ab?ub??ezob?itnert??onitnert??nitnert?onitnert??us&-&n&asl&ab?ub??ezob?itnert??onitnert??nitnert?onitnert??üs!-&n&asl&ab?ub??ezob?itnert??onitnert??nitnert?onitnert???s&-onitnert?onitnert?????m&ac?f?i!t.nepo.citsalej.duolc,?ol?r??n&a!lim?sl&ab?ub???b?c?e!en.cj,v?zob??irut?m!p??p?r?t??o&a!v??b!retiv??c!cel??enuc?g!ivor??i&dem&-onadipmac?onadipmac??pmet&-aiblo?aiblo??rdnos?zal??l?m!a&greb?ret??oc?re&f?lap???n!a&dipmac&-oidem?oidem??lim?tsiro?zlob??ecip&-ilocsa?ilocsa??i&bru&-orasep?orasep??lleva?rot?tnert??r&elas?ovil??ulleb??p?r!a&sep&-onibru?onibru??znatac??oun??s!ivert?sabopmac??t!arp?e&nev?ssorg??n&arat?e&girga?rt?veneb????zz&era?urba???p&a?ohsdaerpsym,s?t??qa?r&a!m?s??b!a??c?f?g?k?me?o?p?s?t?v??s&a&b?iselgi&-ainobrac?ainobrac???b?c?elpan?i?m?o&t?x&bi,obdaili,??s?t?v??t&a?b?c?l?m?nomdeip?o!psgolb,?p?v??u&de?l?n?p??v&a?og?p?s?t?v??y&drabmol?ellav&-atsoa?atsoa??licis?nacsut??z&al?b?c?p??ìlrof&-anesec?anesec???derc?er?f?m?utni??je3a3abgm--nx?kh?l!.&topsgolb,vog??uda??m!.&gro?moc!.topsgolb,?ten?ude???n&a&morockivdnas?ruatser?tnuocca??e&g?m&eganam!.retuor,?piuqe??r??i!.ue?m?opdlog??opud?uocsid??o&b?cs!.&ude,vog:.ecivres,,??d?g?h?j?oferab?p&edemoh?s???p!.&emon?gro?lbup?moc?t&en?ni?opsgolb,?ude?vog???r&a!m&law?s???epxe?op&er?pus!.ysrab,?s???s!.&adaxiabme?e&motoas?picnirp?rots??gro?lim?moc?o&c?dalusnoc?hon,?ten?ude??a&cmoc?f??e&b?r?uq??i!rolf?tned??o&h!.&duolc&p,rim,?e&lej,tiseerf,?flah,l&enapysae,rupmet,?s&pvtsaf,seccaduolc,?tsafym,vedumpw,??p!sua???urt??t!.&eman?gro?ibom?levart?m&oc?uesum??o&c?fni?r&ea?p???pooc?sboj?t&en?ni??ude?vog?zib??ayh?n?o!bba?irram???uognah?xen?y!.gro,?ztej??u&2&5te9--nx?yssp--nx??a!.&a&s?w??civ?d&i?lq??fnoc?gro?moc!.&pohsdaerpsym,stelduolc.lem,topsgolb,??nsa?ofni?sat?t&ca?en?n??ude!.&a&s?w??ci&lohtac?v??dlq?sat?t&ca?n??", - "wsn!.sloohcs????vog!.&a&s?w??civ?dlq?sat???wsn?zo??ti??c!.&fni?gro?moc?ten?ude?vog??i??d&e!.tir.segap-tig,?iab??e!.&dcym,enozgniebllew,noitatsksid,odagod.citsalej,s&nd&ps,uolc,?ppatikria,?ysrab,??g!.&bew?gro?m&aug?oc??ofni?ten?ude?vog???h!.&0002?a&citore?idem?kitore??edszot?gro?ilus?letoh?m&alker?lif?t?urof??naltagni?o&c?ediv?fni?levynok?nisac??pohs?rarga?s&a&kal?zatu??emag?wen??t&lob?opsgolb,rops??virp?xe&s?zs??ytic?zsagoj??os?sut??l!.topsgolb,?m!.&ca?gro?moc?oc?ro?ten?vog???n!.&duolcesirpretne,eni&esrem,m,?tenkcahs,?em!.ysrab,??o&ggnaw?y!c???r!.&3kl,a&i&kymlak,rikhsab,vodrom,?yegyda,?bps,ca,duolcrim,e&niram,rpcm,?g&bc,nitsohurger.citsalej,ro,?ianatsuk,k&ihclan,s&m,rogitayp,??li&amdlc.bh,m,?moc,natsegad,onijym,pp,ri&b,d&cm:.spv,,orue,?midalv,?s&ar,itym,?t&en,ni,opsgolb,set,?u&4an,de,?vo&g,n,?ynzorg,zakvakidalv,?myc?p?ug??s!.&a&d&golov,nagarak,?gulak,i&groeg,kymlak,lerak,nemra,rikhsab,ssakahk,vodrom,zahkba,?lut,rahkub,vut,yegyda,znep,?bps,da&baghsa,rgonilest,?gunel,i&anatsuk,hcos,ovan,ttailgot,?k&alhsygnam,ihclan,s&legnahkra,m,n&a&mrum,yrb,?i&buytka,nbo,??tiort,vorkop,??l&ocarak,ybmaj,?na&gruk,jiabreza,ts&egad,hkazak-&htron,tsae,???ovonavi,r&adonsark,imidalv,?t&enxe,nek&hsat,mihc,??vo&hsalab,n,?ynzorg,z&akvakidalv,emret,??t&amok?i&juf?masih????v!.&em,g&olb,ro??moc?nc,ten?ude?ved,??ykuyr??v&b?c!.&emon?gro?moc?t&ni?opsgolb,?ude???ed!.&ated,enilnigol,gnigats-oned,hcetaidem,lecrev,o&ned,tpyrctfihs,?ppa-rettalp,s&egap,rekrow,?vr&esi,uc,?weiverpbuhtig,ylf,??ih?l!.&di?fnoc?gro?lim?moc?nsa?ten?ude?vog???m!.&eman?gro?lim?m&oc?uesum??o&fni?r&ea?p???pooc?t&en?ni??ude?vog?zib???o&g?m??rt?s!.&bog?der?gro?moc?ude???t!.&bew-eht-no,naht-&esrow,retteb,?sndnyd,?d?gh?i?won??uqhv--nx??w&a!.moc?hs?l??b!.&gro?oc???c!.&gro?moc?ten?ude??cp??e&iver!.oby,?n?s??g?k!.&bme?dni?gro?moc?ten?ude?vog???m!.&ca?gro?m&oc?uesum??oc?pooc?t&en?ni??ude?vog?zib??b??o&csom?h!s??n?w??p!.&344x,de?en?o&c?g??ro?snduolc,ualeb???r!.&ca?gro?lim?oc?pooc?ten?vog??n??t!.&a46oa0fz--nx?b&82wrzc--nx?ulc??emag?gro?l&im?ru,?moc!.reliamym,?t&en?opsgolb,?ude?v&di?og?ta0cu--nx??zibe?業商?織組?路網???z!.&ca?gro?lim?oc?vog????x&a!.&cm,eb,gg,s&e,u,?tac,ue,yx,?t??c!.&hta,ofni,vog???e&d&ef?nay??ma!nab??rof?s??ilften?jt?m!.&bog?gro?moc?t&en?opsgolb,?ude??g?ma2ibgy--nx??o&b!x??f?rex??rbgn--nx?s!.vog??x&am&jt?kt??x???y&4punu--nx?7rr03--nx?a&d!i&loh?rfkcalb??ot!.emyfilauqerp,??g?lp?p!ila??rot?ssin?wdaorb??b!.&duolcym,fo?hcetaidem,lim?moc!.topsgolb,?vog??ab?gur??c!.&ca?dtl?gro?lim?m&oc!.&ecrofelacs.j,topsgolb,??t??orp?s&egolke?serp??ten?vog?zib??amrahp?nega??d&dadog?uts??e&kcoh?ltneb?n&dys?om?rotta??snikcm??g!.&eb,gro?moc?oc?ten?ude?vog??olonhcet!.oc,?rene??hpargotohp?id?k!.&gro?moc?ten?ude??s??l!.&clp?d&em?i??gro?hcs?moc?ten?ude?vog??f?imaf!nacirema??l&a?il??ppus??m!.&eman?gro?lim?moc?t&en?opsgolb,?ude?vog?zib??edaca!.laiciffo,?ra??n&a&ffit?pmoc??os??o&j?s??p!.&gro?lim?moc?pooc?ten?ude?vog???r&e&corg?grus?llag?viled??lewej?otcerid?tnuoc?uxul??s!.&gro?lim?moc?ten?ude?vog??pil??t&efas?i&c?ledif?n&ifx?ummoc!.&bdnevar,gon,murofym,???r&ahc?uces??srevinu??laer?r&ap!.oby,?eporp??uaeb??u!.&bug?gro?lim?moc!.topsgolb,?ten?ude??b!tseb???van!dlo??xes??z&a!.&eman?gro?lim?moc?o&fni?rp??pp?t&en?ni??ude?vog?zib???b!.&az,gro?jsg,moc?ten?ude?vog???c!.&4e,inum.duolc.&rsu,tlf,?m&laer,urtnecatem.motsuc,?oc,topsgolb,??d!.&cos?gro?lop?m&oc?t??ossa?t&en?ra??ude?vog???ib!.&duolcsd,e&ht-rof,mos-rof,rom-rof,?izoj,nafamm,p&i&-on,fles,?ohbew,tfym,?retteb-rof,snd&nyd,uolc,?xro,?g??k!.&duolcj,gro?lim?moc?t&en?ropeletzak.saapu,?ude?vog???m!.&ca?gro?lim?oc?ten?ude?v&da?og????n!.&asq-irom--nx?ca?gro?htlaeh?i&r&c?o&am?ām???wi!k???keeg?l&im?oohcs??neg?oc!.topsgolb,?t&en?nemailrap?vog???a!niflla???rawhcs?s!.&ca?gro?oc???t!.&c&a?s??e&m?n??ibom?l&etoh?im??o&c?fni?g??ro?vt???u!.&gro?moc?oc?ten??rwon??yx!.&e&nozlacol,tisgolb,?gnitfarc,otpaz,??zub??λε?υε?авксом?брс!.&гро?до?ка?р&бо?п!у?????г&б?ро??дкм?зақ?итед?килотак?леб?мок?н&йално?ом??рку?сур!.&арамас,бпс,гро,зиб,ичос,ксм,м&ок,ырк,?рим,я,??тйас?фр?юе?յահ?לארשי!.&בושי?הימדקא?ל&הצ?שממ????םוק?اي&روس?سيلم?ناتيروم??بر&ع?غملا??ة&كبش?ي&دوعسلا?روس??یدوعسلا??ت&ا&راما?لاصتا??را&ب?ڀ?ھب???ر&ئازجلا?ازاب?صم?طق??سنوت?عقوم?قارع?ك&تيب?يلوثاك??موك?ن&ا&تس&كاپ?کاپ??دوس?ر&يا?یا??مع?يلعلا??درالا?ميلا?ي&رحبلا?طسلف???ه&ارمه?يدوعسلا??وكمارا?يبظوبا?ۃیدوعسلا?टेन?त&राभ?ोराभ??नठगंस?मॉक?्मतराभ?ত&রাভ?ৰাভ??ালংাব?ਤਰਾਭ?તરાભ?ତରାଭ?ாயித்நஇ?ைக்ஙலஇ?்ரூப்பக்ஙிச?్తరాభ?ತರಾಭ?ംതരാഭ?ාකංල?มอค?ยทไ!.&จิกรุธ?ต็นเ?ร&ก์คงอ?าหท??ลาบฐัร?าษกึศ???ວາລ?ეგ?なんみ?アトス?トンイポ?ドウラク?ムコ?ル&グーグ?ーセ??ン&ゾマア?ョシッァフ??业企?东广?乐娱?亚基诺?你爱我?信中?务政?动移?博微?卦八?厅餐?司公?品食?善慈?团集?国中?國中?址网?坡加新?城商?尚时?山佛?店&商?网?酒大里嘉??府政?康健?息信?戏游?拉里格香?拿大?教主天?机手?构机!织组??标商?歌谷?浦利飞?港香!.&人個?司公?府政?絡網?織組?育教???湾台?灣&台?臺??物购?界世?益公?看点?科盈訊電?站网?籍書?线在?络网?网文中?聘招?販通?逊马亚?通联?里嘉?锡马淡?門澳?门澳?闻新?電家?국한?넷닷?성삼?컴닷??"); + "a&0&0trk9--nx?27qjf--nx?e9ebgn--nx?nbb0c7abgm--nx??1&2oa08--nx?apg6qpcbgm--nx?hbbgm--nx?rdceqa08--nx??2&8ugbgm--nx?eyh3la2ckx--nx?qbd9--nx??3&2wqq1--nx?60a0y8--nx??4x1d77xrck--nx?6&1f4a3abgm--nx?2yqyn--nx?5b06t--nx?axq--nx?ec7q--nx?lbgw--nx??883xnn--nx?9d2c24--nx?a&a?it??b!.&gro?lim?moc?sr,t&en?opsgolb,?ude?vog??abila?c?ihsot?m?n??c!.&b&a?m?n??c&b?g?q??ep?fn?k&s?y??ln?no?oc,p&i-on,ohsdaerpsym,?sn?t&n?opsgolb,?un?ysrab,?i&ma?r&emarp?fa??sroc??naiva?s??d&ats?n&eit?oh??om?sa?tl??eg?f&c?ob??g!emo?naripi?oy??hskihs?i&cnal?dem!.remarf,?hs?k!on??sa!.snduolc,??jnin?k&aso?dov?ede?usto??l!.&c,gro?moc?ofni?r&ep?nb,?t&en?ni??ude?vog??irgnahs?le&nisiuc?rbmuder???m!.&ca?gro?oc?sserp?ten?vog??ahokoy?e00sf7vqn--nx?m??n!.&ac?cc?eman?gro?ibom?loohcs?moc?ni?o&c?fni?rp??r&d?o??s&u?w??vt?xm??av?is?olecrab?tea??p!.&bog?ca?d&em?ls??g&ni?ro??mo&c?n??oba?ten?ude??c?g7hyabgm--nx?ra!.&461e?6pi?iru?nru?rdda-ni?siri???s??q!.&eman?gro?hcs?lim?moc?t&en?opsgolb,?ude?vog???r&az?emac?f4a3abgm--nx?n!d5uhf8le58r4w--nx??u&kas?tan???s!.&bup?dem?gro?hcs?moc?ten?ude?vog??ac!.uban.iu,?iv??t&ad?elhta?led?oyot??u!.&a&cinniv?emirc?i&hzhziropaz?stynniv??s&edo?sedo??tlay?vatlop??bs?cc,d&argovorik?o!roghzu??tl,?e&hzhziropaz?i,nvir?t??f&i?ni,?g&l?ro??hk?i&stvinrehc?ykstynlemhk??k&c?m?s&nagul?t&enod?ul??v&iknarf-onavi?orteporp&end?ind?????l&iponret?opotsa&bes?ves??p??m&k?oc?s?yrk??n&c?d?i?osrehk?v?ylov??o&c,nvor??p&d?p,z??r&c?imotihz?k?ymotyhz??sk?t&en?l?z??ude?v:c?e&alokin?ik??i&alokym?hinrehc?krahk?vl?yk??k?l?o&g!inrehc??krahk??r?,xc,y&ikstinlemhk?mus?s&akrehc?sakrehc?tvonrehc???z&ib,u????v!aj?bb?et?iv??waniko?x&a?iacal??yogan?z&.&bew?c&a?i&n?rga???gro?l&im?oohcs??m&on?t??o&c!.topsgolb,?gn??radnorg?sin?t&en?la??ude?vog?wal??zip!.korgn,???b&00ave5a9iabgm--nx?1&25qhx--nx?68quv--nx?e2kc1--nx??2xtbgm--nx?3&b2kcc--nx?jca1d--nx??4&6&1rfz--nx?qif--nx??96rzc--nx??88uvor--nx?a&0dc4xbgm--nx?c?her?n?ra?t??b!.&erots?gro?moc?o&c?fni??ten?ude?v&og?t??zib??a??c&j?s??d&hesa08--nx?mi??g?l!.&gro?moc?ten?ude?vog??m??s!.&gro?moc?ten?ude?vog???tc-retarebsnegmrev--nx?u&lc!.&elej,snduolc,ysrab,?smas??p!.ysrab,??wp-gnutarebsnegmrev--nx??c&1&1q54--nx?hbgw--nx??2e9c2czf--nx?4&4ub1km--nx?a1e--nx?byj9q--nx?erd5a9b1kcb--nx??8&4xx2g--nx?c9jrb2h--nx??9jr&b&2h--nx?54--nx?9s--nx??c&eg--nx?h3--nx?s2--nx???a!.&gro?lim?moc?rrd,ten?ude?vog??3a09--nx!.&ca1o--nx?gva1c--nx?h&ca1o--nx?za09--nx??ta1d--nx?ua08--nx????b&a?b?ci?f76a0c7ylqbgm--nx?sh??c!.&eugaelysatnaf,gnipparcs,liamwt,nwaps.secnatsni,revres-emag,s&nduolc,otohpym,seccaptf,?xsc,?0atf7b45--nx?a1l--nx??e!.&21k?bog?dem?esab,gro?l&aiciffo,im??moc?nif?o&fni?rp??ten?ude?vog??beuq?n?smoc??fdh?i&l&buperananab?ohtac??n&agro?ilc?osanap??sum?tic??l!.&gro?moc?oc?ten?ude?vog?yo,?l??m!.&mt?ossa??p1akcq--nx??n!.&mon?ossa??i?p??relcel?s!.&gro?moc?ten?ude?vog???t!.&e&m,w,?hc,?s?w??v!.&e0,gro?lim?moc?ten?ude?v&g:.d,,og????wp?yn??d&2urzc--nx?3&1wrpk--nx?c&4b11--nx?9jrcpf--nx???5xq55--nx?697uto--nx?75yrpk--nx?9ctdvkce--nx?a!.mon?d?er?olnwod??b2babgm--nx?c!.vog?g9a2g2b0ae0chclc--nx??e&m!bulc??r!k??sopxe?timil?w??fc?g!.&ude?vog???h&d3tbgm--nx?p?t??i!.&ased?bew?ca?etrof,hcs?lim?o&c!.topsgolb,?g??palf,ro?sepnop?ten?ym?zib??b?ordna?p?rdam??l&iub?og?row??m!.&ed,ot,pj,t&a,opsgolb,???n&a&b?l!.citats:.&setis,ved,?,raas???ob?uf??o&of?rp??r&a&c&tiderc?yalcrab??ugnav??ef506w4b--nx?k!.&oc,ude,?jh3a1habgm--nx??of??s!.&dem?gro?moc?ofni?ten?ude?v&og?t???m!kcrem???t!.topsgolb,excwkcc--nx?l??uolc!.&a&bura-vnej.&1ti,abura.rue.1ti,?tcepsrep,xo:.&ku,nt,?,?b&dnevar,ewilek:.sc,,?citsalej.piv,drayknil,elej,gnitsohdnert.&ed,hc,?letemirp:.ku,,m&edaid,ialcer.&ac,ku,su,??n&evueluk,woru,?r&epolroov,o&pav,tnemele,??tenraxa.1-se,ululetoj,wcs.&gnilebaltrams,koobelacs,latemerab.&1-&rap-rf,sma-ln,?2-rap-rf,?rap-rf.&3s,cnf:.snoitcnuf,,etisbew-3s,mhw,s8k:.sedon,,?s&8k,ecnatsni.&bup,virp,?ma-ln.&3s,etisbew-3s,mhw,s8k:.sedon,,??waw-lp.&3s,etisbew-3s,s8k:.sedon,,??xelpciffart,yawocne.ue,??za5cbgn--nx??e&1&53wlf--nx?7a1hbbgm--nx?ta3kg--nx??2a6a1b6b1i--nx?3ma0e1cvr--nx?418txh--nx?707b0e3--nx?a!.&ca?gro?hcs?lim?oc?t&en?opsgolb,?vog??09--nx??b!.&ca?etisbew321,gnitsohbew,nevueluk.yxorpze,pohsdaerpsym,snoitulostsohretni.duolc,topsgolb,?ortal?ut!uoy???c&0krbd4--nx!.&a2qbd8--nx?b8adbeh--nx?c6ytdgbd4--nx?d8lhbd5--nx???a&lp!.oc,?ps!.&lla4sx,rebu,tsafym,?artxe??sla??i!ffo??n&a&d?iler?nif?rusni!efil?srelevart???eics!.oby,??rofria??d!.&1sndnyd,42pi-nyd,7erauqs,amil4,b&ow-nrefeilgitsng--nx,rb-ni,vz-nelletsebgitsng--nx,?decalpb,e&daregtmueart,luhcsvresi,mohsnd,nihcamyek,tiesbew321,?hcierebsnoissuksid,keegnietsi,lsd-ni,m&oc,rofttalpluhcs,?n&-i-g-o-l,aw-ym,e&lletsebgitsnüg,sgnutiel,?i&emtsi,lreb-n&i,yd,??norblieh-sh.ti.segap,oitatsksid-ygolonys,pv&-n&i,yd,?nyd,?refeilgitsnüg,?orp-ytinummoc,p&h21,iog:ol,,ohsdaerpsym,?r&e&ntrapdeeps.remotsuc,su&-lautriv,lautriv,?t&adpusnd,tub-ni,uor-ym,?vres&-e&bucl,mohym,?bew-emoh:.nyd,,luhcs,??ogiv-&niem,ym,??s&d-&onys,ygolonys,?nd&-&dd,nufiat,sehcsimanyd,tenretni,yard,?isoc.nyd,ps,yard,?oper-&nvs,tig,?sndd:.&nyd,sndnyd,?,?topsgolb,vresi-&niem,tset,?xi2,y&awetag-&llawerif,ym,?srab,tic-amil,?zten&mitbel,sadtretteuf,??art!.oby,?i&sdoow?ug??on--nx??e!.&bil?dem?eif?gro?irp?kiir?moc!.topsgolb,?pia?ude?vog??ei?ffoc?gg?r&f?ged???f&a&c?s??il??g!.&gro?lim?moc?t&en?vp??ude?vog??a&f?gtrom?p!.&3xlh,detalsnart,grebedoc,kselp,sndp,tengam,xlh,y&cvrp,kcor,???rots?yov??elloc?na&hcxe?ro!.hcet,??roeg?ug??i!.&pohsdaerpsym,topsgolb,vog??tilop?v&bba?om???j!.&fo,gro?oc?ten???k!.&c&a?s??e&m?n??ibom?o&c!.topsgolb,?fni?g??ro??i&b?l?n???l&a&dmrif?s!rof???b&a?i&b?dua???c&aro?ric??dnik?g!oog??i&bom?ms??l&asal?erauqa??ppa?uhcs?yts!efil???m!.&4&32i,p&ct,v,??66c,ailisarb,b&dnevar,g-raegelif,?ca?duolcsd,e&d-raegelif,i&-raegelif,lpad:.tsohlacol,,?pcm,?g&ro?s-raegelif,?hctilg,kcatsegde,noitatsksid,o&bmoy,c?t&nigol,poh,??p&i&on,snart.etis,?j-raegelif,ohbew,?r&aegelif,idcm,ofsnd,?s&dym,ndd,ti?umhol,?t&en?s&acdnuos,ohon,??u&a-raegelif,de??v&irp?og??y&golonys,olpedew,srab,??a&g?n!.&reh.togrof,sih.togrof,???em?i&rp?twohs??orhc?w??n!goloc?i&lno!.&egats-oree,oree,ysrab,??w??o!.&derno:.gnigats,,ecivres,knilemoh,?hp?latipac?ts&der?e&gdirb?rif???z!.&66duolc,amil,sh,???ruoblem??om?p!.&bog?gro?lim?mo&c?n??t&en?opsgolb,?ude??irg?yks??r!.&mo&c?n??ossa?topsgolb,?a&c!htlaeh??pmoc?wtfos??bc?eh?if?ots!.&e&rawpohs,saberots,?yflles,??taeht?u&ces?sni?t&inruf?necca??za???s!.&a!bap.us,disnim321,?b!ibnal?rofmok??c!a??d!b?n&arb?ubroflanummok???e?f!noc,?g!ro??h!f??i!trap??k!shf??l?m!oc,t??n!mygskurbrutan??o?p!ohsdaerpsym,p??r!owebdluocti,?s!serp?yspoi,?t!opsgolb,?u?vhf?w?x!uvmok??y?z??a&c?el?hc??i&er?urc??nesemoh?roh?uoh??t&a&d?ts&e!laer??lla???is!.&e&lej,nilnigol,r&etnim,ocevon,?winmo,?k&rowtenoilof,wnf,?laicosnepo,n&eyb,oyc,?spvtsaf,thrs,xulel,ysrab,?bew!.remarf,??ov?ra?t&ioled?ol??utitsni??u&lb?qi&nilc?tuob???v!.&21e?b&ew?ib?og??ce&r?t??erots?gro?lim?m&o&c?n??rif??o&c?fni??rar?stra?t&en?ni??ude?vog??as?e3gerb2h--nx?i&l!.xlh,?rd?ssergorp??ol??w&kct--nx?r??xul?y!.&gro?lim?moc?ten?ude?vog????f&0f3rkcg--nx?198xim--nx?280xim--nx?7vqn--nx?a!.&gro?moc?ten?ude?vog???b!.vog?wa9bgm--nx??c!.topsgolb,a1p--nx!.&a14--nx,b8lea1j--nx,c&avc0aaa08--nx,ma09--nx,?f&a1a09--nx,ea1j--nx,?gva1c--nx,nha1h--nx,pda1j--nx,zila1h--nx,??ns??ea1j--nx?g?iam?l&a1d--nx?og??n!.&bew?cer?erots?m&oc?rif??ofni?re&hto?p??stra?ten???orp?p!.&gro?moc?ude???rus?t!.hcs,w??vd7ckaabgm--nx?w!.&hcs,zib,???g&2&4wq55--nx?8zrf6--nx??3&44sd3--nx?91w6j--nx!.&a5wqmg--nx?d&22svcw--nx?5xq55--nx??gla0do--nx?m1qtxm--nx?vta0cu--nx????455ses--nx?5mzt5--nx?69vqhr--nx?7&8a4d5a4prebgm--nx?rb2c--nx??a!.&gro?mo&c?n??oc?ten??vd??b!.&0?1?2?3?4?5?6?7?8?9?a?b?c?d?e?f?g?h?i?j?k?l?m?n?o?p?q?r?s?t!opsgolb,?u?v?w?x?y!srab,?z???c!b?za9a0cbgm--nx??e!.&eman?gro?ics?lim?moc!.topsgolb,?nue?ten?ude?vog??a??g!.&ayc,gro?lenap:.nomead,,oc?saak,ten???i&a?v??k!.&g&olb,ro??ku,lim?moc?oi,pj,su,ten?ude?v&og?t,???m!.&drp?gro?lim?m&o&c?n??t??oc?ude?vog??pk??n!.&dtl,eman?gro?hcs?i!bom??l&im?oc,?m&oc!.topsgolb,?rif,?neg,ogn,ten?ude?vog??aw?i!b!mulp??car?d&art?dew??h&sif?tolc??k&iv?oo&b?c???ls?n&aelc?iart??p!pohs??re&enigne?tac??t&ad?ekram?hgil?lusnoc?neg?ov?soh!.tfarcnepo,??vi&g?l???o!s??u&rehcisrev?smas?tarebsnegömrev???o&d?lb?og!.&duolc,etalsnart,???r&2n084qlj--nx?ebmoolb?o!.&77ndc.c:sr,,a&remacytirucesym,t&neimip,sivretla,?z,?bew-llams,d&ab-yrev-si,e&sufnocsim,vas-si,?nuof-si,oog-yrev-si,uolc&arfniarodef,mw,??e&a,cin-yrev-si,grof&loot,peh,?l&as-4-ffuts,poeparodef,?m&-morf,agevres,ohruoyslles,?n&ozdop,uma.elet,?r&ehwongniogyldlob,iwym,uces-77ndc.nigiro.lss,?t&adidnac-a-si,is&-ybboh,golb,???fehc-a-si,golbymdaer,k&eeg-a&-si,si,?h,nut,?l&i&amwt,ve-yrev-si,?lawerif&-ym,ym,?sd-ni,?m&acssecca,edom-elbac,?n&af&blm,cfu,egelloc,lfn,s&citlec-a-si,niurb-a-si,tap-a-si,?xos-a-si,?ibptth,o&itatsksid,rviop,?p&j,v-ni,??o&jodsnd,tp&az,oh,??p&i&-on,fles,?o&hbew,tksedeerf,?tf&e&moh,vres,?ym,??r&e&gatop,ppepteews,su-xunil-a-si,?gmtrec,vdmac,?s&a&ila&nyd,snd,?nymsd,?b&alfmw,bevres,?d&ikcet.3s,ylimaf,?eirfotatophcuoc,j,koob-daer,ltbup,nd&-won,deerf,emoh,golb,kcud,mood,nyd:.&emoh,og,?,ps,rvd,tog,uolc,?s&a-skcik,ndd,?tnemhcattaomb,u,?t&ce&jorparodef.&duolc,gts.so.ppa,so.ppa,?riderbew,?e&ews-yrev-si,nretni&ehtfodne,fodne,??hgink-a-si,oi-allizom,s&ixetn&od,seod,?o&h-emag,l-si,?rifyam,??ue:.&a&-q,c,?cm,dc,e&b,d,e,i,m,s,?g&b,n,?hc,i&f,s,?k&d,m,s,u,?l&a,i,n,p,?n&c,i,?o&n,r,ssa,?pj,r&f,g,h,k,t,?s&e,i:rap,,u,?t&a,en,i,l,m,ni,p,?u&a,de,h,l,r,?vl,y&c,m,?z&c,n,??,vresnyd,x&inuemoh,unilemoh,?y&limafxut,srab,???ub&mah?oj???s!.&delacsne,gro?moc?rep?t&en?opsgolb,?ude?vog??gb639j43us5--nx??t?u!.&c&a?s??en?gro?moc?o&c?g??ro?topsgolb,??v!.ta,a1c--nx??wsa08--nx??h&0ee5a3ld2ckx--nx?4wc3o--nx!.&a&2xyc3o--nx?3j0hc3m--nx?ve4b3c0oc21--nx??id1kzuc3h--nx?l8bxi8ifc21--nx?rb0ef1c21--nx???8&8yvfe--nx?a7maabgm--nx??b!.&gro?moc?ten?ude?vog??mg??c!.&7erauqs,amil4,duolc-drayknil,etisbew321,gniksnd,p&h21,ohsdaerpsym,?sndtog,topsgolb,wolf.e&a.1pla,nigneppa,?xi2,ytic-amil,?aoc?et?ir!euz??r&aes?uhc??sob?taw!s???d0sbgp--nx?f&2lpbgm--nx?k??g!.&gro?lim?moc?ude?vog???m!a1j--nx??ocir?p!.&gro?i?lim?moc?ogn?ten?ude?vog???s!.&g&nabhsah,ro??l&im?xv,?m&oc?roftalp.&cb,su,tne,ue,??pib,ten?vog", + "?won,yolpedew,?a&c?nom??i&d?f?ri???t!.&ca?enilno,im?ni?o&c?g??pohs,ro?ten??iaf!.oby,?laeh!.arh,?orxer?ra&ba?e???vo!.lopdren,?zb??i&3tupk--nx?7a0oi--nx?a!.&ffo?gro?moc?ten?uwu,?1p--nx?bud?dnuyh?tnihc??b!.&gro?moc?oc?ro?ude??ahduba?o!m!.&duolcsd,ysrab,???s??c!.&ayb-tropora--nx?ca?d&e?m??esserp?gro?ln,moc?nif,o&c?g?ssa??ro?t&en?ni?roporéa??ude?vuog??cug?t??d&dk?ua??e&bhf--nx?piat??f!.&aw5-nenikkh--nx,dnala?i&ki,spak,?mroftalpduolc.if,nenikkäh,pohsdaerpsym,retnecatad.&omed,saap,?topsgolb,uvisitok321,yd,?onas??g!.&d&om?tl??gro?moc?ude?vog???h&c&atih?ra??s&abodoy?ibustim???juohs?k!.&gro?moc?ofni?ten?ude?vog?zib??b4gc--nx?iw!.remarf,?nisleh?s?uzus??l!.&aac,topsgolb,?drahcir?iamsi??maim?n!.&b&ew?og??ca?gro?lim?mo&c?n??ni?o&c?fni??pp?t&en?ni??ude?zib??airpic?i&hgrobmal?m??re??om?rarref?s!.&egaptig,ppatig,topsgolb,?ed??t&aresam?i&c?nifni??rahb??ut?v!.&21k?gro?moc?oc?ten???wik?xa&rp?t??yf??j&6pqgza9iabgm--nx?8da1tabbgl--nx?b!.&acirfa?eto?gro?m&oc?siruot??o&c!e??fni?noce?rga?tser??russa?s&etcetihcra?risiol?tacova??t&en?naruatser?opsgolb,?ude?vinu?yenom???d?f!.&ca?eman?gro?lim?moc?o&fni?rp??ten?vog?zib???nj?s?t!.&bew?c&a?in??eman?gro?lim?moc?o&c?g??t&en?ni?set??ude?vog?zib???yqx94qit--nx??k&8uxp3--nx?924tcf--nx?arfel?c&a&bdeef?lb??ebdnul?ilc?reme??d!.&e&disemmejh321,rots,?ger,mrif,oc,pohsdaerpsym,topsgolb,zib,?t??e&es?samet??h!.&a&4ya0cu--nx?5wqmg--nx??b3qa0do--nx?cni,d&2&2svcw--nx?3rvcl--nx??5xq55--nx?tl,?g&a0nt--nx?la0do--nx?ro??i&050qmg--nx?7a0oi--nx?xa0km--nx??m&1qtxm--nx?oc??npqic--nx?saaces,t&en?opsgolb,?ude?v&di?og?ta0cu--nx??xva0fz--nx?人&个?個?箇??司公?府政?絡&網?网??織&組?组??织&組?组??络&網?网??育&敎?教???n??i&tsob?vdnas??l!.&bew?c&a?os??dtl?gro?hcs?letoh?moc?nssa?ogn?prg?t&en?ni??ude?vog??at?cd?is??m!.&eman?fni?gro?moc?t&en?opsgolb,?ude?vog???n&ab!cfdh?etats?mmoc?t&en?fos??u??i!l!.&noyc,pepym,??p???oob?p!.&b&ew?og??gro?kog?m&af?oc??nog?ofni?pog?sog?ten?ude?vog?zib???row!ten!.&htumiza,nolt,o&c,vra,??doof???s!.topsgolb,?t?u!.&c&a?lp??dtl?e&cilop?m??gro!.&gul:g,,sgul,yr&ettoly&lkeew,tiniffa,?tneelffar,???lenap-tnednepedni,n&noc,oissimmoc-&layor,tnednepedni,??o&c!.&bunsorter.tsuc,en&ilnoysrab,ozgniebllew,?krametyb.&hd,mv,?omida,p&i-on,ohsdaerpsym,?t&fihsreyal.j,opsgolb,?vres-hn,ysrab,??rpoc,?psoh,shn?t&en?nmyp,seuqni-tnednepedni,?vog!.&eci&ffoemoh,vres,?ipa,ngiapmac,??weiver-tnednepedni,y&riuqni-&cilbup,tnednepedni,?srab,????l&04sr4w--nx?a!.&gro?lim?moc?t&en?opsgolb,?ude?vog??bolg?c?ed?g!el??i&c&nanif!.oc,lpl??os??romem?tnedurp??n&if?oitanretni??t&i&gid!.sppaduolc:.nodnol,,?p&ac?soh???ned?ot??utum!nretsewhtron???c!.&bog?lim?oc?topsgolb,vog???dil?e&datic?n&ahc?nahc!gnikooc?levart?rehtaew???t!ria?tam??vart??f&8f&pbgo--nx?tbgm--nx??a?n??g!.&gro?moc?oc?ten?ude?xx,zib,??h&d?op??i!.&21k?ca?fdi?gro?inum?oc!.&egapvar,redrotibat,t&ibatym,opsgolb,???ten?vog??a&f?m&e?g?toh???m?r??l&a&b&esab?t&eksab!.&sua,zn,??oof???c?mt??e&d?hs??ihmailliw?j??m!.&esserp?gro?moc?ten?ude?v&og?uog????n!.&etisbew321,no&med,rtsic,?oc,pohsdaerpsym,retsulc-gnitsoh,topsgolb,vog,yalphk,?o??o&a?btuf?l!.gmo,?o&c!.&ed,rotnemele,??hcs??rit?u??p!.&a&cin&diws?gel??d&g,ortso?urawon??i&dem?mraw?nydg,?k&elo&guld?rtso??slopolam?tsu?ytsyrut??l&ip?o&kzs?w&-awolats?oksnok????n&erapohs,img?zcel,?rog&-ai&bab?nelej??j?z??syn?tsaim?w&a&l&eib?i?o??zsraw??o&namil?tainop,??z&eiwolaib?mol???c&e&iw&alselob?o&nsos?rtso???le&im?zrogz???orw,p??d&em,ia?ragrats?uolc&inu,sds,??e&c&i&lrog?w&ilg,o&hc&arats?orp??klop?tak????yzreibok??i&csjuoniws?ksromop?saldop??l&ahdop?opo??napokaz,t&atselaer?iselpmis,?z&romop?swozam???g&alble?ezrbo&lok?nrat??ro??hcyzrblaw?i&csomohcurein?grat?klawus??k&e&rut?walcolw??in&byr?diws,sark,?le?o&nas?tsylaib??rob&el?lam??s&als?jazel?nadg,puls?rowezrp???l&colw?e&r?vart??i&am?m???m&o&c?dar?n?tyb??s&g?iruot??t!a???n&a&gaz?nzop,?i&bul?cezczs?lbul,molow?nok?zd&eb?obeiws???uleiw?y&tzslo?z&rtek?seic????o&c,fni?k&celo?zdolk??lkan?n&leim?pek?t&uk?yzczs??z&copo?eing?rowaj???rga?tua?w&ejarg?ogarm???p&e&eb,lks!emoh,??klwwortso?ohs!-ecremmoce,daerpsym,??romophcaz?sos?t&aiwop?en?opos,ra,sezc??ude?v&irp?og!.&a&p?s!w???bni&p?w??ci?dtiw?essp?fiw?g&imu?u??hiiw?m&igu?rio?u!o???nds?o&ks?p!pu??s?wtsorats??p&a?sp!mk?pk?wk??u&m?p??wk?z??r&ksw?s??s&i?oiw?u?zu??talusnok?w&gzr?i&p?rg?w??m?opu?u!imzw???zouw????w&a&l&corw?sizdow??w??o&golg?k&ark,ul?zsurp??r&az?gew??t&rabul,sugua??z&coks?sezr????xes?y&buzsak?d&azczseib?ikseb??hcyt?n&jes?lod-zreimizak??pal?r&ogt?uzam??walup?zutrak??z&am-awar?c&aprak?iwol?zsogdyb??dalezc?ib?s&i&lak?p??uklo????l??r&as?f?s??s!.&gro?moc?ten?ude?vog???t!.vog??ubnatsi?x3b689qq6--nx?yc5rb54--nx??m&00tsb3--nx?1qtxm--nx?981rvj--nx?a!.&aayn,enummoc?gro?moc?o&c?idar,ken,?t&en?opsgolb,??c!bew??dretsma?e&rts?t!.&citsalej,esruocsid,???fma?xq--nx??b!.&gro?moc?ten?ude?vog??i??c!.&moc?oc?ten?vog???d!.&gro?moc?ten?ude?vog???f!.&gro?moc?oidar,ten?ude??i??g!vu96d8syzf--nx??h?i!.&ca?gro?moc?o&c!.&clp?dtl???r,?t&en?t??vt??k?rbg4--nx??k!.&drp?e&rianiretev?sserp??gro?lim?m&o&c?n??t??nicedem?ossa?pooc?s&eriaton?neicamrahp?sa??ude?v&og?uog????l&if?ohkcots??o!.&dem?gro?m&oc?uesum??o&c?rp??ten?ude?vog??b?c!.&0x,2aq,3pmevres,5sndd,a&c&-morf,ir&bafno,fa,??g&-morf,oy-sehcaet,?i-morf,m&-morf,all&-a-si,amai,??p&-morf,c-a-si,?r&emacytirucesym,odih,?s,tadtsudgniht,v-morf,w-morf,z,?b&ew&-sndnyd,arukas,draiw.segap,ottad,?ildts.ipa,?c&amytirucesemoh,d-morf,esyrcs,itsalej.omed,n&-morf,vym,?p&kroweht,ytirucesemoh,?q,rievres,s-morf,?d&aerotffuts,e&calpb,ifitrec-&si,ton-si,?llortnocduolc,rewopenignepw:.sj,,tsohecapsppa,?i&-morf,rgevissam.saap,?m-morf,n&-morf,abeht-htiw-si,?s-morf,uolc&-noitatsyalp,hr,iafaw.&d&ej,yr,?nol,?meaeboda,nevia,panqym:-&ahpla,ved,?,smetsystuo,tekcilc,ved&j,pw,??vreser,wetomer,?e&butuoyhtiw,ciffo-sndnyd,d:-morf,o&celgoog,n&il.srebmem,neve.&1-&su,ue,?2-&su,ue,?3-&su,ue,?4-&su,ue,????,erf&-sndnyd,sndd,?filflahevres,g&de-yltsaf,nahcxeevres,?i&hcet-a-si,p-sekil,?k&auqevres,irtsretnuocevres,?l&bitpa-no,googhtiw,?m&agevres,ina-otni-si,oh-&sndnyd,ta-sndnyd,??n&-morf,ilno&-evreser,ysrab,?og-si,?r&alfduolcyrt,ehwynanohtyp:.ue,,ihcec,?srun-a-si,t&i&nuarepo,s&-ybboh,aloy,elpmis,tipohs,xiw,??omer-sndnyd,upmocsma,ysgolb,?v&als-elcibuc-a-si,i&lsndd,tavresnoc-a-si,??z&amkcar,eelg,iig,??fehc-a-si,g&ni&gats-&raeghtua,swennwot,?ksndd,robsikrow,tsoh-bt.etis,?o&fgp,lb&-sndnyd,sihtsetirw,???h&n-morf,o-morf,?i&fiwehtno,h-morf,kiw-sndnyd,m-morf,p&aerocne,detsoh,?r-morf,w-morf,z&ihcppa,nilppa,??jn-morf,k&a&-morf,erfocsic,?cils-si,eeg&-a&-si,si,?sndd,?h,latsnaebcitsale:.&1-&htuos-pa,lartnec-&ac,ue,?ts&ae&-&as,su,?ht&ron-pa,uos-pa,??ew-&su,ue,vog-su,???2-ts&ae&-su,ht&ron-pa,uos-pa,??ew-&su,ue,??3-ts&aehtron-pa,ew-ue,??,o-morf,r&adhtiwtliub,ow&-&sndnyd,ta-sndnyd,?ten-orehkcats,??sedal,u,?l&a&-morf,colottad,rebil-a-si,?f-morf,i&-morf,am&-sndnyd,detsohpw,??l&ecelffaw,uf-ytnuob:.a&hpla,teb,?,?ppmswa,ru-&elpmis,taen,?ssukoreh,xegap,?m&n-morf,pml.ppa,rofe&pyt.orp,rerac-htlaeh,?sacrasevres,uirarret-yltsaf,?n&a&cilbuper-a-si,f&-sllub-a-si,racsan-a-si,?i&cisum-a-si,ratrebil-a-si,?tarukas,?c,dc&hsums,umpw,xirtrepmi,?eerg-a-si,i&-morf,jod,?m-morf,o&ehtnaptog,isam-al-a-tse,r&italik,tap-el-tse,?s&iam-al-a-tse,replausunu,??pj,t-morf,?o&bordym,c,hce-namtsop,jodsnd,m&-morf,ed-baltlow,?n:iloxip,,ttadym,?p&2pevres,aelutym,i&-sndnyd,fles,ogol,ruoy&esol,hctid,?ym&eerf,teg,??ohsdaerpsym,pa&-rettalp,anis:piv,,esaberif,k1,lortnocduolc,oifilauq,r&aegyks,oetem:.ue,,?t&ilmaerts,norfegap,?ukoreh,?t&fevres,thevres,??r&081,a:-morf,tskcor-a-si,,b,e&d&iv&erp-yb-detsoh.saap,orpnwo,?ner&.ppa,no,??e&bevres,nigne-na-si,?ggolb-a-si,h&caet-a-si,pargotohp-a-si,?krow-drah-a-si,n&gised-a-si,ia&rtlanosrep-a-si,tretne-na-si,??p&acsdnal-a-si,eekkoob-a-si,?retac-a-si,subq,tn&ecysrab,iap-a-si,uh-a-si,?vres&-&ki.&cpj-rev-duolcj,duolcj,?s&ndnyd,pvtsaf,??inim,nmad,sak,?y&alp-a-si,wal-a-si,?zilibomdeepsegap,?g,ituob,k,mgrp.nex,o&-morf,sivdalaicnanif-a-si,t&areleccalabolgswa,c&a-na-si,od-a-si,?susaym,??p-morf,u&as-o-nyd,e&tsoh.&duolc-gar,hc-duolc-gar,?ugolb-nom-tse,?omuhevres,??s&a&apod,ila&nyd,snd,?nymsd,vnacremarf,?bbevres,ci&p&-sndnyd,evres,?tcatytiruces,?dylimaf,e&cived-anelab,itilitu3,lahw-eht-sevas,mag-otni-si,t&i&iis,sro,?yskciuq,??fpi-&eralfduolc,fc,?i&ht2tniop,pa&elgoog,tneltneg,??jfac,k&-morf,aerf-ten,colb&egrof,pohsym,??m&-morf,cxolb,?n&d&-pmet,dyard,golb,htiwssem,mood,tog,?kselp,nyd,ootrac-otni-si,?o&-xobeerf,xobeerf,?ppa&-avnac,raeghtua,t&ikria,neg,??r&ac-otni-si,e&ntrap-paelut,tsohmaerd,??s&e&l-rof-slles,rtca-na-si,?ibodym,?tsaeb-cihtym.&a&llicno,zno,?ilay,lacarac,re&gitnef,motsuc,?sv,toleco,x:n&ihps,yl,?,?u,wanozama.&1-&ht&ron-ue.9duolc.s&fv,tessa-weivbew,?uos-&em.9duolc.s&fv,tessa-weivbew,?fa.9duolc.s&fv,tessa-weivbew,?pa&-3s,.&3s,9duolc.s&fv,tessa-weivbew,?etisbew-3s,kcatslaud.3s,??ue.9duolc.s&fv,tessa-weivbew,???la&nretxe-3s,rtnec-&ac&-3s,.&3s,9duolc.s&fv,tessa-weivbew,?etisbew-3s,kcatslaud.3s,??ue&-3s,.&3s,9duolc.s&fv,tessa-weivbew,?etisbew-3s,kcatslaud.3s,????ts&ae&-&as&-&3s,etisbew-3s,?.&9duolc.s&fv,tessa-weivbew,?kcatslaud.3s,??pa.9duolc.s&fv,tessa-weivbew,?su:-etisbew-3s,.&9duolc.s&fv,tessa-weivbew,?kcatslaud.3s,?,?ht&ron-pa&-&3s,etisbew-3s,?.&9duolc.s&fv,tessa-weivbew,?kcatslaud.3s,??uos-pa&-&3s,etisbew-3s,?.&9duolc.s&fv,tessa-weivbew,?kcatslaud.3s,????ew-&su&-&3s,etisbew-3s,?.9duolc.s&fv,tessa-weivbew,??ue&-&3s,etisbew-3s,?.&9duolc.s&fv,tessa-weivbew,?kcatslaud.3s,??vog-su-&3s,spif-3s,????2-ts&ae&-su&-3s,.&3s,9duolc.s&fv,tessa-weivbew,?etisbew-3s,kcatslaud.3s,??ht&ron-pa&-3s,.&3s,9duolc.s&fv,tessa-weivbew,?etisbew-3s,kcatslaud.3s,??uos-pa&-&3s,etisbew-3s,?.&9duolc.s&fv,tessa-weivbew,?kcatslaud.3s,????ew-&su&-&3s,etisbew-3s,?.9duolc.s&fv,tessa-weivbew,??ue&-3s,.&3s,9duolc.s&fv,tessa-weivbew,?etisbew-3s,kcatslaud.3s,????3&-ts&aehtron-pa.9duolc.s&fv,tessa-weivbew,?ew-ue&-3s,.&3s,9duolc.s&fv,tessa-weivbew,?etisbew-3s,kcatslaud.3s,???s,??yasdrocsid,?t&arcomed-a-si,c&-morf,etedatad.&ecnatsni,omed,??eel&-si,rebu-si,?hgilfhtiwletoh,i:batym,,m-morf,n&atnuocca-na-si,e&duts-a-si,r-ot-ecaps,tnocresu&buhtig,e&capsppa,donil.pi,lbavresbo.citats,?pl,???ops&edoc,golb,ppa,?s&i&hcrana-&a-si,na-si,?laicos-a-si,pareht-a-si,tra-na-si,xetn&od,seod,??oh&piym,sfn,??", + "u&-morf,nyekcoh-asi,?v-morf,?u&-rof-slles,4,a-sppatikria,e,h,oynahtretramssi,r:ug-a-si,,?v&n-morf,rdlf,w-morf,?w&o&lpwons-yrt,zok,?ww100,?x&bsbf.sppa,em,i&nuemoh,rtrepmi,?obaniateb,t-morf,unilemoh,?y&a&bnx:.&2u,lacol-2u,?,l&erottad,pezam,?wetag-llawerif,?dnacsekil,fipohsym,k&-morf,niksisnd,?rot&ceridevitcaym,sitk,?u:goo,,w-morf,x&alagkeeg,orp&hsilbup,mapson.duolc,???zesdrocsid,?inu??m?or?tsla??p!.&eman,nwo,??raf!.jrots,etats??s?t!.&gro?lim?mo&c?n??oc?ten?ude?vog???u&esum?rof??z!.&ca?gro?hcs?lim?moc?o&c?fni??ten?ude?vog?zib????n&315rmi--nx?a&brud?cilbuper?f?grompj?hkaga?idraug?m?ol?ssin?u&hix?qna??varac?yalo??b!.&gro?moc?oc,ten?ude?vog??c??c!.&ah?bh?c&a?s??d&5xq55--nx?g?s?uolctnatsni,?eh?g&la0do--nx?ro??h&a?q?s??i&7a0oi--nx?h??j&b?f?t?x?z??kh?l&h?im?j??m&n?oc!.swanozama.&1-htron-nc.3s,be.1-&htron-nc,tsewhtron-nc,????n&h?l?s?y??om?qc?s&g?j?ppa-avnac,?t&cennockciuq.tcerid,en??ude?vog?wt?x&g?j?n?s??z&g?x??司公?絡網?络网??b??d&g!.ypnc,?ka??e&drag?erg?fuak?gawsklov?hctik?i&libommi?w??m?po?r!ednaalv??sier?ves??g!.&ca?gro?moc?ten?ude?vog??is&ed!.ssb,?irev???h!.&bog?cc,gro?lim?moc?ten?ude???i!.&ac?bew,c&a?in??dni?e&m?sabapus,?g&5?6?p?ro??i&a?hled??ku?l&evart?im??m&a?oc?rif??n&c?eg??o&c?fni?i?rp??p&ooc?u??r&ahib?d?e??s&c?er?nduolc,senisub?u??t&arajug?en!retni??ni?opsgolb,sop??ude?v&og?t??ysrab,zib??elknivlac?griv?ks?lreb?p?v?w?x??k!.&gro?ten?ude?vog???l&eok?ocnil??m!.&cyn,gro?ude?vog???o&dnol?i&hsaf?n&o?utiderc??siv!orue??t&a&cude!.oc,?dnuof?tsyalp??c&etorp?u&a?rtsnoc?????kin?las?mrom?nac?p&q?uoc??s&iam?pe?scire??t&ron?sob??zama??p!.&gro?oc?ten?ude?vog??k??r&e&c?yab??op!.eidni,??s!.&gro?moc?osrep?t&opsgolb,ra??ude?v&inu?uog????t!.&d&ni?uolcegnaro,?gro?ltni?m&oc!nim??siruot??nif?o&fni?srep??sne?t&an?en??vog??m??u&f?r!.&bdnevar,lper,retropno,s&h,revres,?tnempoleved,??stad?xamay?y??v!.&ca?eman?gro?htlaeh?moc?o&fni?rp??t&en?ni?opsgolb,?ude?vog?zib???wo&rc?t!epac????o&76i4orfy--nx?a!.&bp?de?go?oc?ti?vg??boat??b!.&a&ci&sum?tilop??i&c&arcomed?neic??golo&ce?ncet??m&edaca?onoce??rt&ap?sudni??vilob??n&egidni?icidem??serpme?tsiver?vitarepooc??b&ew?og??dulas?e&rbmon?tr&a?op&ed?snart????g&olb?ro??ikiw?l&a&noi&canirulp?seforp??rutan??im??moc?o&fni?lbeup?rga?tneimivom??saiciton?t&askt?en?ni??ude?vt??h?iew?olg??c!.&bew?cer?dr&c,rac,?esabapus,gro?ipym,l&im?per:.di,,?m&o&c!.topsgolb,?n??rif??ofni?s&egap&dael,l,?tra??t&4n,en?ilperdellawerif:.di,,ni??ude?vog??a?e?in?mara?s&edarb?ic???d!.&b&ew?og??dls?gro?lim?moc?t&en?ra??ude?vog??agoba?if?zd7acbgm--nx??e&c?d&iv?or??morafla??f!ni!.&e&g&delwonk-fo-l&errab,lerrab,?ellocevoli,?ht-skorg,rom-rof-ereh,tadpusn:d,,?llatiswonk,macrvd,ofni-v,p&i&-on,fles,?ohbew,?ruo-rof,s&iht-skorg,nd&-cimanyd,nyd,uolc,??tsrifyam,ysrab,zmurof,???g&el?n!am?ib???hwsohw?i!.&35nyd,8302,a&minifed,tad-b,?b&altig,uhtig,?czh,d&in,raobelgaeb,u&olc&iaznab.ppa,ropav,?rd,??e&c&apsinu.1rf-duolc,ivedniser,?donppad.sndnyd,egipa,lej,nilnigol,sufxob,t&i&beulb,snoehtnap,?newtu,ybeeb.saap,??gni&gatsniser.secived,tsohytsoh,?ilpu,k&coregrof.di,orgn:.&as,ni,p&a,j,?su,u&a,e,??,ramytefasresworb,?moc?n&aicisum,mtsp:.kcom,,yded,?ot&oq,pyrctfihs,?p&opilol,pa&-arusah,e&nalpkcab,tybeeb.1dkes,???r&e&tsneum-hf,vres&cisab,lautriv,??ial.sppa,?s&codehtdaer,gnihtbew,nemeis-om,pparevelc,t&acdnas,ekcit,??t&e&kcubtib,notorp,?i&belet,detfihs,gude,kecaps,?raedon.egats,s&ohg,udgniht.&cersid.&dvreser,tsuc,?dorp.tsuc,gnitset.&dvreser,tsuc,?ved.&dvreser,tsuc,????vgib.0ku,whs,x&bslprbv.g,cq,rotide,?y&olpedew,srab,??b?d&ar?u&a?ts???j?r?syhp??j!.&eman?gro?hcs?lim?moc?ten?ude?vog???ll&ag?o??m!.&gro?moc?ten?ude?vog??g?il?mi?orp??n!.&a&0&b-ekhgnark--nx?c-iehsrgev--nx?g-lksedlig--nx?k-negnanvk--nx??1&p-nedragy--nx?q-&asierrs--nx?grebsnt--nx?lado-rs--nx?n&egnidl--nx?orf-rs--nx??regnayh--nx?ssofenh--nx??r-datsgrt--nx?s-ladrjts--nx?v-y&senner--nx?vrejks--nx???3g-datsobegh--nx?4&5-&dnaleprj--nx?goksnerl--nx?tednalyh--nx??6-neladnjm--nx?s-&antouvachb--nx?impouvtalm--nx??y-&agrjnevvad--nx?ikhvlaraeb--nx???7k-antouvacchb--nx?8&k-rekie-erv--nx?l-ladrua-rs--nx?m-darehsdrk--nx??a!.sg??bct-eimeuvejsemn--nx?d&do?iisevvad?lov?narts?uas??f&1-&l--nx?s--nx??2-h--nx??g&10aq0-ineve--nx?av?ev?lot?r&ajn&evvad?u??ájn&evvad?u????h?iz-lf--nx?j&ddadab?sel??k&el?hoj&sarak?šárák??iiv&ag&na&el?g??ŋ&ael?ág???ran???l&f?lahrevo?o&ms?s??sennev?t-&ilm--nx?tom--nx??u&-edr--nx?s??øms??muar?n&0-tsr--nx?2-dob--nx?5-&asir--nx?tals--nx??a&r!-i-om?f?t??t??douvsatvid?kiv?m&os?øs??n&od?ød??ra?sen?t&aouvatheig?ouv&a&c&ch&ab?áb??h&ab?áb???n??i&ag?ág??sa&mo?ttvid??án???z-rey--nx?ær&f?t???o&p-&ladr--nx?sens--nx??q-nagv--nx?r-asns--nx?s-kjks--nx?v-murb--nx?w-&anr&f--nx?t--nx??ublk--nx???ppol?q&0-t&baol--nx?soum--nx?veib--nx??x-&ipphl--nx?r&embh--nx?imph--nx???y-tinks--nx??r&f-atsr--nx?g-&an&ms--nx?nd--nx??e&drf--nx?ngs--nx??murs--nx?netl--nx?olmb--nx?sorr--nx??h-&a&lms--nx?yrf--nx??emjt--nx??i&-&lboh--nx?rsir--nx?y&d&ar--nx?na--nx??ksa--nx?lem--nx?r&ul--nx?yd--nx????stu??j-&drav--nx?rolf--nx?sdav--nx??kua?l-&drojf--nx?lares--nx??m-tlohr--nx?n-esans--nx?olf?p-sdnil--nx?s-ladrl--nx?tih?v-rvsyt--nx??s&a&ns?ons??i&ar?er&dron?r&os?øs???ár??la&g?h??mor!t??sir?uf?åns??t&koulo&nka?ŋká??la?p-raddjb--nx?r-agrjnu--nx?s&aefr&ammah?ámmáh??orf?r&o?ø???u-vreiks--nx??u&h-dnusel--nx?i-&drojfk--nx?vleslm--nx??j-ekerom--nx?k-rekrem--nx?u-&dnalr--nx?goksr--nx?sensk--nx??v-nekyr--nx?w-&k&abrd--nx?ivjg--nx??oryso--nx??y-y&dnas--nx?mrak--nx?n&art--nx?nif--nx??reva--nx??z-smort--nx??v!.sg?ledatskork?reiks??wh-antouvn--nx?x&9-dlofts--nx.aoq-relv--nx?d-nmaherk--nx?f-dnalnks--nx?h-neltloh--nx?i-drgeppo--nx?j-gve&gnal--nx?lreb--nx??m-negnilr--nx?n-drojfvk--nx??y&7-ujdaehal--nx?8-antouvig--nx?b-&dlofrs--nx?goksmr--nx?kivryr--nx?retslj--nx??e-nejsom--nx?f-y&krajb--nx?re&dni--nx?tso--nx??stivk--nx??g-regark--nx?orf?ørf??z9-drojfstb--nx??b&25-akiivagael--nx?53ay7-olousech--nx?a&iy-gv--nx?le-tl&b--nx?s--nx??n0-ydr--nx??c&0-dnal-erdns--nx?z-netot-erts--nx??g&g-regnarav-rs--nx?o-nejssendnas--nx??ju-erdils-ertsy--nx?nj-dnalh-goksrua--nx?q&q-ladsmor-go-erm--nx.&ari-yreh--nx?ednas??s-neslahsladrjts--nx???ca&4s-atsaefrmmh--nx?8m-dnusynnrb--nx?il-tl--nx?le-slg--nx?n5-rdib--nx?op-drgl--nx?uw-ynnrb--nx??d&a&qx-tggrv--nx?reh!nnivk?sd&ork?ørk??uas??ts&e&bi?kkar?llyh?nnan??g&ort?ørt??k&alf?irderf??levev?mirg?obeg&ah?æh??r&ah?ejg????barm-jdddb--nx?ie!rah?s&etivk?ladman???lof&r&os?øs??ts&ev.ednas?o.relav?ø.relåv???n&a&l&-erd&n&os?øs??ron??adroh.so?dron.&a&g5-b--nx?ri-yreh--nx??ob?y&oreh?øreh??øb??e&m!lejh??pr&oj?øj??vi??gyb?n&aks?åks??o&h-goksrua?rf??r&o?ua?ø??tros?øh-goksrua??rts!e&devt?lab?mloh???s&ellil?naitsirk?rof???u&l!os??s!d&im?lejt??e&guah?l&a?å???kkoh?lavk?naitsirk?r&af?eg&e?ie???tef?y&onnorb?ønnørb?????r&a&blavs!.sg??g&eppo?la???o&j&f&a!dniv?k?vk??die?e&dnas?kkelf??llins?r&iel?ots??s&lab?t&ab?åb??yt??å!k??ævk??les??ts??åg&eppo?lå???ureksub.sen??e&ayb-yrettn--nx?d&ar?isemmejh321,lom?r&of?øf??år??g&gyr?nats??i&meuv&ejsem&aan?åån??sekaal??rjea??j&d&ef?oks??les??k&er&aom?åom??hgna&ark?årk??iregnir?kot!s??s&ig?uaf???l&bmab?kyb?l&av?ehtats??oh??m&it?ojt?øjt??n&arg?g&os?øs??meh?reil?te?ummok?yrb??r&dils-erts&ev?y&o?ø???ua?vod??sa&ans?åns??t&robraa?spaav??urg??f&62ats-ugsrop--nx?a&10-ujvrekkhr--nx?7k-tajjrv-attm--nx??o!.sg?h??s!.sg??v!.sg???g&5aly-yr&n--nx?v--nx??a&llor?ve&gnal?lreb???n&av!snellu??org??oks&die?m&or?ør??ner&ol?øl??r&o?ø???r&eb!adnar?edyps?s&die?elf?gnok?n&ot?øt????obspras??uahatsla?åve&gnal?lreb???h&0alu-ysm--nx?7&4ay8-akiivagg--nx?5ay7-atkoulok--nx??a!.sg???i&e&hsr&agev?ågev??rf??k&h&avlaraeb?ávlaraeb??s??lm&a?å??mpouvtal&am?ám??pph&al?ál??rrounaddleid?ssaneve?ššáneve??j&0aoq-ysgv--nx?94bawh-akhojrk--nx??k&a&b&ord?ørd??jks?lleis??iv!aklejps?l&am?evs?u??mag?nel?ojg?r&a&l?n??epok?iel?y&or?ør???s&ah?kel?om??øjg??kabene?ojsarak?ram&deh.&aoq-relv--nx?rel&av?åv??so??e&let.&ag5-b--nx?ob?øb??ra???åjks??l&a!d&anrus?d&numurb?ron??e&gnard?nte?s&meh?sin??ttin??g&is?nyl??kro?l&em?l&ejfttah?of??u&ag-ertdim?s???n&am?era?gos?i&b?nroh?r??kos?nus?oj??o-&dron?r&os?øs???ppo?r&a!l?nram??e&gne?l?v??is?o&jts?ts??u&a-&dron?r&os?øs???h??å?æl?øjts??s&e&jg?nivk?ryf??kav?mor-go-er&om.&ednas?yoreh??øm.&ednas?yøreh???uag??t&las?rajh?suan??v&l&a?e-rots??u-go-eron??yt??ksedlig?res&a?å???bib&eklof?seklyf??es!dah??h!.sg??i&m?syrt??l&ejf?ov&etsua?gnit?ksa?sdie???n!.sg??o!.sg?boh?g?h??r!.sg??å!ksedlig??øboh??m&a&rah?vk??f!.sg??h!.sg??i&e&h&dnort?rtsua?ssej??rkrejb??ksa??ol?t!.sg??u&dom?esum?r&ab?drejg?evle?os?uh?æb?øs??ttals???n&a&g&av?okssman?åv??jlis?or?r&g?rev???e&d&do&sen?ton??lah?r&agy&o?ø??ojfsam???g&iets?n&a&l&as?lab??n&avk?ævk??t&arg?ddosen??v&al?essov???i&d&ol?øl??l&ar?ær???yl??reb??iks?k&srot?y&or?ør???l&a&d&gnos?n&er?ojm?øjm??om??tloh??ug?åtloh??mmard?ojs&om?sendnas??ppolg?s&lahsladr&ojts?øjts??o??t&o&l?t-erts&ev?o?ø???roh?øl??vly&kkys?nav??yam-naj!.sg??øjs&om?sendnas???g&orf?ujb??i&dnaort?vnarg??kob?ladendua?maherk&a?å??n&it?urgsrop??orf-&dron?r&os?øs???r&aieb?evats??sfev?uaks?yrts??o&6axi-ygvtsev--nx?c,d&ob?rav??ievs?kssouf?l&m&ob?øb??ous&adna?ech&ac?áč???so!.sg???msdeks?niekotuak?r&egark?olf?y&oso?øso???s&dav?mort???p&ed?ohsdaerpsym,p&akdron?elk???r&a&d&dj&ab?áb??iab??jtif?luag?mah?vsyt??e&gn&a&k&iel?ro??merb?n&at?mas??rav-r&os?øs??srop?talf?v&ats?el??y&oh?øh???ivsgnok??il?jkniets?k&a&nvej?rem?s&gnir?nellu???ie-er&den?v&o?ø???ram?sa?årem??la&jf?vh??m&b&ah?áh??mahellil??nnul?ts&l&oj?øj??ul??y&o?ø???imp&ah?áh??m!.sg??osir?t!.sg??ádiáb?ævsyt?øsir??s&adnil?en&dnas?e&dga?k&ri&b?k??som??ve??me&h?jg??nroh-go-ejve?s&a?ednil?k&o?ø??of?yt?å??tsev??gv?hf?igaval?o&r&or?ør??sman??so&fen&oh?øh??m?v??uh&lem?sreka.sen??å!dnil???t&a&baol?g&aov?grav??jjr&av-attam?áv-attám??l&a&b?s??ás??soum?ts?v&eib?our???e&dnaly&oh?øh??f?s&nyt?rokomsdeks?sen??vtpiks??in&aks?áks??loh&ar?år??n!.sg??o&m&a?å??psgolb,?s!.sg?efremmah?or?ør??terdi?á&baol?ggráv?lá&b?s??soum?veib???u&b!.sg?alk?e&dna?gnir?nner??les?ælk??dra&b?eb??g&nasrop?vi?ŋásrop??j&daehal&a?á??jedub?v&arekkhar?árekkhár???ksiouf?n&diaegadvoug?taed???v&irp?lesl&am?åm???y&b&essen?nart?sebel?tsev??o&d&ar?na!s??or??gavtsev?k&rajb?sa??lem?mrak?n&art?n&if?orb???r&a&mah?n?v??e&dni?t&so?ton??va??ul?yd??s&am?enner?gav?lrak?tivk??vrejks??ø&d&ar?na!s", + "??ør??gåvtsev?k&rajb?sa??lem?mrak?n&art?n&if?ørb???r&e&dni?t&so?tøn??va??ul?yd?æ&n?v???s&enner?gåv?tivk?åm??vrejks???á&slág?tlá?vreiks??å&gåv?h?jddådåb?lf??ø&d&ob?rav??r&egark?olf??s&dav?mort????aki?i&sac?tal??u??o&b?f?g?hay?o?ttat??r!.&cer?erots?gro?m&o&c?n??rif?t??o&c,fni??pohs,stra?t&n?opsgolb,?www?ysrab,?e&a!.&a&ac?cgd?idem??bulc!orea??ci&ffartria?taborea??e&cn&a&l&lievrus-ria?ubma??netniam?rusni??erefnoc??gnahcxe?mordorea?ni&gne?lria?zagam??rawtfos??gni&d&art?ilg!arap?gnah???l&dnahdnuorg?ledom??noollab?retac?sael?t&lusnoc?uhcarap??vidyks??hcraeser?l&anruoj?euf?icnuoc?ortnoc!-ciffart-ria???n&gised?oi&nu?t&a&cifitrec?ercer?gi&tsevni-tnedicca?van??i&cossa!-regnessap??valivic??redef??cudorp?neverp-tnedicca????ograc?p&ihsnoipmahc?uorg!gnikrow???r&e&dart?enigne?korb?niart?trahc??o&htua?tacude???s&citsigol?e&civres?r??krow?serp!xe??tnega??t&farcr&ia?otor??hgil&f?orcim??liubemoh?n&atlusnoc?e&duts?m&esuma?n&iatretne?revog??piuqe????olip?ropria?si&lanruoj?tneics???w&erc?ohs??y&cnegreme?dobper?tefas????rref?z??p!.&a&aa?ca?pc??dem?ecartsnd.icb,gne?r&ab?uj??snduolc,t&acova?cca?hcer??wal?ysrab,???s!.&em?gro?hcs,moc?ten?ude?vog???t!.&0x,116,ayo,gro?lim?moc?nayn,sulpnpv,t&cennockciuq.tcerid,en??ude?v&dr,og???o&hp?m?v?yk??tol?ua??v&iv?lov??xas?ykot??p&a&ehc?g?m?s??eej?g!.&gro?ibom?moc?ossa?ppa,ten?ude???i&r!.nalc,?v?z??j!.&0o0o,a&3&5xq6f--nx?xqi0ostn--nx??5wtb6--nx?85uwuu--nx?9xtlk--nx?ad,b&ats,ihc!.&a&bihciakoy?don?ma&him?ye&ragan?tat???r&a&bom?gan?hihci??u&agedos?kas?ustak???s&os?ufomihs??t&amihcay?iran??w&a&g&im&anah?o??omak??kihci?zustum??ihsak??y&agamak?imonihci???e&akas?nagot??i&azni?esohc?h&asa?s&abanuf?ohc???ka&to?zok??musi?orihs?r&akihabihsokoy?o&dim?tak??ukujuk??usihs??nano&hc?yk??o&d&iakustoy?ustam??hsonhot?k&a&rihs?t??iba??nihsaran?sobimanim?tas&arihsimao?imot??uhc?yihcay??u&kujno?s&ayaru?t&imik?tuf???zarasik?????c&cah,ed,?g&as!.&a&gas?m&a&tamah?yik??ihsak??rat?t&a&gatik?hatik??ira!ihsin????e&kaira?nimimak??i&akneg?g&aruyk?o??h&c&amo?uo??siorihs??kaznak?modukuf?ra&gonihsoy?mi???nezih?u&k&at?ohuok??s&ot?tarak?????ihs!.&a&kok?m&a&hagan?yirom??ihsakat??rabiam?wagoton??e&miharot?nokih??houyr?i&azaihsin?esok?kustakat?moihsagih??na&mihcahimo?nok??o&hsia?mag?t&asoyot?ok?tir???us&ay?t&asuk?o??????k&aso!.&a&d&awihsik?eki??k&a&noyot?s&akaayahihc?oihsagih???oadat?uziak??m&ayas!akaso??odak??r&a&bustam?wihsak??ediijuf??t&akarih?i&k?us???wag&ayen?odoyihsagih???e&son?tawanojihs??honim?i&akas?h&cugirom?s&ayabadnot?i&a&kat?t??n??oyimusihsagih???k&a&rabi?sim??ustakat??muzi?r&ijat?otamuk???nan&ak?n&ah?es???o&ay?n&a&ganihcawak?simuzi?tak??eba?ikibah?oyot??t&anim?iad?omamihs??uhc??ust&oimuzi?tes????ou&kuf!.&a&d&amay?eos??g&no?ok?usak??hiku?k&awayim?uzii??ma&kan?y&asih?im???rawak?t&a&gon?ka&h?num?t???umo??wa&g&a&kan?nay?t??ias??ko!rih???y&ihsa?usak???e&m&ay?uruk??taruk?us??i&a&nohs?raihcat??goruk?h&cukuf?s&a&gih?hukuy??in???k&a&gako?muzim??iust?o?ustani??m&anim?otihsoynihs?u??r&ogo?ugasas??usu??ne&siek?zu&b?kihc???o&gukihc?h&ak?ot?ukihc??j&ono?ukihc??kayim?nihsukihc?to?uhc??u&fiazad?gnihs?stoyot????zihs!.&a&bmetog?d&amihs?eijuf?ihsoy?omihs??kouzihs?mihsim?ra&biah?honikam??tawi?wa&g&ekak?ukik??kijuf??yimonijuf??i&a&ra?sok??hcamirom?juf?kaz&eamo?ustam??ma&nnak?ta??nukonuzi?orukuf??nohenawak?o&nosus?ti??u&stamamah?z&a&mun?wak??i!ay?i&hs&agih?in??manim??mihs????????m&a&tias!.&a&d&ihsoy?ot?usah??k&a&dih?sa??o&arihs?s???m&a&tias?y&as?o&rom?tah??ustamihsagih???i&hsagurust?jawak??uri??ni?wa&g&e&ko?man??ikot?o??k&ara?i&hsoy?mak???ru?zorokot??y&a&g&amuk?ihsok?otah??kuf??imo??ziin??e&bakusak?ogawak?sogo?ttas?zokoy??i&baraw?h&cugawak?s&oyim?ubustam???iroy?k&ato?ihs?u&k?stawi???m&akoyr?i&hsoy?juf??uziimak???naznar?o&dakas?ihsay?jnoh?n&a&go?nim??imijuf?nah?oy??r&ihsayim?otagan??t&asim!ak??igus?omatik??zak??u&bihcihc!ihsagih??sonuok?ynah????y&ak&aw!.&a&d&ira?notimak??kadih?ma&h&arihs?im??y&a&kaw?tik??oduk???ru&ustakihcan?y??sauy?wa&g&a&dira?zok??orih??konik??yok?zok??e&banat?dawi??i&garustak?jiat?mani??naniak?o&bog?nimik?t&asim?omihs&ah?uk????ugnihs???o!.&a&jos?koasak?m&ay&ako?ust??ihsayah??r&abi?ukawaihsin??wi&aka?nam???e&gakay?kaw??i&gan?h&cu&kasa?otes??sahakat??k&asim?ihsaruk??miin??n&anemuk?ezib??o&hsotas?jnihs?n&amat?imagak??ohs?uhcibik?????ot!.&a&damay?got?koakat?may&etat?ot??nahoj?riat?waki&inakan?reman???eb&ayo?oruk??i&h&asa?ciimak?sahanuf??kuzanu?m&an&i?ot??ih???nezuyn?otnan?u&hcuf?stimukuf?z&imi?ou???????ihs&o&gak!.&a&m&ayuok?ihsogak??si?yonak??e&banawak?n&at&akan?imanim??uka??tomoonihsin??i&adnesamustas?k&azarukam?oih??m&ama?uzi??usuy??nesi?o&knik?os?tomustam??uzimurat???rih!.&a&ka&n?s??m&ayukuf?i&hsorihihsagih?j&ate?imakikaso????r&a&bohs?h&ekat?im???es??tiak?wiad??e&kato?ruk??i&h&ci&akustah?mono?nihs??s&inares?oyim???manimasa?uk??negokikesnij?o&gnoh?namuk??uhcuf????uk&ot!.&a&bihci?mi&hsu&kot?stamok??m??wagakan??egihsustam?i&gum?h&coganas?soyim??kijaw?m&anim?uzia??ukihsihs??nan&a?iak??o&nati?turan????uf!.&a&batuf?m&a&to?y&enak?irok???ihs&im?ukuf??os?uko??r&aboihsatik?uganat??ta&katik?mawak?rih??w&a&g&akus?emas?uy??k&a&mat?rihs?sa??ihsi??nah??ohs???e&gnabuzia?iman?ta&d?tii???i&adnab?enet?hs&agih?iimagak??k&a&wi?zimuzi??ubay??minuk?r&ook?ustamay???nihsiat?o&g&etomo?ihsin?nan?omihs??no!duruf?rih??rihsawani?ta&may?simuzia???u&rahim?stamakawuzia?zia&ihsin?nay???????nug!.&a&bawak?doyihc?k&anna?oi&hsoy?juf?mot???m&ayakat?ustagaihsagih??n&ihsatak?nak??r&ahonagan?nak?o?u&kati?mamat???t&amun?inomihs?o??w&akubihs?iem?ohs???i&hsa&beam?yabetat??kas&akat?esi??m&akanim?uzio??ogamust?rodim??o&jonakan?n&eu?oyikust??tnihs??u&komnan?stasuk?yrik????rep,?n&ibmab,nog,ob,?ppacihc,ra&n!.&a&bihsak?d&akatotamay?u!o???guraki?m&ay&atik&imak?omihs??irokotamay??oki??ra&hihsak?n??wa&geson?knet???e&kayim?ozamay?sog?ustim??i&a&rukas?wak??garustak?h&ciomihs?sinawak??jo?ka&mnak?toruk??makawak?nos?r&net?otakat?ugeh???o&d&na?oyo??gnas?jnihs?nihsoy!ihsagih??tomarawat?yrok????rikik,?t&ag&amay!.&a&dihsio?k&atarihs?ourust??may&a&kan?rum??enak?onimak??rukho?ta&ga&may?nuf??hakat?kas??wa&g&ekas?orumam??ki&hsin?m??z&anabo?enoy?ot???zuy??e&agas?bonamay?dii?nihsagih?o??i&a&gan?nohs??h&asa?sinawak??nugo??o&dnet?jnihs?ynan??ukohak???iin!.&a&ga?k&ium?oagan??munou!imanim??t&a&bihs?giin??ioy??w&a&gioti?kikes?zuy??irak??yijo??e&kustim?mabust??i&aniat?hcamakot?kaz&awihsak?omuzi??m&a&gat?karum??o???n&anust?esog??o&das?ihcot?jnas?k&ihay?oym??mak?naga?ries??u&ories?steoj?????i&k&a!.&a&go?k&asok?oimak??t&ago!rihcah??ika!atik???w&aki?oyk???e&mojog?natim?suranihsagih?t&ado?okoy???i&hsoyirom?magatak?naokimak??nesiad?o&hakin?jnoh!iruy??nuzak?rihson?tasi&juf?m??yjnoh??u&kobmes?oppah????in,?o!.&a&dakatognub?m&asah?ihsemih??su?t&ekat?i&h?o????e&onokok?ustimak??i&jih?k&asinuk?ias?usu??mukust??onoognub?u&fuy?juk?ppeb?suk?????nayn,?wa&ga&k!.&a&mihsoan?rihotok?waga&kihsagih?ya???emaguram?i&j&nonak?ustnez??kunas?monihcu??o&hsonot?nnam?yotim??u&st&amakat?odat??zatu????nak!.&a&dustam?kus&okoy?tarih??maz?nibe?r&a&gihsaimanim?h&esi?imagas??wa&do?guy???u&im?kamak???tikamay?wa&k&ia?oyik?umas??sijuf??yimonin??e&nokah?saya??i&akan?esiak?gusta?hsuz?kasagihc?o?ukust??o&nadah?sio?tamay?????kihsi!.&a&danihcu?gak?kihs?mijaw?t&abust?ikawak??wazanak??i&gurust?hcionon?mon?ukah??nasukah?o&anan?ton!akan???u&kohak?stamok?z&imana?us?????niko!.&a&han?m&arat?ijemuk?uru??n&e&dak?zi??no??ra&hihsin?rih??wa&kihsi?niko??yehi?zonig??e&osaru?seay??i&hsagih?jomihs?k&a&gihsi?not??ihsakot??m&a&ginuk?kihsug?maz??igo?otekat??nuga!noy???n&a&moti?timoy?wonig??i&jikan?k???o&gan?jnan?tiad&atik?imanim???u&botom?kusug&akan!atik??imot??rab&anoy?eah??????yp,zomim,?bus,c&204ugv--nx?462a0t7--nx?678z7vq5d--nx?94ptr5--nx?a?mpopilol,?d&-2,17sql1--nx?3thr--nx?5&20xbz--nx?40sj5--nx??7&87tlk--nx?ptlk--nx??861ti4--nx?a?e!tfarcdnah,?n&eirf&lrig,yob,?om,?ooftac,?e&16thr--nx?5&1a4m2--nx?9ny7k--nx??damydaer,eweep,garotsarukas.&10ksi.3s,20ksi.3s,?i&bmoz,m!.&a&bot?k&asustam?uzus??m&a&him?y&emak?im???ihs??nawuk?wi&em?k???e&bani?ogawak?si!imanim???i&arataw?gusim?h&asa?ciakkoy??k&a&mat?sosik?t??iat??raban??o&dat?hik?n&amuk?ihseru?o&du?mok????ust????kilbew,lasrepus,mihe!.&a&m&a&h&ataway?iin??yustam??ij&awu?imak???taki!man???ebot?i&anoh?kasam?rabami??n&ania?egokamuk?oot??o&jias?kihcu?nustam?uhcukokihs?yi!es???u&kohik?zo????n!.&arukas,lapo,n&erukom,riheg,?omomus,stnim,teniesa.resu,xob-liam,yrovi,zapot,?amihs!.&a&d&amah?ho?usam??kustay?m&a?ihsoni&hsin?ko???wakih??e&namihs?ustam??i&g&aka?usay??konikak?mikih??nannu?o&mu&kay?zi!ihsagih?uko???nawust?tasim??u&stog?yamat????nep,?rotsnoihsaf,srev,t&awi!.&a&bahay?d&amay?on??koirom?t&a&honat?katnezukir??imus??w&as&ijuf?uzim??ihs???e&hon&i&hci?n??uk??tawi??i&a&duf?murak?wak??h&custo?si&amak?ukuzihs???j&oboj?uk??k&a&m&anah?uzuk??sagenak??esonihci??m&akatik?uzia&rih?wi????o&kayim?no&rih?t??tanufo??uhso???isarap,saman,tococ,?ulbybab,?g&3zsiu--nx?71qstn--nx?l?olblooc,?h&03pv23--nx?13ynr--nx?22tsiu--nx?61qqle--nx?o-hu,sulb,?i&54urkm--nx?azosbew,ced,g&ayim!.&a&dukak?m&a&goihs?kihs??ihsustam!ihsagih??unawi??r&awago?iho??ta&bihs?rum??w&a&gano?kuruf??iat??y&imot?ukaw???e&mot?nimes??i&hsiorihs?ka&monihsi?s&awak?o???mak?r&ataw?o&muram?tan????o&az?jagat?t&asim?omamay???u&fir?k&irnasimanim?uhsakihcihs?????ihcot!.&a&g&a&h?kihsa??ust??kom?m&ay&o?usarak??unak??r&a&boihsusan?watho??iho?ukas??t&akihsin?iay??wa&konimak?zenakat??y&imonustu?oihs???e&iiju?kustomihs?nufawi??i&akihci?g&etom?ihcot?on???o&k&ihsam?kin??nas?sioruk?tab??u&bim?san?????h&c&ia!.&a&dnah?m&a!h&akat?im??yuni??ihs&ibot?ust???r&a&hat?tihs??ik?u&ihsagih?kawi???t&ihc?o&k?yot???wa&koyot?zani??yi&monihci?rak???e&inak?k&aoyot?usa??manokot?noyot??i&a&gusak?kot?sia??eot?h&asairawo?cugo?s&ahoyot?oyim???k&a&mok?zako??ihssi??motay?rogamag??n&an&ikeh?ok??ihssin??o&got?ihsin?jna?rihsnihs?suf?tes??u&bo?raho?s&oyik?takihs??yrihc?zah????ok!.&a&dusay?kadih?mayotom?r&ah&im?usuy??umakan??sot!ihsin??wa&g&atik?odoyin??k&as?o????i&esieg?hco!k??jamu?k&a!sus??usto??ma&gak?k??rahan??o&mukus?n&i?ust!ihsagih???torum?yot!o???u&koknan?zimihsasot????ugamay!.&a&m&ayukot?ihso??toyot??e&bu?subat??i&gah?kesonomihs?nukawi?rakih??nanuhs?otagan?u&ba?foh?otim?stamaduk?uy?????s&anamay!.&a&dihsoyijuf?mayabat?r&ahoneu", + "?ustakihsin??w&a&k&ayah?ijuf??suran??ohs???egusok?i&ak?h&cimakan?s&anamay?od???k&asarin?u&feuf?sto????o&k&akanamay?ihcugawakijuf??nihso?t&asimawakihci?ukoh??uhc??spla-imanim?u&b&nan?onim??fok?hsok?rust????ubon,??ix,ka&rabi!.&a&bukust?gok?kan!ihcatih??m&a&sak?timo?wi??ihsak?ustomihs??ni?r&a&hihcu?way??u&agimusak?ihcust???t&ag&amay?eman??oihcatih??w&ag&arukas?o??os??yi&moihcatih?rom???e&bomot?dirot?not?tadomihs??i&a&k&as?ot??rao??esukihc?gahakat?h&asa?catih??k&a&rabi?saguyr??ihsani?uy??ma?rukustamat??o&dnab?giad?him?kati?rihsijuf?soj?t&asorihs?im??yihcay??u&fius?kihsu?simak????sagan!.&a&m&abo?ihsust??natawak?r&abamihs?u&mo?ustam???wijihc?yahasi??i&akias?hies?k&asagan?i??masah??neznu?o&besas?darih?t&eso?og!imaknihs????ust&igot?onihcuk?uf????zayim!.&a&biihs?guyh?k&oebon?ustorom??mihsuk?r&emihsin?uatik??ta&katik?mim??wag&atik?odak??ya??e&banakat?sakog??i&hsayabok?kaza&kat?yim??m&animawak?ot&inuk?nihs????nanihcin?o&j&ik?onokayim??n&ibe?ust??tias??urahakat????ro&cep,moa!.&a&dawot?turust?wasim??e&hon&ihc&ah?ihs??nas?og?ukor??sario??i&anarih?ganayati?hsioruk?jehon?kasorih?makihsah?nawo?r&amodakan?omoa???o&gnihs?kkat??u&ragust?stum????ttot!.&a&r&ahawak?uotok??sa&kaw?sim???egok?irottot?nanihcin?o&ganoy?nih?tanimiakas??u&bnan?z&ay?ihc??????ukuf!.&a&deki?gurust?ma&bo?h&akat?im??yustak??sakaw??eabas?i&akas?ho?jiehie?ukuf??nezihce!imanim??ono????k&26rtl8--nx?4&3qtr5--nx?ytjd--nx??522tin--nx?797ti4--nx?ci&gid,ht,sevol,?ee,limybab,n&at,upatilol,??l&33ussp--nx?e&ccabew.&resu,sr,?llarap,?lik,oof,rigetuc,?m&11tqqq--nx?41s3c--nx?ef,sioge,?n&30sql1--nx?65zqhe--nx?a&ebyllej,i&lognom,viv,??iam,n7p7qrt0--nx?o&o&las,mflah,?ruk,staw,??o&131rot--nx?7qrbk--nx?aic,c?d&iakkoh!.&a&deki?gakihset?hcebihs?k&adih?u&fib?narihs???m&ayiruk?hot?ihs&orihatik?ukuf??oras?usta??r&ib&a!ka??o?uruf??ozo?u&gakihsagih?oyot???sakim?ta&gikust?mun??w&a&ga&k&an?uf??nus!imak???k&aru?i&h&asa?sagih??kat?mak??omihs?um??zimawi??ine?oyk??yot??e&a&mustam?nan??b&a&kihs?yak??o&noroh?to???ian?k&ihsam?ufoto??nakami?ppoko!ihsin??sotihc?tad!okah??uonikat??i&a&bib?mokamot?n&a&k&kaw?oroh??wi??eomak?ihsatu?okik?usta&moruk?sakan????eib?h&c&ioy?u&bmek?irihs???s&ase?ekka?oknar?uesom???jufirihsir?k&amamihs?i&at?n???m&atik?otoyot??oa&kihs?rihs??r&a&hs?kihsi?mot??ihs&aba?ir??otarib???n&a&hctuk?rorum?se?tokahs??uber??o&kayot?m&ire?ukay??naruf!ima&k?nim???orih?r&ih&ibo?suk??o&bah?h&i&b?hsimak??sa??pnan?yan??umen??t&asoyik?eko?ukoh???u&bassa?kotnihs?m&assaw?uo??pp&akiin?en&ioto?nuk??ip??rato?s&akat?t&eb&e?i&a?hs!a??robon??m&e?o&m?takan???no&h?tamah??o&mik?s?t??u&kir?ppihc?st???onihsnihs?ufuras??uaru??yru!koh??zimihs!ok?????nu,?g!iti,oyh!.&a&bmat?dnas?gusak?k&at?o&oyot?y??uzarakat??m&ayasas?irah??wa&g&ani?okak??k&i&hci?mak??oy???yi&hsa?monihsin???i&asak?hs&aka?i&at?nawak???j&awa!imanim??emih??k&a&goa?s&agama?ukuf??wihsin??i&hsog?m???mati?oia?rogimak??n&annas?esnonihs??o&gasa!kat??ka?n&ikat?o?ustat??rihsay?sihs?tomus?yas??u&bay?gnihs?????hih,konip,l&bs,ik,?mol,nagan!.&a&bukah?d&a&w?yim??e&ki?u??ii??k&a&s&ay?uki??zus??ihsoo?ousay??m&ay&akat?ii??i&hsukufosik?jii??ukihc??n&i!hsetat??uzii??r&ah?ugot??saim?t&agamay?oyim??w&a&g&a&kan?n??o??kustam?ziurak??onim!imanim??u&koo?s!omihs????ya&ko?rih???e&akas?nagamok?subo??i&gakat?h&asa?c&a!mo!nanihs???uonamay??sukagot??k&a&kas?mimanim?to??ia&atik?imanim??oa?uzihcom??m&akawak?ijuf?o!t???r&ato?ijoihs?omakat???n&ana?esnoawazon??o&hukas?n&a&gan?kan??i&hc?muza??ustat??romok?si&gan?k??tomustam??u&k&as?ohukihc??stamega????o&b,m,pac,?to&mamuk!.&a&gamay?rahihsin?sukama!imak??tamanim??enufim?i&hcukik?k&ihsam?u??nugo!imanim??romakat??o&ara?rihsustay?sa?t&amay?om&amuk?us??u!koyg???yohc??u&sagan?zo????yk!.&a&bmatoyk?k&ies?oemak?uzaw??mayi&h&cukuf?sagih??muk??nihsamay?rawatiju?t&away?ik???e&ba&nat!oyk??ya??di?ni??i&ju?kazamayo?manim??natnan?o&gnatoyk?kum?mak?rihsamayimanim?y&gakan?ka&koagan?s??oj???u&ruziam?z&ayim?ik??????wtc1--nx?ykot!.&a&d&i&hcam?mus??oyihc??k&atim?ihsustak??m&a&t!uko??yarumihsa&gih?sum???i&hs&agoa?ika?o!t??uzuok??ren???r&a&honih?wasago??iadok?umah??ssuf?t&ik?o??wa&g&anihs?ode??k&ara?ihcat???y&agates?ubihs???e&amok?donih?m&o?urukihsagih??soyik??i&enagok?gani?h&ca&da?tinuk??sabati??j&nubukok?oihcah??manigus??o&huzim?jihcah?n&akan?ih!sasum??urika??rugem?t&a&mayihsagih?nim??iat?ok??uhc?yknub??u&fohc?hcuf?kujnihs?????p&a&ehc,rc,?o&hs&eht,iiawak,yub,?lf,p&evol,ydnac,?rd&kcab,niar,???r&2xro6--nx?atselttil,e&d&nu,wohc,?h,ilf,pp&ep,irts,u,?t&aerg,tib,??g!r,?ks,o!on,?ufekaf,?s&9nvfe--nx?dom,p&ihc,oo,?remagten,sikhcnerf,u&bloohcs,ruci,srev,?xvp4--nx??t&a&cyssup,obgip,?e&rces,vlev,?hginyad,netnocresu,opsgolb,sidas,u&b,ollihc,??u&4rvp8--nx?fig!.&a&d&eki?ih??kimot?m&ayakat?ihsah??ne?raha&gi&kes?makak??sak??taga&may?tik??wa&g&ibi?ustakan??karihs!ihsagih????e&katim?uawak??i&gohakas?hc&apna?uonaw??k&ago?es?ot??m&anuzim?ijat??nak?urat??nanig?o&dog?jug?makonim?nim?roy?sihcih??u&fig?s&otom?t&amasak?oay??????hc,pup,stoknot,ynup,?wonsetihw,x&5ytlk--nx?irtam,?y&adynnus,dr,knarc,l&oh,rig,?moolg,ob,pp&ih,olf,?rgn&a,uh,?u6d27srjd--nx?vaeh,?z&72thr--nx?e&ej,lur,??井福?京東?分大?取鳥?口山?城&宮?茨??媛愛?山&富?岡?歌和??岡&福?静??島&児鹿?広?徳?福??崎&宮?長??川&奈神?石?香??庫兵?形山?手岩?木栃?本熊?根島?梨山?森青?潟新?玉埼?田秋?知&愛?高??縄沖?良奈?葉千?賀&佐?滋??道海北?都京?重三?野長?阜岐?阪大?馬群???k!.&art?gro?moc?per?ude?vog???l&eh?l??m!.uj,ac?j??nd?o&g?h&pih?s!.&esab,xilpoh,ysrab,???lnud?oc?t!.&lldtn,snd-won,???pa!.&0mroftalp,a&rusah,ted,?bew:erif,,e&erf-korgn,gatskrelc,kalfwons:.kniletavirp,,niln&igol,okoob,?tupmocegde,virdhsalfno,?ilressem,k&orgn,relc,?le&crev,napysae,?maerdepyt,n&aecolatigidno,ur:.a,,?poon,r&cne,emarf,?t&i&belet,lmaerts,?xenw,?yfilten,??ra&a?hs??u&ekam?llag?org!.esruocsid,cts?kouk?nayalo???vsr?xece4ibgm--nx??q&a!3a9y--nx??g?i!.&gro?lim?moc?ten?ude?vog???m?se??r&a!.&a&cisum?sanes??bog?gro?l&autum?im??moc!.topsgolb,?pooc?rut?t&e&b?n??ni??ude?vog??4d5a4prebgm--nx?b?c?eydoog?los?t&at?s!uen???ugaj??b!.&21g?a&b&a&coros?iuc??itiruc??cnogoas?dicerapa?gniram?i&naiog?ramatnas??n&erom?irdnol??op?p&acam?irolf?ma&j?s???rief?tsivaob??b!aj?ib?mi?sb??c&ba?e&r?t??js?sp?t!e???d&em?mb?n&f?i??rt??e&dnarganipmac?ficer?ht?llivnioj?rdnaotnas??f&dj?ed?gg?n&e?i???g&e&l!.&a&b,m,p,?bp,c&a,s,?e&c,p,s,?fd,gm,ip,jr,la,ma,nr,o&g,r,t,?p&a,s,?r&p,r,?s&e,m,r,?tm,??s??l&s?z??n&c?e?o??ol!b?f?v??pp?ro??hvp?i&du?kiw?nana?oretin?r&c?eurab??sp?te?xat??l&at&an?rof??el?im?sq??m&a?da?e&gatnoc?leb??f?ic?oc!.&duolclautriv.elacs.sresu,etiselpmis,topsgolb,???nce?o&ariebir?c&e?narboir?saso??d&o?ranreboas??e&g?t??i&b?dar?ecam?r??rp?t&a?erpoir???p&er?m!e?t??ooc?pa?se??qra?r&af?ga?o&davlas?j??tn?ut??s&a&ixac?mlap?nipmac??ed?u&anam?j?m???t&am?e&d?n?v??nc?o&f?n??ra?sf??u&caug9?de?ja?rg??v&da?ed?og!.&a&b?m?p??bp?c&a?s??e&c?p?s??fd?gm?ip?jr?la?ma?nr?o&g?r?t??p&a?s??r&p?r??s&e?m?r??tm???rs?t??xiv?z&hb?ls?o&c?f?????c!.&as?ca?de?if?o&c?g??ro???e&bew?ccos?dnik?e&b?n&igne?oip??rac??gni&arg?rheob??h&cor?sok?t&aew?orb???itnorf?k&col?o&p?rb???l&aed?ffeahcs??mal?nes?pinuj?t&a&eht?rebsnegömrev??law?nec?s&acnal?nom?ubkcolb??upmoc??v&o&csid?rdnal??resbo??wulksretlow?ywal?zifp??f!.&aterg?bew&-no,etis321,?drp?e&c&itsuj-reissiuh?narf-ne-setsitned-sneigrurihc,?lipuog,rianiretev??hny,i&cc?rgabmahc??m&o&c?n??t??n&eicamrahp?icedem??ossa?pohsdaerpsym,s&e&lbatpmoc-strepxe?riaton?tsitned-sneigrurihc?uova??o&-x&bf,obeerf,?x&bf,obeerf,???t&acova?o&or-ne,psgolb,?r&epxe-ertemoeg?op!orea????vuog?xobided,?avc7ylqbgm--nx?s??g!.&etiselpmis,gro?moc?t&en?opsgolb,?ude?vog???h!.&e&erf,man??mo&c?rf??topsgolb,zi??ur??i!.&a&61f4a3abgm--nx?rf4a3abgm--nx??ca?di?gro?hcs?oc?ten?vog?نار&يا?یا???a&h?per??ew?lf??k!.&c&a?s??e&n?p?r??gk?iggnoeyg?kub&gn&oeyg?uhc??noej??l&im?uoes??man&gn&oeyg?uhc??noej??n&as&lu?ub??o&e&hcni?jead??wgnag???o&c?g??ro?s&e?h?m??topsgolb,u&gead?j&ej?gnawg????cilf??l!.&gro?moc?ten?ude?vog???m!.&topsgolb,vog???n!.&gro?moc?ofni?ten?ude?vog?zib???o&htua?odtnorf?t&c&a?od??laer???p!.&alsi?ca?eman?forp?gro?moc?o&fni?rp??t&en?se??ude?vog?zib???s?t!.&21k?bew?cn!.vog??eman?gro?kst?l&e&b?t??im?op??moc!.topsgolb,?neg?ofni?pek?rd?sbb?ten?ude?v&a?og?t??zib??f?m??ubad?vd??s&8sqif--nx?9zqif--nx?a!.vog?birappnb?gev?lliv?mtsirhc?s??b!.&ew,gro?moc?ten?ude?vog??c?oj?s?u??c&i&hparg?p?t&sigolyrrek?ylana???od??d&a?d?ik?l?n&iwriaf?omaid??oogemoh?rac??e!.&b&ewim321,og??gro?mo&c!.topsgolb,?n??pohsdaerpsym,ude??civres!.enilnigol,?d&d2bgm--nx?oc??h&ctaw?guh??i&lppus?rtsudni?treporp!yrrek???jaiv?l&aw?cycrotom?etoh?gnis?pats??m&ag?oh?reh??nut?ohs?picer?r&it?ut&cip!.7331,?nev???s&i&rpretne?urc??ruoc??taicossa?vig??g!nidloh??h5c822qif--nx?i!.&ekacpuc,gro?moc?t&en?ni?opsgolb,?ude?vog??a09--nx?nnet?rap?targ??k&c&or!.&ecapsbew,snddym,ytic-amil,??us??hxda08--nx?row??l!.&c&a?s??ed,gro?o&c?fni??ten?ude?vog?zib??a&ed?tner??e&ssurb?toh!yrrek???lahsram?m?oot??m!.&bal,etisinim,gro?moc?ten?ude?vog??b?etsys!.tniopthgink,?ialc??n&a&f?gorf?ol??egassap?i&a&grab?mod??giro??o&it&acav?cudorp?ulos??puoc???o&dnoc?geuj?leuv?ppaz?t&ohp!.remarf,?ua???p!.&ces?gro?moc?olp?ten?ude?vog??i&hsralohcs?lihp?t??u??r!.&au,ca?gro?ni?oc?topsgolb,ude?vog?xo,yldnerb.pohs,?a&c?p?tiug??c?e&dliub!.etisduolc,?erac?gor?levart?mraf?n&niw?trap??wolf??ot&cartnoc?omatat??pj?uot??s!.&em?gro?hcs?moc?ten?ude?vog?zib??alg?e&n&isub!.oc,?tif??rp!xe!nacirema???xnal??iws??t&a&e&b?ytic??ob??ek&cit?ram??fig?h&cay?gilf??n&atnuocca?e&mt&rapa?sevni??ve!.&nibook,oc,????rap??u!.&a&c!.&21k?bil?cc???g!.&21k?bil?cc???i!.&21k?bil?cc???l!.&21k?bil?cc???m!.&21k!.&hcorap?rthc?tvp???bil?cc???p!.&21k?bil?cc???si?v!.&21k?bil?cc???w!.&21k?bil?cc????c&d!.&21k?bil?cc???n!.&21k?bil?cc???s!.&21k?bil?cc????d&e&f?lacsne.xhp,?i!.&21k?bil?cc???m!.&21k?bil?cc???n!.&bil?cc???s!.&bil?cc???u&olcrim,rd,??e&d!.&21k?bil,cc???las-4-&dnal,ffuts,?m!.&21k?bil?cc???n!.&21k?bil?cc????h&n!.&21k?bil?cc???o!.&21k?bil?cc????i&h!.&bil?cc???m!.&21k?bil?c&c?et??goc?n&eg?otae??robra-nna?sum?tsd?wanethsaw???nd?r!.&bil?cc???v!.&21k?bil?cc???w!.&21k?bil?cc????jn!.&21k?bil?cc???k&a!.&21k?bil?cc???o!.&21k?bil?cc????l&a!.&21k?bil?cc???f!.&21k?bil?cc???i!.&21k?bil?cc????mn!.&21k?bil?cc???n&afflog,i!.&21k?bil?cc???m!.&21k?bil?cc???sn?t!.&21k?bil?cc????o&c!.&21k?bil?cc???m!.&21k?bil?cc???ttniop,?p&ion,rettalp,?r&a!.&21k?bil?cc???o!.&21k?bil?cc???p!", + ".&21k?bil?cc????s&a!.&21k?bil?cc???dik?k!.&21k?bil?cc???m!.&21k?bil?cc???nd&deerf,uolc,??t&c!.&21k?bil?cc???m!.&21k?bil?cc???u!.&21k?bil?cc???v!.&21k?bil?cc????ug!.&21k?bil?cc???v&n!.&21k?bil?cc???w!.cc???x&ohparg,t!.&21k?bil?cc????y&b-si,k!.&21k?bil?cc???n!.&21k?bil?cc???w!.&21k?bil?cc????za!.&21k?bil?cc????ah!uab??bria?col?e!.ytrap.resu,?ineserf?lp?xe&l?n???vt?w!.&66duolc,gro?moc?s&ndnyd,tepym,?ten?ude?vog??a?e&iver?n!.elbaeciton,??odniw??y&alcrab?ot???t&0srzc--nx?a!.&amil4,ca!.hts??etiesbew321,gni&liamerutuf,tsoherutuf,?o&c!.topsgolb,?fni,?p&h21,ohsdaerpsym,?r&euefknuf.neiw,o??v&g?irp,?xi2,ytic-amil,zib,?c?e!s??hc?if?l!asite??mami?rcomed??b!.&gro?moc?ten?ude?vog??b?gl??c&atnoc?e&les?rid!txen????dimhcs?e!.&eman?gro?moc?ofni?ten?ude?vog?zib??b?em?grat?id?k&circ?ram??n!.&0rab,1rab,2rab,5inu,6vnyd,7&7ndc.r,erauqs,?a&l&-morf,moob,?minifed,remacytirucesym,tadsyawla,z,?b&boi,g,lyltsaf:.pam,,?c&i&nagro-gnitae,tats-oieboda,?paidemym,?d&e&calpb,ziamaka,?hiamaka,irgevissam.saap.&1-&gs,nol,rf,yn,?2-&nol,yn,??nab-eht-ni,uolc&meaeboda,nievas.c&di-etsedron,itsalej,?xednay:.e&garots,tisbew,?,??e&c&narusnihtlaehezitavirp,rofelacs.j,?gd&eiamaka,irbtib,?ht-no-eciffo,l&acs&liat.ateb,noom,?ibom-eruza,?m&ecnuob,itnuroieboda,ohtanyd,tcerider,?n&ilno-evreser,ozdop,?rehurht,s:abapus,,ti&s-repparcs,usegde,?zam&aym,kcar,??f&aeletis,crs.&cos,resu,?ehc-a-si,?g&ni&gats-&d&eziamaka,hiamaka,?e&gdeiamaka,tiusegde,?iamaka,nigiroiamaka,yekegde,?reesnes,sirkcilc,tsohnnylf,?olbevres,?iamaka,k&catsvano,eeg-a&-si,si,?u,?l&acolottad,iamwt,meteh,s&d-ni,s-77ndc,??m&ac&asac,ih,?urofniem,?n&a&f&agp,lhn,?i&bed,llerk,??dcduabkcalb,i:giroiamaka,,pv-ni,?o&c-morf,duppa,jodsnd,rp-ytinummoc,ttadym,?p&i&-&etsef,on,?emoh,fles,nwo,?j,mac-dnab-ta,o&-oidar-mah,h&bew,sdaerpsym,??pa&duolc,egde,?tfe&moh,vres,?usnd,?r&e&tsulcyduolc,vres-xnk,?vdslennahc:.u,,?s&a&ila&nyd,snd,?nymsd,?bbevres,dylimaf,e&gde-ndc,rauqs,suohsyub,t&isbeweruza,ys,??k&catstsaf,ekokohcs,?n&d&-won,aka,d,golb,npv,?oitcnufduolc,?ppacitatseruza:.&1,2:suts&ae,ew,?,3,aisatsae,eporuetsew,sulartnec,?,s&a-skcik,ecca&-citats,duolc,??t,?t&adies,ce&ffeym,jorprot:.segap,,lespohs,?e&nretnifodne,smem,?farcenimevres,i-&ekorb,s&eod,lles,teg,??n&essidym,orfduolc,?r0p3l3t,s&ixetnod,oh&-spv:.citsalej.&cir,lta,sjn,?,gnik,???u&h,nyd,r:eakust.citsalej,,?ved-naissalta.dorp.ndc,x&inuemoh,spym,tsale.&1ots-slj,2ots-slj,3ots-slj,?unilemoh,?y&awetag-llawerif,ekegde,ffijduolc:.&ed-1arf,su-1tsew,?,ltsaf.&dorp.&a,labolg,?lss.&a,b,labolg,?pam,slteerf,?n&-morf,ofipi,?srab,?z&a-morf,tirfym,???p?tcip?v??f&ig?osorcim??g!.&bog?dni?ed,g&olb,ro??lim?moc?ot,ten?ude???h!.&dem?gro?l&er?op??m&oc?rif??o&fni?rp?s&rep?sa???po&hs?oc??t&en?luda?ra??ude?vuog???i!.&a&2n-loritds--nx?7e-etsoaellav--nx?8&c-aneseclrof--nx?i-lrofanesec--nx??at?b?c!cul??dv?i&blo&-oipmet?oipmet??cserb?drabmol?g&gof?urep??l&gup?i&cis?me&-oigger?oigger???uig&-&aizenev&-iluirf?iluirf??ev&-iluirf?iluirf??v&-iluirf?iluirf???aizenev&-iluirf?iluirf??ev&-iluirf?iluirf??v&-iluirf?iluirf????n&a&brev?cul?pmac?tac??idras?obrac&-saiselgi?saiselgi??resi??otsip?r&b&alac!-oigger?oigger??mu??dna&-&attelrab-inart?inart-attelrab??attelrabinart?inartattelrab?ssela??epmi?ugil??tnelav&-obiv?obiv??vap?z&e&nev?ps&-al?al???irog???l&iuqa!l??leib??m&or?rap??n!acsot?e&dom?is?sec&-&ilrof?ìlrof??ilrof?ìlrof???g&amor&-ailime?ailime??edras?olob??i&ssem?tal??ne!var??o&cna?merc?rev?vas???oneg?p?r!a&csep?rr&ac&-assam?assam??ef??von??etam?tsailgo!-lled?lled???s!ip?sam&-ararrac?ararrac??u&caris?gar???t!a&cilisab?recam??resac?soa!-&d&-&ellav?lav??ellav?lav??ellav??d&-&ellav?lav??ellav?lav??ellav??te&lrab&-&airdna-inart?inart-airdna??airdnainart?inartairdna??ssinatlac???udap?v!o&dap?neg?tnam???zn&airb&-a&lled-e-aznom?znom??a&lledeaznom?znom??eaznom??e&c&aip?iv??soc?top??om???b&-&23,46,61,?3c-lorit-ds-onitnert--nx?be-etsoa&-ellav--nx?dellav--nx??c!f-anesec-lrof--nx?m-lrof-anesec--nx??he-etsoa-d-ellav--nx?m!u??o2-loritds-nezob--nx?sn-loritds&-nasl&ab--nx?ub--nx??nitnert--nx??v!6-lorit-dsnitnert--nx?7-loritds&-nitnert--nx?onitnert--nx???z&r-lorit-ds&-nitnert--nx?onitnert--nx??s-loritds-onitnert--nx???c&f?is?l?m?p?r?v??d&p?u!olcnys,??e&c!cel?inev?nerolf??f?g!apemoh321,ida&-&a&-onitnert?onitnert??otla!-onitnert?onitnert???a&-onitnert?onitnert??otla!-on&azlob?itnert??onitnert????hcram?l?m!or??n&idu?o&n&edrop?isorf??torc???p?r?s&erav?ilom??t!nomeip?s&eirt?oa!-&d-e&ellav?éllav??e&ellav?éllav???de&ellav?éllav??e&ellav?éllav?????v?znerif??g&a?b?f?il?o?p?r?up?vf??hc?i&b?c?dol?f?l!lecrev?opan?rof&-anesec?anesec???m?n&a&part?rt&-attelrab-airdna?attelrabairdna???imir?ret??p?r!a&b?ilgac?ssas???s!idnirb??t&ei&hc?r??sa??v??l&a!c??b?c?o&m?rit&-&d&eus&-&nitnert?onitnert??nitnert?onitnert??us&-&nitnert?onitnert??nitnert?onitnert??üs&-&nitnert?onitnert??nitnert?onitnert???s&-onitnert?onitnert???d&eus!-&n&asl&ab?ub??ezob?itnert??onitnert??nitnert?onitnert??us&-&n&asl&ab?ub??ezob?itnert??onitnert??nitnert?onitnert??üs!-&n&asl&ab?ub??ezob?itnert??onitnert??nitnert?onitnert???s&-onitnert?onitnert?????m&ac?f?i!t.nepo.citsalej.duolc,?ol?r??n&a!lim?sl&ab?ub???b?c?e!en.cj,v?zob??irut?m!p??p?r?t??o&a!v??b!retiv??c!cel??enuc?g!ivor??i&dem&-onadipmac?onadipmac??pmet&-aiblo?aiblo??rdnos?zal??l?m!a&greb?ret??oc?re&f?lap???n!a&dipmac&-oidem?oidem??lim?tsiro?zlob??ecip&-ilocsa?ilocsa??i&bru&-orasep?orasep??lleva?rot?tnert??r&elas?ovil??ulleb??p?r!a&sep&-onibru?onibru??znatac??oun??s!ivert?sabopmac??t!arp?e&nev?ssorg??n&arat?e&girga?rt?veneb????zz&era?urba???p&a?ohsdaerpsym,s?t??qa?r&a!m?s??b!a??c?f?g?k?me?o?p?s?t?v??s&a&b?iselgi&-ainobrac?ainobrac???b?c?elpan?i?m?o&t?x&bi,obdaili,??s?t?v??t&a?b?c?l?m?nomdeip?o!psgolb,?p?v??u&de?l?n?p??v&a?og?p?s?t?v??y&drabmol?ellav&-atsoa?atsoa??licis?nacsut??z&al?b?c?p??ìlrof&-anesec?anesec???derc?er?f?m?utni??je3a3abgm--nx?kh?l!.&topsgolb,vog??uda??m!.&gro?moc!.topsgolb,?ten?ude???n&a&morockivdnas?ruatser?tnuocca??e&g?m&eganam!.retuor,?piuqe??r??i!.ue?m?opdlog??opud?uocsid??o&b?cs!.&ude,vog:.ecivres,,??d?g?h?j?oferab?p&edemoh?s???p!.&bewanigap321,emon?gro?lbup?moc?t&en?ni?opsgolb,?ude?vog???r&a!m&law?s???epxe?op&er?pus!.ysrab,?s???s!.&a&daxiabme?rarik,?e&motoas?picnirp?rots??gro?lim?moc?o&c?dalusnoc?hon,?ten?ude??a&cmoc?f??e&b?r?uq??i!rolf?tned??o&h!.&duolc&p,rim,?e&lej,tiseerf,?flah,l&enapysae,rupmet,?s&pvtsaf,seccaduolc,?tsafym,vedumpw,??p!sua???urt??t!.&eman?gro?ibom?levart?m&oc?uesum??o&c?fni?r&ea?p???pooc?sboj?t&en?ni??ude?vog?zib??ayh?n?o!bba?irram???uognah?xen?y!.gro,?ztej??u&2&5te9--nx?yssp--nx??a!.&a&s?w??civ?d&i?lq??fnoc?gro?moc!.&pohsdaerpsym,stelduolc.lem,topsgolb,??nsa?ofni?sat?t&ca?en?n??ude!.&a&s?w??ci&lohtac?v??dlq?sat?t&ca?n??wsn!.sloohcs????vog!.&a&s?w??civ?dlq?sat???wsn?zo??ti??c!.&fni?gro?moc?ten?ude?vog??i??d&e!.tir.segap-tig,?iab??e!.&dcym,enozgniebllew,noitatsksid,odagod.citsalej,s&nd&ps,uolc,?ppatikria,?ysrab,??g!.&bew?gro?m&aug?oc??ofni?ten?ude?vog???h!.&0002?a&citore?idem?kitore??edszot?gro?ilus?letoh?m&alker?lif?t?urof??naltagni?o&c?ediv?fni?levynok?nisac??pohs?rarga?s&a&kal?zatu??emag?wen??t&lob?opsgolb,rops??virp?xe&s?zs??ytic?zsagoj??os?sut??l!.&etisbew321,topsgolb,??m!.&ca?gro?moc?oc?ro?ten?vog???n!.&duolcesirpretne,eni&esrem,m,?tenkcahs,?em!.ysrab,??o&ggnaw?y!c???r!.&3kl,a&i&kymlak,rikhsab,vodrom,?yegyda,?bps,ca,duolcrim,e&niram,rpcm,?g&bc,nitsohurger.citsalej,ro,?ianatsuk,k&ihclan,s&m,rogitayp,??li&amdlc.bh,m,?moc,natsegad,onijym,pp,ri&b,d&cm:.spv,,orue,?midalv,?s&ar,itym,?t&en,ias321,ni,opsgolb,set,?u&4an,de,?vo&g,n,?ynzorg,zakvakidalv,?myc?p?ug??s!.&a&d&golov,nagarak,?gulak,i&groeg,kymlak,lerak,nemra,rikhsab,ssakahk,vodrom,zahkba,?lut,rahkub,vut,yegyda,znep,?bps,da&baghsa,rgonilest,?gunel,i&anatsuk,hcos,ovan,ttailgot,?k&alhsygnam,ihclan,s&legnahkra,m,n&a&mrum,yrb,?i&buytka,nbo,??tiort,vorkop,??l&ocarak,ybmaj,?na&gruk,jiabreza,ts&egad,hkazak-&htron,tsae,???ovonavi,r&adonsark,imidalv,?t&enxe,nek&hsat,mihc,??vo&hsalab,n,?ynzorg,z&akvakidalv,emret,??t&amok?i&juf?masih????v!.&em,g&olb,ro??moc?nc,ten?ude?ved,??ykuyr??v&b?c!.&emon?gro?moc?t&ni?opsgolb,?ude???ed!.&2r,ated,e&docotua,erf-korgn,nilnigol,?gnigats-oned,hcetaidem,korgn,lecrev,o&ned,tpyrctfihs,?ppa-rettalp,s&egap,rekrow,?vr&esi,uc,?weiverpbuhtig,ylf,??ih?l!.&di?fnoc?gro?lim?moc?nsa?ten?ude?vog???m!.&eman?gro?lim?m&oc?uesum??o&fni?r&ea?p???pooc?t&en?ni??ude?vog?zib???o&g?m??rt?s!.&bog?der?gro?moc?ude???t!.&arukas,bew-eht-no,morf,naht-&esrow,retteb,?sndnyd,?d?gh?i?won??uqhv--nx??w&a!.moc?hs?l??b!.&gro?oc???c!.&gro?moc?ten?ude??cp??e&iver!.oby,?n?s??g?k!.&bme?dni?gro?moc?ten?ude?vog???m!.&ca?gro?m&oc?uesum??oc?pooc?t&en?ni??ude?vog?zib??b??o&csom?h!s??n?w??p!.&344x,de?en?o&c?g??ro?snduolc,ualeb???r!.&ca?gro?lim?oc?pooc?ten?vog??n??t!.&a46oa0fz--nx?b&82wrzc--nx?ulc??emag?gro?l&im?ru,?moc!.reliamym,?t&en?opsgolb,?ude?v&di?og?ta0cu--nx??zibe?業商?織組?路網???z!.&ca?gro?lim?oc?vog????x&a!.&cm,eb,gg,s&e,u,?tac,ue,yx,?t??c!.&hta,ofni,vog???e&d&ef?nay??ma!nab??rof?s??ilften?jt?m!.&bog?gro?moc?t&en?opsgolb,?ude??g?ma2ibgy--nx??o&b!x??f?rex??rbgn--nx?s!.vog??x&am&jt?kt??x???y&4punu--nx?7rr03--nx?a&d!i&loh?rfkcalb??ot!.emyfilauqerp,??g?lp?p!ila??rot?ssin?wdaorb??b!.&duolcym,fo?hcetaidem,lim?moc!.topsgolb,?vog??ab?gur??c!.&ca?dtl?gro?lim?m&oc!.&ecrofelacs.j,topsgolb,??t??orp?s&egolke?serp??ten?vog?zib??amrahp?nega??d&dadog?uts??e&kcoh?ltneb?n&dys?om?rotta??snikcm??g!.&eb,gro?moc?oc?ten?ude?vog??olonhcet!.oc,?rene??hpargotohp?id?k!.&gro?moc?ten?ude??s??l!.&clp?d&em?i??gro?hcs?moc?ten?ude?vog??f?imaf!nacirema??l&a?il??ppus??m!.&eman?gro?lim?moc?t&en?opsgolb,?ude?vog?zib??edaca!.laiciffo,?ra??n&a&ffit?pmoc??os??o&j?s??p!.&gro?lim?moc?pooc?ten?ude?vog???r&e&corg?grus?llag?viled??lewej?otcerid?tnuoc?uxul??s!.&gro?lim?moc?ten?ude?vog??pil??t&efas?i&c?ledif?n&ifx?ummoc!.&bdnevar,gon,murofym,???r&ahc?uces??srevinu??laer?r&ap!.oby,?eporp??uaeb??u!.&bug?gro?lim?moc!.topsgolb,?ten?ude??b!tseb???van!dlo??xes??z&a!.&eman?gro?lim?moc?o&fni?rp??pp?t&en?ni??ude?vog?zib???b!.&az,gro?jsg,moc?ten?ude?vog???c!.&4e,inum.duolc.&rsu,tlf,?m&laer,urtnecatem.motsuc,?oc,topsgolb,??d!.&cos?gro?lop?m&oc?t??ossa?t&en?ra??ude?vog???ib!.&duolcsd,e&ht-rof,mos-rof,rom-ro", + "f,?izoj,liartevitca,nafamm,p&i&-on,fles,?ohbew,tfym,?retteb-rof,snd&nyd,uolc,?xro,?g??k!.&duolcj,gro?lim?moc?t&en?ropeletzak.saapu,?ude?vog???m!.&ca?gro?lim?oc?ten?ude?v&da?og????n!.&asq-irom--nx?ca?gro?htlaeh?i&r&c?o&am?ām???wi!k???keeg?l&im?oohcs??neg?oc!.topsgolb,?t&en?nemailrap?vog???a!niflla???rawhcs?s!.&ca?gro?oc???t!.&c&a?s??e&m?n??ibom?l&etoh?im??o&c?fni?g??ro?vt???u!.&gro?moc?oc?ten??rwon??yx!.&e&nozlacol,tisgolb,?gnitfarc,otpaz,??zub??λε?υε?авксом?брс!.&гро?до?ка?р&бо?п!у?????г&б?ро??дкм?зақ?итед?килотак?леб?мок?н&йално?ом??рку?сур!.&арамас,бпс,гро,зиб,ичос,ксм,м&ок,ырк,?рим,я,??тйас?фр?юе?յահ?לארשי!.&בושי?הימדקא?ל&הצ?שממ????םוק?اي&روس?سيلم?ناتيروم??بر&ع?غملا??ة&كبش?ي&دوعسلا?روس??یدوعسلا??ت&ا&راما?لاصتا??را&ب?ڀ?ھب???ر&ئازجلا?ازاب?صم?طق??سنوت?عقوم?قارع?ك&تيب?يلوثاك??موك?ن&ا&تس&كاپ?کاپ??دوس?ر&يا?یا??مع?يلعلا??درالا?ميلا?ي&رحبلا?طسلف???ه&ارمه?يدوعسلا??وكمارا?يبظوبا?ۃیدوعسلا?टेन?त&राभ?ोराभ??नठगंस?मॉक?्मतराभ?ত&রাভ?ৰাভ??ালংাব?ਤਰਾਭ?તરાભ?ତରାଭ?ாயித்நஇ?ைக்ஙலஇ?்ரூப்பக்ஙிச?్తరాభ?ತರಾಭ?ംതരാഭ?ාකංල?มอค?ยทไ!.&จิกรุธ?ต็นเ?ร&ก์คงอ?าหท??ลาบฐัร?าษกึศ???ວາລ?ეგ?なんみ?アトス?トンイポ?ドウラク?ムコ?ル&グーグ?ーセ??ン&ゾマア?ョシッァフ??业企?东广?乐娱?你爱我?信中?务政?动移?博微?卦八?厅餐?司公?品食?善慈?团集?国中?國中?址网?坡加新?城商?尚时?山佛?店&商?网?酒大里嘉??府政?康健?息信?戏游?拉里格香?拿大?教主天?机手?构机!织组??标商?歌谷?浦利飞?港香!.&人個?司公?府政?絡網?織組?育教???湾台?灣&台?臺??物购?界世?益公?看点?科盈訊電?站网?籍書?线在?络网?网文中?聘招?販通?逊马亚?通联?里嘉?锡马淡?門澳?门澳?闻新?電家?국한?넷닷?성삼?컴닷??"); /** * If a hostname is not a key in the EXCLUDE map, and if removing its leftmost component results @@ -56,7 +56,7 @@ private PublicSuffixPatterns() {} */ public static final ImmutableMap UNDER = TrieParser.parseTrie( - "ac.vedwa,d&b?i.ym.ssr,uolc.&etiso&isnes,tnegam,?iaznab,rehcnar-no,scitats,??e&b.lrusnart,d.&ecapsrebu,yksurf,?noz.notirt,t&atse.etupmoc,is.&areduolc,hsmroftalp,tst,???g&oog.tnetnocresu,p??h&c.tenerif:.cvs,,k?trae.sppad:.zzb,,?k&c?f?nil.bewd,rowten.secla,u.hcs??ln.lrusnart,m&j?m?oc.&duolcmeaeboda.ved,edo&c.redliub:->s,ved,?,nil.recnalabedon,?ico-remotsuc:.&ico,pco,sco,?,lrihwyap,mme0,osseccandcved,s&ecapsnaecolatigid,t&cejbo&edonil,rtluv,?nemelepiuq,?wanozama.&1-etupmoc,ble,etupmoc,??t&neyoj.snc,opsppa.r,???n&c.moc.swanozama.&ble,etupmoc,?ur.&dliub,e&doc,sabatad,?noitargim,??o&c.pato,i.&duolciaznab.sdraykcab,elacsnoom,nroca-no,oir-no,reniatnoceruza,s&3k-no,olots,?xcq.sys,y5s,??p&j.&a&mahokoy?yogan??ebok?i&adnes?kasawak??oroppas?uhsuykatik??n?pa.&knalfhtron,repoleved,tegeb,??r&b.mon?e??s&edoc.owo,noitulos.rehid,w.rosivda,?t&a.&ofnistro.&nednuk,xe,?smcerutuf:.&ni,xe,?,?en.&cimonotpyrc,hvo.&gnitsoh,saapbew,???u&e.lrusnart,r.onijym.&gni&dnal,tsoh,?murtceps,spv,??ved.&e&gats>s,lcl,?rahbew,?gts,lcl,treclacol.resu,yawetag,?z&c.murtnecatem.duolc,yx.tibelet,??"); + "ac.vedwa,d&b?i.ym.ssr,uolc.&etiso&isnes,tnegam,?iaznab,rehcnar-no,scitats,??e&b.lrusnart,d.&ecapsrebu,yksurf,?noz.notirt,t&atse.etupmoc,is.&areduolc,hsmroftalp,tst,???g&oog.tnetnocresu,p??h&c.tenerif:.cvs,,k?trae.sppad:.zzb,,?k&c?f?nil.bewd,rowten.secla,u.hcs??ln.lrusnart,m&f.resu,j?m?oc.&duolcmeaeboda.ved,edo&c.redliub:->s,ved,?,nil.recnalabedon,?ico-remotsuc:.&ico,pco,sco,?,lrihwyap,mme0,osseccandcved,s&ecapsnaecolatigid,t&cejbo&edonil,rtluv,?nemelepiuq,?wanozama.&1-etupmoc,ble,etupmoc,??t&neyoj.snc,opsppa.r,???n&c.moc.swanozama.&ble,etupmoc,?ur.&dliub,e&doc,sabatad,?noitargim,??o&c.pato,i.&duolciaznab.sdraykcab,elacsnoom,nroca-no,oir-no,reniatnoceruza,s&3k-no,olots,?xcq.sys,y5s,??p&j.&a&mahokoy?yogan??ebok?i&adnes?kasawak??oroppas?uhsuykatik??n?pa.&knalfhtron,repoleved,tegeb,??r&b.mon?e??s&edoc.owo,noitulos.rehid,w.rosivda,?t&a.&ofnistro.&nednuk,xe,?smcerutuf:.&ni,xe,?,?en.&cimonotpyrc,hvo.&gnitsoh,saapbew,???u&e.lrusnart,r.onijym.&gni&dnal,tsoh,?murtceps,spv,??ved.&e&gats>s,lcl,?rahbew,?gts,lcl,treclacol.resu,yawetag,?z&c.murtnecatem.duolc,yx.tibelet,??"); /** * The elements in this map would pass the UNDER test, but are known not to be public suffixes and diff --git a/android/pom.xml b/android/pom.xml index 04fabfe0edbb..60d3e6486485 100644 --- a/android/pom.xml +++ b/android/pom.xml @@ -15,13 +15,12 @@ %regex[.*.class] 1.1.3 - 3.26.0 - 1.22 3.4.1 9+181-r4173-1 3.2.1 + 1980-02-01T00:00:00Z UTF-8 @@ -127,6 +126,7 @@ 1.8 1.8 UTF-8 + true @@ -512,7 +501,7 @@ be passed as part of the same as -Xplugin:ErrorProne, and I gave up trying to figure out how to do that for test compilation only. --> - -Xplugin:ErrorProne -Xep:NullArgumentForNonNullParameter:OFF + -Xplugin:ErrorProne -Xep:NullArgumentForNonNullParameter:OFF -Xep:Java8ApiChecker:ERROR + + + + @@ -402,9 +407,8 @@ src - - src-super - + + ${project.build.directory}/guava-gwt-sources diff --git a/guava-gwt/src-super/com/google/common/collect/super/com/google/common/collect/AbstractSortedMultiset.java b/guava-gwt/src-super/com/google/common/collect/super/com/google/common/collect/AbstractSortedMultiset.java index 88cc5363182e..412ef964c8c6 100644 --- a/guava-gwt/src-super/com/google/common/collect/super/com/google/common/collect/AbstractSortedMultiset.java +++ b/guava-gwt/src-super/com/google/common/collect/super/com/google/common/collect/AbstractSortedMultiset.java @@ -20,7 +20,6 @@ import java.util.Comparator; import java.util.Iterator; import java.util.SortedSet; -import org.checkerframework.checker.nullness.qual.Nullable; /** * This class provides a skeletal implementation of the {@link SortedMultiset} interface. @@ -98,10 +97,7 @@ public Entry pollLastEntry() { @Override public SortedMultiset subMultiset( - @Nullable E fromElement, - BoundType fromBoundType, - @Nullable E toElement, - BoundType toBoundType) { + E fromElement, BoundType fromBoundType, E toElement, BoundType toBoundType) { // These are checked elsewhere, but NullPointerTester wants them checked eagerly. checkNotNull(fromBoundType); checkNotNull(toBoundType); diff --git a/guava-gwt/src-super/com/google/common/collect/super/com/google/common/collect/Platform.java b/guava-gwt/src-super/com/google/common/collect/super/com/google/common/collect/Platform.java index 4b85849acdb4..887b96d74f57 100644 --- a/guava-gwt/src-super/com/google/common/collect/super/com/google/common/collect/Platform.java +++ b/guava-gwt/src-super/com/google/common/collect/super/com/google/common/collect/Platform.java @@ -74,13 +74,8 @@ static Set preservesInsertionOrderOnAddsSet() { } static T[] newArray(T[] reference, int length) { - T[] clone = Arrays.copyOf(reference, 0); - resizeArray(clone, length); - return clone; - } - - private static void resizeArray(Object array, int newSize) { - ((NativeArray) array).setLength(newSize); + T[] empty = reference.length == 0 ? reference : Arrays.copyOf(reference, 0); + return Arrays.copyOf(empty, length); } /** Equivalent to Arrays.copyOfRange(source, from, to, arrayOfType.getClass()). */ diff --git a/guava-gwt/src-super/com/google/common/util/concurrent/super/com/google/common/util/concurrent/AbstractFuture.java b/guava-gwt/src-super/com/google/common/util/concurrent/super/com/google/common/util/concurrent/AbstractFuture.java index c293045958de..e17376e7ad01 100644 --- a/guava-gwt/src-super/com/google/common/util/concurrent/super/com/google/common/util/concurrent/AbstractFuture.java +++ b/guava-gwt/src-super/com/google/common/util/concurrent/super/com/google/common/util/concurrent/AbstractFuture.java @@ -38,7 +38,8 @@ /** Emulation for AbstractFuture in GWT. */ @SuppressWarnings("nullness") // TODO(b/147136275): Remove once our checker understands & and |. -public abstract class AbstractFuture extends InternalFutureFailureAccess +@ElementTypesAreNonnullByDefault +public abstract class AbstractFuture extends InternalFutureFailureAccess implements ListenableFuture { static final boolean GENERATE_CANCELLATION_CAUSES = false; @@ -48,9 +49,10 @@ public abstract class AbstractFuture extends InternalFutureFailureAccess * of this interface must also be an AbstractFuture and must not override or expose for overriding * any of the public methods of ListenableFuture. */ - interface Trusted extends ListenableFuture {} + interface Trusted extends ListenableFuture {} - abstract static class TrustedFuture extends AbstractFuture implements Trusted { + abstract static class TrustedFuture extends AbstractFuture + implements Trusted { @CanIgnoreReturnValue @Override public final V get() throws InterruptedException, ExecutionException { @@ -90,8 +92,8 @@ public final boolean cancel(boolean mayInterruptIfRunning) { private State state; private V value; - private Future delegate; - private Throwable throwable; + private @Nullable Future delegate; + private @Nullable Throwable throwable; private boolean mayInterruptIfRunning; private List listeners; diff --git a/guava-gwt/src-super/com/google/common/util/concurrent/super/com/google/common/util/concurrent/AggregateFutureState.java b/guava-gwt/src-super/com/google/common/util/concurrent/super/com/google/common/util/concurrent/AggregateFutureState.java index 0058c34c03dc..f7d9dd21fe3e 100644 --- a/guava-gwt/src-super/com/google/common/util/concurrent/super/com/google/common/util/concurrent/AggregateFutureState.java +++ b/guava-gwt/src-super/com/google/common/util/concurrent/super/com/google/common/util/concurrent/AggregateFutureState.java @@ -19,12 +19,15 @@ import static com.google.common.collect.Sets.newHashSet; import java.util.Set; +import org.checkerframework.checker.nullness.qual.Nullable; /** Emulation of AggregateFutureState. */ -abstract class AggregateFutureState extends AbstractFuture.TrustedFuture { +@ElementTypesAreNonnullByDefault +abstract class AggregateFutureState + extends AbstractFuture.TrustedFuture { // Lazily initialized the first time we see an exception; not released until all the input futures // & this future completes. Released when the future releases the reference to the running state - private Set seenExceptions = null; + private @Nullable Set seenExceptions = null; private int remaining; AggregateFutureState(int remainingFutures) { diff --git a/guava-gwt/src-super/com/google/common/util/concurrent/super/com/google/common/util/concurrent/GwtFluentFutureCatchingSpecialization.java b/guava-gwt/src-super/com/google/common/util/concurrent/super/com/google/common/util/concurrent/GwtFluentFutureCatchingSpecialization.java index 58a7057db19c..1e9cff859223 100644 --- a/guava-gwt/src-super/com/google/common/util/concurrent/super/com/google/common/util/concurrent/GwtFluentFutureCatchingSpecialization.java +++ b/guava-gwt/src-super/com/google/common/util/concurrent/super/com/google/common/util/concurrent/GwtFluentFutureCatchingSpecialization.java @@ -16,13 +16,16 @@ import com.google.common.base.Function; import java.util.concurrent.Executor; +import org.checkerframework.checker.nullness.qual.Nullable; /** * Hidden superclass of {@link FluentFuture} that provides us a place to declare special GWT * versions of the {@link FluentFuture#catching(Class, com.google.common.base.Function) * FluentFuture.catching} family of methods. Those versions have slightly different signatures. */ -abstract class GwtFluentFutureCatchingSpecialization extends AbstractFuture { +@ElementTypesAreNonnullByDefault +abstract class GwtFluentFutureCatchingSpecialization + extends AbstractFuture { /* * In the GWT versions of the methods (below), every exceptionType parameter is required to be * Class. To handle only certain kinds of exceptions under GWT, you'll need to write diff --git a/guava-gwt/src-super/com/google/common/util/concurrent/super/com/google/common/util/concurrent/GwtFuturesCatchingSpecialization.java b/guava-gwt/src-super/com/google/common/util/concurrent/super/com/google/common/util/concurrent/GwtFuturesCatchingSpecialization.java index 4ce990d322d3..f5e05b2130ac 100644 --- a/guava-gwt/src-super/com/google/common/util/concurrent/super/com/google/common/util/concurrent/GwtFuturesCatchingSpecialization.java +++ b/guava-gwt/src-super/com/google/common/util/concurrent/super/com/google/common/util/concurrent/GwtFuturesCatchingSpecialization.java @@ -16,12 +16,14 @@ import com.google.common.base.Function; import java.util.concurrent.Executor; +import org.checkerframework.checker.nullness.qual.Nullable; /** * Hidden superclass of {@link Futures} that provides us a place to declare special GWT versions of * the {@link Futures#catching(ListenableFuture, Class, com.google.common.base.Function) * Futures.catching} family of methods. Those versions have slightly different signatures. */ +@ElementTypesAreNonnullByDefault abstract class GwtFuturesCatchingSpecialization { /* * In the GWT versions of the methods (below), every exceptionType parameter is required to be @@ -29,7 +31,7 @@ abstract class GwtFuturesCatchingSpecialization { * your own instanceof tests. */ - public static ListenableFuture catching( + public static ListenableFuture catching( ListenableFuture input, Class exceptionType, Function fallback, @@ -37,7 +39,7 @@ public static ListenableFuture catching( return AbstractCatchingFuture.create(input, exceptionType, fallback, executor); } - public static ListenableFuture catchingAsync( + public static ListenableFuture catchingAsync( ListenableFuture input, Class exceptionType, AsyncFunction fallback, diff --git a/guava-gwt/src-super/com/google/common/util/concurrent/super/com/google/common/util/concurrent/InterruptibleTask.java b/guava-gwt/src-super/com/google/common/util/concurrent/super/com/google/common/util/concurrent/InterruptibleTask.java index 1cd9f3e73dd4..8d4217bbd7da 100644 --- a/guava-gwt/src-super/com/google/common/util/concurrent/super/com/google/common/util/concurrent/InterruptibleTask.java +++ b/guava-gwt/src-super/com/google/common/util/concurrent/super/com/google/common/util/concurrent/InterruptibleTask.java @@ -18,8 +18,11 @@ import static com.google.common.util.concurrent.NullnessCasts.uncheckedCastNullableTToT; +import org.checkerframework.checker.nullness.qual.Nullable; + /** Emulation for InterruptibleTask in GWT. */ -abstract class InterruptibleTask implements Runnable { +@ElementTypesAreNonnullByDefault +abstract class InterruptibleTask implements Runnable { @Override public void run() { diff --git a/guava-gwt/src-super/com/google/common/util/concurrent/super/com/google/common/util/concurrent/ListenableFuture.java b/guava-gwt/src-super/com/google/common/util/concurrent/super/com/google/common/util/concurrent/ListenableFuture.java index 40f83eb61d2b..345fb94c2b38 100644 --- a/guava-gwt/src-super/com/google/common/util/concurrent/super/com/google/common/util/concurrent/ListenableFuture.java +++ b/guava-gwt/src-super/com/google/common/util/concurrent/super/com/google/common/util/concurrent/ListenableFuture.java @@ -21,18 +21,20 @@ import jsinterop.annotations.JsOptional; import jsinterop.annotations.JsPackage; import jsinterop.annotations.JsType; +import org.checkerframework.checker.nullness.qual.Nullable; /** * Java super source for ListenableFuture, implementing a structural thenable via a default method. * For restrictions, please refer to the documentation of the then() method. */ -public interface ListenableFuture extends Future, IThenable { +@ElementTypesAreNonnullByDefault +public interface ListenableFuture extends Future, IThenable { void addListener(Runnable listener, Executor executor); /** Note that this method is not expected to be overridden. */ @JsMethod @Override - default IThenable then( + default IThenable then( @JsOptional IThenOnFulfilledCallbackFn onFulfilled, @JsOptional IThenOnRejectedCallbackFn onRejected) { return new Promise( @@ -61,30 +63,30 @@ public void onFailure(Throwable throwable) { * us to implement it using a default implementation in J2cl ListenableFuture. */ @JsType(isNative = true, namespace = JsPackage.GLOBAL, name = "IThenable") -interface IThenable { - IThenable then( +interface IThenable { + IThenable then( @JsOptional IThenOnFulfilledCallbackFn onFulfilled, @JsOptional IThenOnRejectedCallbackFn onRejected); @JsFunction - interface IThenOnFulfilledCallbackFn { + interface IThenOnFulfilledCallbackFn { V onInvoke(T p0); } @JsFunction - interface IThenOnRejectedCallbackFn { + interface IThenOnRejectedCallbackFn { V onInvoke(Object p0); } } /** Subset of the elemental2 Promise API. */ @JsType(isNative = true, namespace = JsPackage.GLOBAL, name = "Promise") -class Promise implements IThenable { +class Promise implements IThenable { @JsFunction - interface PromiseExecutorCallbackFn { + interface PromiseExecutorCallbackFn { @JsFunction - interface ResolveCallbackFn { + interface ResolveCallbackFn { void onInvoke(T value); } @@ -99,7 +101,7 @@ interface RejectCallbackFn { public Promise(PromiseExecutorCallbackFn executor) {} @Override - public native Promise then( + public native Promise then( @JsOptional IThenOnFulfilledCallbackFn onFulfilled, @JsOptional IThenOnRejectedCallbackFn onRejected); } diff --git a/guava-gwt/src-super/com/google/common/util/concurrent/super/com/google/common/util/concurrent/Platform.java b/guava-gwt/src-super/com/google/common/util/concurrent/super/com/google/common/util/concurrent/Platform.java index bf5c7a47e99f..430e1abd7c78 100644 --- a/guava-gwt/src-super/com/google/common/util/concurrent/super/com/google/common/util/concurrent/Platform.java +++ b/guava-gwt/src-super/com/google/common/util/concurrent/super/com/google/common/util/concurrent/Platform.java @@ -16,7 +16,9 @@ package com.google.common.util.concurrent; + /** Methods factored out so that they can be emulated differently in GWT. */ +@ElementTypesAreNonnullByDefault final class Platform { static boolean isInstanceOfThrowableClass(Throwable t, Class expectedClass) { /* diff --git a/guava-gwt/src-super/com/google/common/util/concurrent/super/com/google/common/util/concurrent/Uninterruptibles.java b/guava-gwt/src-super/com/google/common/util/concurrent/super/com/google/common/util/concurrent/Uninterruptibles.java index 6d55b40250f6..add601819431 100644 --- a/guava-gwt/src-super/com/google/common/util/concurrent/super/com/google/common/util/concurrent/Uninterruptibles.java +++ b/guava-gwt/src-super/com/google/common/util/concurrent/super/com/google/common/util/concurrent/Uninterruptibles.java @@ -19,14 +19,17 @@ import com.google.errorprone.annotations.CanIgnoreReturnValue; import java.util.concurrent.ExecutionException; import java.util.concurrent.Future; +import org.checkerframework.checker.nullness.qual.Nullable; /** Emulation of Uninterruptibles in GWT. */ +@ElementTypesAreNonnullByDefault public final class Uninterruptibles { private Uninterruptibles() {} @CanIgnoreReturnValue - public static V getUninterruptibly(Future future) throws ExecutionException { + public static V getUninterruptibly(Future future) + throws ExecutionException { try { return future.get(); } catch (InterruptedException e) { diff --git a/guava-testlib/src/com/google/common/collect/testing/AbstractIteratorTester.java b/guava-testlib/src/com/google/common/collect/testing/AbstractIteratorTester.java index a9f7d9b7ee84..e9242a79401e 100644 --- a/guava-testlib/src/com/google/common/collect/testing/AbstractIteratorTester.java +++ b/guava-testlib/src/com/google/common/collect/testing/AbstractIteratorTester.java @@ -31,6 +31,7 @@ import java.util.Set; import java.util.Stack; import junit.framework.AssertionFailedError; +import org.checkerframework.checker.nullness.qual.Nullable; /** * Most of the logic for {@link IteratorTester} and {@link ListIteratorTester}. @@ -148,7 +149,7 @@ protected final class MultiExceptionListIterator implements ListIterator { * this to determine which stack to pop from on a call to {@code remove()} (or to pop from and * push to on a call to {@code set()}). */ - Stack stackWithLastReturnedElementAtTop = null; + @Nullable Stack stackWithLastReturnedElementAtTop = null; MultiExceptionListIterator(List expectedElements) { Helpers.addAll(nextElements, Helpers.reverse(expectedElements)); @@ -379,7 +380,7 @@ private static List subListCopy(Object[] source, int size) { } private interface IteratorOperation { - Object execute(Iterator iterator); + @Nullable Object execute(Iterator iterator); } /** @@ -465,7 +466,7 @@ private > void internalExecuteAndCompare( private static final IteratorOperation REMOVE_METHOD = new IteratorOperation() { @Override - public Object execute(Iterator iterator) { + public @Nullable Object execute(Iterator iterator) { iterator.remove(); return null; } @@ -491,7 +492,7 @@ private final IteratorOperation newAddMethod() { final Object toInsert = elementsToInsert.next(); return new IteratorOperation() { @Override - public Object execute(Iterator iterator) { + public @Nullable Object execute(Iterator iterator) { @SuppressWarnings("unchecked") ListIterator rawIterator = (ListIterator) iterator; rawIterator.add(toInsert); @@ -504,7 +505,7 @@ private final IteratorOperation newSetMethod() { final E toInsert = elementsToInsert.next(); return new IteratorOperation() { @Override - public Object execute(Iterator iterator) { + public @Nullable Object execute(Iterator iterator) { @SuppressWarnings("unchecked") ListIterator li = (ListIterator) iterator; li.set(toInsert); diff --git a/guava-testlib/src/com/google/common/collect/testing/AbstractMapTester.java b/guava-testlib/src/com/google/common/collect/testing/AbstractMapTester.java index 5e0de3ccc443..2f322971785a 100644 --- a/guava-testlib/src/com/google/common/collect/testing/AbstractMapTester.java +++ b/guava-testlib/src/com/google/common/collect/testing/AbstractMapTester.java @@ -23,6 +23,7 @@ import java.util.ListIterator; import java.util.Map; import java.util.Map.Entry; +import org.checkerframework.checker.nullness.qual.Nullable; import org.junit.Ignore; /** @@ -167,7 +168,7 @@ protected void expectMissing(Entry... entries) { } } - private static boolean equal(Object a, Object b) { + private static boolean equal(@Nullable Object a, @Nullable Object b) { return a == b || (a != null && a.equals(b)); } diff --git a/guava-testlib/src/com/google/common/collect/testing/AbstractTester.java b/guava-testlib/src/com/google/common/collect/testing/AbstractTester.java index dc1e1a0674fc..adbc8dcc6f79 100644 --- a/guava-testlib/src/com/google/common/collect/testing/AbstractTester.java +++ b/guava-testlib/src/com/google/common/collect/testing/AbstractTester.java @@ -18,6 +18,7 @@ import com.google.common.annotations.GwtCompatible; import junit.framework.TestCase; +import org.checkerframework.checker.nullness.qual.Nullable; /** * This abstract base class for testers allows the framework to inject needed information after @@ -34,8 +35,8 @@ public class AbstractTester extends TestCase { private G subjectGenerator; private String suiteName; - private Runnable setUp; - private Runnable tearDown; + private @Nullable Runnable setUp; + private @Nullable Runnable tearDown; // public so that it can be referenced in generated GWT tests. @Override @@ -54,7 +55,8 @@ public void tearDown() throws Exception { } // public so that it can be referenced in generated GWT tests. - public final void init(G subjectGenerator, String suiteName, Runnable setUp, Runnable tearDown) { + public final void init( + G subjectGenerator, String suiteName, @Nullable Runnable setUp, @Nullable Runnable tearDown) { this.subjectGenerator = subjectGenerator; this.suiteName = suiteName; this.setUp = setUp; diff --git a/guava-testlib/src/com/google/common/collect/testing/BaseComparable.java b/guava-testlib/src/com/google/common/collect/testing/BaseComparable.java index 3847709894cd..cf3a11eabc24 100644 --- a/guava-testlib/src/com/google/common/collect/testing/BaseComparable.java +++ b/guava-testlib/src/com/google/common/collect/testing/BaseComparable.java @@ -18,6 +18,7 @@ import com.google.common.annotations.GwtCompatible; import java.io.Serializable; +import org.checkerframework.checker.nullness.qual.Nullable; /** * Simple base class to verify that we handle generics correctly. @@ -38,7 +39,7 @@ public int hashCode() { // delegate to 's' } @Override - public boolean equals(Object other) { + public boolean equals(@Nullable Object other) { if (other == null) { return false; } else if (other instanceof BaseComparable) { diff --git a/guava-testlib/src/com/google/common/collect/testing/FeatureSpecificTestSuiteBuilder.java b/guava-testlib/src/com/google/common/collect/testing/FeatureSpecificTestSuiteBuilder.java index b59b090f892a..bf15135dc4f2 100644 --- a/guava-testlib/src/com/google/common/collect/testing/FeatureSpecificTestSuiteBuilder.java +++ b/guava-testlib/src/com/google/common/collect/testing/FeatureSpecificTestSuiteBuilder.java @@ -39,6 +39,7 @@ import junit.framework.Test; import junit.framework.TestCase; import junit.framework.TestSuite; +import org.checkerframework.checker.nullness.qual.Nullable; /** * Creates, based on your criteria, a JUnit test suite that exhaustively tests the object generated @@ -62,7 +63,7 @@ protected B self() { // Test Data - private G subjectGenerator; + private @Nullable G subjectGenerator; // Gets run before every test. private Runnable setUp; // Gets run at the conclusion of every test. @@ -125,7 +126,7 @@ public Set> getFeatures() { // Name - private String name; + private @Nullable String name; /** Configures this builder produce a TestSuite with the given name. */ @CanIgnoreReturnValue diff --git a/guava-testlib/src/com/google/common/collect/testing/Helpers.java b/guava-testlib/src/com/google/common/collect/testing/Helpers.java index c044fcfa9196..64dded5afe8a 100644 --- a/guava-testlib/src/com/google/common/collect/testing/Helpers.java +++ b/guava-testlib/src/com/google/common/collect/testing/Helpers.java @@ -40,11 +40,12 @@ import java.util.Set; import junit.framework.Assert; import junit.framework.AssertionFailedError; +import org.checkerframework.checker.nullness.qual.Nullable; @GwtCompatible(emulated = true) public class Helpers { // Clone of Objects.equal - static boolean equal(Object a, Object b) { + static boolean equal(@Nullable Object a, @Nullable Object b) { return a == b || (a != null && a.equals(b)); } @@ -253,7 +254,7 @@ static void fail(Throwable cause, Object message) { } public static Comparator> entryComparator( - Comparator keyComparator) { + @Nullable Comparator keyComparator) { return new Comparator>() { @Override @SuppressWarnings("unchecked") // no less safe than putting it in the map! @@ -384,7 +385,7 @@ public V setValue(V value) { @SuppressWarnings("unchecked") @Override - public boolean equals(Object o) { + public boolean equals(@Nullable Object o) { if (o instanceof Entry) { Entry e = (Entry) o; e.setValue(value); // muhahaha! @@ -462,7 +463,7 @@ protected NullsBefore(String justAfterNull) { } @Override - public int compare(String lhs, String rhs) { + public int compare(@Nullable String lhs, @Nullable String rhs) { if (lhs == rhs) { return 0; } @@ -486,7 +487,7 @@ public int compare(String lhs, String rhs) { } @Override - public boolean equals(Object obj) { + public boolean equals(@Nullable Object obj) { if (obj instanceof NullsBefore) { NullsBefore other = (NullsBefore) obj; return justAfterNull.equals(other.justAfterNull); diff --git a/guava-testlib/src/com/google/common/collect/testing/MinimalIterable.java b/guava-testlib/src/com/google/common/collect/testing/MinimalIterable.java index 15d48dbbd75b..816a9737794f 100644 --- a/guava-testlib/src/com/google/common/collect/testing/MinimalIterable.java +++ b/guava-testlib/src/com/google/common/collect/testing/MinimalIterable.java @@ -20,6 +20,7 @@ import java.util.Arrays; import java.util.Collection; import java.util.Iterator; +import org.checkerframework.checker.nullness.qual.Nullable; /** * An implementation of {@code Iterable} which throws an exception on all invocations of the {@link @@ -63,7 +64,7 @@ public static MinimalIterable from(Collection elements) { return (MinimalIterable) of(elements.toArray()); } - private Iterator iterator; + private @Nullable Iterator iterator; private MinimalIterable(Iterator iterator) { this.iterator = iterator; diff --git a/guava-testlib/src/com/google/common/collect/testing/MinimalSet.java b/guava-testlib/src/com/google/common/collect/testing/MinimalSet.java index 9a87d244d01f..4027684b42c8 100644 --- a/guava-testlib/src/com/google/common/collect/testing/MinimalSet.java +++ b/guava-testlib/src/com/google/common/collect/testing/MinimalSet.java @@ -22,6 +22,7 @@ import java.util.Collection; import java.util.List; import java.util.Set; +import org.checkerframework.checker.nullness.qual.Nullable; /** * A simplistic set which implements the bare minimum so that it can be used in tests without @@ -63,7 +64,7 @@ private MinimalSet(Class type, E... contents) { */ @Override - public boolean equals(Object object) { + public boolean equals(@Nullable Object object) { if (object instanceof Set) { Set that = (Set) object; return (this.size() == that.size()) && this.containsAll(that); diff --git a/guava-testlib/src/com/google/common/collect/testing/SafeTreeMap.java b/guava-testlib/src/com/google/common/collect/testing/SafeTreeMap.java index 19a89050d6c5..c284619da15d 100644 --- a/guava-testlib/src/com/google/common/collect/testing/SafeTreeMap.java +++ b/guava-testlib/src/com/google/common/collect/testing/SafeTreeMap.java @@ -29,6 +29,7 @@ import java.util.Set; import java.util.SortedMap; import java.util.TreeMap; +import org.checkerframework.checker.nullness.qual.Nullable; /** * A wrapper around {@code TreeMap} that aggressively checks to see if keys are mutually comparable. @@ -76,12 +77,12 @@ private SafeTreeMap(NavigableMap delegate) { } @Override - public Entry ceilingEntry(K key) { + public @Nullable Entry ceilingEntry(K key) { return delegate.ceilingEntry(checkValid(key)); } @Override - public K ceilingKey(K key) { + public @Nullable K ceilingKey(K key) { return delegate.ceilingKey(checkValid(key)); } @@ -163,7 +164,7 @@ public void clear() { } @Override - public Entry firstEntry() { + public @Nullable Entry firstEntry() { return delegate.firstEntry(); } @@ -173,17 +174,17 @@ public K firstKey() { } @Override - public Entry floorEntry(K key) { + public @Nullable Entry floorEntry(K key) { return delegate.floorEntry(checkValid(key)); } @Override - public K floorKey(K key) { + public @Nullable K floorKey(K key) { return delegate.floorKey(checkValid(key)); } @Override - public V get(Object key) { + public @Nullable V get(Object key) { return delegate.get(checkValid(key)); } @@ -198,12 +199,12 @@ public NavigableMap headMap(K toKey, boolean inclusive) { } @Override - public Entry higherEntry(K key) { + public @Nullable Entry higherEntry(K key) { return delegate.higherEntry(checkValid(key)); } @Override - public K higherKey(K key) { + public @Nullable K higherKey(K key) { return delegate.higherKey(checkValid(key)); } @@ -218,7 +219,7 @@ public NavigableSet keySet() { } @Override - public Entry lastEntry() { + public @Nullable Entry lastEntry() { return delegate.lastEntry(); } @@ -228,12 +229,12 @@ public K lastKey() { } @Override - public Entry lowerEntry(K key) { + public @Nullable Entry lowerEntry(K key) { return delegate.lowerEntry(checkValid(key)); } @Override - public K lowerKey(K key) { + public @Nullable K lowerKey(K key) { return delegate.lowerKey(checkValid(key)); } @@ -243,17 +244,17 @@ public NavigableSet navigableKeySet() { } @Override - public Entry pollFirstEntry() { + public @Nullable Entry pollFirstEntry() { return delegate.pollFirstEntry(); } @Override - public Entry pollLastEntry() { + public @Nullable Entry pollLastEntry() { return delegate.pollLastEntry(); } @Override - public V put(K key, V value) { + public @Nullable V put(K key, V value) { return delegate.put(checkValid(key), value); } @@ -266,7 +267,7 @@ public void putAll(Map map) { } @Override - public V remove(Object key) { + public @Nullable V remove(Object key) { return delegate.remove(checkValid(key)); } @@ -311,7 +312,7 @@ private T checkValid(T t) { } @Override - public boolean equals(Object obj) { + public boolean equals(@Nullable Object obj) { return delegate.equals(obj); } diff --git a/guava-testlib/src/com/google/common/collect/testing/SafeTreeSet.java b/guava-testlib/src/com/google/common/collect/testing/SafeTreeSet.java index 2bcfe5d59ad8..ddb628656b89 100644 --- a/guava-testlib/src/com/google/common/collect/testing/SafeTreeSet.java +++ b/guava-testlib/src/com/google/common/collect/testing/SafeTreeSet.java @@ -25,6 +25,7 @@ import java.util.NavigableSet; import java.util.SortedSet; import java.util.TreeSet; +import org.checkerframework.checker.nullness.qual.Nullable; /** * A wrapper around {@code TreeSet} that aggressively checks to see if elements are mutually @@ -82,7 +83,7 @@ public boolean addAll(Collection collection) { } @Override - public E ceiling(E e) { + public @Nullable E ceiling(E e) { return delegate.ceiling(checkValid(e)); } @@ -127,7 +128,7 @@ public E first() { } @Override - public E floor(E e) { + public @Nullable E floor(E e) { return delegate.floor(checkValid(e)); } @@ -142,7 +143,7 @@ public NavigableSet headSet(E toElement, boolean inclusive) { } @Override - public E higher(E e) { + public @Nullable E higher(E e) { return delegate.higher(checkValid(e)); } @@ -162,17 +163,17 @@ public E last() { } @Override - public E lower(E e) { + public @Nullable E lower(E e) { return delegate.lower(checkValid(e)); } @Override - public E pollFirst() { + public @Nullable E pollFirst() { return delegate.pollFirst(); } @Override - public E pollLast() { + public @Nullable E pollLast() { return delegate.pollLast(); } @@ -239,7 +240,7 @@ private T checkValid(T t) { } @Override - public boolean equals(Object obj) { + public boolean equals(@Nullable Object obj) { return delegate.equals(obj); } diff --git a/guava-testlib/src/com/google/common/collect/testing/SampleElements.java b/guava-testlib/src/com/google/common/collect/testing/SampleElements.java index 400107dc58fc..9fed1fbe8ed3 100644 --- a/guava-testlib/src/com/google/common/collect/testing/SampleElements.java +++ b/guava-testlib/src/com/google/common/collect/testing/SampleElements.java @@ -21,6 +21,7 @@ import java.util.Iterator; import java.util.List; import java.util.Map.Entry; +import org.checkerframework.checker.nullness.qual.Nullable; /** * A container class for the five sample elements we need for testing. @@ -143,7 +144,7 @@ private static class Collider { } @Override - public boolean equals(Object obj) { + public boolean equals(@Nullable Object obj) { return obj instanceof Collider && ((Collider) obj).value == value; } diff --git a/guava-testlib/src/com/google/common/collect/testing/SortedMapTestSuiteBuilder.java b/guava-testlib/src/com/google/common/collect/testing/SortedMapTestSuiteBuilder.java index 7944aaa6a0b8..4a290860e55c 100644 --- a/guava-testlib/src/com/google/common/collect/testing/SortedMapTestSuiteBuilder.java +++ b/guava-testlib/src/com/google/common/collect/testing/SortedMapTestSuiteBuilder.java @@ -30,6 +30,7 @@ import java.util.Map.Entry; import java.util.Set; import junit.framework.TestSuite; +import org.checkerframework.checker.nullness.qual.Nullable; /** * Creates, based on your criteria, a JUnit test suite that exhaustively tests a SortedMap @@ -88,12 +89,12 @@ protected SetTestSuiteBuilder createDerivedKeySetSuite(TestSetGenerator ke * To avoid infinite recursion, test suites with these marker features won't have derived suites * created for them. */ - enum NoRecurse implements Feature { + enum NoRecurse implements Feature<@Nullable Void> { SUBMAP, DESCENDING; @Override - public Set> getImpliedFeatures() { + public Set> getImpliedFeatures() { return Collections.emptySet(); } } diff --git a/guava-testlib/src/com/google/common/collect/testing/SpliteratorTester.java b/guava-testlib/src/com/google/common/collect/testing/SpliteratorTester.java index 6fbd80e62438..e0c2ebfea2ba 100644 --- a/guava-testlib/src/com/google/common/collect/testing/SpliteratorTester.java +++ b/guava-testlib/src/com/google/common/collect/testing/SpliteratorTester.java @@ -104,7 +104,7 @@ boolean tryAdvance(Consumer action) { } @Override - GeneralSpliterator trySplit() { + @Nullable GeneralSpliterator trySplit() { Spliterator split = spliterator.trySplit(); return split == null ? null : new GeneralSpliteratorOfObject<>(split); } @@ -141,7 +141,7 @@ boolean tryAdvance(Consumer action) { } @Override - GeneralSpliterator trySplit() { + @Nullable GeneralSpliterator trySplit() { Spliterator.OfPrimitive split = spliterator.trySplit(); return split == null ? null : new GeneralSpliteratorOfPrimitive<>(split, consumerizer); } diff --git a/guava-testlib/src/com/google/common/collect/testing/UnhashableObject.java b/guava-testlib/src/com/google/common/collect/testing/UnhashableObject.java index 69d263bda096..3e1d3b4ee369 100644 --- a/guava-testlib/src/com/google/common/collect/testing/UnhashableObject.java +++ b/guava-testlib/src/com/google/common/collect/testing/UnhashableObject.java @@ -17,6 +17,7 @@ package com.google.common.collect.testing; import com.google.common.annotations.GwtCompatible; +import org.checkerframework.checker.nullness.qual.Nullable; /** * An unhashable object to be used in testing as values in our collections. @@ -32,7 +33,7 @@ public UnhashableObject(int value) { } @Override - public boolean equals(Object object) { + public boolean equals(@Nullable Object object) { if (object instanceof UnhashableObject) { UnhashableObject that = (UnhashableObject) object; return this.value == that.value; diff --git a/guava-testlib/src/com/google/common/collect/testing/features/CollectionSize.java b/guava-testlib/src/com/google/common/collect/testing/features/CollectionSize.java index 6203e514862e..cc627bb5cb99 100644 --- a/guava-testlib/src/com/google/common/collect/testing/features/CollectionSize.java +++ b/guava-testlib/src/com/google/common/collect/testing/features/CollectionSize.java @@ -24,6 +24,7 @@ import java.util.Collection; import java.util.Collections; import java.util.Set; +import org.checkerframework.checker.nullness.qual.Nullable; /** * When describing the features of the collection produced by a given generator (i.e. in a call to @@ -59,7 +60,7 @@ public enum CollectionSize implements Feature, Comparable> implied; - private final Integer numElements; + private final @Nullable Integer numElements; CollectionSize(int numElements) { this.implied = Collections.emptySet(); diff --git a/guava-testlib/src/com/google/common/collect/testing/features/TesterRequirements.java b/guava-testlib/src/com/google/common/collect/testing/features/TesterRequirements.java index 4780b1bf50ff..2290f296c756 100644 --- a/guava-testlib/src/com/google/common/collect/testing/features/TesterRequirements.java +++ b/guava-testlib/src/com/google/common/collect/testing/features/TesterRequirements.java @@ -20,6 +20,7 @@ import com.google.common.collect.testing.Helpers; import java.util.Collections; import java.util.Set; +import org.checkerframework.checker.nullness.qual.Nullable; /** * Encapsulates the constraints that a class under test must satisfy in order for a tester method to @@ -54,7 +55,7 @@ public final Set> getAbsentFeatures() { } @Override - public boolean equals(Object object) { + public boolean equals(@Nullable Object object) { if (object == this) { return true; } diff --git a/guava-testlib/src/com/google/common/collect/testing/testers/AbstractListIndexOfTester.java b/guava-testlib/src/com/google/common/collect/testing/testers/AbstractListIndexOfTester.java index 46bd52942657..05f72dfd3df3 100644 --- a/guava-testlib/src/com/google/common/collect/testing/testers/AbstractListIndexOfTester.java +++ b/guava-testlib/src/com/google/common/collect/testing/testers/AbstractListIndexOfTester.java @@ -23,6 +23,7 @@ import com.google.common.collect.testing.WrongType; import com.google.common.collect.testing.features.CollectionFeature; import com.google.common.collect.testing.features.CollectionSize; +import org.checkerframework.checker.nullness.qual.Nullable; import org.junit.Ignore; /** @@ -34,7 +35,7 @@ @Ignore // Affects only Android test runner, which respects JUnit 4 annotations on JUnit 3 tests. public abstract class AbstractListIndexOfTester extends AbstractListTester { /** Override to call {@code indexOf()} or {@code lastIndexOf()}. */ - protected abstract int find(Object o); + protected abstract int find(@Nullable Object o); /** Override to return "indexOf" or "lastIndexOf()" for use in failure messages. */ protected abstract String getMethodName(); diff --git a/guava-testlib/src/com/google/common/testing/AbstractPackageSanityTests.java b/guava-testlib/src/com/google/common/testing/AbstractPackageSanityTests.java index 1e31bbfb408f..184a8c21fdaa 100644 --- a/guava-testlib/src/com/google/common/testing/AbstractPackageSanityTests.java +++ b/guava-testlib/src/com/google/common/testing/AbstractPackageSanityTests.java @@ -22,6 +22,7 @@ import com.google.common.annotations.Beta; import com.google.common.annotations.GwtIncompatible; +import com.google.common.annotations.J2ktIncompatible; import com.google.common.annotations.VisibleForTesting; import com.google.common.base.Optional; import com.google.common.base.Predicate; @@ -105,7 +106,9 @@ // TODO: Switch to JUnit 4 and use @Parameterized and @BeforeClass // Note: @Test annotations are deliberate, as some subclasses specify @RunWith(JUnit4). @GwtIncompatible +@J2ktIncompatible @J2ObjCIncompatible // com.google.common.reflect.ClassPath +@ElementTypesAreNonnullByDefault public abstract class AbstractPackageSanityTests extends TestCase { /** @@ -325,7 +328,7 @@ private static AssertionFailedError sanityError( /** * Finds the classes not ending with a test suffix and not covered by an explicit test whose name - * is {@code explicitTestName}. + * is {@code explicitTestNames}. */ @VisibleForTesting List> findClassesToTest( diff --git a/guava-testlib/src/com/google/common/testing/ArbitraryInstances.java b/guava-testlib/src/com/google/common/testing/ArbitraryInstances.java index 1325d7f8c09e..0071feacf434 100644 --- a/guava-testlib/src/com/google/common/testing/ArbitraryInstances.java +++ b/guava-testlib/src/com/google/common/testing/ArbitraryInstances.java @@ -19,6 +19,7 @@ import static com.google.common.base.Preconditions.checkArgument; import com.google.common.annotations.GwtIncompatible; +import com.google.common.annotations.J2ktIncompatible; import com.google.common.base.CharMatcher; import com.google.common.base.Charsets; import com.google.common.base.Defaults; @@ -172,6 +173,8 @@ * @since 12.0 */ @GwtIncompatible +@J2ktIncompatible +@ElementTypesAreNonnullByDefault public final class ArbitraryInstances { private static final Ordering BY_FIELD_NAME = @@ -359,7 +362,7 @@ private static void setImplementation(Class type, Class impl } if (type.isEnum()) { T[] enumConstants = type.getEnumConstants(); - return (enumConstants.length == 0) ? null : enumConstants[0]; + return (enumConstants == null || enumConstants.length == 0) ? null : enumConstants[0]; } if (type.isArray()) { return createEmptyArray(type); @@ -506,11 +509,12 @@ private Object readResolve() { } // Always equal is a valid total ordering. And it works for any Object. - private static final class AlwaysEqual extends Ordering implements Serializable { + private static final class AlwaysEqual extends Ordering<@Nullable Object> + implements Serializable { private static final AlwaysEqual INSTANCE = new AlwaysEqual(); @Override - public int compare(Object o1, Object o2) { + public int compare(@Nullable Object o1, @Nullable Object o2) { return 0; } diff --git a/guava-testlib/src/com/google/common/testing/ClassSanityTester.java b/guava-testlib/src/com/google/common/testing/ClassSanityTester.java index 1dbb95c9e6c7..0af86684bbe6 100644 --- a/guava-testlib/src/com/google/common/testing/ClassSanityTester.java +++ b/guava-testlib/src/com/google/common/testing/ClassSanityTester.java @@ -23,6 +23,7 @@ import com.google.common.annotations.Beta; import com.google.common.annotations.GwtIncompatible; +import com.google.common.annotations.J2ktIncompatible; import com.google.common.annotations.VisibleForTesting; import com.google.common.base.Joiner; import com.google.common.base.Objects; @@ -81,6 +82,7 @@ */ @Beta @GwtIncompatible +@J2ktIncompatible public final class ClassSanityTester { private static final Ordering> BY_METHOD_NAME = @@ -338,11 +340,13 @@ void doTestEquals(Class cls) * or factory method to be constructed. */ @Nullable T instantiate(Class cls) - throws ParameterNotInstantiableException, IllegalAccessException, InvocationTargetException, + throws ParameterNotInstantiableException, + IllegalAccessException, + InvocationTargetException, FactoryMethodReturnsNullException { if (cls.isEnum()) { T[] constants = cls.getEnumConstants(); - if (constants.length > 0) { + if (constants != null && constants.length > 0) { return constants[0]; } else { return null; @@ -574,7 +578,7 @@ private void testEqualsUsing(final Invokable factory) IllegalAccessException, InvocationTargetException, FactoryMethodReturnsNullException { List params = factory.getParameters(); List argGenerators = Lists.newArrayListWithCapacity(params.size()); - List args = Lists.newArrayListWithCapacity(params.size()); + List<@Nullable Object> args = Lists.newArrayListWithCapacity(params.size()); for (Parameter param : params) { FreshValueGenerator generator = newFreshValueGenerator(); argGenerators.add(generator); @@ -832,7 +836,7 @@ R dummyReturnValue(TypeToken returnType) { } @Override - public boolean equals(Object obj) { + public boolean equals(@Nullable Object obj) { return obj instanceof SerializableDummyProxy; } diff --git a/guava-testlib/src/com/google/common/testing/ClusterException.java b/guava-testlib/src/com/google/common/testing/ClusterException.java index 7665ab1d435b..2b8d4eb77e72 100644 --- a/guava-testlib/src/com/google/common/testing/ClusterException.java +++ b/guava-testlib/src/com/google/common/testing/ClusterException.java @@ -59,20 +59,21 @@ * @author Luiz-Otavio Zorzella */ @GwtCompatible +@ElementTypesAreNonnullByDefault final class ClusterException extends RuntimeException { - public final Collection exceptions; + final Collection exceptions; private ClusterException(Collection exceptions) { super( exceptions.size() + " exceptions were thrown. The first exception is listed as a cause.", exceptions.iterator().next()); - ArrayList temp = new ArrayList<>(exceptions); + ArrayList temp = new ArrayList<>(exceptions); this.exceptions = Collections.unmodifiableCollection(temp); } - /** @see #create(Collection) */ - public static RuntimeException create(Throwable... exceptions) { + /** See {@link #create(Collection)}. */ + static RuntimeException create(Throwable... exceptions) { ArrayList temp = new ArrayList<>(Arrays.asList(exceptions)); return create(temp); } @@ -96,7 +97,7 @@ public static RuntimeException create(Throwable... exceptions) { * @throws NullPointerException if {@code exceptions} is null * @throws IllegalArgumentException if {@code exceptions} is empty */ - public static RuntimeException create(Collection exceptions) { + static RuntimeException create(Collection exceptions) { if (exceptions.size() == 0) { throw new IllegalArgumentException("Can't create an ExceptionCollection with no exceptions"); } diff --git a/guava-testlib/src/com/google/common/testing/CollectorTester.java b/guava-testlib/src/com/google/common/testing/CollectorTester.java index e1dd347ab89d..b62b83e954a7 100644 --- a/guava-testlib/src/com/google/common/testing/CollectorTester.java +++ b/guava-testlib/src/com/google/common/testing/CollectorTester.java @@ -47,12 +47,15 @@ * @since 21.0 */ @GwtCompatible -public final class CollectorTester { +@ElementTypesAreNonnullByDefault +public final class CollectorTester< + T extends @Nullable Object, A extends @Nullable Object, R extends @Nullable Object> { /** * Creates a {@code CollectorTester} for the specified {@code Collector}. The result of the {@code * Collector} will be compared to the expected value using {@link Object#equals}. */ - public static CollectorTester of(Collector collector) { + public static + CollectorTester of(Collector collector) { return of(collector, Objects::equals); } @@ -60,8 +63,9 @@ public static CollectorTester of(Collector collector * Creates a {@code CollectorTester} for the specified {@code Collector}. The result of the {@code * Collector} will be compared to the expected value using the specified {@code equivalence}. */ - public static CollectorTester of( - Collector collector, BiPredicate equivalence) { + public static + CollectorTester of( + Collector collector, BiPredicate equivalence) { return new CollectorTester<>(collector, equivalence); } @@ -82,7 +86,8 @@ enum CollectStrategy { /** Get one accumulator and accumulate the elements into it sequentially. */ SEQUENTIAL { @Override - final A result(Collector collector, Iterable inputs) { + final + A result(Collector collector, Iterable inputs) { A accum = collector.supplier().get(); for (T input : inputs) { collector.accumulator().accept(accum, input); @@ -93,7 +98,8 @@ final A result(Collector collector, Iterable inputs) { /** Get one accumulator for each element and merge the accumulators left-to-right. */ MERGE_LEFT_ASSOCIATIVE { @Override - final A result(Collector collector, Iterable inputs) { + final + A result(Collector collector, Iterable inputs) { A accum = collector.supplier().get(); for (T input : inputs) { A newAccum = collector.supplier().get(); @@ -106,7 +112,8 @@ final A result(Collector collector, Iterable inputs) { /** Get one accumulator for each element and merge the accumulators right-to-left. */ MERGE_RIGHT_ASSOCIATIVE { @Override - final A result(Collector collector, Iterable inputs) { + final + A result(Collector collector, Iterable inputs) { List stack = new ArrayList<>(); for (T input : inputs) { A newAccum = collector.supplier().get(); @@ -122,16 +129,17 @@ final A result(Collector collector, Iterable inputs) { return pop(stack); } - void push(List stack, E value) { + void push(List stack, E value) { stack.add(value); } - E pop(List stack) { + E pop(List stack) { return stack.remove(stack.size() - 1); } }; - abstract A result(Collector collector, Iterable inputs); + abstract + A result(Collector collector, Iterable inputs); } /** @@ -140,7 +148,7 @@ E pop(List stack) { */ @SafeVarargs @CanIgnoreReturnValue - public final CollectorTester expectCollects(@Nullable R expectedResult, T... inputs) { + public final CollectorTester expectCollects(R expectedResult, T... inputs) { List list = Arrays.asList(inputs); doExpectCollects(expectedResult, list); if (collector.characteristics().contains(Collector.Characteristics.UNORDERED)) { @@ -150,7 +158,7 @@ public final CollectorTester expectCollects(@Nullable R expectedResult, return this; } - private void doExpectCollects(@Nullable R expectedResult, List inputs) { + private void doExpectCollects(R expectedResult, List inputs) { for (CollectStrategy scheme : EnumSet.allOf(CollectStrategy.class)) { A finalAccum = scheme.result(collector, inputs); if (collector.characteristics().contains(Collector.Characteristics.IDENTITY_FINISH)) { @@ -160,7 +168,7 @@ private void doExpectCollects(@Nullable R expectedResult, List inputs) { } } - private void assertEquivalent(@Nullable R expected, @Nullable R actual) { + private void assertEquivalent(R expected, R actual) { assertTrue( "Expected " + expected + " got " + actual + " modulo equivalence " + equivalence, equivalence.test(expected, actual)); diff --git a/guava-testlib/src/com/google/common/testing/DummyProxy.java b/guava-testlib/src/com/google/common/testing/DummyProxy.java index 85e229d51831..7b2525c72c61 100644 --- a/guava-testlib/src/com/google/common/testing/DummyProxy.java +++ b/guava-testlib/src/com/google/common/testing/DummyProxy.java @@ -20,6 +20,7 @@ import static com.google.common.testing.NullPointerTester.isNullable; import com.google.common.annotations.GwtIncompatible; +import com.google.common.annotations.J2ktIncompatible; import com.google.common.collect.ImmutableList; import com.google.common.collect.Sets; import com.google.common.reflect.AbstractInvocationHandler; @@ -30,6 +31,7 @@ import java.lang.reflect.Method; import java.lang.reflect.Proxy; import java.util.Set; +import org.checkerframework.checker.nullness.qual.Nullable; /** * Generates a dummy interface proxy that simply returns a dummy value for each method. @@ -37,6 +39,8 @@ * @author Ben Yu */ @GwtIncompatible +@J2ktIncompatible +@ElementTypesAreNonnullByDefault abstract class DummyProxy { /** @@ -59,7 +63,7 @@ final T newProxy(TypeToken interfaceType) { } /** Returns the dummy return value for {@code returnType}. */ - abstract R dummyReturnValue(TypeToken returnType); + abstract @Nullable R dummyReturnValue(TypeToken returnType); private class DummyHandler extends AbstractInvocationHandler implements Serializable { private final TypeToken interfaceType; @@ -69,7 +73,7 @@ private class DummyHandler extends AbstractInvocationHandler implements Serializ } @Override - protected Object handleInvocation(Object proxy, Method method, Object[] args) { + protected @Nullable Object handleInvocation(Object proxy, Method method, Object[] args) { Invokable invokable = interfaceType.method(method); ImmutableList params = invokable.getParameters(); for (int i = 0; i < args.length; i++) { @@ -87,7 +91,7 @@ public int hashCode() { } @Override - public boolean equals(Object obj) { + public boolean equals(@Nullable Object obj) { if (obj instanceof DummyHandler) { DummyHandler that = (DummyHandler) obj; return identity().equals(that.identity()); diff --git a/guava-testlib/src/com/google/common/testing/ElementTypesAreNonnullByDefault.java b/guava-testlib/src/com/google/common/testing/ElementTypesAreNonnullByDefault.java new file mode 100644 index 000000000000..1362176b5a12 --- /dev/null +++ b/guava-testlib/src/com/google/common/testing/ElementTypesAreNonnullByDefault.java @@ -0,0 +1,41 @@ +/* + * Copyright (C) 2021 The Guava Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.common.testing; + +import static java.lang.annotation.ElementType.FIELD; +import static java.lang.annotation.ElementType.METHOD; +import static java.lang.annotation.ElementType.PARAMETER; +import static java.lang.annotation.ElementType.TYPE; +import static java.lang.annotation.RetentionPolicy.RUNTIME; + +import com.google.common.annotations.GwtCompatible; +import java.lang.annotation.Retention; +import java.lang.annotation.Target; +import javax.annotation.Nonnull; +import javax.annotation.meta.TypeQualifierDefault; + +/** + * Marks all "top-level" types as non-null in a way that is recognized by Kotlin. Note that this + * unfortunately includes type-variable usages, so we also provide {@link ParametricNullness} to + * "undo" it as best we can. + */ +@GwtCompatible +@Retention(RUNTIME) +@Target(TYPE) +@TypeQualifierDefault({FIELD, METHOD, PARAMETER}) +@Nonnull +@interface ElementTypesAreNonnullByDefault {} diff --git a/guava-testlib/src/com/google/common/testing/EqualsTester.java b/guava-testlib/src/com/google/common/testing/EqualsTester.java index 37472a378439..d4484702a994 100644 --- a/guava-testlib/src/com/google/common/testing/EqualsTester.java +++ b/guava-testlib/src/com/google/common/testing/EqualsTester.java @@ -22,11 +22,12 @@ import com.google.common.annotations.GwtCompatible; import com.google.common.base.Equivalence; -import com.google.common.collect.ImmutableList; import com.google.common.collect.Iterables; import com.google.common.collect.Lists; import com.google.errorprone.annotations.CanIgnoreReturnValue; +import java.util.ArrayList; import java.util.List; +import org.checkerframework.checker.nullness.qual.Nullable; /** * Tester for equals() and hashCode() methods of a class. @@ -75,6 +76,7 @@ * @since 10.0 */ @GwtCompatible +@ElementTypesAreNonnullByDefault public final class EqualsTester { private static final int REPETITIONS = 3; @@ -95,9 +97,17 @@ public EqualsTester() { * equal to any other equality groups added to this tester. */ @CanIgnoreReturnValue - public EqualsTester addEqualityGroup(Object... equalityGroup) { + public EqualsTester addEqualityGroup(@Nullable Object @Nullable ... equalityGroup) { checkNotNull(equalityGroup); - equalityGroups.add(ImmutableList.copyOf(equalityGroup)); + List list = new ArrayList<>(equalityGroup.length); + for (int i = 0; i < equalityGroup.length; i++) { + Object element = equalityGroup[i]; + if (element == null) { + throw new NullPointerException("at index " + i); + } + list.add(element); + } + equalityGroups.add(list); return this; } diff --git a/guava-testlib/src/com/google/common/testing/EquivalenceTester.java b/guava-testlib/src/com/google/common/testing/EquivalenceTester.java index b69072984683..ec34752c57ab 100644 --- a/guava-testlib/src/com/google/common/testing/EquivalenceTester.java +++ b/guava-testlib/src/com/google/common/testing/EquivalenceTester.java @@ -50,6 +50,7 @@ * @since 10.0 */ @GwtCompatible +@ElementTypesAreNonnullByDefault public final class EquivalenceTester { private static final int REPETITIONS = 3; diff --git a/guava-testlib/src/com/google/common/testing/FakeTicker.java b/guava-testlib/src/com/google/common/testing/FakeTicker.java index afce1e8c2c0e..2c3e798ff83c 100644 --- a/guava-testlib/src/com/google/common/testing/FakeTicker.java +++ b/guava-testlib/src/com/google/common/testing/FakeTicker.java @@ -20,6 +20,7 @@ import com.google.common.annotations.GwtCompatible; import com.google.common.annotations.GwtIncompatible; +import com.google.common.annotations.J2ktIncompatible; import com.google.common.base.Ticker; import com.google.errorprone.annotations.CanIgnoreReturnValue; import java.util.concurrent.TimeUnit; @@ -36,6 +37,7 @@ * @author Jige Yu * @since 10.0 */ +@ElementTypesAreNonnullByDefault @GwtCompatible public class FakeTicker extends Ticker { @@ -63,6 +65,7 @@ public FakeTicker advance(long nanoseconds) { * @since 28.0 */ @GwtIncompatible + @J2ktIncompatible @CanIgnoreReturnValue public FakeTicker advance(java.time.Duration duration) { return advance(duration.toNanos()); @@ -91,6 +94,7 @@ public FakeTicker setAutoIncrementStep(long autoIncrementStep, TimeUnit timeUnit * @since 28.0 */ @GwtIncompatible + @J2ktIncompatible @CanIgnoreReturnValue public FakeTicker setAutoIncrementStep(java.time.Duration autoIncrementStep) { return setAutoIncrementStep(autoIncrementStep.toNanos(), TimeUnit.NANOSECONDS); diff --git a/guava-testlib/src/com/google/common/testing/ForwardingWrapperTester.java b/guava-testlib/src/com/google/common/testing/ForwardingWrapperTester.java index 9b156c6e03fa..c0d2c6a01217 100644 --- a/guava-testlib/src/com/google/common/testing/ForwardingWrapperTester.java +++ b/guava-testlib/src/com/google/common/testing/ForwardingWrapperTester.java @@ -23,6 +23,7 @@ import static junit.framework.Assert.fail; import com.google.common.annotations.GwtIncompatible; +import com.google.common.annotations.J2ktIncompatible; import com.google.common.base.Function; import com.google.common.base.Throwables; import com.google.common.collect.Lists; @@ -35,6 +36,7 @@ import java.lang.reflect.Modifier; import java.util.List; import java.util.concurrent.atomic.AtomicInteger; +import org.checkerframework.checker.nullness.qual.Nullable; /** * Tester to ensure forwarding wrapper works by delegating calls to the corresponding method with @@ -54,6 +56,8 @@ * @since 14.0 */ @GwtIncompatible +@J2ktIncompatible +@ElementTypesAreNonnullByDefault public final class ForwardingWrapperTester { private boolean testsEquals = false; @@ -173,9 +177,9 @@ private static void testToString( wrapperFunction.apply(proxy).toString()); } - private static Object[] getParameterValues(Method method) { + private static @Nullable Object[] getParameterValues(Method method) { FreshValueGenerator paramValues = new FreshValueGenerator(); - List passedArgs = Lists.newArrayList(); + List<@Nullable Object> passedArgs = Lists.newArrayList(); for (Class paramType : method.getParameterTypes()) { passedArgs.add(paramValues.generateFresh(paramType)); } @@ -187,8 +191,8 @@ private static final class InteractionTester extends AbstractInvocationHandle private final Class interfaceType; private final Method method; - private final Object[] passedArgs; - private final Object returnValue; + private final @Nullable Object[] passedArgs; + private final @Nullable Object returnValue; private final AtomicInteger called = new AtomicInteger(); InteractionTester(Class interfaceType, Method method) { @@ -199,8 +203,8 @@ private static final class InteractionTester extends AbstractInvocationHandle } @Override - protected Object handleInvocation(Object p, Method calledMethod, Object[] args) - throws Throwable { + protected @Nullable Object handleInvocation( + Object p, Method calledMethod, @Nullable Object[] args) throws Throwable { assertEquals(method, calledMethod); assertEquals(method + " invoked more than once.", 0, called.get()); for (int i = 0; i < passedArgs.length; i++) { diff --git a/guava-testlib/src/com/google/common/testing/FreshValueGenerator.java b/guava-testlib/src/com/google/common/testing/FreshValueGenerator.java index bb51e408b285..0e0d9b13b761 100644 --- a/guava-testlib/src/com/google/common/testing/FreshValueGenerator.java +++ b/guava-testlib/src/com/google/common/testing/FreshValueGenerator.java @@ -20,6 +20,7 @@ import static com.google.common.base.Throwables.throwIfUnchecked; import com.google.common.annotations.GwtIncompatible; +import com.google.common.annotations.J2ktIncompatible; import com.google.common.base.CharMatcher; import com.google.common.base.Charsets; import com.google.common.base.Equivalence; @@ -130,6 +131,7 @@ * @author Ben Yu */ @GwtIncompatible +@J2ktIncompatible class FreshValueGenerator { private static final ImmutableMap, Method> GENERATORS; @@ -201,7 +203,7 @@ final T newFreshProxy(final Class interfaceType) { * Generates an instance for {@code type} using the current {@link #freshness}. The generated * instance may or may not be unique across different calls. */ - private Object generate(TypeToken type) { + private @Nullable Object generate(TypeToken type) { Class rawType = type.getRawType(); List samples = sampleInstances.get(rawType); Object sample = pickInstance(samples, null); @@ -212,7 +214,7 @@ private Object generate(TypeToken type) { return pickInstance(rawType.getEnumConstants(), null); } if (type.isArray()) { - TypeToken componentType = type.getComponentType(); + TypeToken componentType = checkNotNull(type.getComponentType()); Object array = Array.newInstance(componentType.getRawType(), 1); Array.set(array, 0, generate(componentType)); return array; @@ -258,7 +260,7 @@ private Object generate(TypeToken type) { return defaultGenerate(rawType); } - private T defaultGenerate(Class rawType) { + private @Nullable T defaultGenerate(Class rawType) { if (rawType.isInterface()) { // always create a new proxy return newProxy(rawType); @@ -291,7 +293,7 @@ private final class FreshInvocationHandler extends AbstractInvocationHandler { } @Override - protected Object handleInvocation(Object proxy, Method method, Object[] args) { + protected Object handleInvocation(Object proxy, Method method, @Nullable Object[] args) { return interfaceMethodCalled(interfaceType, method); } @@ -647,7 +649,7 @@ Comparator generateComparator() { } @Generates - Ordering generateOrdering() { + Ordering generateOrdering() { return new Ordering() { @Override public int compare(T left, T right) { @@ -930,14 +932,12 @@ static ImmutableBiMap generateImmutableBimap(K key, V value) { } @Generates - static Table generateTable( - @Nullable R row, @Nullable C column, @Nullable V value) { + static Table generateTable(R row, C column, V value) { return generateHashBasedTable(row, column, value); } @Generates - static HashBasedTable generateHashBasedTable( - @Nullable R row, @Nullable C column, @Nullable V value) { + static HashBasedTable generateHashBasedTable(R row, C column, V value) { HashBasedTable table = HashBasedTable.create(); table.put(row, column, value); return table; diff --git a/guava-testlib/src/com/google/common/testing/GcFinalization.java b/guava-testlib/src/com/google/common/testing/GcFinalization.java index da6aa2211b49..cf3409ac3578 100644 --- a/guava-testlib/src/com/google/common/testing/GcFinalization.java +++ b/guava-testlib/src/com/google/common/testing/GcFinalization.java @@ -19,6 +19,7 @@ import static java.util.concurrent.TimeUnit.SECONDS; import com.google.common.annotations.GwtIncompatible; +import com.google.common.annotations.J2ktIncompatible; import com.google.errorprone.annotations.DoNotMock; import com.google.j2objc.annotations.J2ObjCIncompatible; import java.lang.ref.WeakReference; @@ -103,7 +104,9 @@ * @since 11.0 */ @GwtIncompatible +@J2ktIncompatible @J2ObjCIncompatible // gc +@ElementTypesAreNonnullByDefault public final class GcFinalization { private GcFinalization() {} diff --git a/guava-testlib/src/com/google/common/testing/IgnoreJRERequirement.java b/guava-testlib/src/com/google/common/testing/IgnoreJRERequirement.java new file mode 100644 index 000000000000..2203162bf2b7 --- /dev/null +++ b/guava-testlib/src/com/google/common/testing/IgnoreJRERequirement.java @@ -0,0 +1,29 @@ +/* + * Copyright 2019 The Guava Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ + +package com.google.common.testing; + +import static java.lang.annotation.ElementType.CONSTRUCTOR; +import static java.lang.annotation.ElementType.METHOD; +import static java.lang.annotation.ElementType.TYPE; + +import java.lang.annotation.Target; + +/** + * Disables Animal Sniffer's checking of compatibility with older versions of Java/Android. + * + *

    Each package's copy of this annotation needs to be listed in our {@code pom.xml}. + */ +@Target({METHOD, CONSTRUCTOR, TYPE}) +@interface IgnoreJRERequirement {} diff --git a/guava-testlib/src/com/google/common/testing/NullPointerTester.java b/guava-testlib/src/com/google/common/testing/NullPointerTester.java index 8e7e26f5fd39..da99adfe025b 100644 --- a/guava-testlib/src/com/google/common/testing/NullPointerTester.java +++ b/guava-testlib/src/com/google/common/testing/NullPointerTester.java @@ -20,6 +20,7 @@ import static com.google.common.base.Preconditions.checkNotNull; import com.google.common.annotations.GwtIncompatible; +import com.google.common.annotations.J2ktIncompatible; import com.google.common.base.Converter; import com.google.common.base.Objects; import com.google.common.collect.ClassToInstanceMap; @@ -46,7 +47,6 @@ import java.util.Arrays; import java.util.List; import java.util.concurrent.ConcurrentMap; -import java.util.function.Function; import junit.framework.Assert; import junit.framework.AssertionFailedError; import org.checkerframework.checker.nullness.qual.Nullable; @@ -69,6 +69,8 @@ * @since 10.0 */ @GwtIncompatible +@J2ktIncompatible +@ElementTypesAreNonnullByDefault public final class NullPointerTester { private final ClassToInstanceMap defaults = MutableClassToInstanceMap.create(); @@ -76,6 +78,22 @@ public final class NullPointerTester { private ExceptionTypePolicy policy = ExceptionTypePolicy.NPE_OR_UOE; + public NullPointerTester() { + try { + /* + * Converter.apply has a non-nullable parameter type but doesn't throw for null arguments. For + * more information, see the comments in that class. + * + * We already know that that's how it behaves, and subclasses of Converter can't change that + * behavior. So there's no sense in making all subclass authors exclude the method from any + * NullPointerTester tests that they have. + */ + ignoredMembers.add(Converter.class.getMethod("apply", Object.class)); + } catch (NoSuchMethodException shouldBeImpossible) { + // OK, fine: If it doesn't exist, then there's chance that we're going to be asked to test it. + } + } + /** * Sets a default value that can be used for any parameter of type {@code type}. Returns this * object. @@ -310,7 +328,7 @@ private static final class Signature { } @Override - public boolean equals(Object obj) { + public boolean equals(@Nullable Object obj) { if (obj instanceof Signature) { Signature that = (Signature) obj; return name.equals(that.name) && parameterTypes.equals(that.parameterTypes); @@ -333,11 +351,18 @@ public int hashCode() { * static */ private void testParameter( - Object instance, Invokable invokable, int paramIndex, Class testedClass) { + @Nullable Object instance, Invokable invokable, int paramIndex, Class testedClass) { + /* + * com.google.common is starting to rely on type-use annotations, which aren't visible under + * Android VMs. So we skip testing there. + */ + if (isAndroid() && Reflection.getPackageName(testedClass).startsWith("com.google.common")) { + return; + } if (isPrimitiveOrNullable(invokable.getParameters().get(paramIndex))) { return; // there's nothing to test } - Object[] params = buildParamList(invokable, paramIndex); + @Nullable Object[] params = buildParamList(invokable, paramIndex); try { @SuppressWarnings("unchecked") // We'll get a runtime exception if the type is wrong. Invokable unsafe = (Invokable) invokable; @@ -373,9 +398,10 @@ private void testParameter( } } - private Object[] buildParamList(Invokable invokable, int indexOfParamToSetToNull) { + private @Nullable Object[] buildParamList( + Invokable invokable, int indexOfParamToSetToNull) { ImmutableList params = invokable.getParameters(); - Object[] args = new Object[params.size()]; + @Nullable Object[] args = new Object[params.size()]; for (int i = 0; i < args.length; i++) { Parameter param = params.get(i); @@ -391,7 +417,7 @@ private Object[] buildParamList(Invokable invokable, int indexOfParamToSet return args; } - private T getDefaultValue(TypeToken type) { + private @Nullable T getDefaultValue(TypeToken type) { // We assume that all defaults are generics-safe, even if they aren't, // we take the risk. @SuppressWarnings("unchecked") @@ -459,7 +485,7 @@ private static TypeToken getFirstTypeParameter(Type type) { private T newDefaultReturningProxy(final TypeToken type) { return new DummyProxy() { @Override - R dummyReturnValue(TypeToken returnType) { + @Nullable R dummyReturnValue(TypeToken returnType) { return getDefaultValue(returnType); } }.newProxy(type); @@ -482,33 +508,14 @@ static boolean isPrimitiveOrNullable(Parameter param) { "CheckForNull", "Nullable", "NullableDecl", "NullableType", "ParametricNullness"); static boolean isNullable(Invokable invokable) { - return isNullable(invokable.getAnnotatedReturnType().getAnnotations()) - || isNullable(invokable.getAnnotations()); + return NULLNESS_ANNOTATION_READER.isNullable(invokable); } static boolean isNullable(Parameter param) { - return isNullable(param.getAnnotatedType().getAnnotations()) - || isNullable(param.getAnnotations()) - || isNullableTypeVariable(param.getAnnotatedType().getType()); - } - - private static boolean isNullableTypeVariable(Type type) { - if (!(type instanceof TypeVariable)) { - return false; - } - TypeVariable var = (TypeVariable) type; - AnnotatedType[] bounds = GET_ANNOTATED_BOUNDS.apply(var); - for (AnnotatedType bound : bounds) { - // Until Java 15, the isNullableTypeVariable case here won't help: - // https://bugs.openjdk.java.net/browse/JDK-8202469 - if (isNullable(bound.getAnnotations()) || isNullableTypeVariable(bound.getType())) { - return true; - } - } - return false; + return NULLNESS_ANNOTATION_READER.isNullable(param); } - private static boolean isNullable(Annotation[] annotations) { + private static boolean containsNullable(Annotation[] annotations) { for (Annotation annotation : annotations) { if (NULLABLE_ANNOTATION_SIMPLE_NAMES.contains(annotation.annotationType().getSimpleName())) { return true; @@ -517,27 +524,6 @@ private static boolean isNullable(Annotation[] annotations) { return false; } - // This is currently required because of j2objc restrictions. - private static final Function, AnnotatedType[]> GET_ANNOTATED_BOUNDS = - initGetAnnotatedBounds(); - - private static Function, AnnotatedType[]> initGetAnnotatedBounds() { - AnnotatedType[] noBounds = new AnnotatedType[0]; - Method getAnnotatedBounds; - try { - getAnnotatedBounds = TypeVariable.class.getMethod("getAnnotatedBounds"); - } catch (ReflectiveOperationException e) { - return v -> noBounds; - } - return v -> { - try { - return (AnnotatedType[]) getAnnotatedBounds.invoke(v); - } catch (ReflectiveOperationException e) { - return noBounds; - } - }; - } - private boolean isIgnored(Member member) { return member.isSynthetic() || ignoredMembers.contains(member) || isEquals(member); } @@ -601,4 +587,87 @@ public boolean isExpectedType(Throwable cause) { public abstract boolean isExpectedType(Throwable cause); } + + private static boolean annotatedTypeExists() { + try { + Class.forName("java.lang.reflect.AnnotatedType"); + } catch (ClassNotFoundException e) { + return false; + } + return true; + } + + private static final NullnessAnnotationReader NULLNESS_ANNOTATION_READER = + annotatedTypeExists() + ? NullnessAnnotationReader.FROM_DECLARATION_AND_TYPE_USE_ANNOTATIONS + : NullnessAnnotationReader.FROM_DECLARATION_ANNOTATIONS_ONLY; + + /** + * Looks for declaration nullness annotations and, if supported, type-use nullness annotations. + * + *

    Under Android VMs, the methods for retrieving type-use annotations don't exist. This means + * that {@link NullPointerException} may misbehave under Android when used on classes that rely on + * type-use annotations. + * + *

    Under j2objc, the necessary APIs exist, but some (perhaps all) return stub values, like + * empty arrays. Presumably {@link NullPointerException} could likewise misbehave under j2objc, + * but I don't know that anyone uses it there, anyway. + */ + private enum NullnessAnnotationReader { + // Usages (which are unsafe only for Android) are guarded by the annotatedTypeExists() check. + @SuppressWarnings({"Java7ApiChecker", "AndroidApiChecker", "DoNotCall", "deprecation"}) + FROM_DECLARATION_AND_TYPE_USE_ANNOTATIONS { + @Override + @IgnoreJRERequirement + boolean isNullable(Invokable invokable) { + return FROM_DECLARATION_ANNOTATIONS_ONLY.isNullable(invokable) + || containsNullable(invokable.getAnnotatedReturnType().getAnnotations()); + // TODO(cpovirk): Should we also check isNullableTypeVariable? + } + + @Override + @IgnoreJRERequirement + boolean isNullable(Parameter param) { + return FROM_DECLARATION_ANNOTATIONS_ONLY.isNullable(param) + || containsNullable(param.getAnnotatedType().getAnnotations()) + || isNullableTypeVariable(param.getAnnotatedType().getType()); + } + + @IgnoreJRERequirement + boolean isNullableTypeVariable(Type type) { + if (!(type instanceof TypeVariable)) { + return false; + } + TypeVariable typeVar = (TypeVariable) type; + for (AnnotatedType bound : typeVar.getAnnotatedBounds()) { + // Until Java 15, the isNullableTypeVariable case here won't help: + // https://bugs.openjdk.java.net/browse/JDK-8202469 + if (containsNullable(bound.getAnnotations()) || isNullableTypeVariable(bound.getType())) { + return true; + } + } + return false; + } + }, + FROM_DECLARATION_ANNOTATIONS_ONLY { + @Override + boolean isNullable(Invokable invokable) { + return containsNullable(invokable.getAnnotations()); + } + + @Override + boolean isNullable(Parameter param) { + return containsNullable(param.getAnnotations()); + } + }; + + abstract boolean isNullable(Invokable invokable); + + abstract boolean isNullable(Parameter param); + } + + private static boolean isAndroid() { + // Arguably it would make more sense to test "can we see type-use annotations" directly.... + return checkNotNull(System.getProperty("java.runtime.name", "")).contains("Android"); + } } diff --git a/guava-testlib/src/com/google/common/testing/Platform.java b/guava-testlib/src/com/google/common/testing/Platform.java index b107966ec97a..bbad5598d74d 100644 --- a/guava-testlib/src/com/google/common/testing/Platform.java +++ b/guava-testlib/src/com/google/common/testing/Platform.java @@ -31,6 +31,7 @@ * @author Chris Povirk */ @GwtCompatible(emulated = true) +@ElementTypesAreNonnullByDefault final class Platform { /** Serializes and deserializes the specified object. */ @SuppressWarnings("unchecked") diff --git a/guava-testlib/src/com/google/common/testing/RelationshipTester.java b/guava-testlib/src/com/google/common/testing/RelationshipTester.java index 1ffed6bb67b7..d1caedd4e8d1 100644 --- a/guava-testlib/src/com/google/common/testing/RelationshipTester.java +++ b/guava-testlib/src/com/google/common/testing/RelationshipTester.java @@ -33,6 +33,7 @@ * @author Gregory Kick */ @GwtCompatible +@ElementTypesAreNonnullByDefault final class RelationshipTester { static class ItemReporter { diff --git a/guava-testlib/src/com/google/common/testing/SerializableTester.java b/guava-testlib/src/com/google/common/testing/SerializableTester.java index 72d3ea4c3b72..c2f8cc169b0b 100644 --- a/guava-testlib/src/com/google/common/testing/SerializableTester.java +++ b/guava-testlib/src/com/google/common/testing/SerializableTester.java @@ -33,6 +33,7 @@ * @since 10.0 */ @GwtCompatible // but no-op! +@ElementTypesAreNonnullByDefault public final class SerializableTester { private SerializableTester() {} diff --git a/guava-testlib/src/com/google/common/testing/SloppyTearDown.java b/guava-testlib/src/com/google/common/testing/SloppyTearDown.java index 95ff34e33dda..478e8b7e4d88 100644 --- a/guava-testlib/src/com/google/common/testing/SloppyTearDown.java +++ b/guava-testlib/src/com/google/common/testing/SloppyTearDown.java @@ -32,6 +32,7 @@ */ @Beta @GwtCompatible +@ElementTypesAreNonnullByDefault public abstract class SloppyTearDown implements TearDown { private static final Logger logger = Logger.getLogger(SloppyTearDown.class.getName()); diff --git a/guava-testlib/src/com/google/common/testing/TearDown.java b/guava-testlib/src/com/google/common/testing/TearDown.java index 9582525a569f..877e5c2391fb 100644 --- a/guava-testlib/src/com/google/common/testing/TearDown.java +++ b/guava-testlib/src/com/google/common/testing/TearDown.java @@ -28,6 +28,7 @@ @Beta @FunctionalInterface @GwtCompatible +@ElementTypesAreNonnullByDefault public interface TearDown { /** * Performs a single tear-down operation. See test-libraries-for-java's {@code diff --git a/guava-testlib/src/com/google/common/testing/TearDownAccepter.java b/guava-testlib/src/com/google/common/testing/TearDownAccepter.java index bad1f1997867..52134256a4c4 100644 --- a/guava-testlib/src/com/google/common/testing/TearDownAccepter.java +++ b/guava-testlib/src/com/google/common/testing/TearDownAccepter.java @@ -17,8 +17,8 @@ package com.google.common.testing; import com.google.common.annotations.Beta; -import com.google.errorprone.annotations.DoNotMock; import com.google.common.annotations.GwtCompatible; +import com.google.errorprone.annotations.DoNotMock; /** * Any object which can accept registrations of {@link TearDown} instances. @@ -29,6 +29,7 @@ @Beta @DoNotMock("Implement with a lambda") @GwtCompatible +@ElementTypesAreNonnullByDefault public interface TearDownAccepter { /** * Registers a TearDown implementor which will be run after the test proper. diff --git a/guava-testlib/src/com/google/common/testing/TearDownStack.java b/guava-testlib/src/com/google/common/testing/TearDownStack.java index bab025a61fc2..1f7e855e0698 100644 --- a/guava-testlib/src/com/google/common/testing/TearDownStack.java +++ b/guava-testlib/src/com/google/common/testing/TearDownStack.java @@ -38,6 +38,7 @@ */ @Beta @GwtCompatible +@ElementTypesAreNonnullByDefault public class TearDownStack implements TearDownAccepter { private static final Logger logger = Logger.getLogger(TearDownStack.class.getName()); diff --git a/guava-testlib/src/com/google/common/testing/TestLogHandler.java b/guava-testlib/src/com/google/common/testing/TestLogHandler.java index 41dca2ec8b8d..e481a2f19e9b 100644 --- a/guava-testlib/src/com/google/common/testing/TestLogHandler.java +++ b/guava-testlib/src/com/google/common/testing/TestLogHandler.java @@ -16,6 +16,7 @@ package com.google.common.testing; + import com.google.common.annotations.GwtCompatible; import java.util.ArrayList; import java.util.Collections; @@ -52,6 +53,7 @@ * @since 10.0 */ @GwtCompatible +@ElementTypesAreNonnullByDefault public class TestLogHandler extends Handler { /** We will keep a private list of all logged records */ private final List list = new ArrayList<>(); @@ -59,7 +61,9 @@ public class TestLogHandler extends Handler { /** Adds the most recently logged record to our list. */ @Override public synchronized void publish(@Nullable LogRecord record) { - list.add(record); + if (record != null) { + list.add(record); + } } @Override diff --git a/guava-testlib/src/com/google/common/util/concurrent/testing/AbstractListenableFutureTest.java b/guava-testlib/src/com/google/common/util/concurrent/testing/AbstractListenableFutureTest.java index b5bec2c094bd..ee3f8ff776fe 100644 --- a/guava-testlib/src/com/google/common/util/concurrent/testing/AbstractListenableFutureTest.java +++ b/guava-testlib/src/com/google/common/util/concurrent/testing/AbstractListenableFutureTest.java @@ -31,6 +31,7 @@ import java.util.concurrent.TimeUnit; import java.util.concurrent.TimeoutException; import junit.framework.TestCase; +import org.checkerframework.checker.nullness.qual.Nullable; /** * Abstract test case parent for anything implementing {@link ListenableFuture}. Tests the two get @@ -63,7 +64,7 @@ protected void tearDown() throws Exception { /** Constructs a listenable future with a value available after the latch has counted down. */ protected abstract ListenableFuture createListenableFuture( - V value, Exception except, CountDownLatch waitOn); + V value, @Nullable Exception except, CountDownLatch waitOn); /** Tests that the {@link Future#get()} method blocks until a value is available. */ public void testGetBlocksUntilValueAvailable() throws Throwable { diff --git a/guava-testlib/test/com/google/common/collect/testing/IteratorTesterTest.java b/guava-testlib/test/com/google/common/collect/testing/IteratorTesterTest.java index 283f51efe66a..b44811e33f63 100644 --- a/guava-testlib/test/com/google/common/collect/testing/IteratorTesterTest.java +++ b/guava-testlib/test/com/google/common/collect/testing/IteratorTesterTest.java @@ -233,7 +233,7 @@ public void remove() { @Override public Integer next() { // We should throw here, but we won't! - return null; + return 0; } @Override diff --git a/guava-testlib/test/com/google/common/collect/testing/MapTestSuiteBuilderTests.java b/guava-testlib/test/com/google/common/collect/testing/MapTestSuiteBuilderTests.java index 5fd0d0368d96..84447b78941f 100644 --- a/guava-testlib/test/com/google/common/collect/testing/MapTestSuiteBuilderTests.java +++ b/guava-testlib/test/com/google/common/collect/testing/MapTestSuiteBuilderTests.java @@ -46,6 +46,7 @@ import junit.framework.Test; import junit.framework.TestCase; import junit.framework.TestSuite; +import org.checkerframework.checker.nullness.qual.Nullable; /** * Tests {@link MapTestSuiteBuilder} by using it against maps that have various negative behaviors. @@ -107,7 +108,7 @@ public Set> entrySet() { } @Override - public String put(String key, String value) { + public @Nullable String put(String key, String value) { checkNotNull(key); return map.put(key, value); } @@ -139,7 +140,7 @@ public int hashCode() { } @Override - public boolean equals(Object o) { + public boolean equals(@Nullable Object o) { return map.equals(o); } @@ -149,7 +150,7 @@ public String toString() { } @Override - public String remove(Object key) { + public @Nullable String remove(Object key) { return map.remove(key); } @@ -200,7 +201,7 @@ public String getKey() { } @Override - public boolean equals(Object obj) { + public boolean equals(@Nullable Object obj) { return next.equals(obj); } @@ -249,7 +250,7 @@ public int hashCode() { } @Override - public boolean equals(Object o) { + public boolean equals(@Nullable Object o) { return map.entrySet().equals(o); } @@ -260,7 +261,7 @@ public String toString() { } @Override - public String put(String key, String value) { + public @Nullable String put(String key, String value) { checkNotNull(value); return map.put(key, value); } diff --git a/guava-testlib/test/com/google/common/collect/testing/MyTester.java b/guava-testlib/test/com/google/common/collect/testing/MyTester.java index 4a247c1b191c..de79059a6033 100644 --- a/guava-testlib/test/com/google/common/collect/testing/MyTester.java +++ b/guava-testlib/test/com/google/common/collect/testing/MyTester.java @@ -16,6 +16,7 @@ package com.google.common.collect.testing; +import org.checkerframework.checker.nullness.qual.Nullable; import org.junit.Ignore; /** Support class added to a suite as part of {@link FeatureSpecificTestSuiteBuilderTest}. */ @@ -28,7 +29,7 @@ */ @SuppressWarnings("JUnit4ClassUsedInJUnit3") @Ignore -public final class MyTester extends AbstractTester { +public final class MyTester extends AbstractTester<@Nullable Void> { static int timesTestClassWasRun = 0; public void testNothing() { diff --git a/guava-testlib/test/com/google/common/testing/ArbitraryInstancesTest.java b/guava-testlib/test/com/google/common/testing/ArbitraryInstancesTest.java index dfd26a0c7345..ecca9c8735f1 100644 --- a/guava-testlib/test/com/google/common/testing/ArbitraryInstancesTest.java +++ b/guava-testlib/test/com/google/common/testing/ArbitraryInstancesTest.java @@ -131,6 +131,7 @@ import java.util.regex.MatchResult; import java.util.regex.Pattern; import junit.framework.TestCase; +import org.checkerframework.checker.nullness.qual.Nullable; /** * Unit test for {@link ArbitraryInstances}. @@ -481,7 +482,7 @@ private WithGenericConstant() {} } public static class WithNullConstant { - public static final WithNullConstant NULL = null; + public static final @Nullable WithNullConstant NULL = null; private WithNullConstant() {} } @@ -504,7 +505,7 @@ private static class WithPublicConstants { private static class FirstConstantIsNull { // To test that null constant is ignored @SuppressWarnings("unused") - public static final FirstConstantIsNull FIRST = null; + public static final @Nullable FirstConstantIsNull FIRST = null; public static final FirstConstantIsNull SECOND = new FirstConstantIsNull(); } diff --git a/guava-testlib/test/com/google/common/testing/ClassSanityTesterTest.java b/guava-testlib/test/com/google/common/testing/ClassSanityTesterTest.java index aee0b5b3d552..ac4e05fba983 100644 --- a/guava-testlib/test/com/google/common/testing/ClassSanityTesterTest.java +++ b/guava-testlib/test/com/google/common/testing/ClassSanityTesterTest.java @@ -45,6 +45,7 @@ * * @author Ben Yu */ +@AndroidIncompatible // NullPointerTester refuses to run for c.g.c under Android public class ClassSanityTesterTest extends TestCase { private final ClassSanityTester tester = new ClassSanityTester(); @@ -812,7 +813,7 @@ public int hashCode() { @Override @SuppressWarnings({"BoxedPrimitiveEquality", "NumericEquality"}) - public boolean equals(Object obj) { + public boolean equals(@Nullable Object obj) { if (obj instanceof SameIntegerInstance) { SameIntegerInstance that = (SameIntegerInstance) obj; return i == that.i; @@ -835,7 +836,7 @@ public int hashCode() { @Override @SuppressWarnings({"BoxedPrimitiveEquality", "NumericEquality"}) - public boolean equals(Object obj) { + public boolean equals(@Nullable Object obj) { if (obj instanceof SameLongInstance) { SameLongInstance that = (SameLongInstance) obj; return i == that.i; @@ -858,7 +859,7 @@ public int hashCode() { @Override @SuppressWarnings({"BoxedPrimitiveEquality", "NumericEquality"}) - public boolean equals(Object obj) { + public boolean equals(@Nullable Object obj) { if (obj instanceof SameFloatInstance) { SameFloatInstance that = (SameFloatInstance) obj; return i == that.i; @@ -881,7 +882,7 @@ public int hashCode() { @Override @SuppressWarnings({"BoxedPrimitiveEquality", "NumericEquality"}) - public boolean equals(Object obj) { + public boolean equals(@Nullable Object obj) { if (obj instanceof SameDoubleInstance) { SameDoubleInstance that = (SameDoubleInstance) obj; return i == that.i; @@ -904,7 +905,7 @@ public int hashCode() { @Override @SuppressWarnings({"BoxedPrimitiveEquality", "NumericEquality"}) - public boolean equals(Object obj) { + public boolean equals(@Nullable Object obj) { if (obj instanceof SameShortInstance) { SameShortInstance that = (SameShortInstance) obj; return i == that.i; @@ -927,7 +928,7 @@ public int hashCode() { @Override @SuppressWarnings({"BoxedPrimitiveEquality", "NumericEquality"}) - public boolean equals(Object obj) { + public boolean equals(@Nullable Object obj) { if (obj instanceof SameByteInstance) { SameByteInstance that = (SameByteInstance) obj; return i == that.i; @@ -950,7 +951,7 @@ public int hashCode() { @Override @SuppressWarnings("BoxedPrimitiveEquality") - public boolean equals(Object obj) { + public boolean equals(@Nullable Object obj) { if (obj instanceof SameCharacterInstance) { SameCharacterInstance that = (SameCharacterInstance) obj; return i == that.i; @@ -973,7 +974,7 @@ public int hashCode() { @Override @SuppressWarnings("BoxedPrimitiveEquality") - public boolean equals(Object obj) { + public boolean equals(@Nullable Object obj) { if (obj instanceof SameBooleanInstance) { SameBooleanInstance that = (SameBooleanInstance) obj; return i == that.i; @@ -995,7 +996,7 @@ public int hashCode() { } @Override - public boolean equals(Object obj) { + public boolean equals(@Nullable Object obj) { if (obj instanceof SameStringInstance) { SameStringInstance that = (SameStringInstance) obj; return s == that.s; @@ -1017,7 +1018,7 @@ public int hashCode() { } @Override - public boolean equals(Object obj) { + public boolean equals(@Nullable Object obj) { if (obj instanceof SameObjectInstance) { SameObjectInstance that = (SameObjectInstance) obj; return s == that.s; @@ -1039,7 +1040,7 @@ public int hashCode() { } @Override - public boolean equals(Object obj) { + public boolean equals(@Nullable Object obj) { if (obj instanceof SameInterfaceInstance) { SameInterfaceInstance that = (SameInterfaceInstance) obj; return s == that.s; @@ -1061,7 +1062,7 @@ public int hashCode() { } @Override - public boolean equals(Object obj) { + public boolean equals(@Nullable Object obj) { if (obj instanceof SameListInstance) { SameListInstance that = (SameListInstance) obj; return s == that.s; @@ -1093,7 +1094,7 @@ public int hashCode() { } @Override - public boolean equals(Object obj) { + public boolean equals(@Nullable Object obj) { if (obj instanceof UsesReferentialEquality) { UsesReferentialEquality that = (UsesReferentialEquality) obj; return s == that.s; @@ -1115,7 +1116,7 @@ public int hashCode() { } @Override - public boolean equals(Object obj) { + public boolean equals(@Nullable Object obj) { if (obj instanceof UsesEnum) { UsesEnum that = (UsesEnum) obj; return s == that.s; @@ -1288,7 +1289,7 @@ static class ConstructorParameterSingleValue { public ConstructorParameterSingleValue(@SuppressWarnings("unused") Singleton s) {} @Override - public boolean equals(Object obj) { + public boolean equals(@Nullable Object obj) { return obj instanceof ConstructorParameterSingleValue; } diff --git a/guava-testlib/test/com/google/common/testing/EqualsTesterTest.java b/guava-testlib/test/com/google/common/testing/EqualsTesterTest.java index 53c9bbe2d4a8..b6b1914eb5fd 100644 --- a/guava-testlib/test/com/google/common/testing/EqualsTesterTest.java +++ b/guava-testlib/test/com/google/common/testing/EqualsTesterTest.java @@ -23,6 +23,7 @@ import java.util.Set; import junit.framework.AssertionFailedError; import junit.framework.TestCase; +import org.checkerframework.checker.nullness.qual.Nullable; /** * Unit tests for {@link EqualsTester}. @@ -302,7 +303,7 @@ private static class ValidTestObject { } @Override - public boolean equals(Object o) { + public boolean equals(@Nullable Object o) { if (!(o instanceof ValidTestObject)) { return false; } @@ -337,7 +338,7 @@ private static class InvalidHashCodeObject { @SuppressWarnings("EqualsHashCode") @Override - public boolean equals(Object o) { + public boolean equals(@Nullable Object o) { if (!(o instanceof InvalidHashCodeObject)) { return false; } @@ -356,7 +357,7 @@ public boolean equals(Object o) { private static class NonReflexiveObject { @Override - public boolean equals(Object o) { + public boolean equals(@Nullable Object o) { return false; } @@ -370,7 +371,7 @@ public int hashCode() { private static class InvalidEqualsNullObject { @Override - public boolean equals(Object o) { + public boolean equals(@Nullable Object o) { return o == this || o == null; } @@ -384,7 +385,7 @@ public int hashCode() { private static class InvalidEqualsIncompatibleClassObject { @Override - public boolean equals(Object o) { + public boolean equals(@Nullable Object o) { return o != null; } @@ -413,7 +414,7 @@ NamedObject addPeers(String... names) { } @Override - public boolean equals(Object obj) { + public boolean equals(@Nullable Object obj) { if (obj instanceof NamedObject) { NamedObject that = (NamedObject) obj; return name.equals(that.name) || peerNames.contains(that.name); @@ -440,7 +441,7 @@ private EqualsBasedOnToString(String s) { } @Override - public boolean equals(Object obj) { + public boolean equals(@Nullable Object obj) { return obj != null && obj.toString().equals(toString()); } diff --git a/guava-testlib/test/com/google/common/testing/FakeTickerTest.java b/guava-testlib/test/com/google/common/testing/FakeTickerTest.java index 674f70351783..5120119db1bc 100644 --- a/guava-testlib/test/com/google/common/testing/FakeTickerTest.java +++ b/guava-testlib/test/com/google/common/testing/FakeTickerTest.java @@ -26,6 +26,7 @@ import java.util.concurrent.Future; import java.util.concurrent.TimeUnit; import junit.framework.TestCase; +import org.checkerframework.checker.nullness.qual.Nullable; /** * Unit test for {@link FakeTicker}. @@ -119,9 +120,9 @@ public void testConcurrentAdvance() throws Exception { int numberOfThreads = 64; runConcurrentTest( numberOfThreads, - new Callable() { + new Callable<@Nullable Void>() { @Override - public Void call() throws Exception { + public @Nullable Void call() throws Exception { // adds two nanoseconds to the ticker ticker.advance(1L); Thread.sleep(10); @@ -143,9 +144,9 @@ public void testConcurrentAutoIncrementStep() throws Exception { int numberOfThreads = 64; runConcurrentTest( numberOfThreads, - new Callable() { + new Callable<@Nullable Void>() { @Override - public Void call() throws Exception { + public @Nullable Void call() throws Exception { long unused = ticker.read(); return null; } @@ -156,7 +157,7 @@ public Void call() throws Exception { /** Runs {@code callable} concurrently {@code numberOfThreads} times. */ @GwtIncompatible // concurrency - private void runConcurrentTest(int numberOfThreads, final Callable callable) + private void runConcurrentTest(int numberOfThreads, final Callable<@Nullable Void> callable) throws Exception { ExecutorService executorService = Executors.newFixedThreadPool(numberOfThreads); final CountDownLatch startLatch = new CountDownLatch(numberOfThreads); @@ -165,9 +166,9 @@ private void runConcurrentTest(int numberOfThreads, final Callable callabl @SuppressWarnings("unused") // https://errorprone.info/bugpattern/FutureReturnValueIgnored Future possiblyIgnoredError = executorService.submit( - new Callable() { + new Callable<@Nullable Void>() { @Override - public Void call() throws Exception { + public @Nullable Void call() throws Exception { startLatch.countDown(); startLatch.await(); callable.call(); diff --git a/guava-testlib/test/com/google/common/testing/GcFinalizationTest.java b/guava-testlib/test/com/google/common/testing/GcFinalizationTest.java index 8748798c8ef1..7fe3a608036d 100644 --- a/guava-testlib/test/com/google/common/testing/GcFinalizationTest.java +++ b/guava-testlib/test/com/google/common/testing/GcFinalizationTest.java @@ -25,6 +25,7 @@ import java.util.concurrent.CountDownLatch; import java.util.concurrent.atomic.AtomicBoolean; import junit.framework.TestCase; +import org.checkerframework.checker.nullness.qual.Nullable; /** * Tests for {@link GcFinalization}. @@ -55,7 +56,7 @@ protected void finalize() { } public void testAwaitDone_Future() { - final SettableFuture future = SettableFuture.create(); + final SettableFuture<@Nullable Void> future = SettableFuture.create(); Object x = new Object() { @Override @@ -70,7 +71,7 @@ protected void finalize() { } public void testAwaitDone_Future_Cancel() { - final SettableFuture future = SettableFuture.create(); + final SettableFuture<@Nullable Void> future = SettableFuture.create(); Object x = new Object() { @Override @@ -162,7 +163,7 @@ public void testAwait_CountDownLatch_Interrupted() { public void testAwaitDone_Future_Interrupted_Interrupted() { Interruptenator interruptenator = new Interruptenator(Thread.currentThread()); try { - final SettableFuture future = SettableFuture.create(); + final SettableFuture<@Nullable Void> future = SettableFuture.create(); try { GcFinalization.awaitDone(future); fail("should throw"); diff --git a/guava-testlib/test/com/google/common/testing/NullPointerTesterTest.java b/guava-testlib/test/com/google/common/testing/NullPointerTesterTest.java index b7903674e645..050f05f6d97e 100644 --- a/guava-testlib/test/com/google/common/testing/NullPointerTesterTest.java +++ b/guava-testlib/test/com/google/common/testing/NullPointerTesterTest.java @@ -56,6 +56,7 @@ * @author Mick Killianey */ @SuppressWarnings("CheckReturnValue") +@AndroidIncompatible // NullPointerTester refuses to run for c.g.c under Android public class NullPointerTesterTest extends TestCase { /** Non-NPE RuntimeException. */ @@ -384,7 +385,7 @@ public TwoArg(Action actionWhenFirstParamIsNull, Action actionWhenSecondParamIsN } /** Method that decides how to react to parameters. */ - public void reactToNullParameters(Object first, Object second) { + public void reactToNullParameters(@Nullable Object first, @Nullable Object second) { if (first == null) { actionWhenFirstParamIsNull.act(); } @@ -1446,7 +1447,7 @@ private static String rootLocaleFormat(String format, Object... args) { static class OverridesEquals { @SuppressWarnings("EqualsHashCode") @Override - public boolean equals(Object o) { + public boolean equals(@Nullable Object o) { return true; } } diff --git a/guava-testlib/test/com/google/common/testing/SerializableTesterTest.java b/guava-testlib/test/com/google/common/testing/SerializableTesterTest.java index 753c4ab63118..e950c9968cd1 100644 --- a/guava-testlib/test/com/google/common/testing/SerializableTesterTest.java +++ b/guava-testlib/test/com/google/common/testing/SerializableTesterTest.java @@ -19,6 +19,7 @@ import java.io.Serializable; import junit.framework.AssertionFailedError; import junit.framework.TestCase; +import org.checkerframework.checker.nullness.qual.Nullable; /** * Tests for {@link SerializableTester}. @@ -82,7 +83,7 @@ private static class ClassWhichIsAlwaysEqualButHasDifferentHashcodes implements @SuppressWarnings("EqualsHashCode") @Override - public boolean equals(Object other) { + public boolean equals(@Nullable Object other) { return (other instanceof ClassWhichIsAlwaysEqualButHasDifferentHashcodes); } } @@ -91,7 +92,7 @@ private static class ObjectWhichIsEqualButChangesClass implements Serializable { private static final long serialVersionUID = 1L; @Override - public boolean equals(Object other) { + public boolean equals(@Nullable Object other) { return (other instanceof ObjectWhichIsEqualButChangesClass || other instanceof OtherForm); } @@ -106,7 +107,7 @@ private Object writeReplace() { private static class OtherForm implements Serializable { @Override - public boolean equals(Object other) { + public boolean equals(@Nullable Object other) { return (other instanceof ObjectWhichIsEqualButChangesClass || other instanceof OtherForm); } diff --git a/guava-testlib/test/com/google/common/testing/TearDownStackTest.java b/guava-testlib/test/com/google/common/testing/TearDownStackTest.java index 5a4f9ede4861..63e162f75ee9 100644 --- a/guava-testlib/test/com/google/common/testing/TearDownStackTest.java +++ b/guava-testlib/test/com/google/common/testing/TearDownStackTest.java @@ -20,6 +20,7 @@ import com.google.common.annotations.GwtCompatible; import junit.framework.TestCase; +import org.checkerframework.checker.nullness.qual.Nullable; /** @author Luiz-Otavio "Z" Zorzella */ @GwtCompatible @@ -146,7 +147,7 @@ public void tearDown() throws Exception { private static final class SimpleTearDown implements TearDown { boolean ran = false; - Callback callback = null; + @Nullable Callback callback = null; public SimpleTearDown() {} diff --git a/guava-testlib/test/com/google/common/testing/anotherpackage/ForwardingWrapperTesterTest.java b/guava-testlib/test/com/google/common/testing/anotherpackage/ForwardingWrapperTesterTest.java index 3782c00374d0..bd823f8f6b03 100644 --- a/guava-testlib/test/com/google/common/testing/anotherpackage/ForwardingWrapperTesterTest.java +++ b/guava-testlib/test/com/google/common/testing/anotherpackage/ForwardingWrapperTesterTest.java @@ -35,6 +35,7 @@ import java.util.regex.Pattern; import junit.framework.AssertionFailedError; import junit.framework.TestCase; +import org.checkerframework.checker.nullness.qual.Nullable; /** * Tests for {@link ForwardingWrapperTester}. Live in a different package to detect reflection @@ -120,7 +121,7 @@ public Runnable apply(final Runnable runnable) { @SuppressWarnings("EqualsHashCode") @Override - public boolean equals(Object o) { + public boolean equals(@Nullable Object o) { if (o instanceof ForwardingRunnable) { ForwardingRunnable that = (ForwardingRunnable) o; return runnable.equals(that.runnable); @@ -142,7 +143,7 @@ public void testEqualsAndHashCodeForwarded() { public Runnable apply(final Runnable runnable) { return new ForwardingRunnable(runnable) { @Override - public boolean equals(Object o) { + public boolean equals(@Nullable Object o) { if (o instanceof ForwardingRunnable) { ForwardingRunnable that = (ForwardingRunnable) o; return runnable.equals(that.runnable); @@ -531,7 +532,7 @@ public String toString() { private interface Equals { @Override - boolean equals(Object obj); + boolean equals(@Nullable Object obj); @Override int hashCode(); diff --git a/guava-tests/benchmark/com/google/common/cache/ChainBenchmark.java b/guava-tests/benchmark/com/google/common/cache/ChainBenchmark.java index b7dd39307885..592e80b64ae8 100644 --- a/guava-tests/benchmark/com/google/common/cache/ChainBenchmark.java +++ b/guava-tests/benchmark/com/google/common/cache/ChainBenchmark.java @@ -20,6 +20,7 @@ import com.google.caliper.Benchmark; import com.google.caliper.Param; import com.google.common.cache.LocalCache.Segment; +import org.checkerframework.checker.nullness.qual.Nullable; /** * Benchmark for {@code LocalCache.Segment.removeEntryFromChain}. @@ -34,7 +35,7 @@ public class ChainBenchmark { private Segment segment; private ReferenceEntry head; - private ReferenceEntry chain; + private @Nullable ReferenceEntry chain; @SuppressWarnings("GuardedBy") @BeforeExperiment diff --git a/guava-tests/benchmark/com/google/common/collect/MinMaxPriorityQueueBenchmark.java b/guava-tests/benchmark/com/google/common/collect/MinMaxPriorityQueueBenchmark.java index 239a033f7e4d..08755044c3e0 100644 --- a/guava-tests/benchmark/com/google/common/collect/MinMaxPriorityQueueBenchmark.java +++ b/guava-tests/benchmark/com/google/common/collect/MinMaxPriorityQueueBenchmark.java @@ -25,6 +25,7 @@ import java.util.PriorityQueue; import java.util.Queue; import java.util.Random; +import org.checkerframework.checker.nullness.qual.Nullable; /** * Benchmarks to compare performance of MinMaxPriorityQueue and PriorityQueue. @@ -90,7 +91,7 @@ protected Queue delegate() { } @Override - public T poll() { + public @Nullable T poll() { return mmHeap.pollLast(); } } diff --git a/guava-tests/benchmark/com/google/common/hash/ChecksumBenchmark.java b/guava-tests/benchmark/com/google/common/hash/ChecksumBenchmark.java index 0fa3e2a88ebd..4bb0031dc2b0 100644 --- a/guava-tests/benchmark/com/google/common/hash/ChecksumBenchmark.java +++ b/guava-tests/benchmark/com/google/common/hash/ChecksumBenchmark.java @@ -63,7 +63,7 @@ byte crc32Checksum(int reps) throws Exception { byte result = 0x01; for (int i = 0; i < reps; i++) { CRC32 checksum = new CRC32(); - checksum.update(testBytes); + checksum.update(testBytes, 0, testBytes.length); result = (byte) (result ^ checksum.getValue()); } return result; @@ -81,7 +81,7 @@ byte adler32Checksum(int reps) throws Exception { byte result = 0x01; for (int i = 0; i < reps; i++) { Adler32 checksum = new Adler32(); - checksum.update(testBytes); + checksum.update(testBytes, 0, testBytes.length); result = (byte) (result ^ checksum.getValue()); } return result; diff --git a/guava-tests/benchmark/com/google/common/io/CharStreamsCopyBenchmark.java b/guava-tests/benchmark/com/google/common/io/CharStreamsCopyBenchmark.java index 52532bb61ac2..0b9c87489c67 100644 --- a/guava-tests/benchmark/com/google/common/io/CharStreamsCopyBenchmark.java +++ b/guava-tests/benchmark/com/google/common/io/CharStreamsCopyBenchmark.java @@ -21,6 +21,7 @@ import java.io.IOException; import java.io.StringReader; import java.io.StringWriter; +import java.nio.Buffer; import java.nio.CharBuffer; import java.util.Random; @@ -40,10 +41,10 @@ long copy(Readable from, Appendable to) throws IOException { CharBuffer buf = CharStreams.createBuffer(); long total = 0; while (from.read(buf) != -1) { - buf.flip(); + ((Buffer) buf).flip(); to.append(buf); total += buf.remaining(); - buf.clear(); + ((Buffer) buf).clear(); } return total; } diff --git a/guava-tests/benchmark/com/google/common/util/concurrent/ExecutionListBenchmark.java b/guava-tests/benchmark/com/google/common/util/concurrent/ExecutionListBenchmark.java index ed278408338a..946b85109cb8 100644 --- a/guava-tests/benchmark/com/google/common/util/concurrent/ExecutionListBenchmark.java +++ b/guava-tests/benchmark/com/google/common/util/concurrent/ExecutionListBenchmark.java @@ -440,7 +440,7 @@ private static final class NewExecutionListWithoutReverse { static final Logger log = Logger.getLogger(NewExecutionListWithoutReverse.class.getName()); @GuardedBy("this") - private RunnableExecutorPair runnables; + private @Nullable RunnableExecutorPair runnables; @GuardedBy("this") private boolean executed; @@ -504,10 +504,10 @@ private static final class NewExecutionListQueue { static final Logger log = Logger.getLogger(NewExecutionListQueue.class.getName()); @GuardedBy("this") - private RunnableExecutorPair head; + private @Nullable RunnableExecutorPair head; @GuardedBy("this") - private RunnableExecutorPair tail; + private @Nullable RunnableExecutorPair tail; @GuardedBy("this") private boolean executed; @@ -671,7 +671,7 @@ private static class RunnableExecutorPair { // Volatile because this is written on one thread and read on another with no synchronization. @Nullable volatile RunnableExecutorPair next; - RunnableExecutorPair(Runnable runnable, Executor executor) { + RunnableExecutorPair(@Nullable Runnable runnable, @Nullable Executor executor) { this.runnable = runnable; this.executor = executor; } diff --git a/guava-tests/benchmark/com/google/common/util/concurrent/MonitorBasedArrayBlockingQueue.java b/guava-tests/benchmark/com/google/common/util/concurrent/MonitorBasedArrayBlockingQueue.java index 376118111e5d..7b9be17ec374 100644 --- a/guava-tests/benchmark/com/google/common/util/concurrent/MonitorBasedArrayBlockingQueue.java +++ b/guava-tests/benchmark/com/google/common/util/concurrent/MonitorBasedArrayBlockingQueue.java @@ -290,7 +290,7 @@ public void put(E e) throws InterruptedException { @CanIgnoreReturnValue @Override - public E poll() { + public @Nullable E poll() { final Monitor monitor = this.monitor; if (monitor.enterIf(notEmpty)) { try { @@ -305,7 +305,7 @@ public E poll() { @CanIgnoreReturnValue @Override - public E poll(long timeout, TimeUnit unit) throws InterruptedException { + public @Nullable E poll(long timeout, TimeUnit unit) throws InterruptedException { final Monitor monitor = this.monitor; if (monitor.enterWhen(notEmpty, timeout, unit)) { try { @@ -332,7 +332,7 @@ public E take() throws InterruptedException { @CanIgnoreReturnValue @Override - public E peek() { + public @Nullable E peek() { final Monitor monitor = this.monitor; if (monitor.enterIf(notEmpty)) { try { @@ -672,7 +672,7 @@ private class Itr implements Iterator { * we must return it in the following next() call even if it was in the process of being removed * when hasNext() was called. */ - private E nextItem; + private @Nullable E nextItem; /** * Index of element returned by most recent call to next. Reset to -1 if this element is deleted diff --git a/guava-tests/benchmark/com/google/common/util/concurrent/MonitorBasedPriorityBlockingQueue.java b/guava-tests/benchmark/com/google/common/util/concurrent/MonitorBasedPriorityBlockingQueue.java index f5d355d90ce7..25ec5812f361 100644 --- a/guava-tests/benchmark/com/google/common/util/concurrent/MonitorBasedPriorityBlockingQueue.java +++ b/guava-tests/benchmark/com/google/common/util/concurrent/MonitorBasedPriorityBlockingQueue.java @@ -217,7 +217,7 @@ public void put(E e) { @CanIgnoreReturnValue // pushed down from class to method @Override - public E poll() { + public @Nullable E poll() { final Monitor monitor = this.monitor; monitor.enter(); try { @@ -229,7 +229,7 @@ public E poll() { @CanIgnoreReturnValue // pushed down from class to method @Override - public E poll(long timeout, TimeUnit unit) throws InterruptedException { + public @Nullable E poll(long timeout, TimeUnit unit) throws InterruptedException { final Monitor monitor = this.monitor; if (monitor.enterWhen(notEmpty, timeout, unit)) { try { @@ -256,7 +256,7 @@ public E take() throws InterruptedException { @CanIgnoreReturnValue // pushed down from class to method @Override - public E peek() { + public @Nullable E peek() { final Monitor monitor = this.monitor; monitor.enter(); try { diff --git a/guava-tests/pom.xml b/guava-tests/pom.xml index a03dff23d554..84c982039b49 100644 --- a/guava-tests/pom.xml +++ b/guava-tests/pom.xml @@ -37,10 +37,6 @@ junit junit - - org.easymock - easymock - org.mockito mockito-core @@ -83,13 +79,6 @@ maven-jar-plugin - - default-jar - jar - - true - - create-test-jar test-jar diff --git a/guava-tests/test/com/google/common/base/AbstractIteratorTest.java b/guava-tests/test/com/google/common/base/AbstractIteratorTest.java index ad13b979071a..1aef3076e974 100644 --- a/guava-tests/test/com/google/common/base/AbstractIteratorTest.java +++ b/guava-tests/test/com/google/common/base/AbstractIteratorTest.java @@ -50,8 +50,7 @@ public Integer computeNext() { case 2: return endOfData(); default: - fail("Should not have been invoked again"); - return null; + throw new AssertionError("Should not have been invoked again"); } } }; @@ -85,12 +84,12 @@ public void testSneakyThrow() throws Exception { @Override public Integer computeNext() { if (haveBeenCalled) { - fail("Should not have been called again"); + throw new AssertionError("Should not have been called again"); } else { haveBeenCalled = true; sneakyThrow(new SomeCheckedException()); + throw new AssertionError(); // unreachable } - return null; // never reached } }; @@ -192,7 +191,7 @@ public void testReentrantHasNext() { @Override protected Integer computeNext() { boolean unused = hasNext(); - return null; + throw new AssertionError(); } }; try { diff --git a/guava-tests/test/com/google/common/base/FinalizableReferenceQueueTest.java b/guava-tests/test/com/google/common/base/FinalizableReferenceQueueTest.java index 045875a713a3..08ead4365d78 100644 --- a/guava-tests/test/com/google/common/base/FinalizableReferenceQueueTest.java +++ b/guava-tests/test/com/google/common/base/FinalizableReferenceQueueTest.java @@ -25,6 +25,7 @@ import java.util.Arrays; import java.util.Collections; import junit.framework.TestCase; +import org.checkerframework.checker.nullness.qual.Nullable; /** * Unit test for {@link FinalizableReferenceQueue}. @@ -37,7 +38,7 @@ @AndroidIncompatible public class FinalizableReferenceQueueTest extends TestCase { - private FinalizableReferenceQueue frq; + private @Nullable FinalizableReferenceQueue frq; @Override protected void tearDown() throws Exception { @@ -84,7 +85,7 @@ public void testThatFinalizerStops() { } /** If we don't keep a strong reference to the reference object, it won't be enqueued. */ - FinalizableWeakReference reference; + @Nullable FinalizableWeakReference reference; /** Create the FRQ in a method that goes out of scope so that we're sure it will be reclaimed. */ private void weaklyReferenceQueue() { diff --git a/guava-tests/test/com/google/common/base/FunctionsTest.java b/guava-tests/test/com/google/common/base/FunctionsTest.java index 1411c192b551..b854048d0eb1 100644 --- a/guava-tests/test/com/google/common/base/FunctionsTest.java +++ b/guava-tests/test/com/google/common/base/FunctionsTest.java @@ -27,6 +27,7 @@ import java.io.Serializable; import java.util.Map; import junit.framework.TestCase; +import org.checkerframework.checker.nullness.qual.Nullable; /** * Tests for {@link Functions}. @@ -273,9 +274,9 @@ public void testCompositionWildcard() { Functions.compose(numberToSpanish, japaneseToInteger); } - private static class HashCodeFunction implements Function { + private static class HashCodeFunction implements Function<@Nullable Object, Integer> { @Override - public Integer apply(Object o) { + public Integer apply(@Nullable Object o) { return (o == null) ? 0 : o.hashCode(); } } @@ -378,7 +379,7 @@ public Integer get() { } @Override - public boolean equals(Object obj) { + public boolean equals(@Nullable Object obj) { if (obj instanceof CountingSupplier) { return this.value == ((CountingSupplier) obj).value; } diff --git a/guava-tests/test/com/google/common/base/OptionalTest.java b/guava-tests/test/com/google/common/base/OptionalTest.java index f8d83337c5ec..a30dd591a3df 100644 --- a/guava-tests/test/com/google/common/base/OptionalTest.java +++ b/guava-tests/test/com/google/common/base/OptionalTest.java @@ -29,6 +29,7 @@ import java.util.List; import java.util.Set; import junit.framework.TestCase; +import org.checkerframework.checker.nullness.qual.Nullable; /** * Unit test for {@link Optional}. @@ -200,12 +201,13 @@ public void testTransform_present_functionReturnsNull() { Optional unused = Optional.of("a") .transform( - new Function() { - @Override - public String apply(String input) { - return null; - } - }); + (Function) + new Function() { + @Override + public @Nullable String apply(String input) { + return null; + } + }); fail("Should throw if Function returns null."); } catch (NullPointerException expected) { } @@ -216,12 +218,13 @@ public void testTransform_absent_functionReturnsNull() { Optional.absent(), Optional.absent() .transform( - new Function() { - @Override - public Object apply(Object input) { - return null; - } - })); + (Function) + new Function() { + @Override + public @Nullable Object apply(Object input) { + return null; + } + })); } public void testEqualsAndHashCode() { diff --git a/guava-tests/test/com/google/common/base/PreconditionsTest.java b/guava-tests/test/com/google/common/base/PreconditionsTest.java index eccbf2512a3f..e390b3d73b82 100644 --- a/guava-tests/test/com/google/common/base/PreconditionsTest.java +++ b/guava-tests/test/com/google/common/base/PreconditionsTest.java @@ -31,6 +31,7 @@ import java.util.List; import junit.framework.AssertionFailedError; import junit.framework.TestCase; +import org.checkerframework.checker.nullness.qual.Nullable; /** * Unit test for {@link Preconditions}. @@ -462,7 +463,8 @@ private void assertFailureCause( * @param sig The method signature */ @GwtIncompatible("ArbitraryInstances") - private Object[] getParametersForSignature(Object firstParam, ImmutableList> sig) { + private Object[] getParametersForSignature( + @Nullable Object firstParam, ImmutableList> sig) { Object[] params = new Object[sig.size()]; params[0] = firstParam; if (params.length > 1) { diff --git a/guava-tests/test/com/google/common/base/PredicatesTest.java b/guava-tests/test/com/google/common/base/PredicatesTest.java index 23922fdd3700..57db2fa0555d 100644 --- a/guava-tests/test/com/google/common/base/PredicatesTest.java +++ b/guava-tests/test/com/google/common/base/PredicatesTest.java @@ -36,6 +36,7 @@ import java.util.regex.Pattern; import junit.framework.AssertionFailedError; import junit.framework.TestCase; +import org.checkerframework.checker.nullness.qual.Nullable; /** * Unit test for {@link Predicates}. @@ -69,7 +70,7 @@ public int hashCode() { } @Override - public boolean equals(Object obj) { + public boolean equals(@Nullable Object obj) { return obj instanceof IsOdd; } diff --git a/guava-tests/test/com/google/common/cache/AbstractCacheTest.java b/guava-tests/test/com/google/common/cache/AbstractCacheTest.java index 13ef33db280d..8602e587324a 100644 --- a/guava-tests/test/com/google/common/cache/AbstractCacheTest.java +++ b/guava-tests/test/com/google/common/cache/AbstractCacheTest.java @@ -24,6 +24,7 @@ import java.util.List; import java.util.concurrent.atomic.AtomicReference; import junit.framework.TestCase; +import org.checkerframework.checker.nullness.qual.Nullable; /** * Unit test for {@link AbstractCache}. @@ -37,7 +38,7 @@ public void testGetIfPresent() { Cache cache = new AbstractCache() { @Override - public Object getIfPresent(Object key) { + public @Nullable Object getIfPresent(Object key) { return valueRef.get(); } }; @@ -53,7 +54,7 @@ public void testGetAllPresent_empty() { Cache cache = new AbstractCache() { @Override - public Object getIfPresent(Object key) { + public @Nullable Object getIfPresent(Object key) { return null; } }; @@ -67,7 +68,7 @@ public void testGetAllPresent_cached() { Cache cache = new AbstractCache() { @Override - public Object getIfPresent(Object key) { + public @Nullable Object getIfPresent(Object key) { return cachedKey.equals(key) ? cachedValue : null; } }; diff --git a/guava-tests/test/com/google/common/cache/AbstractLoadingCacheTest.java b/guava-tests/test/com/google/common/cache/AbstractLoadingCacheTest.java index c2ddef7b1522..84e004a8b200 100644 --- a/guava-tests/test/com/google/common/cache/AbstractLoadingCacheTest.java +++ b/guava-tests/test/com/google/common/cache/AbstractLoadingCacheTest.java @@ -23,6 +23,7 @@ import java.util.concurrent.ExecutionException; import java.util.concurrent.atomic.AtomicReference; import junit.framework.TestCase; +import org.checkerframework.checker.nullness.qual.Nullable; /** * Unit test for {@link AbstractLoadingCache}. @@ -46,7 +47,7 @@ public Object get(Object key) throws ExecutionException { } @Override - public Object getIfPresent(Object key) { + public @Nullable Object getIfPresent(Object key) { return valueRef.get(); } }; @@ -78,7 +79,7 @@ public Object get(Object key) throws ExecutionException { } @Override - public Object getIfPresent(Object key) { + public @Nullable Object getIfPresent(Object key) { return valueRef.get(); } }; @@ -110,7 +111,7 @@ public Object get(Object key) throws ExecutionException { } @Override - public Object getIfPresent(Object key) { + public @Nullable Object getIfPresent(Object key) { return valueRef.get(); } }; @@ -142,7 +143,7 @@ public Object get(Object key) throws ExecutionException { } @Override - public Object getIfPresent(Object key) { + public @Nullable Object getIfPresent(Object key) { return valueRef.get(); } }; diff --git a/guava-tests/test/com/google/common/cache/CacheBuilderFactory.java b/guava-tests/test/com/google/common/cache/CacheBuilderFactory.java index 5426ced0eab3..77a4734fbba4 100644 --- a/guava-tests/test/com/google/common/cache/CacheBuilderFactory.java +++ b/guava-tests/test/com/google/common/cache/CacheBuilderFactory.java @@ -125,10 +125,10 @@ public Optional apply(@Nullable Object obj) { } }; - private static final Function, Object> OPTIONAL_TO_NULLABLE = - new Function, Object>() { + private static final Function, @Nullable Object> OPTIONAL_TO_NULLABLE = + new Function, @Nullable Object>() { @Override - public Object apply(Optional optional) { + public @Nullable Object apply(Optional optional) { return optional.orNull(); } }; @@ -158,14 +158,14 @@ public List apply(List> objs) { } private CacheBuilder createCacheBuilder( - Integer concurrencyLevel, - Integer initialCapacity, - Integer maximumSize, - DurationSpec expireAfterWrite, - DurationSpec expireAfterAccess, - DurationSpec refresh, - Strength keyStrength, - Strength valueStrength) { + @Nullable Integer concurrencyLevel, + @Nullable Integer initialCapacity, + @Nullable Integer maximumSize, + @Nullable DurationSpec expireAfterWrite, + @Nullable DurationSpec expireAfterAccess, + @Nullable DurationSpec refresh, + @Nullable Strength keyStrength, + @Nullable Strength valueStrength) { CacheBuilder builder = CacheBuilder.newBuilder(); if (concurrencyLevel != null) { @@ -214,7 +214,7 @@ public int hashCode() { } @Override - public boolean equals(Object o) { + public boolean equals(@Nullable Object o) { if (o instanceof DurationSpec) { DurationSpec that = (DurationSpec) o; return unit.toNanos(duration) == that.unit.toNanos(that.duration); diff --git a/guava-tests/test/com/google/common/cache/ForwardingCacheTest.java b/guava-tests/test/com/google/common/cache/ForwardingCacheTest.java index 412ff7802f1a..639a208bd5cd 100644 --- a/guava-tests/test/com/google/common/cache/ForwardingCacheTest.java +++ b/guava-tests/test/com/google/common/cache/ForwardingCacheTest.java @@ -104,7 +104,7 @@ public void testCleanUp() { private static class OnlyGet extends ForwardingCache { @Override protected Cache delegate() { - return null; + throw new AssertionError(); } } } diff --git a/guava-tests/test/com/google/common/cache/ForwardingLoadingCacheTest.java b/guava-tests/test/com/google/common/cache/ForwardingLoadingCacheTest.java index d78db2d375cc..fe41612132b1 100644 --- a/guava-tests/test/com/google/common/cache/ForwardingLoadingCacheTest.java +++ b/guava-tests/test/com/google/common/cache/ForwardingLoadingCacheTest.java @@ -112,7 +112,7 @@ public void testCleanUp() { private static class OnlyGet extends ForwardingLoadingCache { @Override protected LoadingCache delegate() { - return null; + throw new AssertionError(); } } } diff --git a/guava-tests/test/com/google/common/cache/LocalCacheTest.java b/guava-tests/test/com/google/common/cache/LocalCacheTest.java index cd661ed1dc1f..7cc67e840dc2 100644 --- a/guava-tests/test/com/google/common/cache/LocalCacheTest.java +++ b/guava-tests/test/com/google/common/cache/LocalCacheTest.java @@ -77,6 +77,7 @@ import junit.framework.Test; import junit.framework.TestCase; import junit.framework.TestSuite; +import org.checkerframework.checker.nullness.qual.Nullable; /** @author Charles Fry */ @SuppressWarnings("GuardedBy") // TODO(b/35466881): Fix or suppress. @@ -2744,7 +2745,7 @@ private static Iterable> allKeyValueStrengthMakers( // entries and values private static DummyEntry createDummyEntry( - K key, int hash, V value, ReferenceEntry next) { + K key, int hash, V value, @Nullable ReferenceEntry next) { DummyEntry entry = DummyEntry.create(key, hash, next); DummyValueReference valueRef = DummyValueReference.create(value); entry.setValueReference(valueRef); @@ -2752,7 +2753,7 @@ private static DummyEntry createDummyEntry( } static class DummyEntry implements ReferenceEntry { - private K key; + private @Nullable K key; private final int hash; private final ReferenceEntry next; @@ -2762,7 +2763,8 @@ public DummyEntry(K key, int hash, ReferenceEntry next) { this.next = next; } - public static DummyEntry create(K key, int hash, ReferenceEntry next) { + public static DummyEntry create( + K key, int hash, @Nullable ReferenceEntry next) { return new DummyEntry<>(key, hash, next); } @@ -2871,7 +2873,7 @@ public void setPreviousInWriteQueue(ReferenceEntry previous) { } static class DummyValueReference implements ValueReference { - private V value; + private @Nullable V value; boolean loading = false; public DummyValueReference() { @@ -2901,7 +2903,7 @@ public int getWeight() { } @Override - public ReferenceEntry getEntry() { + public @Nullable ReferenceEntry getEntry() { return null; } @@ -2951,7 +2953,7 @@ public int hashCode() { } @Override - public boolean equals(Object o) { + public boolean equals(@Nullable Object o) { return (o instanceof SerializableCacheLoader); } } @@ -2967,7 +2969,7 @@ public int hashCode() { } @Override - public boolean equals(Object o) { + public boolean equals(@Nullable Object o) { return (o instanceof SerializableRemovalListener); } } @@ -2984,7 +2986,7 @@ public int hashCode() { } @Override - public boolean equals(Object o) { + public boolean equals(@Nullable Object o) { return (o instanceof SerializableTicker); } } @@ -3001,7 +3003,7 @@ public int hashCode() { } @Override - public boolean equals(Object o) { + public boolean equals(@Nullable Object o) { return (o instanceof SerializableWeigher); } } diff --git a/guava-tests/test/com/google/common/collect/AbstractImmutableSetTest.java b/guava-tests/test/com/google/common/collect/AbstractImmutableSetTest.java index d7a8d16cadf1..705b15a48082 100644 --- a/guava-tests/test/com/google/common/collect/AbstractImmutableSetTest.java +++ b/guava-tests/test/com/google/common/collect/AbstractImmutableSetTest.java @@ -33,6 +33,7 @@ import java.util.List; import java.util.Set; import junit.framework.TestCase; +import org.checkerframework.checker.nullness.qual.Nullable; /** * Base class for {@link ImmutableSet} and {@link ImmutableSortedSet} tests. @@ -59,7 +60,7 @@ public abstract class AbstractImmutableSetTest extends TestCase { protected abstract > Set of( E e1, E e2, E e3, E e4, E e5, E e6, E... rest); - protected abstract > Set copyOf(E[] elements); + protected abstract > Set copyOf(E @Nullable [] elements); protected abstract > Set copyOf( Collection elements); diff --git a/guava-tests/test/com/google/common/collect/AbstractIteratorTest.java b/guava-tests/test/com/google/common/collect/AbstractIteratorTest.java index 72a4be833c42..60ad785c9229 100644 --- a/guava-tests/test/com/google/common/collect/AbstractIteratorTest.java +++ b/guava-tests/test/com/google/common/collect/AbstractIteratorTest.java @@ -51,8 +51,7 @@ public Integer computeNext() { case 2: return endOfData(); default: - fail("Should not have been invoked again"); - return null; + throw new AssertionError("Should not have been invoked again"); } } }; @@ -97,8 +96,7 @@ public Integer computeNext() { case 2: return endOfData(); default: - fail("Should not have been invoked again"); - return null; + throw new AssertionError("Should not have been invoked again"); } } }; @@ -188,12 +186,12 @@ public void testSneakyThrow() throws Exception { @Override public Integer computeNext() { if (haveBeenCalled) { - fail("Should not have been called again"); + throw new AssertionError("Should not have been called again"); } else { haveBeenCalled = true; sneakyThrow(new SomeCheckedException()); + throw new AssertionError(); // unreachable } - return null; // never reached } }; @@ -281,7 +279,7 @@ public void testReentrantHasNext() { @Override protected Integer computeNext() { boolean unused = hasNext(); - return null; + throw new AssertionError(); } }; try { diff --git a/guava-tests/test/com/google/common/collect/AbstractMapEntryTest.java b/guava-tests/test/com/google/common/collect/AbstractMapEntryTest.java index 63c17dedaeca..6e6b25497235 100644 --- a/guava-tests/test/com/google/common/collect/AbstractMapEntryTest.java +++ b/guava-tests/test/com/google/common/collect/AbstractMapEntryTest.java @@ -20,6 +20,7 @@ import java.util.Collections; import java.util.Map.Entry; import junit.framework.TestCase; +import org.checkerframework.checker.nullness.qual.Nullable; /** * Tests for {@code AbstractMapEntry}. @@ -28,8 +29,8 @@ */ @GwtCompatible public class AbstractMapEntryTest extends TestCase { - private static final String NK = null; - private static final Integer NV = null; + private static final @Nullable String NK = null; + private static final @Nullable Integer NV = null; private static Entry entry(final K key, final V value) { return new AbstractMapEntry() { diff --git a/guava-tests/test/com/google/common/collect/AbstractSequentialIteratorTest.java b/guava-tests/test/com/google/common/collect/AbstractSequentialIteratorTest.java index f63f01ae3775..16a9ba781722 100644 --- a/guava-tests/test/com/google/common/collect/AbstractSequentialIteratorTest.java +++ b/guava-tests/test/com/google/common/collect/AbstractSequentialIteratorTest.java @@ -26,6 +26,7 @@ import java.util.NoSuchElementException; import junit.framework.AssertionFailedError; import junit.framework.TestCase; +import org.checkerframework.checker.nullness.qual.Nullable; /** Tests for {@link AbstractSequentialIterator}. */ @GwtCompatible(emulated = true) @@ -60,7 +61,7 @@ public Iterator iterator() { Iterator powersOfTwo = new AbstractSequentialIterator(1) { @Override - protected Integer computeNext(Integer previous) { + protected @Nullable Integer computeNext(Integer previous) { return (previous == 1 << 30) ? null : previous * 2; } }; @@ -137,7 +138,7 @@ public void testBroken() { private static Iterator newDoubler(int first, final int last) { return new AbstractSequentialIterator(first) { @Override - protected Integer computeNext(Integer previous) { + protected @Nullable Integer computeNext(Integer previous) { return (previous == last) ? null : previous * 2; } }; diff --git a/guava-tests/test/com/google/common/collect/CollectionBenchmarkSampleData.java b/guava-tests/test/com/google/common/collect/CollectionBenchmarkSampleData.java index cdc7a91cc1e6..0504e6a745f6 100644 --- a/guava-tests/test/com/google/common/collect/CollectionBenchmarkSampleData.java +++ b/guava-tests/test/com/google/common/collect/CollectionBenchmarkSampleData.java @@ -22,6 +22,7 @@ import java.util.Collections; import java.util.List; import java.util.Set; +import org.checkerframework.checker.nullness.qual.Nullable; /** * Package up sample data for common collections benchmarking. @@ -111,7 +112,7 @@ static class Element implements Comparable { } @Override - public boolean equals(Object obj) { + public boolean equals(@Nullable Object obj) { return this == obj || (obj instanceof Element && ((Element) obj).hash == hash); } @@ -137,7 +138,7 @@ static class SlowElement extends Element { } @Override - public boolean equals(Object obj) { + public boolean equals(@Nullable Object obj) { return slowItDown() != 1 && super.equals(obj); } diff --git a/guava-tests/test/com/google/common/collect/Collections2Test.java b/guava-tests/test/com/google/common/collect/Collections2Test.java index 4b8761893013..2cf05f632cd5 100644 --- a/guava-tests/test/com/google/common/collect/Collections2Test.java +++ b/guava-tests/test/com/google/common/collect/Collections2Test.java @@ -16,16 +16,15 @@ package com.google.common.collect; +import static com.google.common.base.Strings.isNullOrEmpty; import static com.google.common.collect.Iterables.concat; import static com.google.common.collect.Lists.newArrayList; import static com.google.common.collect.Lists.newLinkedList; import static com.google.common.truth.Truth.assertThat; -import static java.util.Arrays.asList; import static java.util.Collections.nCopies; import com.google.common.annotations.GwtCompatible; import com.google.common.annotations.GwtIncompatible; -import com.google.common.base.Function; import com.google.common.base.Predicate; import com.google.common.collect.testing.CollectionTestSuiteBuilder; import com.google.common.collect.testing.TestStringCollectionGenerator; @@ -40,6 +39,7 @@ import junit.framework.Test; import junit.framework.TestCase; import junit.framework.TestSuite; +import org.checkerframework.checker.nullness.qual.Nullable; /** * Tests for {@link Collections2}. @@ -62,29 +62,10 @@ public static Test suite() { return suite; } - static final Predicate NOT_YYY_ZZZ = - new Predicate() { - @Override - public boolean apply(String input) { - return !"yyy".equals(input) && !"zzz".equals(input); - } - }; - - static final Predicate LENGTH_1 = - new Predicate() { - @Override - public boolean apply(String input) { - return input.length() == 1; - } - }; - - static final Predicate STARTS_WITH_VOWEL = - new Predicate() { - @Override - public boolean apply(String input) { - return asList('a', 'e', 'i', 'o', 'u').contains(input.charAt(0)); - } - }; + static final Predicate<@Nullable String> NOT_YYY_ZZZ = + input -> !"yyy".equals(input) && !"zzz".equals(input); + + static final Predicate LENGTH_1 = input -> input.length() == 1; @GwtIncompatible // suite private static Test testsForFilter() { @@ -200,25 +181,18 @@ public Collection create(String[] elements) { .createTestSuite(); } - private static final Function REMOVE_FIRST_CHAR = - new Function() { - @Override - public String apply(String from) { - return ((from == null) || "".equals(from)) ? null : from.substring(1); - } - }; - @GwtIncompatible // suite private static Test testsForTransform() { return CollectionTestSuiteBuilder.using( new TestStringCollectionGenerator() { @Override - public Collection create(String[] elements) { - List list = newArrayList(); + public Collection<@Nullable String> create(@Nullable String[] elements) { + List<@Nullable String> list = newArrayList(); for (String element : elements) { list.add((element == null) ? null : "q" + element); } - return Collections2.transform(list, REMOVE_FIRST_CHAR); + return Collections2.transform( + list, from -> isNullOrEmpty(from) ? null : from.substring(1)); } }) .named("Collections2.transform") diff --git a/guava-tests/test/com/google/common/collect/ComparatorsTest.java b/guava-tests/test/com/google/common/collect/ComparatorsTest.java index 3f568c11555d..473f1d753955 100644 --- a/guava-tests/test/com/google/common/collect/ComparatorsTest.java +++ b/guava-tests/test/com/google/common/collect/ComparatorsTest.java @@ -30,6 +30,7 @@ import java.util.Comparator; import java.util.Optional; import junit.framework.TestCase; +import org.checkerframework.checker.nullness.qual.Nullable; /** * Tests for {@code Comparators}. @@ -161,7 +162,7 @@ public int hashCode() { } @Override - public boolean equals(Object o) { + public boolean equals(@Nullable Object o) { return (o instanceof Foo) && ((Foo) o).value.equals(value); } diff --git a/guava-tests/test/com/google/common/collect/FauxveridesTest.java b/guava-tests/test/com/google/common/collect/FauxveridesTest.java index ff0b86bf95a2..f7eda67d50a6 100644 --- a/guava-tests/test/com/google/common/collect/FauxveridesTest.java +++ b/guava-tests/test/com/google/common/collect/FauxveridesTest.java @@ -34,6 +34,7 @@ import java.util.Map; import java.util.Set; import junit.framework.TestCase; +import org.checkerframework.checker.nullness.qual.Nullable; /** * Tests that all {@code public static} methods "inherited" from superclasses are "overridden" in @@ -176,7 +177,7 @@ private static final class MethodSignature implements Comparable from) { } @Override - public boolean equals(Object obj) { + public boolean equals(@Nullable Object obj) { if (obj instanceof TypeSignature) { TypeSignature other = (TypeSignature) obj; return parameterSignatures.equals(other.parameterSignatures); @@ -251,7 +252,7 @@ private static final class TypeParameterSignature { } @Override - public boolean equals(Object obj) { + public boolean equals(@Nullable Object obj) { if (obj instanceof TypeParameterSignature) { TypeParameterSignature other = (TypeParameterSignature) obj; /* diff --git a/guava-tests/test/com/google/common/collect/ForwardingListTest.java b/guava-tests/test/com/google/common/collect/ForwardingListTest.java index 7d3466eedd2c..881228260edd 100644 --- a/guava-tests/test/com/google/common/collect/ForwardingListTest.java +++ b/guava-tests/test/com/google/common/collect/ForwardingListTest.java @@ -31,6 +31,7 @@ import junit.framework.Test; import junit.framework.TestCase; import junit.framework.TestSuite; +import org.checkerframework.checker.nullness.qual.Nullable; /** * Tests for {@code ForwardingList}. @@ -112,7 +113,7 @@ public String toString() { } @Override - public boolean equals(Object object) { + public boolean equals(@Nullable Object object) { return standardEquals(object); } diff --git a/guava-tests/test/com/google/common/collect/ForwardingMapTest.java b/guava-tests/test/com/google/common/collect/ForwardingMapTest.java index cf2ed0d3b5f1..6654f54962d5 100644 --- a/guava-tests/test/com/google/common/collect/ForwardingMapTest.java +++ b/guava-tests/test/com/google/common/collect/ForwardingMapTest.java @@ -47,6 +47,7 @@ import junit.framework.Test; import junit.framework.TestCase; import junit.framework.TestSuite; +import org.checkerframework.checker.nullness.qual.Nullable; /** * Unit test for {@link ForwardingMap}. @@ -83,12 +84,12 @@ public void putAll(Map map) { } @Override - public V remove(Object object) { + public @Nullable V remove(Object object) { return standardRemove(object); } @Override - public boolean equals(Object object) { + public boolean equals(@Nullable Object object) { return standardEquals(object); } @@ -335,7 +336,7 @@ protected Map delegate() { "java.util.function.Consumer", "accept", "java.util.function.IntFunction", "apply"); - private static Object getDefaultValue(final TypeToken type) { + private static @Nullable Object getDefaultValue(final TypeToken type) { Class rawType = type.getRawType(); Object defaultValue = ArbitraryInstances.get(rawType); if (defaultValue != null) { diff --git a/guava-tests/test/com/google/common/collect/ForwardingMultisetTest.java b/guava-tests/test/com/google/common/collect/ForwardingMultisetTest.java index 327885d538f4..c2d78300514e 100644 --- a/guava-tests/test/com/google/common/collect/ForwardingMultisetTest.java +++ b/guava-tests/test/com/google/common/collect/ForwardingMultisetTest.java @@ -33,6 +33,7 @@ import junit.framework.Test; import junit.framework.TestCase; import junit.framework.TestSuite; +import org.checkerframework.checker.nullness.qual.Nullable; /** * Tests for {@link ForwardingMultiset}. @@ -115,7 +116,7 @@ public String toString() { } @Override - public boolean equals(Object object) { + public boolean equals(@Nullable Object object) { return standardEquals(object); } @@ -277,7 +278,7 @@ public boolean retainAll(Collection collection) { } @Override - public boolean equals(Object object) { + public boolean equals(@Nullable Object object) { throw new UnsupportedOperationException(); } diff --git a/guava-tests/test/com/google/common/collect/ForwardingNavigableMapTest.java b/guava-tests/test/com/google/common/collect/ForwardingNavigableMapTest.java index b70cd0718ef1..41e29ec8807f 100644 --- a/guava-tests/test/com/google/common/collect/ForwardingNavigableMapTest.java +++ b/guava-tests/test/com/google/common/collect/ForwardingNavigableMapTest.java @@ -39,6 +39,7 @@ import junit.framework.Test; import junit.framework.TestCase; import junit.framework.TestSuite; +import org.checkerframework.checker.nullness.qual.Nullable; /** * Tests for {@code ForwardingNavigableMap}. @@ -75,12 +76,12 @@ public void putAll(Map map) { } @Override - public V remove(Object object) { + public @Nullable V remove(Object object) { return standardRemove(object); } @Override - public boolean equals(Object object) { + public boolean equals(@Nullable Object object) { return standardEquals(object); } @@ -134,47 +135,47 @@ public SortedMap subMap(K fromKey, K toKey) { } @Override - public Entry lowerEntry(K key) { + public @Nullable Entry lowerEntry(K key) { return standardLowerEntry(key); } @Override - public K lowerKey(K key) { + public @Nullable K lowerKey(K key) { return standardLowerKey(key); } @Override - public Entry floorEntry(K key) { + public @Nullable Entry floorEntry(K key) { return standardFloorEntry(key); } @Override - public K floorKey(K key) { + public @Nullable K floorKey(K key) { return standardFloorKey(key); } @Override - public Entry ceilingEntry(K key) { + public @Nullable Entry ceilingEntry(K key) { return standardCeilingEntry(key); } @Override - public K ceilingKey(K key) { + public @Nullable K ceilingKey(K key) { return standardCeilingKey(key); } @Override - public Entry higherEntry(K key) { + public @Nullable Entry higherEntry(K key) { return standardHigherEntry(key); } @Override - public K higherKey(K key) { + public @Nullable K higherKey(K key) { return standardHigherKey(key); } @Override - public Entry firstEntry() { + public @Nullable Entry firstEntry() { return standardFirstEntry(); } @@ -184,12 +185,12 @@ public Entry firstEntry() { */ @Override - public Entry pollFirstEntry() { + public @Nullable Entry pollFirstEntry() { return standardPollFirstEntry(); } @Override - public Entry pollLastEntry() { + public @Nullable Entry pollLastEntry() { return standardPollLastEntry(); } @@ -242,7 +243,7 @@ protected NavigableMap delegate() { } @Override - public Entry lastEntry() { + public @Nullable Entry lastEntry() { return standardLastEntry(); } } diff --git a/guava-tests/test/com/google/common/collect/ForwardingNavigableSetTest.java b/guava-tests/test/com/google/common/collect/ForwardingNavigableSetTest.java index fd47bf8fd53c..2fbc42ae7de3 100644 --- a/guava-tests/test/com/google/common/collect/ForwardingNavigableSetTest.java +++ b/guava-tests/test/com/google/common/collect/ForwardingNavigableSetTest.java @@ -34,6 +34,7 @@ import junit.framework.Test; import junit.framework.TestCase; import junit.framework.TestSuite; +import org.checkerframework.checker.nullness.qual.Nullable; /** * Tests for {@code ForwardingNavigableSet}. @@ -54,7 +55,7 @@ protected NavigableSet delegate() { } @Override - public boolean equals(Object object) { + public boolean equals(@Nullable Object object) { return standardEquals(object); } @@ -119,32 +120,32 @@ public SortedSet subSet(T fromElement, T toElement) { } @Override - public T lower(T e) { + public @Nullable T lower(T e) { return standardLower(e); } @Override - public T floor(T e) { + public @Nullable T floor(T e) { return standardFloor(e); } @Override - public T ceiling(T e) { + public @Nullable T ceiling(T e) { return standardCeiling(e); } @Override - public T higher(T e) { + public @Nullable T higher(T e) { return standardHigher(e); } @Override - public T pollFirst() { + public @Nullable T pollFirst() { return standardPollFirst(); } @Override - public T pollLast() { + public @Nullable T pollLast() { return standardPollLast(); } diff --git a/guava-tests/test/com/google/common/collect/ForwardingQueueTest.java b/guava-tests/test/com/google/common/collect/ForwardingQueueTest.java index 248f132777a4..033a96d9e310 100644 --- a/guava-tests/test/com/google/common/collect/ForwardingQueueTest.java +++ b/guava-tests/test/com/google/common/collect/ForwardingQueueTest.java @@ -29,6 +29,7 @@ import junit.framework.Test; import junit.framework.TestCase; import junit.framework.TestSuite; +import org.checkerframework.checker.nullness.qual.Nullable; /** * Tests for {@code ForwardingQueue}. @@ -106,12 +107,12 @@ public boolean offer(T o) { } @Override - public T peek() { + public @Nullable T peek() { return standardPeek(); } @Override - public T poll() { + public @Nullable T poll() { return standardPoll(); } } diff --git a/guava-tests/test/com/google/common/collect/ForwardingSetTest.java b/guava-tests/test/com/google/common/collect/ForwardingSetTest.java index 89bf7b31d728..53d12c36afb1 100644 --- a/guava-tests/test/com/google/common/collect/ForwardingSetTest.java +++ b/guava-tests/test/com/google/common/collect/ForwardingSetTest.java @@ -31,6 +31,7 @@ import junit.framework.Test; import junit.framework.TestCase; import junit.framework.TestSuite; +import org.checkerframework.checker.nullness.qual.Nullable; /** * Tests for {@code ForwardingSet}. @@ -52,7 +53,7 @@ protected Set delegate() { } @Override - public boolean equals(Object object) { + public boolean equals(@Nullable Object object) { return standardEquals(object); } diff --git a/guava-tests/test/com/google/common/collect/ForwardingSortedMapTest.java b/guava-tests/test/com/google/common/collect/ForwardingSortedMapTest.java index 59e7ece53eac..a4d829085d42 100644 --- a/guava-tests/test/com/google/common/collect/ForwardingSortedMapTest.java +++ b/guava-tests/test/com/google/common/collect/ForwardingSortedMapTest.java @@ -36,6 +36,7 @@ import junit.framework.Test; import junit.framework.TestCase; import junit.framework.TestSuite; +import org.checkerframework.checker.nullness.qual.Nullable; /** * Tests for {@code ForwardingSortedMap}. @@ -71,12 +72,12 @@ public void putAll(Map map) { } @Override - public V remove(Object object) { + public @Nullable V remove(Object object) { return standardRemove(object); } @Override - public boolean equals(Object object) { + public boolean equals(@Nullable Object object) { return standardEquals(object); } diff --git a/guava-tests/test/com/google/common/collect/ForwardingSortedSetTest.java b/guava-tests/test/com/google/common/collect/ForwardingSortedSetTest.java index b83ee6b97112..417370488726 100644 --- a/guava-tests/test/com/google/common/collect/ForwardingSortedSetTest.java +++ b/guava-tests/test/com/google/common/collect/ForwardingSortedSetTest.java @@ -31,6 +31,7 @@ import junit.framework.Test; import junit.framework.TestCase; import junit.framework.TestSuite; +import org.checkerframework.checker.nullness.qual.Nullable; /** * Tests for {@code ForwardingSortedSet}. @@ -51,7 +52,7 @@ protected SortedSet delegate() { } @Override - public boolean equals(Object object) { + public boolean equals(@Nullable Object object) { return standardEquals(object); } diff --git a/guava-tests/test/com/google/common/collect/ImmutableClassToInstanceMapTest.java b/guava-tests/test/com/google/common/collect/ImmutableClassToInstanceMapTest.java index bce73b8f759b..b9696301fe5f 100644 --- a/guava-tests/test/com/google/common/collect/ImmutableClassToInstanceMapTest.java +++ b/guava-tests/test/com/google/common/collect/ImmutableClassToInstanceMapTest.java @@ -33,6 +33,7 @@ import junit.framework.Test; import junit.framework.TestCase; import junit.framework.TestSuite; +import org.checkerframework.checker.nullness.qual.Nullable; /** * Unit test for {@link ImmutableClassToInstanceMap}. @@ -213,7 +214,7 @@ static final class Impl implements One, Two, Three, Four, Five, Serializable { } @Override - public boolean equals(Object obj) { + public boolean equals(@Nullable Object obj) { return obj instanceof Impl && value == ((Impl) obj).value; } diff --git a/guava-tests/test/com/google/common/collect/ImmutableMapTest.java b/guava-tests/test/com/google/common/collect/ImmutableMapTest.java index 34e0e55bc0a3..3e4390bd4991 100644 --- a/guava-tests/test/com/google/common/collect/ImmutableMapTest.java +++ b/guava-tests/test/com/google/common/collect/ImmutableMapTest.java @@ -65,6 +65,7 @@ import junit.framework.Test; import junit.framework.TestCase; import junit.framework.TestSuite; +import org.checkerframework.checker.nullness.qual.Nullable; /** * Tests for {@link ImmutableMap}. @@ -557,7 +558,7 @@ public int compareTo(ClassWithTerribleHashCode that) { } @Override - public boolean equals(Object x) { + public boolean equals(@Nullable Object x) { return x instanceof ClassWithTerribleHashCode && ((ClassWithTerribleHashCode) x).value == value; } @@ -928,7 +929,7 @@ public IntHolder(int value) { } @Override - public boolean equals(Object o) { + public boolean equals(@Nullable Object o) { return (o instanceof IntHolder) && ((IntHolder) o).value == value; } diff --git a/guava-tests/test/com/google/common/collect/ImmutableMultisetTest.java b/guava-tests/test/com/google/common/collect/ImmutableMultisetTest.java index 01615e6b0f8a..719cfc8c1274 100644 --- a/guava-tests/test/com/google/common/collect/ImmutableMultisetTest.java +++ b/guava-tests/test/com/google/common/collect/ImmutableMultisetTest.java @@ -47,6 +47,7 @@ import junit.framework.Test; import junit.framework.TestCase; import junit.framework.TestSuite; +import org.checkerframework.checker.nullness.qual.Nullable; /** * Tests for {@link ImmutableMultiset}. @@ -354,11 +355,11 @@ public int hashCode() { } @Override - public boolean equals(Object obj) { + public boolean equals(@Nullable Object obj) { return obj instanceof TypeWithDuplicates && ((TypeWithDuplicates) obj).a == a; } - public boolean fullEquals(TypeWithDuplicates other) { + public boolean fullEquals(@Nullable TypeWithDuplicates other) { return other != null && a == other.a && b == other.b; } } diff --git a/guava-tests/test/com/google/common/collect/ImmutableSetTest.java b/guava-tests/test/com/google/common/collect/ImmutableSetTest.java index a27c129f2f4d..4f76cc888182 100644 --- a/guava-tests/test/com/google/common/collect/ImmutableSetTest.java +++ b/guava-tests/test/com/google/common/collect/ImmutableSetTest.java @@ -45,6 +45,7 @@ import java.util.stream.Collector; import junit.framework.Test; import junit.framework.TestSuite; +import org.checkerframework.checker.nullness.qual.Nullable; /** * Unit test for {@link ImmutableSet}. @@ -321,11 +322,11 @@ public int hashCode() { } @Override - public boolean equals(Object obj) { + public boolean equals(@Nullable Object obj) { return obj instanceof TypeWithDuplicates && ((TypeWithDuplicates) obj).a == a; } - public boolean fullEquals(TypeWithDuplicates other) { + public boolean fullEquals(@Nullable TypeWithDuplicates other) { return other != null && a == other.a && b == other.b; } } diff --git a/guava-tests/test/com/google/common/collect/ImmutableSortedMapTest.java b/guava-tests/test/com/google/common/collect/ImmutableSortedMapTest.java index 605fc022d06e..9eb466cd416d 100644 --- a/guava-tests/test/com/google/common/collect/ImmutableSortedMapTest.java +++ b/guava-tests/test/com/google/common/collect/ImmutableSortedMapTest.java @@ -51,6 +51,7 @@ import junit.framework.Test; import junit.framework.TestCase; import junit.framework.TestSuite; +import org.checkerframework.checker.nullness.qual.Nullable; /** * Tests for {@link ImmutableSortedMap}. @@ -743,7 +744,7 @@ public IntHolder(int value) { } @Override - public boolean equals(Object o) { + public boolean equals(@Nullable Object o) { return (o instanceof IntHolder) && ((IntHolder) o).value == value; } diff --git a/guava-tests/test/com/google/common/collect/ImmutableSortedSetTest.java b/guava-tests/test/com/google/common/collect/ImmutableSortedSetTest.java index d69168f767c4..9ab3bb867eca 100644 --- a/guava-tests/test/com/google/common/collect/ImmutableSortedSetTest.java +++ b/guava-tests/test/com/google/common/collect/ImmutableSortedSetTest.java @@ -52,6 +52,7 @@ import java.util.stream.Collector; import junit.framework.Test; import junit.framework.TestSuite; +import org.checkerframework.checker.nullness.qual.Nullable; /** * Unit tests for {@link ImmutableSortedSet}. @@ -754,7 +755,7 @@ public int compareTo(TypeWithDuplicates o) { return Integer.compare(a, o.a); } - public boolean fullEquals(TypeWithDuplicates other) { + public boolean fullEquals(@Nullable TypeWithDuplicates other) { return other != null && a == other.a && b == other.b; } } diff --git a/guava-tests/test/com/google/common/collect/LegacyComparable.java b/guava-tests/test/com/google/common/collect/LegacyComparable.java index 8b0c9620cd68..05a6607a420c 100644 --- a/guava-tests/test/com/google/common/collect/LegacyComparable.java +++ b/guava-tests/test/com/google/common/collect/LegacyComparable.java @@ -19,6 +19,7 @@ import com.google.common.annotations.GwtCompatible; import java.io.Serializable; import java.util.Arrays; +import org.checkerframework.checker.nullness.qual.Nullable; /** * A class that implements {@code Comparable} without generics, such as those found in libraries @@ -51,7 +52,7 @@ public int compareTo(Object object) { } @Override - public boolean equals(Object object) { + public boolean equals(@Nullable Object object) { if (object instanceof LegacyComparable) { LegacyComparable that = (LegacyComparable) object; return this.value.equals(that.value); diff --git a/guava-tests/test/com/google/common/collect/MapsTest.java b/guava-tests/test/com/google/common/collect/MapsTest.java index a809160a23fe..6c4800550df4 100644 --- a/guava-tests/test/com/google/common/collect/MapsTest.java +++ b/guava-tests/test/com/google/common/collect/MapsTest.java @@ -62,6 +62,7 @@ import java.util.TreeMap; import java.util.concurrent.ConcurrentMap; import junit.framework.TestCase; +import org.checkerframework.checker.nullness.qual.Nullable; /** * Unit test for {@code Maps}. @@ -1370,18 +1371,18 @@ public void testSynchronizedBiMap() { assertEquals(ImmutableSet.of(1, 2, 3), sync.inverse().keySet()); } - static final Predicate NOT_LENGTH_3 = - new Predicate() { + static final Predicate<@Nullable String> NOT_LENGTH_3 = + new Predicate<@Nullable String>() { @Override - public boolean apply(String input) { + public boolean apply(@Nullable String input) { return input == null || input.length() != 3; } }; - static final Predicate EVEN = - new Predicate() { + static final Predicate<@Nullable Integer> EVEN = + new Predicate<@Nullable Integer>() { @Override - public boolean apply(Integer input) { + public boolean apply(@Nullable Integer input) { return input == null || input % 2 == 0; } }; diff --git a/guava-tests/test/com/google/common/collect/MapsTransformValuesTest.java b/guava-tests/test/com/google/common/collect/MapsTransformValuesTest.java index c20e166167b6..e35aa3647f7d 100644 --- a/guava-tests/test/com/google/common/collect/MapsTransformValuesTest.java +++ b/guava-tests/test/com/google/common/collect/MapsTransformValuesTest.java @@ -265,22 +265,22 @@ public Integer apply(Integer from) { } public void testTransformEntrySetContains() { - Map underlying = Maps.newHashMap(); + Map<@Nullable String, @Nullable Boolean> underlying = Maps.newHashMap(); underlying.put("a", null); underlying.put("b", true); underlying.put(null, true); - Map map = + Map<@Nullable String, @Nullable Boolean> map = Maps.transformValues( underlying, - new Function() { + new Function<@Nullable Boolean, @Nullable Boolean>() { @Override - public Boolean apply(@Nullable Boolean from) { + public @Nullable Boolean apply(@Nullable Boolean from) { return (from == null) ? true : null; } }); - Set> entries = map.entrySet(); + Set> entries = map.entrySet(); assertTrue(entries.contains(Maps.immutableEntry("a", true))); assertTrue(entries.contains(Maps.immutableEntry("b", (Boolean) null))); assertTrue(entries.contains(Maps.immutableEntry((String) null, (Boolean) null))); diff --git a/guava-tests/test/com/google/common/collect/MapsTransformValuesUnmodifiableIteratorTest.java b/guava-tests/test/com/google/common/collect/MapsTransformValuesUnmodifiableIteratorTest.java index 271b3b31d8ee..7411beca42d3 100644 --- a/guava-tests/test/com/google/common/collect/MapsTransformValuesUnmodifiableIteratorTest.java +++ b/guava-tests/test/com/google/common/collect/MapsTransformValuesUnmodifiableIteratorTest.java @@ -340,22 +340,22 @@ public Integer apply(Integer from) { } public void testTransformEntrySetContains() { - Map underlying = Maps.newHashMap(); + Map<@Nullable String, @Nullable Boolean> underlying = Maps.newHashMap(); underlying.put("a", null); underlying.put("b", true); underlying.put(null, true); - Map map = + Map<@Nullable String, @Nullable Boolean> map = Maps.transformValues( underlying, - new Function() { + new Function<@Nullable Boolean, @Nullable Boolean>() { @Override - public Boolean apply(@Nullable Boolean from) { + public @Nullable Boolean apply(@Nullable Boolean from) { return (from == null) ? true : null; } }); - Set> entries = map.entrySet(); + Set> entries = map.entrySet(); assertTrue(entries.contains(Maps.immutableEntry("a", true))); assertTrue(entries.contains(Maps.immutableEntry("b", (Boolean) null))); assertTrue(entries.contains(Maps.immutableEntry((String) null, (Boolean) null))); diff --git a/guava-tests/test/com/google/common/collect/MultisetsImmutableEntryTest.java b/guava-tests/test/com/google/common/collect/MultisetsImmutableEntryTest.java index bef27b9b20e5..870490e5fd42 100644 --- a/guava-tests/test/com/google/common/collect/MultisetsImmutableEntryTest.java +++ b/guava-tests/test/com/google/common/collect/MultisetsImmutableEntryTest.java @@ -20,6 +20,7 @@ import com.google.common.collect.Multiset.Entry; import java.util.Collections; import junit.framework.TestCase; +import org.checkerframework.checker.nullness.qual.Nullable; /** * Tests for {@link Multisets#immutableEntry}. @@ -28,7 +29,7 @@ */ @GwtCompatible public class MultisetsImmutableEntryTest extends TestCase { - private static final String NE = null; + private static final @Nullable String NE = null; private static Entry entry(final E element, final int count) { return Multisets.immutableEntry(element, count); diff --git a/guava-tests/test/com/google/common/collect/OrderingTest.java b/guava-tests/test/com/google/common/collect/OrderingTest.java index 36b63d8d9c8b..a98379986d89 100644 --- a/guava-tests/test/com/google/common/collect/OrderingTest.java +++ b/guava-tests/test/com/google/common/collect/OrderingTest.java @@ -833,7 +833,7 @@ public int hashCode() { } @Override - public boolean equals(Object other) { + public boolean equals(@Nullable Object other) { return other instanceof NumberOrdering; } diff --git a/guava-tests/test/com/google/common/collect/QueuesTest.java b/guava-tests/test/com/google/common/collect/QueuesTest.java index e48c497e7566..e2c3485f9d54 100644 --- a/guava-tests/test/com/google/common/collect/QueuesTest.java +++ b/guava-tests/test/com/google/common/collect/QueuesTest.java @@ -40,6 +40,7 @@ import java.util.concurrent.SynchronousQueue; import java.util.concurrent.TimeUnit; import junit.framework.TestCase; +import org.checkerframework.checker.nullness.qual.Nullable; /** * Tests for {@link Queues}. @@ -220,9 +221,9 @@ private void testDrainUninterruptibly_doesNotThrow(final BlockingQueue q @SuppressWarnings("unused") // https://errorprone.info/bugpattern/FutureReturnValueIgnored Future possiblyIgnoredError = threadPool.submit( - new Callable() { + new Callable<@Nullable Void>() { @Override - public Void call() throws InterruptedException { + public @Nullable Void call() throws InterruptedException { new Producer(q, 50).call(); new Interrupter(mainThread).run(); new Producer(q, 50).call(); @@ -303,7 +304,7 @@ private void assertUninterruptibleDrained(BlockingQueue q) { } } - private static class Producer implements Callable { + private static class Producer implements Callable<@Nullable Void> { final BlockingQueue q; final int elements; final CountDownLatch beganProducing = new CountDownLatch(1); @@ -315,7 +316,7 @@ private static class Producer implements Callable { } @Override - public Void call() throws InterruptedException { + public @Nullable Void call() throws InterruptedException { try { beganProducing.countDown(); for (int i = 0; i < elements; i++) { diff --git a/guava-tests/test/com/google/common/collect/SetsTest.java b/guava-tests/test/com/google/common/collect/SetsTest.java index 72131bfc38b6..b0d2ab9d50cf 100644 --- a/guava-tests/test/com/google/common/collect/SetsTest.java +++ b/guava-tests/test/com/google/common/collect/SetsTest.java @@ -73,6 +73,8 @@ import java.util.SortedSet; import java.util.TreeSet; import java.util.concurrent.CopyOnWriteArraySet; +import java.util.function.BiConsumer; +import java.util.stream.Collector; import java.util.stream.Stream; import junit.framework.Test; import junit.framework.TestCase; @@ -354,6 +356,23 @@ public void testToImmutableEnumSetEmpty() { assertThat(units).isEmpty(); } + public void testToImmutableEnumSetReused() { + // An unchecked cast lets us refer to the accumulator as an A and invoke the callbacks manually + @SuppressWarnings("unchecked") + Collector> collector = + (Collector) Sets.toImmutableEnumSet(); + A accumulator = collector.supplier().get(); + BiConsumer adder = collector.accumulator(); + adder.accept(accumulator, SomeEnum.A); + adder.accept(accumulator, SomeEnum.B); + ImmutableSet set = collector.finisher().apply(accumulator); + assertThat(set).containsExactly(SomeEnum.A, SomeEnum.B); + + // Subsequent manual manipulation of the accumulator must not affect the state of the built set + adder.accept(accumulator, SomeEnum.C); + assertThat(set).containsExactly(SomeEnum.A, SomeEnum.B); + } + @GwtIncompatible // SerializableTester public void testImmutableEnumSet_serialized() { Set units = Sets.immutableEnumSet(SomeEnum.D, SomeEnum.B); @@ -1125,7 +1144,7 @@ public int hashCode() { // delegate to 's' } @Override - public boolean equals(Object other) { + public boolean equals(@Nullable Object other) { if (other == null) { return false; } else if (other instanceof Base) { diff --git a/guava-tests/test/com/google/common/collect/SynchronizedBiMapTest.java b/guava-tests/test/com/google/common/collect/SynchronizedBiMapTest.java index 2219ca11be32..d0cc8132a8cb 100644 --- a/guava-tests/test/com/google/common/collect/SynchronizedBiMapTest.java +++ b/guava-tests/test/com/google/common/collect/SynchronizedBiMapTest.java @@ -30,6 +30,7 @@ import java.util.Set; import java.util.function.BiFunction; import junit.framework.TestSuite; +import org.checkerframework.checker.nullness.qual.Nullable; /** * Tests for {@code Synchronized#biMap}. @@ -112,7 +113,7 @@ public TestBiMap(BiMap delegate, Object mutex) { } @Override - public V forcePut(K key, V value) { + public @Nullable V forcePut(K key, V value) { assertTrue(Thread.holdsLock(mutex)); return delegate.forcePut(key, value); } diff --git a/guava-tests/test/com/google/common/collect/SynchronizedDequeTest.java b/guava-tests/test/com/google/common/collect/SynchronizedDequeTest.java index 1df6aa1bffd1..09f9c429b06b 100644 --- a/guava-tests/test/com/google/common/collect/SynchronizedDequeTest.java +++ b/guava-tests/test/com/google/common/collect/SynchronizedDequeTest.java @@ -21,6 +21,7 @@ import java.util.Deque; import java.util.Iterator; import junit.framework.TestCase; +import org.checkerframework.checker.nullness.qual.Nullable; /** * Tests for {@link Synchronized#deque} and {@link Queues#synchronizedDeque}. @@ -47,7 +48,7 @@ public boolean offer(E o) { } @Override - public E poll() { + public @Nullable E poll() { assertTrue(Thread.holdsLock(mutex)); return delegate.poll(); } @@ -65,7 +66,7 @@ public boolean remove(Object object) { } @Override - public E peek() { + public @Nullable E peek() { assertTrue(Thread.holdsLock(mutex)); return delegate.peek(); } @@ -186,13 +187,13 @@ public E removeLast() { } @Override - public E pollFirst() { + public @Nullable E pollFirst() { assertTrue(Thread.holdsLock(mutex)); return delegate.pollFirst(); } @Override - public E pollLast() { + public @Nullable E pollLast() { assertTrue(Thread.holdsLock(mutex)); return delegate.pollLast(); } @@ -210,13 +211,13 @@ public E getLast() { } @Override - public E peekFirst() { + public @Nullable E peekFirst() { assertTrue(Thread.holdsLock(mutex)); return delegate.peekFirst(); } @Override - public E peekLast() { + public @Nullable E peekLast() { assertTrue(Thread.holdsLock(mutex)); return delegate.peekLast(); } diff --git a/guava-tests/test/com/google/common/collect/SynchronizedMapTest.java b/guava-tests/test/com/google/common/collect/SynchronizedMapTest.java index 2e15eda327a5..1aeae36cc6cf 100644 --- a/guava-tests/test/com/google/common/collect/SynchronizedMapTest.java +++ b/guava-tests/test/com/google/common/collect/SynchronizedMapTest.java @@ -28,6 +28,7 @@ import java.util.Map.Entry; import java.util.Set; import junit.framework.TestCase; +import org.checkerframework.checker.nullness.qual.Nullable; /** * Tests for {@code Synchronized#map}. @@ -71,7 +72,7 @@ public boolean isEmpty() { } @Override - public V remove(Object object) { + public @Nullable V remove(Object object) { assertTrue(Thread.holdsLock(mutex)); return super.remove(object); } @@ -95,13 +96,13 @@ public boolean containsValue(Object value) { } @Override - public V get(Object key) { + public @Nullable V get(Object key) { assertTrue(Thread.holdsLock(mutex)); return super.get(key); } @Override - public V put(K key, V value) { + public @Nullable V put(K key, V value) { assertTrue(Thread.holdsLock(mutex)); return super.put(key, value); } @@ -131,7 +132,7 @@ public Set> entrySet() { } @Override - public boolean equals(Object obj) { + public boolean equals(@Nullable Object obj) { assertTrue(Thread.holdsLock(mutex)); return super.equals(obj); } diff --git a/guava-tests/test/com/google/common/collect/SynchronizedNavigableMapTest.java b/guava-tests/test/com/google/common/collect/SynchronizedNavigableMapTest.java index 41b597aac10f..ad9fd230dab1 100644 --- a/guava-tests/test/com/google/common/collect/SynchronizedNavigableMapTest.java +++ b/guava-tests/test/com/google/common/collect/SynchronizedNavigableMapTest.java @@ -33,6 +33,7 @@ import java.util.NavigableSet; import java.util.SortedMap; import junit.framework.TestSuite; +import org.checkerframework.checker.nullness.qual.Nullable; /** * Tests for {@link Maps#synchronizedNavigableMap(NavigableMap)}. @@ -65,7 +66,7 @@ protected Entry delegate() { } @Override - public boolean equals(Object object) { + public boolean equals(@Nullable Object object) { assertTrue(Thread.holdsLock(mutex)); return super.equals(object); } @@ -110,13 +111,13 @@ protected NavigableMap delegate() { } @Override - public Entry ceilingEntry(K key) { + public @Nullable Entry ceilingEntry(K key) { assertTrue(Thread.holdsLock(mutex)); return delegate().ceilingEntry(key); } @Override - public K ceilingKey(K key) { + public @Nullable K ceilingKey(K key) { assertTrue(Thread.holdsLock(mutex)); return delegate().ceilingKey(key); } @@ -134,19 +135,19 @@ public NavigableMap descendingMap() { } @Override - public Entry firstEntry() { + public @Nullable Entry firstEntry() { assertTrue(Thread.holdsLock(mutex)); return delegate().firstEntry(); } @Override - public Entry floorEntry(K key) { + public @Nullable Entry floorEntry(K key) { assertTrue(Thread.holdsLock(mutex)); return delegate().floorEntry(key); } @Override - public K floorKey(K key) { + public @Nullable K floorKey(K key) { assertTrue(Thread.holdsLock(mutex)); return delegate().floorKey(key); } @@ -163,31 +164,31 @@ public SortedMap headMap(K toKey) { } @Override - public Entry higherEntry(K key) { + public @Nullable Entry higherEntry(K key) { assertTrue(Thread.holdsLock(mutex)); return delegate().higherEntry(key); } @Override - public K higherKey(K key) { + public @Nullable K higherKey(K key) { assertTrue(Thread.holdsLock(mutex)); return delegate().higherKey(key); } @Override - public Entry lastEntry() { + public @Nullable Entry lastEntry() { assertTrue(Thread.holdsLock(mutex)); return delegate().lastEntry(); } @Override - public Entry lowerEntry(K key) { + public @Nullable Entry lowerEntry(K key) { assertTrue(Thread.holdsLock(mutex)); return delegate().lowerEntry(key); } @Override - public K lowerKey(K key) { + public @Nullable K lowerKey(K key) { assertTrue(Thread.holdsLock(mutex)); return delegate().lowerKey(key); } @@ -199,13 +200,13 @@ public NavigableSet navigableKeySet() { } @Override - public Entry pollFirstEntry() { + public @Nullable Entry pollFirstEntry() { assertTrue(Thread.holdsLock(mutex)); return delegate().pollFirstEntry(); } @Override - public Entry pollLastEntry() { + public @Nullable Entry pollLastEntry() { assertTrue(Thread.holdsLock(mutex)); return delegate().pollLastEntry(); } diff --git a/guava-tests/test/com/google/common/collect/SynchronizedNavigableSetTest.java b/guava-tests/test/com/google/common/collect/SynchronizedNavigableSetTest.java index c4ee70ce7d2d..93969556a22b 100644 --- a/guava-tests/test/com/google/common/collect/SynchronizedNavigableSetTest.java +++ b/guava-tests/test/com/google/common/collect/SynchronizedNavigableSetTest.java @@ -32,6 +32,7 @@ import java.util.TreeSet; import junit.framework.TestCase; import junit.framework.TestSuite; +import org.checkerframework.checker.nullness.qual.Nullable; /** * Tests for {@link Sets#synchronizedNavigableSet(NavigableSet)}. @@ -51,7 +52,7 @@ protected NavigableSet create() { static class TestSet extends SynchronizedSetTest.TestSet implements NavigableSet { - TestSet(NavigableSet delegate, Object mutex) { + TestSet(NavigableSet delegate, @Nullable Object mutex) { super(delegate, mutex); } @@ -61,7 +62,7 @@ protected NavigableSet delegate() { } @Override - public E ceiling(E e) { + public @Nullable E ceiling(E e) { assertTrue(Thread.holdsLock(mutex)); return delegate().ceiling(e); } @@ -78,7 +79,7 @@ public NavigableSet descendingSet() { } @Override - public E floor(E e) { + public @Nullable E floor(E e) { assertTrue(Thread.holdsLock(mutex)); return delegate().floor(e); } @@ -95,24 +96,24 @@ public SortedSet headSet(E toElement) { } @Override - public E higher(E e) { + public @Nullable E higher(E e) { assertTrue(Thread.holdsLock(mutex)); return delegate().higher(e); } @Override - public E lower(E e) { + public @Nullable E lower(E e) { return delegate().lower(e); } @Override - public E pollFirst() { + public @Nullable E pollFirst() { assertTrue(Thread.holdsLock(mutex)); return delegate().pollFirst(); } @Override - public E pollLast() { + public @Nullable E pollLast() { assertTrue(Thread.holdsLock(mutex)); return delegate().pollLast(); } diff --git a/guava-tests/test/com/google/common/collect/SynchronizedQueueTest.java b/guava-tests/test/com/google/common/collect/SynchronizedQueueTest.java index 1e2290d883be..e29966367a6f 100644 --- a/guava-tests/test/com/google/common/collect/SynchronizedQueueTest.java +++ b/guava-tests/test/com/google/common/collect/SynchronizedQueueTest.java @@ -21,6 +21,7 @@ import java.util.Iterator; import java.util.Queue; import junit.framework.TestCase; +import org.checkerframework.checker.nullness.qual.Nullable; /** * Tests for {@link Synchronized#queue} and {@link Queues#synchronizedQueue}. @@ -48,7 +49,7 @@ public boolean offer(E o) { } @Override - public E poll() { + public @Nullable E poll() { assertTrue(Thread.holdsLock(mutex)); return delegate.poll(); } @@ -66,7 +67,7 @@ public boolean remove(Object object) { } @Override - public E peek() { + public @Nullable E peek() { assertTrue(Thread.holdsLock(mutex)); return delegate.peek(); } diff --git a/guava-tests/test/com/google/common/collect/SynchronizedSetTest.java b/guava-tests/test/com/google/common/collect/SynchronizedSetTest.java index 313a94f6679f..9db478cbb0be 100644 --- a/guava-tests/test/com/google/common/collect/SynchronizedSetTest.java +++ b/guava-tests/test/com/google/common/collect/SynchronizedSetTest.java @@ -38,6 +38,9 @@ public class SynchronizedSetTest extends TestCase { public static final Object MUTEX = new Integer(1); // something Serializable + // TODO(cpovirk): Resolve difference between branches in their choice of mutex: + // - The mainline uses `null` (even since the change in cl/99720576 was integrated). + // - The backport continued to use MUTEX. public static Test suite() { return SetTestSuiteBuilder.using( new TestStringSetGenerator() { @@ -63,7 +66,7 @@ static class TestSet extends ForwardingSet implements Serializable { final Set delegate; public Object mutex; - public TestSet(Set delegate, Object mutex) { + public TestSet(Set delegate, @Nullable Object mutex) { this.delegate = delegate; this.mutex = mutex; } diff --git a/guava-tests/test/com/google/common/collect/SynchronizedTableTest.java b/guava-tests/test/com/google/common/collect/SynchronizedTableTest.java index 934ad7a9e9c5..216f32b2e6cf 100644 --- a/guava-tests/test/com/google/common/collect/SynchronizedTableTest.java +++ b/guava-tests/test/com/google/common/collect/SynchronizedTableTest.java @@ -119,13 +119,13 @@ public boolean containsRow(Object rowKey) { } @Override - public V get(Object rowKey, Object columnKey) { + public @Nullable V get(Object rowKey, Object columnKey) { assertTrue(Thread.holdsLock(mutex)); return delegate.get(rowKey, columnKey); } @Override - public V put(R rowKey, C columnKey, V value) { + public @Nullable V put(R rowKey, C columnKey, V value) { assertTrue(Thread.holdsLock(mutex)); return delegate.put(rowKey, columnKey, value); } @@ -137,7 +137,7 @@ public void putAll(Table table) { } @Override - public V remove(Object rowKey, Object columnKey) { + public @Nullable V remove(Object rowKey, Object columnKey) { assertTrue(Thread.holdsLock(mutex)); return delegate.remove(rowKey, columnKey); } diff --git a/guava-tests/test/com/google/common/collect/TableCollectionTest.java b/guava-tests/test/com/google/common/collect/TableCollectionTest.java index 6a4938278882..18ad54939f4f 100644 --- a/guava-tests/test/com/google/common/collect/TableCollectionTest.java +++ b/guava-tests/test/com/google/common/collect/TableCollectionTest.java @@ -44,6 +44,7 @@ import junit.framework.Test; import junit.framework.TestCase; import junit.framework.TestSuite; +import org.checkerframework.checker.nullness.qual.Nullable; /** * Collection tests for {@link Table} implementations. @@ -767,10 +768,10 @@ protected Map makePopulatedMap() { } } - static final Function DIVIDE_BY_2 = - new Function() { + static final Function<@Nullable Integer, @Nullable Integer> DIVIDE_BY_2 = + new Function<@Nullable Integer, @Nullable Integer>() { @Override - public Integer apply(Integer input) { + public @Nullable Integer apply(@Nullable Integer input) { return (input == null) ? null : input / 2; } }; @@ -889,10 +890,10 @@ protected Map> makeEmptyMap() { } } - static final Function FIRST_CHARACTER = - new Function() { + static final Function<@Nullable String, @Nullable Character> FIRST_CHARACTER = + new Function<@Nullable String, @Nullable Character>() { @Override - public Character apply(String input) { + public @Nullable Character apply(@Nullable String input) { return input == null ? null : input.charAt(0); } }; diff --git a/guava-tests/test/com/google/common/collect/TablesTransformValuesTest.java b/guava-tests/test/com/google/common/collect/TablesTransformValuesTest.java index 6730b3f519d4..d6330a246150 100644 --- a/guava-tests/test/com/google/common/collect/TablesTransformValuesTest.java +++ b/guava-tests/test/com/google/common/collect/TablesTransformValuesTest.java @@ -21,6 +21,7 @@ import com.google.common.annotations.GwtCompatible; import com.google.common.annotations.GwtIncompatible; import com.google.common.base.Function; +import org.checkerframework.checker.nullness.qual.Nullable; /** * Test cases for {@link Tables#transformValues}. @@ -30,10 +31,10 @@ @GwtCompatible(emulated = true) public class TablesTransformValuesTest extends AbstractTableTest { - private static final Function FIRST_CHARACTER = - new Function() { + private static final Function<@Nullable String, @Nullable Character> FIRST_CHARACTER = + new Function<@Nullable String, @Nullable Character>() { @Override - public Character apply(String input) { + public @Nullable Character apply(@Nullable String input) { return input == null ? null : input.charAt(0); } }; diff --git a/guava-tests/test/com/google/common/collect/TreeMultimapExplicitTest.java b/guava-tests/test/com/google/common/collect/TreeMultimapExplicitTest.java index 92a3d83a7d8c..4b00570a6126 100644 --- a/guava-tests/test/com/google/common/collect/TreeMultimapExplicitTest.java +++ b/guava-tests/test/com/google/common/collect/TreeMultimapExplicitTest.java @@ -28,6 +28,7 @@ import java.util.Map.Entry; import java.util.SortedSet; import junit.framework.TestCase; +import org.checkerframework.checker.nullness.qual.Nullable; /** * Unit tests for {@code TreeMultimap} with explicit comparators. @@ -41,11 +42,11 @@ public class TreeMultimapExplicitTest extends TestCase { * Compare strings lengths, and if the lengths are equal compare the strings. A {@code null} is * less than any non-null value. */ - private enum StringLength implements Comparator { + private enum StringLength implements Comparator<@Nullable String> { COMPARATOR; @Override - public int compare(String first, String second) { + public int compare(@Nullable String first, @Nullable String second) { if (first == second) { return 0; } else if (first == null) { diff --git a/guava-tests/test/com/google/common/escape/UnicodeEscaperTest.java b/guava-tests/test/com/google/common/escape/UnicodeEscaperTest.java index 96cfa10b0333..48f2f17152f1 100644 --- a/guava-tests/test/com/google/common/escape/UnicodeEscaperTest.java +++ b/guava-tests/test/com/google/common/escape/UnicodeEscaperTest.java @@ -18,6 +18,7 @@ import com.google.common.annotations.GwtCompatible; import junit.framework.TestCase; +import org.checkerframework.checker.nullness.qual.Nullable; /** * Tests for {@link UnicodeEscaper}. @@ -39,7 +40,7 @@ public class UnicodeEscaperTest extends TestCase { private static final UnicodeEscaper NOP_ESCAPER = new UnicodeEscaper() { @Override - protected char[] escape(int c) { + protected char @Nullable [] escape(int c) { return null; } }; @@ -48,7 +49,7 @@ protected char[] escape(int c) { private static final UnicodeEscaper SIMPLE_ESCAPER = new UnicodeEscaper() { @Override - protected char[] escape(int cp) { + protected char @Nullable [] escape(int cp) { return ('a' <= cp && cp <= 'z') || ('A' <= cp && cp <= 'Z') || ('0' <= cp && cp <= '9') ? null : ("[" + String.valueOf(cp) + "]").toCharArray(); @@ -163,7 +164,7 @@ public void testFalsePositivesForNextEscapedIndex() { new UnicodeEscaper() { // Canonical escaper method that only escapes lower case ASCII letters. @Override - protected char[] escape(int cp) { + protected char @Nullable [] escape(int cp) { return ('a' <= cp && cp <= 'z') ? new char[] {Character.toUpperCase((char) cp)} : null; } // Inefficient implementation that defines all letters as escapable. diff --git a/guava-tests/test/com/google/common/eventbus/SubscriberTest.java b/guava-tests/test/com/google/common/eventbus/SubscriberTest.java index e2380df21349..14210ac14f3b 100644 --- a/guava-tests/test/com/google/common/eventbus/SubscriberTest.java +++ b/guava-tests/test/com/google/common/eventbus/SubscriberTest.java @@ -22,6 +22,7 @@ import java.lang.reflect.InvocationTargetException; import java.lang.reflect.Method; import junit.framework.TestCase; +import org.checkerframework.checker.nullness.qual.Nullable; /** * Tests for {@link Subscriber}. @@ -35,7 +36,7 @@ public class SubscriberTest extends TestCase { private EventBus bus; private boolean methodCalled; - private Object methodArgument; + private @Nullable Object methodArgument; @Override protected void setUp() throws Exception { diff --git a/guava-tests/test/com/google/common/eventbus/outside/AbstractEventBusTest.java b/guava-tests/test/com/google/common/eventbus/outside/AbstractEventBusTest.java index f4af7a7516de..54d6c93f588b 100644 --- a/guava-tests/test/com/google/common/eventbus/outside/AbstractEventBusTest.java +++ b/guava-tests/test/com/google/common/eventbus/outside/AbstractEventBusTest.java @@ -18,6 +18,7 @@ import com.google.common.eventbus.EventBus; import junit.framework.TestCase; +import org.checkerframework.checker.nullness.qual.Nullable; /** * Abstract base class for tests that EventBus finds the correct subscribers. @@ -34,7 +35,7 @@ abstract class AbstractEventBusTest extends TestCase { abstract H createSubscriber(); - private H subscriber; + private @Nullable H subscriber; H getSubscriber() { return subscriber; diff --git a/guava-tests/test/com/google/common/graph/AbstractNetworkTest.java b/guava-tests/test/com/google/common/graph/AbstractNetworkTest.java index 889f0fbec933..be551ce34d8f 100644 --- a/guava-tests/test/com/google/common/graph/AbstractNetworkTest.java +++ b/guava-tests/test/com/google/common/graph/AbstractNetworkTest.java @@ -36,6 +36,7 @@ import java.util.concurrent.CyclicBarrier; import java.util.concurrent.ExecutorService; import java.util.concurrent.Future; +import org.checkerframework.checker.nullness.qual.Nullable; import org.junit.After; import org.junit.Before; import org.junit.Test; @@ -805,9 +806,9 @@ public void concurrentIteration() throws Exception { for (int i = 0; i < threadCount; i++) { futures.add( executor.submit( - new Callable() { + new Callable<@Nullable Void>() { @Override - public Object call() throws Exception { + public @Nullable Void call() throws Exception { barrier.await(); Integer first = network.nodes().iterator().next(); for (Integer node : network.nodes()) { diff --git a/guava-tests/test/com/google/common/graph/ValueGraphTest.java b/guava-tests/test/com/google/common/graph/ValueGraphTest.java index f74680cef73e..c9be9818da1a 100644 --- a/guava-tests/test/com/google/common/graph/ValueGraphTest.java +++ b/guava-tests/test/com/google/common/graph/ValueGraphTest.java @@ -30,6 +30,7 @@ import java.util.concurrent.CyclicBarrier; import java.util.concurrent.ExecutorService; import java.util.concurrent.Future; +import org.checkerframework.checker.nullness.qual.Nullable; import org.junit.After; import org.junit.Test; import org.junit.runner.RunWith; @@ -493,9 +494,9 @@ public void concurrentIteration() throws Exception { for (int i = 0; i < threadCount; i++) { futures.add( executor.submit( - new Callable() { + new Callable<@Nullable Void>() { @Override - public Object call() throws Exception { + public @Nullable Void call() throws Exception { barrier.await(); Integer first = graph.nodes().iterator().next(); for (Integer node : graph.nodes()) { diff --git a/guava-tests/test/com/google/common/hash/HashCodeTest.java b/guava-tests/test/com/google/common/hash/HashCodeTest.java index 4cccefe7e36d..231fd402bb41 100644 --- a/guava-tests/test/com/google/common/hash/HashCodeTest.java +++ b/guava-tests/test/com/google/common/hash/HashCodeTest.java @@ -24,6 +24,7 @@ import com.google.common.testing.ClassSanityTester; import java.util.Arrays; import junit.framework.TestCase; +import org.checkerframework.checker.nullness.qual.Nullable; /** * Unit tests for {@link HashCode}. @@ -391,7 +392,7 @@ private static class ExpectedHashCode { final Long asLong; // null means that asLong should throw an exception final String toString; - ExpectedHashCode(byte[] bytes, int asInt, Long asLong, String toString) { + ExpectedHashCode(byte[] bytes, int asInt, @Nullable Long asLong, String toString) { this.bytes = bytes; this.asInt = asInt; this.asLong = asLong; diff --git a/guava-tests/test/com/google/common/hash/MacHashFunctionTest.java b/guava-tests/test/com/google/common/hash/MacHashFunctionTest.java index 4dbb4241e0b6..7783b5fc3095 100644 --- a/guava-tests/test/com/google/common/hash/MacHashFunctionTest.java +++ b/guava-tests/test/com/google/common/hash/MacHashFunctionTest.java @@ -29,6 +29,7 @@ import javax.crypto.SecretKey; import javax.crypto.spec.SecretKeySpec; import junit.framework.TestCase; +import org.checkerframework.checker.nullness.qual.Nullable; import sun.security.jca.ProviderList; import sun.security.jca.Providers; @@ -155,7 +156,7 @@ public String getAlgorithm() { } @Override - public byte[] getEncoded() { + public byte @Nullable [] getEncoded() { return null; } diff --git a/guava-tests/test/com/google/common/io/ByteSourceTest.java b/guava-tests/test/com/google/common/io/ByteSourceTest.java index edf450158b39..58ad653c2fd0 100644 --- a/guava-tests/test/com/google/common/io/ByteSourceTest.java +++ b/guava-tests/test/com/google/common/io/ByteSourceTest.java @@ -40,6 +40,7 @@ import java.util.Arrays; import java.util.EnumSet; import junit.framework.TestSuite; +import org.checkerframework.checker.nullness.qual.Nullable; /** * Tests for the default implementations of {@code ByteSource} methods. @@ -151,8 +152,8 @@ public byte[] getResult() { } public void testRead_withProcessor_stopsOnFalse() throws IOException { - ByteProcessor processor = - new ByteProcessor() { + ByteProcessor<@Nullable Void> processor = + new ByteProcessor<@Nullable Void>() { boolean firstCall = true; @Override @@ -163,7 +164,7 @@ public boolean processBytes(byte[] buf, int off, int len) throws IOException { } @Override - public Void getResult() { + public @Nullable Void getResult() { return null; } }; diff --git a/guava-tests/test/com/google/common/io/ByteStreamsTest.java b/guava-tests/test/com/google/common/io/ByteStreamsTest.java index 6bc0bf0703d0..2598b9fedb2c 100644 --- a/guava-tests/test/com/google/common/io/ByteStreamsTest.java +++ b/guava-tests/test/com/google/common/io/ByteStreamsTest.java @@ -51,7 +51,6 @@ public void testCopyChannel() throws IOException { assertThat(out.toByteArray()).isEqualTo(expected); } - @AndroidIncompatible // Android forbids much filesystem access. Maybe we could make it work? public void testCopyFileChannel() throws IOException { final int chunkSize = 14407; // Random prime, unlikely to match any internal chunk size @@ -381,7 +380,7 @@ public void testNewDataOutput_writeChars() { assertThat(out.toByteArray()).isEqualTo(expected); } - @AndroidIncompatible // https://code.google.com/p/android/issues/detail?id=196848 + @AndroidIncompatible // https://issuetracker.google.com/issues/37074504 public void testUtf16Expected() { byte[] hardcodedExpected = utf16ExpectedWithBom; byte[] computedExpected = "r\u00C9sum\u00C9".getBytes(Charsets.UTF_16); diff --git a/guava-tests/test/com/google/common/io/CloserTest.java b/guava-tests/test/com/google/common/io/CloserTest.java index 3876174eacb7..f30d771a8743 100644 --- a/guava-tests/test/com/google/common/io/CloserTest.java +++ b/guava-tests/test/com/google/common/io/CloserTest.java @@ -393,7 +393,7 @@ private Suppression(Closeable closeable, Throwable thrown, Throwable suppressed) } @Override - public boolean equals(Object obj) { + public boolean equals(@Nullable Object obj) { if (obj instanceof Suppression) { Suppression other = (Suppression) obj; return closeable.equals(other.closeable) diff --git a/guava-tests/test/com/google/common/io/FileBackedOutputStreamTest.java b/guava-tests/test/com/google/common/io/FileBackedOutputStreamTest.java index abd27db0ff32..0938905dfbaf 100644 --- a/guava-tests/test/com/google/common/io/FileBackedOutputStreamTest.java +++ b/guava-tests/test/com/google/common/io/FileBackedOutputStreamTest.java @@ -28,7 +28,6 @@ * * @author Chris Nokleberg */ -@AndroidIncompatible // Android forbids much filesystem access. Maybe we could make it work? public class FileBackedOutputStreamTest extends IoTestCase { @@ -80,6 +79,7 @@ private void testThreshold( } + @AndroidIncompatible // Finalization probably just doesn't happen fast enough? public void testFinalizeDeletesFile() throws Exception { byte[] data = newPreFilledByteArray(100); FileBackedOutputStream out = new FileBackedOutputStream(0, true); diff --git a/guava-tests/test/com/google/common/io/FilesCreateTempDirTest.java b/guava-tests/test/com/google/common/io/FilesCreateTempDirTest.java new file mode 100644 index 000000000000..557689e0e7fe --- /dev/null +++ b/guava-tests/test/com/google/common/io/FilesCreateTempDirTest.java @@ -0,0 +1,37 @@ +/* + * Copyright (C) 2007 The Guava Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.common.io; + +import static com.google.common.truth.Truth.assertThat; + +import java.io.File; + +/** + * Unit test for {@link Files#createTempDir}. + * + * @author Chris Nokleberg + */ + +public class FilesCreateTempDirTest extends IoTestCase { + public void testCreateTempDir() { + File temp = Files.createTempDir(); + assertTrue(temp.exists()); + assertTrue(temp.isDirectory()); + assertThat(temp.listFiles()).isEmpty(); + assertTrue(temp.delete()); + } +} diff --git a/guava-tests/test/com/google/common/io/FilesFileTraverserTest.java b/guava-tests/test/com/google/common/io/FilesFileTraverserTest.java index 104ced67996b..9409d216df62 100644 --- a/guava-tests/test/com/google/common/io/FilesFileTraverserTest.java +++ b/guava-tests/test/com/google/common/io/FilesFileTraverserTest.java @@ -22,11 +22,6 @@ import com.google.errorprone.annotations.CanIgnoreReturnValue; import java.io.File; import java.io.IOException; -import java.nio.file.FileVisitResult; -import java.nio.file.Path; -import java.nio.file.SimpleFileVisitor; -import java.nio.file.attribute.BasicFileAttributes; -import junit.framework.TestCase; /** * Tests for {@link Files#fileTraverser()}. @@ -34,38 +29,13 @@ * @author Jens Nyman */ -@AndroidIncompatible // Android forbids much filesystem access. Maybe we could make it work? -public class FilesFileTraverserTest extends TestCase { +public class FilesFileTraverserTest extends IoTestCase { private File rootDir; @Override public void setUp() throws IOException { - rootDir = Files.createTempDir(); - } - - @Override - public void tearDown() throws IOException { - // delete rootDir and its contents - java.nio.file.Files.walkFileTree( - rootDir.toPath(), - new SimpleFileVisitor() { - @Override - public FileVisitResult visitFile(Path file, BasicFileAttributes attrs) - throws IOException { - java.nio.file.Files.deleteIfExists(file); - return FileVisitResult.CONTINUE; - } - - @Override - public FileVisitResult postVisitDirectory(Path dir, IOException exc) throws IOException { - if (exc != null) { - return FileVisitResult.TERMINATE; - } - java.nio.file.Files.deleteIfExists(dir); - return FileVisitResult.CONTINUE; - } - }); + rootDir = createTempDir(); } public void testFileTraverser_emptyDirectory() throws Exception { diff --git a/guava-tests/test/com/google/common/io/FilesTest.java b/guava-tests/test/com/google/common/io/FilesTest.java index 68e2174926a1..6ffcf5c81fe6 100644 --- a/guava-tests/test/com/google/common/io/FilesTest.java +++ b/guava-tests/test/com/google/common/io/FilesTest.java @@ -42,14 +42,19 @@ /** * Unit test for {@link Files}. * - *

    Note: {@link Files#fileTraverser()} is tested in {@link FilesFileTraverserTest}. + *

    Some methods are tested in separate files: + * + *

      + *
    • {@link Files#fileTraverser()} is tested in {@link FilesFileTraverserTest}. + *
    • {@link Files#createTempDir()} is tested in {@link FilesCreateTempDirTest}. + *
    * * @author Chris Nokleberg */ -@AndroidIncompatible // Android forbids much filesystem access. Maybe we could make it work? public class FilesTest extends IoTestCase { + @AndroidIncompatible // suites, ByteSourceTester (b/230620681) public static TestSuite suite() { TestSuite suite = new TestSuite(); suite.addTest( @@ -358,14 +363,6 @@ public void testCreateParentDirs_nonDirectoryParentExists() throws IOException { } } - public void testCreateTempDir() { - File temp = Files.createTempDir(); - assertTrue(temp.exists()); - assertTrue(temp.isDirectory()); - assertThat(temp.listFiles()).isEmpty(); - assertTrue(temp.delete()); - } - public void testMove() throws IOException { File i18nFile = getTestFile("i18n.txt"); File temp1 = createTempFile(); diff --git a/guava-tests/test/com/google/common/io/IoTestCase.java b/guava-tests/test/com/google/common/io/IoTestCase.java index fa8961905931..c79ebcbd2fca 100644 --- a/guava-tests/test/com/google/common/io/IoTestCase.java +++ b/guava-tests/test/com/google/common/io/IoTestCase.java @@ -28,6 +28,7 @@ import java.util.logging.Level; import java.util.logging.Logger; import junit.framework.TestCase; +import org.checkerframework.checker.nullness.qual.Nullable; /** * Base test case class for I/O tests. @@ -92,7 +93,7 @@ private File getTestDir() throws IOException { } /** Returns the file with the given name under the testdata directory. */ - protected final File getTestFile(String name) throws IOException { + protected final @Nullable File getTestFile(String name) throws IOException { File file = new File(getTestDir(), name); if (!file.exists()) { URL resourceUrl = IoTestCase.class.getResource("testdata/" + name); diff --git a/guava-tests/test/com/google/common/io/ResourcesTest.java b/guava-tests/test/com/google/common/io/ResourcesTest.java index 37580ffab7be..0b51c9986f88 100644 --- a/guava-tests/test/com/google/common/io/ResourcesTest.java +++ b/guava-tests/test/com/google/common/io/ResourcesTest.java @@ -133,7 +133,6 @@ public void testGetResource_relativePath() { assertNotNull(Resources.getResource(getClass(), "testdata/i18n.txt")); } - @AndroidIncompatible // Android prevents most access to files public void testGetResource_contextClassLoader() throws IOException { // Check that we can find a resource if it is visible to the context class // loader, even if it is not visible to the loader of the Resources class. diff --git a/guava-tests/test/com/google/common/math/BigIntegerMathTest.java b/guava-tests/test/com/google/common/math/BigIntegerMathTest.java index 170261bb547f..6f05cc7c918d 100644 --- a/guava-tests/test/com/google/common/math/BigIntegerMathTest.java +++ b/guava-tests/test/com/google/common/math/BigIntegerMathTest.java @@ -41,6 +41,7 @@ import com.google.common.annotations.GwtCompatible; import com.google.common.annotations.GwtIncompatible; import com.google.common.testing.NullPointerTester; +import com.google.errorprone.annotations.CanIgnoreReturnValue; import java.math.BigDecimal; import java.math.BigInteger; import java.math.RoundingMode; @@ -558,6 +559,7 @@ private static final class RoundToDoubleTester { this.input = input; } + @CanIgnoreReturnValue RoundToDoubleTester setExpectation(double expectedValue, RoundingMode... modes) { for (RoundingMode mode : modes) { Double previous = expectedValues.put(mode, expectedValue); @@ -568,6 +570,7 @@ RoundToDoubleTester setExpectation(double expectedValue, RoundingMode... modes) return this; } + @CanIgnoreReturnValue public RoundToDoubleTester roundUnnecessaryShouldThrow() { unnecessaryShouldThrow = true; return this; diff --git a/guava-tests/test/com/google/common/net/HostAndPortTest.java b/guava-tests/test/com/google/common/net/HostAndPortTest.java index 65e80962bafa..7d36d18f49db 100644 --- a/guava-tests/test/com/google/common/net/HostAndPortTest.java +++ b/guava-tests/test/com/google/common/net/HostAndPortTest.java @@ -20,6 +20,7 @@ import com.google.common.testing.EqualsTester; import com.google.common.testing.SerializableTester; import junit.framework.TestCase; +import org.checkerframework.checker.nullness.qual.Nullable; /** * Tests for {@link HostAndPort} @@ -99,10 +100,17 @@ public void testFromStringParseableNonsense() { checkFromStringCase("\nOMG\t", 89, "\nOMG\t", 89, false); } + public void testFromStringParseableIncompleteAddresses() { + checkFromStringCase("1.2.3", 87, "1.2.3", 87, false); + checkFromStringCase("1.2.3:99", 87, "1.2.3", 99, true); + checkFromStringCase("2001:4860:4864:5", 87, "2001:4860:4864:5", 87, false); + checkFromStringCase("[2001:4860:4864:5]:99", 87, "2001:4860:4864:5", 99, true); + } + private static void checkFromStringCase( String hpString, int defaultPort, - String expectHost, + @Nullable String expectHost, int expectPort, boolean expectHasExplicitPort) { HostAndPort hp; diff --git a/guava-tests/test/com/google/common/net/HttpHeadersTest.java b/guava-tests/test/com/google/common/net/HttpHeadersTest.java index 90bb0c8186eb..ef32ccfe308b 100644 --- a/guava-tests/test/com/google/common/net/HttpHeadersTest.java +++ b/guava-tests/test/com/google/common/net/HttpHeadersTest.java @@ -48,7 +48,7 @@ public void testConstantNameMatchesString() throws Exception { .put("SEC_WEBSOCKET_VERSION", "Sec-WebSocket-Version") .put("X_WEBKIT_CSP", "X-WebKit-CSP") .put("X_WEBKIT_CSP_REPORT_ONLY", "X-WebKit-CSP-Report-Only") - .build(); + .buildOrThrow(); ImmutableSet uppercaseAcronyms = ImmutableSet.of( "CH", "ID", "DNT", "DNS", "DPR", "ECT", "HTTP2", "IP", "MD5", "P3P", "RTT", "TE", "UA", diff --git a/guava-tests/test/com/google/common/primitives/BooleansTest.java b/guava-tests/test/com/google/common/primitives/BooleansTest.java index c4367fa5168a..6e9f257ad064 100644 --- a/guava-tests/test/com/google/common/primitives/BooleansTest.java +++ b/guava-tests/test/com/google/common/primitives/BooleansTest.java @@ -570,6 +570,20 @@ public void testAsListSet() { } } + public void testAsListCanonicalValues() { + List list = Booleans.asList(true, false); + assertThat(list.get(0)).isSameInstanceAs(true); + assertThat(list.get(1)).isSameInstanceAs(false); + @SuppressWarnings("deprecation") + Boolean anotherTrue = new Boolean(true); + @SuppressWarnings("deprecation") + Boolean anotherFalse = new Boolean(false); + list.set(0, anotherTrue); + assertThat(list.get(0)).isSameInstanceAs(true); + list.set(1, anotherFalse); + assertThat(list.get(1)).isSameInstanceAs(false); + } + public void testCountTrue() { assertThat(Booleans.countTrue()).isEqualTo(0); assertThat(Booleans.countTrue(false)).isEqualTo(0); diff --git a/guava-tests/test/com/google/common/primitives/DoublesTest.java b/guava-tests/test/com/google/common/primitives/DoublesTest.java index 052de396d0c5..aad2dfc289c5 100644 --- a/guava-tests/test/com/google/common/primitives/DoublesTest.java +++ b/guava-tests/test/com/google/common/primitives/DoublesTest.java @@ -34,6 +34,7 @@ import java.util.List; import java.util.regex.Pattern; import junit.framework.TestCase; +import org.checkerframework.checker.nullness.qual.Nullable; /** * Unit test for {@link Doubles}. @@ -607,7 +608,7 @@ public void testAsListEmpty() { * A reference implementation for {@code tryParse} that just catches the exception from {@link * Double#valueOf}. */ - private static Double referenceTryParse(String input) { + private static @Nullable Double referenceTryParse(String input) { if (input.trim().length() < input.length()) { return null; } diff --git a/guava-tests/test/com/google/common/primitives/FloatsTest.java b/guava-tests/test/com/google/common/primitives/FloatsTest.java index 5b72460c1d37..b9623d3cda00 100644 --- a/guava-tests/test/com/google/common/primitives/FloatsTest.java +++ b/guava-tests/test/com/google/common/primitives/FloatsTest.java @@ -33,6 +33,7 @@ import java.util.Comparator; import java.util.List; import junit.framework.TestCase; +import org.checkerframework.checker.nullness.qual.Nullable; /** * Unit test for {@link Floats}. @@ -585,7 +586,7 @@ public void testAsListEmpty() { * A reference implementation for {@code tryParse} that just catches the exception from {@link * Float#valueOf}. */ - private static Float referenceTryParse(String input) { + private static @Nullable Float referenceTryParse(String input) { if (input.trim().length() < input.length()) { return null; } diff --git a/guava-tests/test/com/google/common/reflect/AbstractInvocationHandlerTest.java b/guava-tests/test/com/google/common/reflect/AbstractInvocationHandlerTest.java index 56b20bdfb22a..310878f98283 100644 --- a/guava-tests/test/com/google/common/reflect/AbstractInvocationHandlerTest.java +++ b/guava-tests/test/com/google/common/reflect/AbstractInvocationHandlerTest.java @@ -26,6 +26,7 @@ import java.lang.reflect.Proxy; import java.util.List; import junit.framework.TestCase; +import org.checkerframework.checker.nullness.qual.Nullable; /** * Tests for {@link AbstractInvocationHandler}. @@ -136,7 +137,7 @@ private static class DelegatingInvocationHandlerWithEquals extends DelegatingInv } @Override - public boolean equals(Object obj) { + public boolean equals(@Nullable Object obj) { if (obj instanceof DelegatingInvocationHandlerWithEquals) { DelegatingInvocationHandlerWithEquals that = (DelegatingInvocationHandlerWithEquals) obj; return delegate.equals(that.delegate); diff --git a/guava-tests/test/com/google/common/reflect/InvokableTest.java b/guava-tests/test/com/google/common/reflect/InvokableTest.java index 5adcc9d3ba19..60c8c15e4561 100644 --- a/guava-tests/test/com/google/common/reflect/InvokableTest.java +++ b/guava-tests/test/com/google/common/reflect/InvokableTest.java @@ -733,7 +733,7 @@ private static class Prepender { private final String prefix; private final int times; - Prepender(@NotBlank String prefix, int times) throws NullPointerException { + Prepender(@NotBlank @Nullable String prefix, int times) throws NullPointerException { this.prefix = prefix; this.times = times; } diff --git a/guava-tests/test/com/google/common/reflect/ParameterTest.java b/guava-tests/test/com/google/common/reflect/ParameterTest.java index 6e0500a9ce08..86ea0104fa93 100644 --- a/guava-tests/test/com/google/common/reflect/ParameterTest.java +++ b/guava-tests/test/com/google/common/reflect/ParameterTest.java @@ -29,6 +29,16 @@ public class ParameterTest extends TestCase { public void testNulls() { + try { + Class.forName("java.lang.reflect.AnnotatedType"); + } catch (ClassNotFoundException runningInAndroidVm) { + /* + * Parameter declares a method that returns AnnotatedType, which isn't available on Android. + * This would cause NullPointerTester, which calls Class.getDeclaredMethods, to throw + * NoClassDefFoundError. + */ + return; + } for (Method method : ParameterTest.class.getDeclaredMethods()) { for (Parameter param : Invokable.from(method).getParameters()) { new NullPointerTester().testAllPublicInstanceMethods(param); diff --git a/guava-tests/test/com/google/common/reflect/SubtypeTester.java b/guava-tests/test/com/google/common/reflect/SubtypeTester.java index 3eec668433fb..7cd61c129dad 100644 --- a/guava-tests/test/com/google/common/reflect/SubtypeTester.java +++ b/guava-tests/test/com/google/common/reflect/SubtypeTester.java @@ -30,6 +30,7 @@ import java.util.Arrays; import java.util.Comparator; import javax.lang.model.element.Modifier; +import org.checkerframework.checker.nullness.qual.Nullable; /** * Tester of subtyping relationships between two types. @@ -78,7 +79,7 @@ abstract class SubtypeTester implements Cloneable { boolean suppressGetSupertype() default false; } - private Method method = null; + private @Nullable Method method = null; /** Call this in a {@link TestSubtype} public method asserting subtype relationship. */ final T isSubtype(T sub) { @@ -105,7 +106,7 @@ final T isSubtype(T sub) { * Call this in a {@link TestSubtype} public method asserting that subtype relationship does not * hold. */ - final X notSubtype(@SuppressWarnings("unused") Object sub) { + final @Nullable X notSubtype(@SuppressWarnings("unused") Object sub) { Type returnType = method.getGenericReturnType(); Type paramType = getOnlyParameterType(); TestSubtype spec = method.getAnnotation(TestSubtype.class); diff --git a/guava-tests/test/com/google/common/util/concurrent/AbstractAbstractFutureTest.java b/guava-tests/test/com/google/common/util/concurrent/AbstractAbstractFutureTest.java index 991cada29a11..8e94f174f865 100644 --- a/guava-tests/test/com/google/common/util/concurrent/AbstractAbstractFutureTest.java +++ b/guava-tests/test/com/google/common/util/concurrent/AbstractAbstractFutureTest.java @@ -34,6 +34,7 @@ import java.util.concurrent.ExecutionException; import java.util.concurrent.TimeoutException; import junit.framework.TestCase; +import org.checkerframework.checker.nullness.qual.Nullable; /** * Base class for tests for emulated {@link AbstractFuture} that allow subclasses to swap in a @@ -443,7 +444,8 @@ private static void assertPending(AbstractFuture future) { verifyTimedGetOnPendingFuture(future); } - private static void assertSuccessful(AbstractFuture future, Integer expectedResult) + private static void assertSuccessful( + AbstractFuture future, @Nullable Integer expectedResult) throws InterruptedException, TimeoutException, ExecutionException { assertDone(future); assertThat(future.isCancelled()).isFalse(); diff --git a/guava-tests/test/com/google/common/util/concurrent/AbstractFutureTest.java b/guava-tests/test/com/google/common/util/concurrent/AbstractFutureTest.java index 520586c4db6f..0ed399b726ad 100644 --- a/guava-tests/test/com/google/common/util/concurrent/AbstractFutureTest.java +++ b/guava-tests/test/com/google/common/util/concurrent/AbstractFutureTest.java @@ -48,6 +48,7 @@ import java.util.concurrent.locks.LockSupport; import junit.framework.AssertionFailedError; import junit.framework.TestCase; +import org.checkerframework.checker.nullness.qual.Nullable; /** * Tests for {@link AbstractFuture}. @@ -444,10 +445,10 @@ public void testFutureBash() { final ExecutorService executor = Executors.newFixedThreadPool(barrier.getParties()); final AtomicReference> currentFuture = Atomics.newReference(); final AtomicInteger numSuccessfulSetCalls = new AtomicInteger(); - Callable completeSuccessfullyRunnable = - new Callable() { + Callable<@Nullable Void> completeSuccessfullyRunnable = + new Callable<@Nullable Void>() { @Override - public Void call() { + public @Nullable Void call() { if (currentFuture.get().set("set")) { numSuccessfulSetCalls.incrementAndGet(); } @@ -455,12 +456,12 @@ public Void call() { return null; } }; - Callable completeExceptionallyRunnable = - new Callable() { + Callable<@Nullable Void> completeExceptionallyRunnable = + new Callable<@Nullable Void>() { Exception failureCause = new Exception("setException"); @Override - public Void call() { + public @Nullable Void call() { if (currentFuture.get().setException(failureCause)) { numSuccessfulSetCalls.incrementAndGet(); } @@ -468,10 +469,10 @@ public Void call() { return null; } }; - Callable cancelRunnable = - new Callable() { + Callable<@Nullable Void> cancelRunnable = + new Callable<@Nullable Void>() { @Override - public Void call() { + public @Nullable Void call() { if (currentFuture.get().cancel(true)) { numSuccessfulSetCalls.incrementAndGet(); } @@ -479,12 +480,12 @@ public Void call() { return null; } }; - Callable setFutureCompleteSuccessfullyRunnable = - new Callable() { + Callable<@Nullable Void> setFutureCompleteSuccessfullyRunnable = + new Callable<@Nullable Void>() { ListenableFuture future = Futures.immediateFuture("setFuture"); @Override - public Void call() { + public @Nullable Void call() { if (currentFuture.get().setFuture(future)) { numSuccessfulSetCalls.incrementAndGet(); } @@ -492,13 +493,13 @@ public Void call() { return null; } }; - Callable setFutureCompleteExceptionallyRunnable = - new Callable() { + Callable<@Nullable Void> setFutureCompleteExceptionallyRunnable = + new Callable<@Nullable Void>() { ListenableFuture future = Futures.immediateFailedFuture(new Exception("setFuture")); @Override - public Void call() { + public @Nullable Void call() { if (currentFuture.get().setFuture(future)) { numSuccessfulSetCalls.incrementAndGet(); } @@ -506,12 +507,12 @@ public Void call() { return null; } }; - Callable setFutureCancelRunnable = - new Callable() { + Callable<@Nullable Void> setFutureCancelRunnable = + new Callable<@Nullable Void>() { ListenableFuture future = Futures.immediateCancelledFuture(); @Override - public Void call() { + public @Nullable Void call() { if (currentFuture.get().setFuture(future)) { numSuccessfulSetCalls.incrementAndGet(); } @@ -574,9 +575,9 @@ public void run() { k % 2 == 0 ? collectResultsRunnable : collectResultsTimedGetRunnable; allTasks.add(Executors.callable(listener)); allTasks.add( - new Callable() { + new Callable<@Nullable Void>() { @Override - public Void call() throws Exception { + public @Nullable Void call() throws Exception { currentFuture.get().addListener(listener, executor); return null; } @@ -760,21 +761,21 @@ public void testSetFutureCancelBash_withDoneFuture() { final AtomicReference> currentFuture = Atomics.newReference(); final AtomicBoolean setFutureSuccess = new AtomicBoolean(); final AtomicBoolean cancellationSuccess = new AtomicBoolean(); - Callable cancelRunnable = - new Callable() { + Callable<@Nullable Void> cancelRunnable = + new Callable<@Nullable Void>() { @Override - public Void call() { + public @Nullable Void call() { cancellationSuccess.set(currentFuture.get().cancel(true)); awaitUnchecked(barrier); return null; } }; - Callable setFutureCompleteSuccessfullyRunnable = - new Callable() { + Callable<@Nullable Void> setFutureCompleteSuccessfullyRunnable = + new Callable<@Nullable Void>() { final ListenableFuture future = Futures.immediateFuture("hello"); @Override - public Void call() { + public @Nullable Void call() { setFutureSuccess.set(currentFuture.get().setFuture(future)); awaitUnchecked(barrier); return null; @@ -1209,13 +1210,10 @@ private ExecutionException getExpectingExecutionException(AbstractFuture throws InterruptedException { try { String got = future.get(); - fail("Expected exception but got " + got); + throw new AssertionError("Expected exception but got " + got); } catch (ExecutionException e) { return e; } - - // unreachable, but compiler doesn't know that fail() always throws - return null; } private static final class WaiterThread extends Thread { diff --git a/guava-tests/test/com/google/common/util/concurrent/AbstractScheduledServiceTest.java b/guava-tests/test/com/google/common/util/concurrent/AbstractScheduledServiceTest.java index 5d90b15504a7..f7266b274e85 100644 --- a/guava-tests/test/com/google/common/util/concurrent/AbstractScheduledServiceTest.java +++ b/guava-tests/test/com/google/common/util/concurrent/AbstractScheduledServiceTest.java @@ -43,6 +43,7 @@ import java.util.concurrent.atomic.AtomicInteger; import java.util.concurrent.atomic.AtomicReference; import junit.framework.TestCase; +import org.checkerframework.checker.nullness.qual.Nullable; /** * Unit test for {@link AbstractScheduledService}. @@ -52,7 +53,7 @@ public class AbstractScheduledServiceTest extends TestCase { volatile Scheduler configuration = newFixedDelaySchedule(0, 10, MILLISECONDS); - volatile ScheduledFuture future = null; + volatile @Nullable ScheduledFuture future = null; volatile boolean atFixedRateCalled = false; volatile boolean withFixedDelayCalled = false; @@ -313,9 +314,9 @@ private class TestService extends AbstractScheduledService { AtomicInteger numberOfTimesRunCalled = new AtomicInteger(0); AtomicInteger numberOfTimesExecutorCalled = new AtomicInteger(0); AtomicInteger numberOfTimesSchedulerCalled = new AtomicInteger(0); - volatile Exception runException = null; - volatile Exception startUpException = null; - volatile Exception shutDownException = null; + volatile @Nullable Exception runException = null; + volatile @Nullable Exception startUpException = null; + volatile @Nullable Exception shutDownException = null; @Override protected void runOneIteration() throws Exception { diff --git a/guava-tests/test/com/google/common/util/concurrent/CallablesTest.java b/guava-tests/test/com/google/common/util/concurrent/CallablesTest.java index 5bc92dc20633..b4766bc8ca20 100644 --- a/guava-tests/test/com/google/common/util/concurrent/CallablesTest.java +++ b/guava-tests/test/com/google/common/util/concurrent/CallablesTest.java @@ -26,6 +26,7 @@ import java.util.concurrent.Callable; import java.util.concurrent.ExecutionException; import junit.framework.TestCase; +import org.checkerframework.checker.nullness.qual.Nullable; /** * Unit tests for {@link Callables}. @@ -90,10 +91,10 @@ public String call() throws Exception { public void testRenaming() throws Exception { String oldName = Thread.currentThread().getName(); final Supplier newName = Suppliers.ofInstance("MyCrazyThreadName"); - Callable callable = - new Callable() { + Callable<@Nullable Void> callable = + new Callable<@Nullable Void>() { @Override - public Void call() throws Exception { + public @Nullable Void call() throws Exception { assertEquals(Thread.currentThread().getName(), newName.get()); return null; } @@ -107,10 +108,10 @@ public void testRenaming_exceptionalReturn() throws Exception { String oldName = Thread.currentThread().getName(); final Supplier newName = Suppliers.ofInstance("MyCrazyThreadName"); class MyException extends Exception {} - Callable callable = - new Callable() { + Callable<@Nullable Void> callable = + new Callable<@Nullable Void>() { @Override - public Void call() throws Exception { + public @Nullable Void call() throws Exception { assertEquals(Thread.currentThread().getName(), newName.get()); throw new MyException(); } @@ -141,10 +142,10 @@ public void checkPermission(Permission perm) { try { final String oldName = Thread.currentThread().getName(); Supplier newName = Suppliers.ofInstance("MyCrazyThreadName"); - Callable callable = - new Callable() { + Callable<@Nullable Void> callable = + new Callable<@Nullable Void>() { @Override - public Void call() throws Exception { + public @Nullable Void call() throws Exception { assertEquals(Thread.currentThread().getName(), oldName); return null; } diff --git a/guava-tests/test/com/google/common/util/concurrent/CycleDetectingLockFactoryTest.java b/guava-tests/test/com/google/common/util/concurrent/CycleDetectingLockFactoryTest.java index 2b1dd2fa0881..bf388b0ba887 100644 --- a/guava-tests/test/com/google/common/util/concurrent/CycleDetectingLockFactoryTest.java +++ b/guava-tests/test/com/google/common/util/concurrent/CycleDetectingLockFactoryTest.java @@ -16,6 +16,7 @@ package com.google.common.util.concurrent; +import static com.google.common.truth.Truth.assertThat; import com.google.common.base.Joiner; import com.google.common.util.concurrent.CycleDetectingLockFactory.Policies; @@ -26,8 +27,6 @@ import java.util.concurrent.locks.Lock; import java.util.concurrent.locks.ReentrantLock; import java.util.concurrent.locks.ReentrantReadWriteLock; -import java.util.regex.Matcher; -import java.util.regex.Pattern; import junit.framework.TestCase; /** @@ -543,16 +542,6 @@ private enum OtherOrder { // "LockA -> LockB \b.*\b LockB -> LockC \b.*\b LockC -> LockA" private void checkMessage(IllegalStateException exception, String... expectedLockCycle) { String regex = Joiner.on("\\b.*\\b").join(expectedLockCycle); - assertContainsRegex(regex, exception.getMessage()); - } - - // TODO(cpovirk): consider adding support for regex to Truth - private static void assertContainsRegex(String expectedRegex, String actual) { - Pattern pattern = Pattern.compile(expectedRegex); - Matcher matcher = pattern.matcher(actual); - if (!matcher.find()) { - String actualDesc = (actual == null) ? "null" : ('<' + actual + '>'); - fail("expected to contain regex:<" + expectedRegex + "> but was:" + actualDesc); - } + assertThat(exception).hasMessageThat().containsMatch(regex); } } diff --git a/guava-tests/test/com/google/common/util/concurrent/ExecutionSequencerTest.java b/guava-tests/test/com/google/common/util/concurrent/ExecutionSequencerTest.java index 068287c1986b..1dafb3b0b203 100644 --- a/guava-tests/test/com/google/common/util/concurrent/ExecutionSequencerTest.java +++ b/guava-tests/test/com/google/common/util/concurrent/ExecutionSequencerTest.java @@ -37,6 +37,7 @@ import java.util.concurrent.TimeUnit; import java.util.logging.Logger; import junit.framework.TestCase; +import org.checkerframework.checker.nullness.qual.Nullable; /** Tests for {@link ExecutionSequencer} */ public class ExecutionSequencerTest extends TestCase { @@ -44,7 +45,7 @@ public class ExecutionSequencerTest extends TestCase { ExecutorService executor; private ExecutionSequencer serializer; - private SettableFuture firstFuture; + private SettableFuture<@Nullable Void> firstFuture; private TestCallable firstCallable; @Override @@ -76,7 +77,8 @@ public void testCancellationDoesNotViolateSerialization() { @SuppressWarnings({"unused", "nullness"}) Future possiblyIgnoredError = serializer.submitAsync(firstCallable, directExecutor()); TestCallable secondCallable = new TestCallable(Futures.immediateFuture(null)); - ListenableFuture secondFuture = serializer.submitAsync(secondCallable, directExecutor()); + ListenableFuture<@Nullable Void> secondFuture = + serializer.submitAsync(secondCallable, directExecutor()); TestCallable thirdCallable = new TestCallable(Futures.immediateFuture(null)); @SuppressWarnings({"unused", "nullness"}) Future possiblyIgnoredError1 = serializer.submitAsync(thirdCallable, directExecutor()); @@ -90,7 +92,7 @@ public void testCancellationDoesNotViolateSerialization() { public void testCancellationMultipleThreads() throws Exception { final BlockingCallable blockingCallable = new BlockingCallable(); - ListenableFuture unused = serializer.submit(blockingCallable, executor); + ListenableFuture<@Nullable Void> unused = serializer.submit(blockingCallable, executor); ListenableFuture future2 = serializer.submit( new Callable() { @@ -117,7 +119,7 @@ public Boolean call() { public void testSecondTaskWaitsForFirstEvenIfCancelled() throws Exception { final BlockingCallable blockingCallable = new BlockingCallable(); - ListenableFuture future1 = serializer.submit(blockingCallable, executor); + ListenableFuture<@Nullable Void> future1 = serializer.submit(blockingCallable, executor); ListenableFuture future2 = serializer.submit( new Callable() { @@ -153,12 +155,12 @@ public Boolean call() { public void testCancellationWithReferencedObject() throws Exception { Object toBeGCed = new Object(); WeakReference ref = new WeakReference<>(toBeGCed); - final SettableFuture settableFuture = SettableFuture.create(); + final SettableFuture<@Nullable Void> settableFuture = SettableFuture.create(); ListenableFuture ignored = serializer.submitAsync( - new AsyncCallable() { + new AsyncCallable<@Nullable Void>() { @Override - public ListenableFuture call() { + public ListenableFuture<@Nullable Void> call() { return settableFuture; } }, @@ -195,9 +197,9 @@ public void execute(Runnable task) { final Future[] thingToCancel = new Future[1]; results.add( serializer.submit( - new Callable() { + new Callable<@Nullable Void>() { @Override - public Void call() { + public @Nullable Void call() { thingToCancel[0].cancel(false); return null; } @@ -223,13 +225,13 @@ public Void call() { } public void testAvoidsStackOverflow_manySubmitted() throws Exception { - final SettableFuture settableFuture = SettableFuture.create(); - ArrayList> results = new ArrayList<>(50_001); + final SettableFuture<@Nullable Void> settableFuture = SettableFuture.create(); + ArrayList> results = new ArrayList<>(50_001); results.add( serializer.submitAsync( - new AsyncCallable() { + new AsyncCallable<@Nullable Void>() { @Override - public ListenableFuture call() { + public ListenableFuture<@Nullable Void> call() { return settableFuture; } }, @@ -242,12 +244,12 @@ public ListenableFuture call() { } public void testAvoidsStackOverflow_manyCancelled() throws Exception { - final SettableFuture settableFuture = SettableFuture.create(); - ListenableFuture unused = + final SettableFuture<@Nullable Void> settableFuture = SettableFuture.create(); + ListenableFuture<@Nullable Void> unused = serializer.submitAsync( - new AsyncCallable() { + new AsyncCallable<@Nullable Void>() { @Override - public ListenableFuture call() { + public ListenableFuture<@Nullable Void> call() { return settableFuture; } }, @@ -270,12 +272,12 @@ public Integer call() { } public void testAvoidsStackOverflow_alternatingCancelledAndSubmitted() throws Exception { - final SettableFuture settableFuture = SettableFuture.create(); - ListenableFuture unused = + final SettableFuture<@Nullable Void> settableFuture = SettableFuture.create(); + ListenableFuture<@Nullable Void> unused = serializer.submitAsync( - new AsyncCallable() { + new AsyncCallable<@Nullable Void>() { @Override - public ListenableFuture call() { + public ListenableFuture<@Nullable Void> call() { return settableFuture; } }, @@ -344,12 +346,12 @@ public Integer call() { }, service) .get(); - final SettableFuture settableFuture = SettableFuture.create(); + final SettableFuture<@Nullable Void> settableFuture = SettableFuture.create(); ListenableFuture unused = serializer.submitAsync( - new AsyncCallable() { + new AsyncCallable<@Nullable Void>() { @Override - public ListenableFuture call() { + public ListenableFuture<@Nullable Void> call() { return settableFuture; } }, @@ -359,9 +361,9 @@ public ListenableFuture call() { // after some number of iterations, switch threads unused = serializer.submit( - new Callable() { + new Callable<@Nullable Void>() { @Override - public Void call() { + public @Nullable Void call() { holder.count++; return null; } @@ -383,9 +385,9 @@ public Integer call() { // Otherwise, schedule a task on directExecutor unused = serializer.submit( - new Callable() { + new Callable<@Nullable Void>() { @Override - public Void call() { + public @Nullable Void call() { holder.count++; return null; } @@ -416,14 +418,14 @@ public void testToString() { assertThat(second.toString()).contains(secondCallable.future.toString()); } - private static class BlockingCallable implements Callable { + private static class BlockingCallable implements Callable<@Nullable Void> { private final CountDownLatch startLatch = new CountDownLatch(1); private final CountDownLatch stopLatch = new CountDownLatch(1); private volatile boolean running = false; @Override - public Void call() throws InterruptedException { + public @Nullable Void call() throws InterruptedException { running = true; startLatch.countDown(); stopLatch.await(); @@ -444,17 +446,17 @@ public boolean isRunning() { } } - private static final class TestCallable implements AsyncCallable { + private static final class TestCallable implements AsyncCallable<@Nullable Void> { - private final ListenableFuture future; + private final ListenableFuture<@Nullable Void> future; private boolean called = false; - private TestCallable(ListenableFuture future) { + private TestCallable(ListenableFuture<@Nullable Void> future) { this.future = future; } @Override - public ListenableFuture call() throws Exception { + public ListenableFuture<@Nullable Void> call() throws Exception { called = true; return future; } diff --git a/guava-tests/test/com/google/common/util/concurrent/ForwardingObjectTester.java b/guava-tests/test/com/google/common/util/concurrent/ForwardingObjectTester.java index 84b0426a6830..ad391efdc5d1 100644 --- a/guava-tests/test/com/google/common/util/concurrent/ForwardingObjectTester.java +++ b/guava-tests/test/com/google/common/util/concurrent/ForwardingObjectTester.java @@ -28,7 +28,7 @@ import java.util.Arrays; /** - * Tester for typical subclass of {@link ForwardingObject} by using EasyMock partial mocks. + * Tester for typical subclass of {@link ForwardingObject} by using Mockito. * * @author Ben Yu */ diff --git a/guava-tests/test/com/google/common/util/concurrent/FuturesTest.java b/guava-tests/test/com/google/common/util/concurrent/FuturesTest.java index ebb2e86335e1..c46801b99e72 100644 --- a/guava-tests/test/com/google/common/util/concurrent/FuturesTest.java +++ b/guava-tests/test/com/google/common/util/concurrent/FuturesTest.java @@ -141,7 +141,7 @@ public void testImmediateFuture() throws Exception { } public void testImmediateVoidFuture() throws Exception { - ListenableFuture voidFuture = immediateVoidFuture(); + ListenableFuture<@Nullable Void> voidFuture = immediateVoidFuture(); assertThat(getDone(voidFuture)).isNull(); assertThat(getDoneFromTimeoutOverload(voidFuture)).isNull(); @@ -1662,7 +1662,7 @@ public ListenableFuture apply(X t) { } private static AsyncFunction constantAsyncFunction( - final ListenableFuture output) { + final @Nullable ListenableFuture output) { return new AsyncFunction() { @Override public ListenableFuture apply(I input) { @@ -1978,7 +1978,7 @@ public void execute(Runnable runnable) { pendingRunnables.add(runnable); } }; - ListenableFuture future = submit(runnable, executor); + ListenableFuture<@Nullable Void> future = submit(runnable, executor); assertThat(future.isDone()).isFalse(); assertThat(executedRunnables).isEmpty(); assertThat(pendingRunnables).hasSize(1); @@ -1997,7 +1997,7 @@ public void run() { throw exception; } }; - ListenableFuture future = submit(runnable, directExecutor()); + ListenableFuture<@Nullable Void> future = submit(runnable, directExecutor()); try { getDone(future); fail(); @@ -2110,7 +2110,8 @@ public void run() { assertFalse(callableCalled.get()); } - private static AsyncCallable constantAsyncCallable(final ListenableFuture returnValue) { + private static AsyncCallable constantAsyncCallable( + final @Nullable ListenableFuture returnValue) { return new AsyncCallable() { @Override public ListenableFuture call() { diff --git a/guava-tests/test/com/google/common/util/concurrent/GeneratedMonitorTest.java b/guava-tests/test/com/google/common/util/concurrent/GeneratedMonitorTest.java index 8b5caebf51fb..9e33d1f57f05 100644 --- a/guava-tests/test/com/google/common/util/concurrent/GeneratedMonitorTest.java +++ b/guava-tests/test/com/google/common/util/concurrent/GeneratedMonitorTest.java @@ -35,6 +35,7 @@ import java.util.concurrent.TimeUnit; import junit.framework.TestCase; import junit.framework.TestSuite; +import org.checkerframework.checker.nullness.qual.Nullable; /** * Generated tests for {@link Monitor}. @@ -460,7 +461,11 @@ public void setSatisfied(boolean satisfied) { private final CountDownLatch callCompletedLatch; private GeneratedMonitorTest( - Method method, Scenario scenario, boolean fair, Timeout timeout, Outcome expectedOutcome) { + Method method, + Scenario scenario, + boolean fair, + @Nullable Timeout timeout, + Outcome expectedOutcome) { super(nameFor(method, scenario, fair, timeout, expectedOutcome)); this.method = method; this.scenario = scenario; @@ -494,7 +499,7 @@ public void run() { runChosenTest(); } }; - final FutureTask task = new FutureTask<>(runChosenTest, null); + final FutureTask<@Nullable Void> task = new FutureTask<>(runChosenTest, null); startThread( new Runnable() { @Override diff --git a/guava-tests/test/com/google/common/util/concurrent/InterruptibleTaskTest.java b/guava-tests/test/com/google/common/util/concurrent/InterruptibleTaskTest.java index 0df083fb8059..6d1591354f93 100644 --- a/guava-tests/test/com/google/common/util/concurrent/InterruptibleTaskTest.java +++ b/guava-tests/test/com/google/common/util/concurrent/InterruptibleTaskTest.java @@ -23,6 +23,7 @@ import java.util.concurrent.TimeUnit; import java.util.concurrent.locks.LockSupport; import junit.framework.TestCase; +import org.checkerframework.checker.nullness.qual.Nullable; public final class InterruptibleTaskTest extends TestCase { @@ -30,10 +31,10 @@ public final class InterruptibleTaskTest extends TestCase { // transition to DONE public void testInterruptThrows() throws Exception { final CountDownLatch isInterruptibleRegistered = new CountDownLatch(1); - InterruptibleTask task = - new InterruptibleTask() { + InterruptibleTask<@Nullable Void> task = + new InterruptibleTask<@Nullable Void>() { @Override - Void runInterruptibly() throws Exception { + @Nullable Void runInterruptibly() throws Exception { BrokenChannel bc = new BrokenChannel(); bc.doBegin(); isInterruptibleRegistered.countDown(); @@ -52,7 +53,7 @@ String toPendingString() { } @Override - void afterRanInterruptiblySuccess(Void result) {} + void afterRanInterruptiblySuccess(@Nullable Void result) {} @Override void afterRanInterruptiblyFailure(Throwable error) {} @@ -100,10 +101,10 @@ void doBegin() { public void testInterruptIsSlow() throws Exception { final CountDownLatch isInterruptibleRegistered = new CountDownLatch(1); final SlowChannel slowChannel = new SlowChannel(); - final InterruptibleTask task = - new InterruptibleTask() { + final InterruptibleTask<@Nullable Void> task = + new InterruptibleTask<@Nullable Void>() { @Override - Void runInterruptibly() throws Exception { + @Nullable Void runInterruptibly() throws Exception { slowChannel.doBegin(); isInterruptibleRegistered.countDown(); try { @@ -126,7 +127,7 @@ String toPendingString() { } @Override - void afterRanInterruptiblySuccess(Void result) {} + void afterRanInterruptiblySuccess(@Nullable Void result) {} @Override void afterRanInterruptiblyFailure(Throwable error) {} diff --git a/guava-tests/test/com/google/common/util/concurrent/MoreExecutorsTest.java b/guava-tests/test/com/google/common/util/concurrent/MoreExecutorsTest.java index aac61735e998..dab6d92f9c6e 100644 --- a/guava-tests/test/com/google/common/util/concurrent/MoreExecutorsTest.java +++ b/guava-tests/test/com/google/common/util/concurrent/MoreExecutorsTest.java @@ -72,6 +72,7 @@ import java.util.concurrent.TimeUnit; import java.util.concurrent.atomic.AtomicBoolean; import java.util.concurrent.atomic.AtomicReference; +import org.checkerframework.checker.nullness.qual.Nullable; import org.mockito.InOrder; import org.mockito.Mockito; @@ -185,9 +186,9 @@ public void run() { try { Future future = executor.submit( - new Callable() { + new Callable<@Nullable Void>() { @Override - public Void call() throws Exception { + public @Nullable Void call() throws Exception { // WAIT #1 barrier.await(1, TimeUnit.SECONDS); diff --git a/guava-tests/test/com/google/common/util/concurrent/RateLimiterTest.java b/guava-tests/test/com/google/common/util/concurrent/RateLimiterTest.java index a6c08999b74a..279c98e020a0 100644 --- a/guava-tests/test/com/google/common/util/concurrent/RateLimiterTest.java +++ b/guava-tests/test/com/google/common/util/concurrent/RateLimiterTest.java @@ -35,7 +35,6 @@ import java.util.Random; import java.util.concurrent.TimeUnit; import junit.framework.TestCase; -import org.easymock.EasyMock; import org.mockito.Mockito; /** @@ -571,17 +570,6 @@ public String toString() { */ public void testMockingMockito() throws Exception { RateLimiter mock = Mockito.mock(RateLimiter.class); - doTestMocking(mock); - } - - @AndroidIncompatible // EasyMock Class Extension doesn't appear to work on Android. - public void testMockingEasyMock() throws Exception { - RateLimiter mock = EasyMock.createNiceMock(RateLimiter.class); - EasyMock.replay(mock); - doTestMocking(mock); - } - - private static void doTestMocking(RateLimiter mock) throws Exception { for (Method method : RateLimiter.class.getMethods()) { if (!isStatic(method.getModifiers()) && !NOT_WORKING_ON_MOCKS.contains(method.getName()) diff --git a/guava-tests/test/com/google/common/util/concurrent/SimpleTimeLimiterTest.java b/guava-tests/test/com/google/common/util/concurrent/SimpleTimeLimiterTest.java index 35406864dce4..37ef84f66998 100644 --- a/guava-tests/test/com/google/common/util/concurrent/SimpleTimeLimiterTest.java +++ b/guava-tests/test/com/google/common/util/concurrent/SimpleTimeLimiterTest.java @@ -278,7 +278,7 @@ public String sleepThenReturnInput(String input) { finished = true; return input; } catch (InterruptedException e) { - return null; + throw new AssertionError(); } } diff --git a/guava-tests/test/com/google/common/util/concurrent/TestThread.java b/guava-tests/test/com/google/common/util/concurrent/TestThread.java index 6d5609399b0d..ef3b27410d40 100644 --- a/guava-tests/test/com/google/common/util/concurrent/TestThread.java +++ b/guava-tests/test/com/google/common/util/concurrent/TestThread.java @@ -58,7 +58,7 @@ public final class TestThread extends Thread implements TearDown { private final SynchronousQueue requestQueue = new SynchronousQueue<>(); private final SynchronousQueue responseQueue = new SynchronousQueue<>(); - private Throwable uncaughtThrowable = null; + private @Nullable Throwable uncaughtThrowable = null; public TestThread(L lockLikeObject, String threadName) { super(threadName); @@ -275,7 +275,7 @@ private static class Response { final Object result; final Throwable throwable; - Response(String methodName, Object result, Throwable throwable) { + Response(String methodName, @Nullable Object result, @Nullable Throwable throwable) { this.methodName = methodName; this.result = result; this.throwable = throwable; diff --git a/guava-tests/test/com/google/common/util/concurrent/TrustedListenableFutureTaskTest.java b/guava-tests/test/com/google/common/util/concurrent/TrustedListenableFutureTaskTest.java index 8cf16c7bfe85..e58d3eef0de6 100644 --- a/guava-tests/test/com/google/common/util/concurrent/TrustedListenableFutureTaskTest.java +++ b/guava-tests/test/com/google/common/util/concurrent/TrustedListenableFutureTaskTest.java @@ -33,6 +33,7 @@ import java.util.concurrent.atomic.AtomicBoolean; import java.util.concurrent.atomic.AtomicInteger; import junit.framework.TestCase; +import org.checkerframework.checker.nullness.qual.Nullable; /** Test case for {@link TrustedListenableFutureTask}. */ @GwtCompatible(emulated = true) @@ -172,11 +173,11 @@ public void run() { public void testToString() throws Exception { final CountDownLatch enterLatch = new CountDownLatch(1); final CountDownLatch exitLatch = new CountDownLatch(1); - final TrustedListenableFutureTask task = + final TrustedListenableFutureTask<@Nullable Void> task = TrustedListenableFutureTask.create( - new Callable() { + new Callable<@Nullable Void>() { @Override - public Void call() throws Exception { + public @Nullable Void call() throws Exception { enterLatch.countDown(); new CountDownLatch(1).await(); // wait forever return null; diff --git a/guava-tests/test/com/google/common/util/concurrent/WrappingExecutorServiceTest.java b/guava-tests/test/com/google/common/util/concurrent/WrappingExecutorServiceTest.java index fdb2c54e6792..5cbc7c2b732c 100644 --- a/guava-tests/test/com/google/common/util/concurrent/WrappingExecutorServiceTest.java +++ b/guava-tests/test/com/google/common/util/concurrent/WrappingExecutorServiceTest.java @@ -188,7 +188,7 @@ protected Runnable wrapTask(Runnable command) { } } - // TODO: If this test can ever depend on EasyMock or the like, use it instead. + // TODO: If this test can ever depend on Mockito or the like, use it instead. private static final class MockExecutor implements ExecutorService { private String lastMethodCalled = ""; private long lastTimeoutInMillis = -1; diff --git a/guava/pom.xml b/guava/pom.xml index 50c031bb0748..150831cc8ae7 100644 --- a/guava/pom.xml +++ b/guava/pom.xml @@ -62,7 +62,7 @@ true org.apache.felix maven-bundle-plugin - 2.5.0 + 5.1.8 bundle-manifest diff --git a/guava/src/com/google/common/annotations/J2ktIncompatible.java b/guava/src/com/google/common/annotations/J2ktIncompatible.java new file mode 100644 index 000000000000..6e28d025c932 --- /dev/null +++ b/guava/src/com/google/common/annotations/J2ktIncompatible.java @@ -0,0 +1,31 @@ +/* + * Copyright (C) 2009 The Guava Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ + +package com.google.common.annotations; + +import java.lang.annotation.ElementType; +import java.lang.annotation.Retention; +import java.lang.annotation.RetentionPolicy; +import java.lang.annotation.Target; + +/** + * The presence of this annotation on an API indicates that the method may not be used with + * J2kt. + * + * @since NEXT + */ +@Retention(RetentionPolicy.CLASS) +@Target({ElementType.TYPE, ElementType.METHOD, ElementType.CONSTRUCTOR, ElementType.FIELD}) +@GwtCompatible +public @interface J2ktIncompatible {} diff --git a/guava/src/com/google/common/annotations/VisibleForTesting.java b/guava/src/com/google/common/annotations/VisibleForTesting.java index e767afcdd3e2..24b4db5bde02 100644 --- a/guava/src/com/google/common/annotations/VisibleForTesting.java +++ b/guava/src/com/google/common/annotations/VisibleForTesting.java @@ -22,8 +22,8 @@ * bad design, and it does not prevent anyone from using the declaration---and experience has shown * that they will. If the method breaks the encapsulation of its class, then its internal * representation will be hard to change. Instead, use RestrictedApiChecker, which - * enforces fine-grained visibility policies. + * href="http://errorprone.info/bugpattern/RestrictedApi">RestrictedApiChecker, which enforces + * fine-grained visibility policies. * * @author Johannes Henkel */ diff --git a/guava/src/com/google/common/base/CaseFormat.java b/guava/src/com/google/common/base/CaseFormat.java index 7b393ebd7e0f..93fa7e4b7665 100644 --- a/guava/src/com/google/common/base/CaseFormat.java +++ b/guava/src/com/google/common/base/CaseFormat.java @@ -151,7 +151,8 @@ String convert(CaseFormat format, String s) { } /** - * Returns a {@code Converter} that converts strings from this format to {@code targetFormat}. + * Returns a serializable {@code Converter} that converts strings from this format to {@code + * targetFormat}. * * @since 16.0 */ diff --git a/guava/src/com/google/common/base/CharMatcher.java b/guava/src/com/google/common/base/CharMatcher.java index 253bc6a22f9e..4ed1e9a90e6f 100644 --- a/guava/src/com/google/common/base/CharMatcher.java +++ b/guava/src/com/google/common/base/CharMatcher.java @@ -20,6 +20,7 @@ import com.google.common.annotations.GwtCompatible; import com.google.common.annotations.GwtIncompatible; +import com.google.common.annotations.J2ktIncompatible; import com.google.common.annotations.VisibleForTesting; import java.util.Arrays; import java.util.BitSet; @@ -412,6 +413,7 @@ public CharMatcher precomputed() { * constructs an eight-kilobyte bit array and queries that. In many situations this produces a * matcher which is faster to query than the original. */ + @J2ktIncompatible @GwtIncompatible // SmallCharMatcher CharMatcher precomputedInternal() { final BitSet table = new BitSet(); @@ -442,6 +444,7 @@ public String toString() { /** * Helper method for {@link #precomputedInternal} that doesn't test if the negation is cheaper. */ + @J2ktIncompatible @GwtIncompatible // SmallCharMatcher private static CharMatcher precomputedPositive( int totalCharacters, BitSet table, String description) { @@ -461,6 +464,7 @@ private static CharMatcher precomputedPositive( } } + @J2ktIncompatible @GwtIncompatible // SmallCharMatcher private static boolean isSmall(int totalCharacters, int tableLength) { return totalCharacters <= SmallCharMatcher.MAX_SIZE @@ -469,6 +473,7 @@ private static boolean isSmall(int totalCharacters, int tableLength) { } /** Sets bits in {@code table} matched by this matcher. */ + @J2ktIncompatible @GwtIncompatible // used only from other GwtIncompatible code void setBits(BitSet table) { for (int c = Character.MAX_VALUE; c >= Character.MIN_VALUE; c--) { @@ -979,6 +984,7 @@ public final CharMatcher precomputed() { } /** Fast matcher using a {@link BitSet} table of matching characters. */ + @J2ktIncompatible @GwtIncompatible // used only from other GwtIncompatible code private static final class BitSetMatcher extends NamedFastMatcher { @@ -1233,6 +1239,7 @@ public boolean matches(char c) { return TABLE.charAt((MULTIPLIER * c) >>> SHIFT) == c; } + @J2ktIncompatible @GwtIncompatible // used only from other GwtIncompatible code @Override void setBits(BitSet table) { @@ -1519,6 +1526,7 @@ public int countIn(CharSequence sequence) { return sequence.length() - original.countIn(sequence); } + @J2ktIncompatible @GwtIncompatible // used only from other GwtIncompatible code @Override void setBits(BitSet table) { @@ -1555,6 +1563,7 @@ public boolean matches(char c) { return first.matches(c) && second.matches(c); } + @J2ktIncompatible @GwtIncompatible // used only from other GwtIncompatible code @Override void setBits(BitSet table) { @@ -1583,6 +1592,7 @@ private static final class Or extends CharMatcher { second = checkNotNull(b); } + @J2ktIncompatible @GwtIncompatible // used only from other GwtIncompatible code @Override void setBits(BitSet table) { @@ -1637,6 +1647,7 @@ public CharMatcher negate() { return isNot(match); } + @J2ktIncompatible @GwtIncompatible // used only from other GwtIncompatible code @Override void setBits(BitSet table) { @@ -1673,6 +1684,7 @@ public CharMatcher or(CharMatcher other) { return other.matches(match) ? any() : this; } + @J2ktIncompatible @GwtIncompatible // used only from other GwtIncompatible code @Override void setBits(BitSet table) { @@ -1711,6 +1723,7 @@ public boolean matches(char c) { return c == match1 || c == match2; } + @J2ktIncompatible @GwtIncompatible // used only from other GwtIncompatible code @Override void setBits(BitSet table) { @@ -1740,6 +1753,7 @@ public boolean matches(char c) { } @Override + @J2ktIncompatible @GwtIncompatible // used only from other GwtIncompatible code void setBits(BitSet table) { for (char c : chars) { @@ -1775,6 +1789,7 @@ public boolean matches(char c) { return startInclusive <= c && c <= endInclusive; } + @J2ktIncompatible @GwtIncompatible // used only from other GwtIncompatible code @Override void setBits(BitSet table) { diff --git a/guava/src/com/google/common/base/Charsets.java b/guava/src/com/google/common/base/Charsets.java index 7aebea826c78..538e604f2dbd 100644 --- a/guava/src/com/google/common/base/Charsets.java +++ b/guava/src/com/google/common/base/Charsets.java @@ -16,6 +16,7 @@ import com.google.common.annotations.GwtCompatible; import com.google.common.annotations.GwtIncompatible; +import com.google.common.annotations.J2ktIncompatible; import java.nio.charset.Charset; /** @@ -42,6 +43,7 @@ private Charsets() {} * java.nio.charset.StandardCharsets#US_ASCII} instead. * */ + @J2ktIncompatible @GwtIncompatible // Charset not supported by GWT public static final Charset US_ASCII = Charset.forName("US-ASCII"); @@ -70,6 +72,7 @@ private Charsets() {} * java.nio.charset.StandardCharsets#UTF_16BE} instead. * */ + @J2ktIncompatible @GwtIncompatible // Charset not supported by GWT public static final Charset UTF_16BE = Charset.forName("UTF-16BE"); @@ -80,6 +83,7 @@ private Charsets() {} * java.nio.charset.StandardCharsets#UTF_16LE} instead. * */ + @J2ktIncompatible @GwtIncompatible // Charset not supported by GWT public static final Charset UTF_16LE = Charset.forName("UTF-16LE"); @@ -91,6 +95,7 @@ private Charsets() {} * java.nio.charset.StandardCharsets#UTF_16} instead. * */ + @J2ktIncompatible @GwtIncompatible // Charset not supported by GWT public static final Charset UTF_16 = Charset.forName("UTF-16"); diff --git a/guava/src/com/google/common/base/Converter.java b/guava/src/com/google/common/base/Converter.java index 7f1234d9a176..63f4394f4821 100644 --- a/guava/src/com/google/common/base/Converter.java +++ b/guava/src/com/google/common/base/Converter.java @@ -283,8 +283,6 @@ public boolean hasNext() { } @Override - @SuppressWarnings("nullness") // See code comments on convertAll and Converter.apply. - @CheckForNull public B next() { return convert(fromIterator.next()); } @@ -458,40 +456,26 @@ public String toString() { */ @Deprecated @Override - /* - * Even though we implement `Function` instead of `Function<@Nullable A, @Nullable B>` (as - * discussed in a code comment at the top of the class), we declare our override of Function.apply - * to accept and return null. This requires a suppression, but it's safe: - * - * - Callers who use Converter as a Function will neither pass null nor have it returned to - * them. (Or, if they're not using nullness checking, they might be able to pass null and thus - * have null returned to them. But our signature isn't making their existing nullness type error - * any worse.) - * - In the relatively unlikely event that anyone calls Converter.apply directly, that caller is - * allowed to pass null but is also forced to deal with a potentially null return. - * - Perhaps more important than actual *callers* of this method are various tools that look at - * bytecode. Notably, NullPointerTester expects a method to throw NPE when passed null unless it - * is annotated in a way that identifies its parameter type as potentially including null. (And - * this method does not throw NPE -- nor do we want to enact a dangerous change to make it begin - * doing so.) We can even imagine tools that rewrite bytecode to insert null checks before and - * after calling methods with allegedly non-nullable parameters[*]. If we didn't annotate the - * parameter and return type here, then anyone who used such a tool (and managed to pass null to - * this method, presumably because that user doesn't run a normal nullness checker) could see - * NullPointerException. - * - * [*] Granted, such tools could conceivably be smart enough to recognize that the apply() method - * on a Function should never allow null inputs and never produce null outputs even if - * this specific subclass claims otherwise. Such tools might still produce NPE for calls to this - * method. And that is one reason that we should be nervous about "lying" by extending Function in the first place. But for now, we're giving it a try, since extending Function<@Nullable - * A, @Nullable B> will cause issues *today*, whereas extending Function causes problems in - * various hypothetical futures. (Plus, a tool that were that smart would likely already introduce - * problems with LegacyConverter.) - */ - @SuppressWarnings("nullness") - @CheckForNull @InlineMe(replacement = "this.convert(a)") - public final B apply(@CheckForNull A a) { + public final B apply(A a) { + /* + * Given that we declare this method as accepting and returning non-nullable values (because we + * implement Function, as discussed in a class-level comment), it would make some sense to + * perform runtime null checks on the input and output. (That would also make NullPointerTester + * happy!) However, since we didn't do that for many years, we're not about to start now. + * (Runtime checks could be particularly bad for users of LegacyConverter.) + * + * Luckily, our nullness checker is smart enough to realize that `convert` has @PolyNull-like + * behavior, so it knows that `convert(a)` returns a non-nullable value, and we don't need to + * perform even a cast, much less a runtime check. + * + * All that said, don't forget that everyone should call converter.convert() instead of + * converter.apply(), anyway. If clients use only converter.convert(), then their nullness + * checkers are unlikely to ever look at the annotations on this declaration. + * + * Historical note: At one point, we'd declared this method as accepting and returning nullable + * values. For details on that, see earlier revisions of this file. + */ return convert(a); } diff --git a/guava/src/com/google/common/base/Defaults.java b/guava/src/com/google/common/base/Defaults.java index 5d12343ed241..089f4b572438 100644 --- a/guava/src/com/google/common/base/Defaults.java +++ b/guava/src/com/google/common/base/Defaults.java @@ -17,6 +17,7 @@ import static com.google.common.base.Preconditions.checkNotNull; import com.google.common.annotations.GwtIncompatible; +import com.google.common.annotations.J2ktIncompatible; import javax.annotation.CheckForNull; /** @@ -25,6 +26,7 @@ * @author Ben Yu * @since 1.0 */ +@J2ktIncompatible @GwtIncompatible @ElementTypesAreNonnullByDefault public final class Defaults { diff --git a/guava/src/com/google/common/base/Enums.java b/guava/src/com/google/common/base/Enums.java index 5c55b65942cd..11fbfa8ffad2 100644 --- a/guava/src/com/google/common/base/Enums.java +++ b/guava/src/com/google/common/base/Enums.java @@ -18,6 +18,7 @@ import com.google.common.annotations.GwtCompatible; import com.google.common.annotations.GwtIncompatible; +import com.google.common.annotations.J2ktIncompatible; import java.io.Serializable; import java.lang.ref.WeakReference; import java.lang.reflect.Field; @@ -34,6 +35,7 @@ * @since 9.0 */ @GwtCompatible(emulated = true) +@J2ktIncompatible @ElementTypesAreNonnullByDefault public final class Enums { @@ -48,7 +50,8 @@ private Enums() {} */ @GwtIncompatible // reflection public static Field getField(Enum enumValue) { - Class clazz = enumValue.getDeclaringClass(); + Class + clazz = enumValue.getDeclaringClass(); try { return clazz.getDeclaredField(enumValue.name()); } catch (NoSuchFieldException impossible) { @@ -98,10 +101,10 @@ static > Map>> getEnum } /** - * Returns a converter that converts between strings and {@code enum} values of type {@code - * enumClass} using {@link Enum#valueOf(Class, String)} and {@link Enum#name()}. The converter - * will throw an {@code IllegalArgumentException} if the argument is not the name of any enum - * constant in the specified enum. + * Returns a serializable converter that converts between strings and {@code enum} values of type + * {@code enumClass} using {@link Enum#valueOf(Class, String)} and {@link Enum#name()}. The + * converter will throw an {@code IllegalArgumentException} if the argument is not the name of any + * enum constant in the specified enum. * * @since 16.0 */ diff --git a/guava/src/com/google/common/base/Equivalence.java b/guava/src/com/google/common/base/Equivalence.java index 16f9bcc20cd6..a2b8bb15b01b 100644 --- a/guava/src/com/google/common/base/Equivalence.java +++ b/guava/src/com/google/common/base/Equivalence.java @@ -163,11 +163,13 @@ public final Equivalence onResultOf(FunctionThe returned object is serializable if both this {@code Equivalence} and {@code reference} + * are serializable (including when {@code reference} is null). + * * @since 10.0 */ public final Wrapper wrap(@ParametricNullness S reference) { - Wrapper w = new Wrapper<>(this, reference); - return w; + return new Wrapper<>(this, reference); } /** @@ -267,6 +269,8 @@ public String toString() { *

    Note that this method performs a similar function for equivalences as {@link * com.google.common.collect.Ordering#lexicographical} does for orderings. * + *

    The returned object is serializable if this object is serializable. + * * @since 10.0 */ @GwtCompatible(serializable = true) diff --git a/guava/src/com/google/common/base/FinalizablePhantomReference.java b/guava/src/com/google/common/base/FinalizablePhantomReference.java index 4f9399669569..6f76b63f7647 100644 --- a/guava/src/com/google/common/base/FinalizablePhantomReference.java +++ b/guava/src/com/google/common/base/FinalizablePhantomReference.java @@ -15,6 +15,7 @@ package com.google.common.base; import com.google.common.annotations.GwtIncompatible; +import com.google.common.annotations.J2ktIncompatible; import java.lang.ref.PhantomReference; import java.lang.ref.ReferenceQueue; import javax.annotation.CheckForNull; @@ -29,6 +30,7 @@ * @author Bob Lee * @since 2.0 */ +@J2ktIncompatible @GwtIncompatible @ElementTypesAreNonnullByDefault public abstract class FinalizablePhantomReference extends PhantomReference diff --git a/guava/src/com/google/common/base/FinalizableReference.java b/guava/src/com/google/common/base/FinalizableReference.java index 73753c9b3520..f538f9dc0e1b 100644 --- a/guava/src/com/google/common/base/FinalizableReference.java +++ b/guava/src/com/google/common/base/FinalizableReference.java @@ -15,6 +15,7 @@ package com.google.common.base; import com.google.common.annotations.GwtIncompatible; +import com.google.common.annotations.J2ktIncompatible; import com.google.errorprone.annotations.DoNotMock; /** @@ -25,6 +26,7 @@ * @since 2.0 */ @DoNotMock("Use an instance of one of the Finalizable*Reference classes") +@J2ktIncompatible @GwtIncompatible @ElementTypesAreNonnullByDefault public interface FinalizableReference { diff --git a/guava/src/com/google/common/base/FinalizableReferenceQueue.java b/guava/src/com/google/common/base/FinalizableReferenceQueue.java index 7447b8051d31..7f1afbb3904d 100644 --- a/guava/src/com/google/common/base/FinalizableReferenceQueue.java +++ b/guava/src/com/google/common/base/FinalizableReferenceQueue.java @@ -15,6 +15,7 @@ package com.google.common.base; import com.google.common.annotations.GwtIncompatible; +import com.google.common.annotations.J2ktIncompatible; import com.google.common.annotations.VisibleForTesting; import java.io.Closeable; import java.io.FileNotFoundException; @@ -88,6 +89,7 @@ * @author Bob Lee * @since 2.0 */ +@J2ktIncompatible @GwtIncompatible @ElementTypesAreNonnullByDefault public class FinalizableReferenceQueue implements Closeable { diff --git a/guava/src/com/google/common/base/FinalizableSoftReference.java b/guava/src/com/google/common/base/FinalizableSoftReference.java index c0e9b6bae041..f4b7c80050fb 100644 --- a/guava/src/com/google/common/base/FinalizableSoftReference.java +++ b/guava/src/com/google/common/base/FinalizableSoftReference.java @@ -15,6 +15,7 @@ package com.google.common.base; import com.google.common.annotations.GwtIncompatible; +import com.google.common.annotations.J2ktIncompatible; import java.lang.ref.ReferenceQueue; import java.lang.ref.SoftReference; import javax.annotation.CheckForNull; @@ -27,6 +28,7 @@ * @author Bob Lee * @since 2.0 */ +@J2ktIncompatible @GwtIncompatible @ElementTypesAreNonnullByDefault public abstract class FinalizableSoftReference extends SoftReference diff --git a/guava/src/com/google/common/base/FinalizableWeakReference.java b/guava/src/com/google/common/base/FinalizableWeakReference.java index 9cca92ed5310..12c8dfbfceb3 100644 --- a/guava/src/com/google/common/base/FinalizableWeakReference.java +++ b/guava/src/com/google/common/base/FinalizableWeakReference.java @@ -15,6 +15,7 @@ package com.google.common.base; import com.google.common.annotations.GwtIncompatible; +import com.google.common.annotations.J2ktIncompatible; import java.lang.ref.ReferenceQueue; import java.lang.ref.WeakReference; import javax.annotation.CheckForNull; @@ -27,6 +28,7 @@ * @author Bob Lee * @since 2.0 */ +@J2ktIncompatible @GwtIncompatible @ElementTypesAreNonnullByDefault public abstract class FinalizableWeakReference extends WeakReference diff --git a/guava/src/com/google/common/base/FunctionalEquivalence.java b/guava/src/com/google/common/base/FunctionalEquivalence.java index 4383f4f36c1a..1cd8c416d39a 100644 --- a/guava/src/com/google/common/base/FunctionalEquivalence.java +++ b/guava/src/com/google/common/base/FunctionalEquivalence.java @@ -16,7 +16,6 @@ import static com.google.common.base.Preconditions.checkNotNull; -import com.google.common.annotations.Beta; import com.google.common.annotations.GwtCompatible; import java.io.Serializable; import javax.annotation.CheckForNull; @@ -28,7 +27,6 @@ * @author Bob Lee * @since 10.0 */ -@Beta @GwtCompatible @ElementTypesAreNonnullByDefault final class FunctionalEquivalence extends Equivalence implements Serializable { diff --git a/guava/src/com/google/common/base/Java8Compatibility.java b/guava/src/com/google/common/base/Java8Compatibility.java index edc8b73bdd10..2dfbd6b1cf19 100644 --- a/guava/src/com/google/common/base/Java8Compatibility.java +++ b/guava/src/com/google/common/base/Java8Compatibility.java @@ -15,12 +15,14 @@ package com.google.common.base; import com.google.common.annotations.GwtIncompatible; +import com.google.common.annotations.J2ktIncompatible; import java.nio.Buffer; /** * Wrappers around {@link Buffer} methods that are covariantly overridden in Java 9+. See * https://github.com/google/guava/issues/3990 */ +@J2ktIncompatible @GwtIncompatible @ElementTypesAreNonnullByDefault final class Java8Compatibility { diff --git a/guava/src/com/google/common/base/JdkPattern.java b/guava/src/com/google/common/base/JdkPattern.java index 4788398b7c20..a259d0061daa 100644 --- a/guava/src/com/google/common/base/JdkPattern.java +++ b/guava/src/com/google/common/base/JdkPattern.java @@ -15,12 +15,14 @@ package com.google.common.base; import com.google.common.annotations.GwtIncompatible; +import com.google.common.annotations.J2ktIncompatible; import java.io.Serializable; import java.util.regex.Matcher; import java.util.regex.Pattern; /** A regex pattern implementation which is backed by the {@link Pattern}. */ @ElementTypesAreNonnullByDefault +@J2ktIncompatible @GwtIncompatible final class JdkPattern extends CommonPattern implements Serializable { private final Pattern pattern; diff --git a/guava/src/com/google/common/base/Joiner.java b/guava/src/com/google/common/base/Joiner.java index 8b29f68f8ad1..fe1b40a5e073 100644 --- a/guava/src/com/google/common/base/Joiner.java +++ b/guava/src/com/google/common/base/Joiner.java @@ -17,7 +17,6 @@ import static com.google.common.base.Preconditions.checkNotNull; import static java.util.Objects.requireNonNull; -import com.google.common.annotations.Beta; import com.google.common.annotations.GwtCompatible; import com.google.errorprone.annotations.CanIgnoreReturnValue; import java.io.IOException; @@ -366,7 +365,6 @@ public StringBuilder appendTo(StringBuilder builder, Map map) { * * @since 10.0 */ - @Beta @CanIgnoreReturnValue public A appendTo(A appendable, Iterable> entries) throws IOException { @@ -379,7 +377,6 @@ public A appendTo(A appendable, Iterable A appendTo(A appendable, Iterator> parts) throws IOException { @@ -407,7 +404,6 @@ public A appendTo(A appendable, Iterator> entries) { return appendTo(builder, entries.iterator()); @@ -420,7 +416,6 @@ public StringBuilder appendTo(StringBuilder builder, Iterable> entries) { try { @@ -445,7 +440,6 @@ public String join(Map map) { * * @since 10.0 */ - @Beta public String join(Iterable> entries) { return join(entries.iterator()); } @@ -456,7 +450,6 @@ public String join(Iterable> entries) { * * @since 11.0 */ - @Beta public String join(Iterator> entries) { return appendTo(new StringBuilder(), entries).toString(); } diff --git a/guava/src/com/google/common/base/MoreObjects.java b/guava/src/com/google/common/base/MoreObjects.java index 103c759207b9..989cfe0678b4 100644 --- a/guava/src/com/google/common/base/MoreObjects.java +++ b/guava/src/com/google/common/base/MoreObjects.java @@ -419,12 +419,14 @@ private ValueHolder addHolder() { return valueHolder; } + @CanIgnoreReturnValue private ToStringHelper addHolder(@CheckForNull Object value) { ValueHolder valueHolder = addHolder(); valueHolder.value = value; return this; } + @CanIgnoreReturnValue private ToStringHelper addHolder(String name, @CheckForNull Object value) { ValueHolder valueHolder = addHolder(); valueHolder.value = value; @@ -438,12 +440,14 @@ private UnconditionalValueHolder addUnconditionalHolder() { return valueHolder; } + @CanIgnoreReturnValue private ToStringHelper addUnconditionalHolder(Object value) { UnconditionalValueHolder valueHolder = addUnconditionalHolder(); valueHolder.value = value; return this; } + @CanIgnoreReturnValue private ToStringHelper addUnconditionalHolder(String name, Object value) { UnconditionalValueHolder valueHolder = addUnconditionalHolder(); valueHolder.value = value; diff --git a/guava/src/com/google/common/base/Optional.java b/guava/src/com/google/common/base/Optional.java index b47705e82f7a..b30cb51e9b6b 100644 --- a/guava/src/com/google/common/base/Optional.java +++ b/guava/src/com/google/common/base/Optional.java @@ -16,7 +16,6 @@ import static com.google.common.base.Preconditions.checkNotNull; -import com.google.common.annotations.Beta; import com.google.common.annotations.GwtCompatible; import com.google.errorprone.annotations.DoNotMock; import java.io.Serializable; @@ -52,6 +51,9 @@ *

    This class is not intended as a direct analogue of any existing "option" or "maybe" construct * from other programming environments, though it may bear some similarities. * + *

    An instance of this class is serializable if its reference is absent or is a serializable + * object. + * *

    Comparison to {@code java.util.Optional} (JDK 8 and higher): A new {@code Optional} * class was added for Java 8. The two classes are extremely similar, but incompatible (they cannot * share a common supertype). All known differences are listed either here or with the @@ -239,7 +241,6 @@ public java.util.Optional toJavaUtil() { * @throws NullPointerException if this optional's value is absent and the supplier returns {@code * null} */ - @Beta public abstract T or(Supplier supplier); /** @@ -331,7 +332,6 @@ public java.util.Optional toJavaUtil() { * * @since 11.0 (generics widened in 13.0) */ - @Beta public static Iterable presentInstances( final Iterable> optionals) { checkNotNull(optionals); diff --git a/guava/src/com/google/common/base/PairwiseEquivalence.java b/guava/src/com/google/common/base/PairwiseEquivalence.java index 74be27fd7c6f..ea40518c5a50 100644 --- a/guava/src/com/google/common/base/PairwiseEquivalence.java +++ b/guava/src/com/google/common/base/PairwiseEquivalence.java @@ -56,7 +56,8 @@ protected int doHash(Iterable iterable) { @Override public boolean equals(@CheckForNull Object object) { if (object instanceof PairwiseEquivalence) { - PairwiseEquivalence that = (PairwiseEquivalence) object; + @SuppressWarnings("unchecked") + PairwiseEquivalence that = (PairwiseEquivalence) object; return this.elementEquivalence.equals(that.elementEquivalence); } diff --git a/guava/src/com/google/common/base/PatternCompiler.java b/guava/src/com/google/common/base/PatternCompiler.java index 72a45faae963..6a7b620b2569 100644 --- a/guava/src/com/google/common/base/PatternCompiler.java +++ b/guava/src/com/google/common/base/PatternCompiler.java @@ -15,12 +15,14 @@ package com.google.common.base; import com.google.common.annotations.GwtIncompatible; +import com.google.common.annotations.J2ktIncompatible; /** * Pluggable interface for compiling a regex pattern. By default this package uses the {@code * java.util.regex} library, but an alternate implementation can be supplied using the {@link * java.util.ServiceLoader} mechanism. */ +@J2ktIncompatible @GwtIncompatible @ElementTypesAreNonnullByDefault interface PatternCompiler { diff --git a/guava/src/com/google/common/base/Preconditions.java b/guava/src/com/google/common/base/Preconditions.java index a42c22eb88f5..1e9ac39cb40c 100644 --- a/guava/src/com/google/common/base/Preconditions.java +++ b/guava/src/com/google/common/base/Preconditions.java @@ -118,8 +118,6 @@ public final class Preconditions { private Preconditions() {} - // TODO(cpovirk): Standardize parameter names (expression vs. b, reference vs. obj). - /** * Ensures the truth of an expression involving one or more parameters to the calling method. * @@ -175,8 +173,8 @@ public static void checkArgument( * * @since 20.0 (varargs overload since 2.0) */ - public static void checkArgument(boolean b, String errorMessageTemplate, char p1) { - if (!b) { + public static void checkArgument(boolean expression, String errorMessageTemplate, char p1) { + if (!expression) { throw new IllegalArgumentException(lenientFormat(errorMessageTemplate, p1)); } } @@ -188,8 +186,8 @@ public static void checkArgument(boolean b, String errorMessageTemplate, char p1 * * @since 20.0 (varargs overload since 2.0) */ - public static void checkArgument(boolean b, String errorMessageTemplate, int p1) { - if (!b) { + public static void checkArgument(boolean expression, String errorMessageTemplate, int p1) { + if (!expression) { throw new IllegalArgumentException(lenientFormat(errorMessageTemplate, p1)); } } @@ -201,8 +199,8 @@ public static void checkArgument(boolean b, String errorMessageTemplate, int p1) * * @since 20.0 (varargs overload since 2.0) */ - public static void checkArgument(boolean b, String errorMessageTemplate, long p1) { - if (!b) { + public static void checkArgument(boolean expression, String errorMessageTemplate, long p1) { + if (!expression) { throw new IllegalArgumentException(lenientFormat(errorMessageTemplate, p1)); } } @@ -215,8 +213,8 @@ public static void checkArgument(boolean b, String errorMessageTemplate, long p1 * @since 20.0 (varargs overload since 2.0) */ public static void checkArgument( - boolean b, String errorMessageTemplate, @CheckForNull Object p1) { - if (!b) { + boolean expression, String errorMessageTemplate, @CheckForNull Object p1) { + if (!expression) { throw new IllegalArgumentException(lenientFormat(errorMessageTemplate, p1)); } } @@ -228,8 +226,9 @@ public static void checkArgument( * * @since 20.0 (varargs overload since 2.0) */ - public static void checkArgument(boolean b, String errorMessageTemplate, char p1, char p2) { - if (!b) { + public static void checkArgument( + boolean expression, String errorMessageTemplate, char p1, char p2) { + if (!expression) { throw new IllegalArgumentException(lenientFormat(errorMessageTemplate, p1, p2)); } } @@ -241,8 +240,9 @@ public static void checkArgument(boolean b, String errorMessageTemplate, char p1 * * @since 20.0 (varargs overload since 2.0) */ - public static void checkArgument(boolean b, String errorMessageTemplate, char p1, int p2) { - if (!b) { + public static void checkArgument( + boolean expression, String errorMessageTemplate, char p1, int p2) { + if (!expression) { throw new IllegalArgumentException(lenientFormat(errorMessageTemplate, p1, p2)); } } @@ -254,8 +254,9 @@ public static void checkArgument(boolean b, String errorMessageTemplate, char p1 * * @since 20.0 (varargs overload since 2.0) */ - public static void checkArgument(boolean b, String errorMessageTemplate, char p1, long p2) { - if (!b) { + public static void checkArgument( + boolean expression, String errorMessageTemplate, char p1, long p2) { + if (!expression) { throw new IllegalArgumentException(lenientFormat(errorMessageTemplate, p1, p2)); } } @@ -268,8 +269,8 @@ public static void checkArgument(boolean b, String errorMessageTemplate, char p1 * @since 20.0 (varargs overload since 2.0) */ public static void checkArgument( - boolean b, String errorMessageTemplate, char p1, @CheckForNull Object p2) { - if (!b) { + boolean expression, String errorMessageTemplate, char p1, @CheckForNull Object p2) { + if (!expression) { throw new IllegalArgumentException(lenientFormat(errorMessageTemplate, p1, p2)); } } @@ -281,8 +282,9 @@ public static void checkArgument( * * @since 20.0 (varargs overload since 2.0) */ - public static void checkArgument(boolean b, String errorMessageTemplate, int p1, char p2) { - if (!b) { + public static void checkArgument( + boolean expression, String errorMessageTemplate, int p1, char p2) { + if (!expression) { throw new IllegalArgumentException(lenientFormat(errorMessageTemplate, p1, p2)); } } @@ -294,8 +296,9 @@ public static void checkArgument(boolean b, String errorMessageTemplate, int p1, * * @since 20.0 (varargs overload since 2.0) */ - public static void checkArgument(boolean b, String errorMessageTemplate, int p1, int p2) { - if (!b) { + public static void checkArgument( + boolean expression, String errorMessageTemplate, int p1, int p2) { + if (!expression) { throw new IllegalArgumentException(lenientFormat(errorMessageTemplate, p1, p2)); } } @@ -307,8 +310,9 @@ public static void checkArgument(boolean b, String errorMessageTemplate, int p1, * * @since 20.0 (varargs overload since 2.0) */ - public static void checkArgument(boolean b, String errorMessageTemplate, int p1, long p2) { - if (!b) { + public static void checkArgument( + boolean expression, String errorMessageTemplate, int p1, long p2) { + if (!expression) { throw new IllegalArgumentException(lenientFormat(errorMessageTemplate, p1, p2)); } } @@ -321,8 +325,8 @@ public static void checkArgument(boolean b, String errorMessageTemplate, int p1, * @since 20.0 (varargs overload since 2.0) */ public static void checkArgument( - boolean b, String errorMessageTemplate, int p1, @CheckForNull Object p2) { - if (!b) { + boolean expression, String errorMessageTemplate, int p1, @CheckForNull Object p2) { + if (!expression) { throw new IllegalArgumentException(lenientFormat(errorMessageTemplate, p1, p2)); } } @@ -334,8 +338,9 @@ public static void checkArgument( * * @since 20.0 (varargs overload since 2.0) */ - public static void checkArgument(boolean b, String errorMessageTemplate, long p1, char p2) { - if (!b) { + public static void checkArgument( + boolean expression, String errorMessageTemplate, long p1, char p2) { + if (!expression) { throw new IllegalArgumentException(lenientFormat(errorMessageTemplate, p1, p2)); } } @@ -347,8 +352,9 @@ public static void checkArgument(boolean b, String errorMessageTemplate, long p1 * * @since 20.0 (varargs overload since 2.0) */ - public static void checkArgument(boolean b, String errorMessageTemplate, long p1, int p2) { - if (!b) { + public static void checkArgument( + boolean expression, String errorMessageTemplate, long p1, int p2) { + if (!expression) { throw new IllegalArgumentException(lenientFormat(errorMessageTemplate, p1, p2)); } } @@ -360,8 +366,9 @@ public static void checkArgument(boolean b, String errorMessageTemplate, long p1 * * @since 20.0 (varargs overload since 2.0) */ - public static void checkArgument(boolean b, String errorMessageTemplate, long p1, long p2) { - if (!b) { + public static void checkArgument( + boolean expression, String errorMessageTemplate, long p1, long p2) { + if (!expression) { throw new IllegalArgumentException(lenientFormat(errorMessageTemplate, p1, p2)); } } @@ -374,8 +381,8 @@ public static void checkArgument(boolean b, String errorMessageTemplate, long p1 * @since 20.0 (varargs overload since 2.0) */ public static void checkArgument( - boolean b, String errorMessageTemplate, long p1, @CheckForNull Object p2) { - if (!b) { + boolean expression, String errorMessageTemplate, long p1, @CheckForNull Object p2) { + if (!expression) { throw new IllegalArgumentException(lenientFormat(errorMessageTemplate, p1, p2)); } } @@ -388,8 +395,8 @@ public static void checkArgument( * @since 20.0 (varargs overload since 2.0) */ public static void checkArgument( - boolean b, String errorMessageTemplate, @CheckForNull Object p1, char p2) { - if (!b) { + boolean expression, String errorMessageTemplate, @CheckForNull Object p1, char p2) { + if (!expression) { throw new IllegalArgumentException(lenientFormat(errorMessageTemplate, p1, p2)); } } @@ -402,8 +409,8 @@ public static void checkArgument( * @since 20.0 (varargs overload since 2.0) */ public static void checkArgument( - boolean b, String errorMessageTemplate, @CheckForNull Object p1, int p2) { - if (!b) { + boolean expression, String errorMessageTemplate, @CheckForNull Object p1, int p2) { + if (!expression) { throw new IllegalArgumentException(lenientFormat(errorMessageTemplate, p1, p2)); } } @@ -416,8 +423,8 @@ public static void checkArgument( * @since 20.0 (varargs overload since 2.0) */ public static void checkArgument( - boolean b, String errorMessageTemplate, @CheckForNull Object p1, long p2) { - if (!b) { + boolean expression, String errorMessageTemplate, @CheckForNull Object p1, long p2) { + if (!expression) { throw new IllegalArgumentException(lenientFormat(errorMessageTemplate, p1, p2)); } } @@ -430,8 +437,11 @@ public static void checkArgument( * @since 20.0 (varargs overload since 2.0) */ public static void checkArgument( - boolean b, String errorMessageTemplate, @CheckForNull Object p1, @CheckForNull Object p2) { - if (!b) { + boolean expression, + String errorMessageTemplate, + @CheckForNull Object p1, + @CheckForNull Object p2) { + if (!expression) { throw new IllegalArgumentException(lenientFormat(errorMessageTemplate, p1, p2)); } } @@ -444,12 +454,12 @@ public static void checkArgument( * @since 20.0 (varargs overload since 2.0) */ public static void checkArgument( - boolean b, + boolean expression, String errorMessageTemplate, @CheckForNull Object p1, @CheckForNull Object p2, @CheckForNull Object p3) { - if (!b) { + if (!expression) { throw new IllegalArgumentException(lenientFormat(errorMessageTemplate, p1, p2, p3)); } } @@ -462,13 +472,13 @@ public static void checkArgument( * @since 20.0 (varargs overload since 2.0) */ public static void checkArgument( - boolean b, + boolean expression, String errorMessageTemplate, @CheckForNull Object p1, @CheckForNull Object p2, @CheckForNull Object p3, @CheckForNull Object p4) { - if (!b) { + if (!expression) { throw new IllegalArgumentException(lenientFormat(errorMessageTemplate, p1, p2, p3, p4)); } } @@ -543,8 +553,8 @@ public static void checkState( * * @since 20.0 (varargs overload since 2.0) */ - public static void checkState(boolean b, String errorMessageTemplate, char p1) { - if (!b) { + public static void checkState(boolean expression, String errorMessageTemplate, char p1) { + if (!expression) { throw new IllegalStateException(lenientFormat(errorMessageTemplate, p1)); } } @@ -557,8 +567,8 @@ public static void checkState(boolean b, String errorMessageTemplate, char p1) { * * @since 20.0 (varargs overload since 2.0) */ - public static void checkState(boolean b, String errorMessageTemplate, int p1) { - if (!b) { + public static void checkState(boolean expression, String errorMessageTemplate, int p1) { + if (!expression) { throw new IllegalStateException(lenientFormat(errorMessageTemplate, p1)); } } @@ -571,8 +581,8 @@ public static void checkState(boolean b, String errorMessageTemplate, int p1) { * * @since 20.0 (varargs overload since 2.0) */ - public static void checkState(boolean b, String errorMessageTemplate, long p1) { - if (!b) { + public static void checkState(boolean expression, String errorMessageTemplate, long p1) { + if (!expression) { throw new IllegalStateException(lenientFormat(errorMessageTemplate, p1)); } } @@ -585,8 +595,9 @@ public static void checkState(boolean b, String errorMessageTemplate, long p1) { * * @since 20.0 (varargs overload since 2.0) */ - public static void checkState(boolean b, String errorMessageTemplate, @CheckForNull Object p1) { - if (!b) { + public static void checkState( + boolean expression, String errorMessageTemplate, @CheckForNull Object p1) { + if (!expression) { throw new IllegalStateException(lenientFormat(errorMessageTemplate, p1)); } } @@ -599,8 +610,8 @@ public static void checkState(boolean b, String errorMessageTemplate, @CheckForN * * @since 20.0 (varargs overload since 2.0) */ - public static void checkState(boolean b, String errorMessageTemplate, char p1, char p2) { - if (!b) { + public static void checkState(boolean expression, String errorMessageTemplate, char p1, char p2) { + if (!expression) { throw new IllegalStateException(lenientFormat(errorMessageTemplate, p1, p2)); } } @@ -613,8 +624,8 @@ public static void checkState(boolean b, String errorMessageTemplate, char p1, c * * @since 20.0 (varargs overload since 2.0) */ - public static void checkState(boolean b, String errorMessageTemplate, char p1, int p2) { - if (!b) { + public static void checkState(boolean expression, String errorMessageTemplate, char p1, int p2) { + if (!expression) { throw new IllegalStateException(lenientFormat(errorMessageTemplate, p1, p2)); } } @@ -627,8 +638,8 @@ public static void checkState(boolean b, String errorMessageTemplate, char p1, i * * @since 20.0 (varargs overload since 2.0) */ - public static void checkState(boolean b, String errorMessageTemplate, char p1, long p2) { - if (!b) { + public static void checkState(boolean expression, String errorMessageTemplate, char p1, long p2) { + if (!expression) { throw new IllegalStateException(lenientFormat(errorMessageTemplate, p1, p2)); } } @@ -642,8 +653,8 @@ public static void checkState(boolean b, String errorMessageTemplate, char p1, l * @since 20.0 (varargs overload since 2.0) */ public static void checkState( - boolean b, String errorMessageTemplate, char p1, @CheckForNull Object p2) { - if (!b) { + boolean expression, String errorMessageTemplate, char p1, @CheckForNull Object p2) { + if (!expression) { throw new IllegalStateException(lenientFormat(errorMessageTemplate, p1, p2)); } } @@ -656,8 +667,8 @@ public static void checkState( * * @since 20.0 (varargs overload since 2.0) */ - public static void checkState(boolean b, String errorMessageTemplate, int p1, char p2) { - if (!b) { + public static void checkState(boolean expression, String errorMessageTemplate, int p1, char p2) { + if (!expression) { throw new IllegalStateException(lenientFormat(errorMessageTemplate, p1, p2)); } } @@ -670,8 +681,8 @@ public static void checkState(boolean b, String errorMessageTemplate, int p1, ch * * @since 20.0 (varargs overload since 2.0) */ - public static void checkState(boolean b, String errorMessageTemplate, int p1, int p2) { - if (!b) { + public static void checkState(boolean expression, String errorMessageTemplate, int p1, int p2) { + if (!expression) { throw new IllegalStateException(lenientFormat(errorMessageTemplate, p1, p2)); } } @@ -684,8 +695,8 @@ public static void checkState(boolean b, String errorMessageTemplate, int p1, in * * @since 20.0 (varargs overload since 2.0) */ - public static void checkState(boolean b, String errorMessageTemplate, int p1, long p2) { - if (!b) { + public static void checkState(boolean expression, String errorMessageTemplate, int p1, long p2) { + if (!expression) { throw new IllegalStateException(lenientFormat(errorMessageTemplate, p1, p2)); } } @@ -699,8 +710,8 @@ public static void checkState(boolean b, String errorMessageTemplate, int p1, lo * @since 20.0 (varargs overload since 2.0) */ public static void checkState( - boolean b, String errorMessageTemplate, int p1, @CheckForNull Object p2) { - if (!b) { + boolean expression, String errorMessageTemplate, int p1, @CheckForNull Object p2) { + if (!expression) { throw new IllegalStateException(lenientFormat(errorMessageTemplate, p1, p2)); } } @@ -713,8 +724,8 @@ public static void checkState( * * @since 20.0 (varargs overload since 2.0) */ - public static void checkState(boolean b, String errorMessageTemplate, long p1, char p2) { - if (!b) { + public static void checkState(boolean expression, String errorMessageTemplate, long p1, char p2) { + if (!expression) { throw new IllegalStateException(lenientFormat(errorMessageTemplate, p1, p2)); } } @@ -727,8 +738,8 @@ public static void checkState(boolean b, String errorMessageTemplate, long p1, c * * @since 20.0 (varargs overload since 2.0) */ - public static void checkState(boolean b, String errorMessageTemplate, long p1, int p2) { - if (!b) { + public static void checkState(boolean expression, String errorMessageTemplate, long p1, int p2) { + if (!expression) { throw new IllegalStateException(lenientFormat(errorMessageTemplate, p1, p2)); } } @@ -741,8 +752,8 @@ public static void checkState(boolean b, String errorMessageTemplate, long p1, i * * @since 20.0 (varargs overload since 2.0) */ - public static void checkState(boolean b, String errorMessageTemplate, long p1, long p2) { - if (!b) { + public static void checkState(boolean expression, String errorMessageTemplate, long p1, long p2) { + if (!expression) { throw new IllegalStateException(lenientFormat(errorMessageTemplate, p1, p2)); } } @@ -756,8 +767,8 @@ public static void checkState(boolean b, String errorMessageTemplate, long p1, l * @since 20.0 (varargs overload since 2.0) */ public static void checkState( - boolean b, String errorMessageTemplate, long p1, @CheckForNull Object p2) { - if (!b) { + boolean expression, String errorMessageTemplate, long p1, @CheckForNull Object p2) { + if (!expression) { throw new IllegalStateException(lenientFormat(errorMessageTemplate, p1, p2)); } } @@ -771,8 +782,8 @@ public static void checkState( * @since 20.0 (varargs overload since 2.0) */ public static void checkState( - boolean b, String errorMessageTemplate, @CheckForNull Object p1, char p2) { - if (!b) { + boolean expression, String errorMessageTemplate, @CheckForNull Object p1, char p2) { + if (!expression) { throw new IllegalStateException(lenientFormat(errorMessageTemplate, p1, p2)); } } @@ -786,8 +797,8 @@ public static void checkState( * @since 20.0 (varargs overload since 2.0) */ public static void checkState( - boolean b, String errorMessageTemplate, @CheckForNull Object p1, int p2) { - if (!b) { + boolean expression, String errorMessageTemplate, @CheckForNull Object p1, int p2) { + if (!expression) { throw new IllegalStateException(lenientFormat(errorMessageTemplate, p1, p2)); } } @@ -801,8 +812,8 @@ public static void checkState( * @since 20.0 (varargs overload since 2.0) */ public static void checkState( - boolean b, String errorMessageTemplate, @CheckForNull Object p1, long p2) { - if (!b) { + boolean expression, String errorMessageTemplate, @CheckForNull Object p1, long p2) { + if (!expression) { throw new IllegalStateException(lenientFormat(errorMessageTemplate, p1, p2)); } } @@ -816,8 +827,11 @@ public static void checkState( * @since 20.0 (varargs overload since 2.0) */ public static void checkState( - boolean b, String errorMessageTemplate, @CheckForNull Object p1, @CheckForNull Object p2) { - if (!b) { + boolean expression, + String errorMessageTemplate, + @CheckForNull Object p1, + @CheckForNull Object p2) { + if (!expression) { throw new IllegalStateException(lenientFormat(errorMessageTemplate, p1, p2)); } } @@ -831,12 +845,12 @@ public static void checkState( * @since 20.0 (varargs overload since 2.0) */ public static void checkState( - boolean b, + boolean expression, String errorMessageTemplate, @CheckForNull Object p1, @CheckForNull Object p2, @CheckForNull Object p3) { - if (!b) { + if (!expression) { throw new IllegalStateException(lenientFormat(errorMessageTemplate, p1, p2, p3)); } } @@ -850,13 +864,13 @@ public static void checkState( * @since 20.0 (varargs overload since 2.0) */ public static void checkState( - boolean b, + boolean expression, String errorMessageTemplate, @CheckForNull Object p1, @CheckForNull Object p2, @CheckForNull Object p3, @CheckForNull Object p4) { - if (!b) { + if (!expression) { throw new IllegalStateException(lenientFormat(errorMessageTemplate, p1, p2, p3, p4)); } } @@ -943,11 +957,12 @@ public static T checkNotNull( * @since 20.0 (varargs overload since 2.0) */ @CanIgnoreReturnValue - public static T checkNotNull(@CheckForNull T obj, String errorMessageTemplate, char p1) { - if (obj == null) { + public static T checkNotNull( + @CheckForNull T reference, String errorMessageTemplate, char p1) { + if (reference == null) { throw new NullPointerException(lenientFormat(errorMessageTemplate, p1)); } - return obj; + return reference; } /** @@ -958,11 +973,11 @@ public static T checkNotNull(@CheckForNull T obj, String errorMessageTemplat * @since 20.0 (varargs overload since 2.0) */ @CanIgnoreReturnValue - public static T checkNotNull(@CheckForNull T obj, String errorMessageTemplate, int p1) { - if (obj == null) { + public static T checkNotNull(@CheckForNull T reference, String errorMessageTemplate, int p1) { + if (reference == null) { throw new NullPointerException(lenientFormat(errorMessageTemplate, p1)); } - return obj; + return reference; } /** @@ -973,11 +988,12 @@ public static T checkNotNull(@CheckForNull T obj, String errorMessageTemplat * @since 20.0 (varargs overload since 2.0) */ @CanIgnoreReturnValue - public static T checkNotNull(@CheckForNull T obj, String errorMessageTemplate, long p1) { - if (obj == null) { + public static T checkNotNull( + @CheckForNull T reference, String errorMessageTemplate, long p1) { + if (reference == null) { throw new NullPointerException(lenientFormat(errorMessageTemplate, p1)); } - return obj; + return reference; } /** @@ -989,11 +1005,11 @@ public static T checkNotNull(@CheckForNull T obj, String errorMessageTemplat */ @CanIgnoreReturnValue public static T checkNotNull( - @CheckForNull T obj, String errorMessageTemplate, @CheckForNull Object p1) { - if (obj == null) { + @CheckForNull T reference, String errorMessageTemplate, @CheckForNull Object p1) { + if (reference == null) { throw new NullPointerException(lenientFormat(errorMessageTemplate, p1)); } - return obj; + return reference; } /** @@ -1005,11 +1021,11 @@ public static T checkNotNull( */ @CanIgnoreReturnValue public static T checkNotNull( - @CheckForNull T obj, String errorMessageTemplate, char p1, char p2) { - if (obj == null) { + @CheckForNull T reference, String errorMessageTemplate, char p1, char p2) { + if (reference == null) { throw new NullPointerException(lenientFormat(errorMessageTemplate, p1, p2)); } - return obj; + return reference; } /** @@ -1021,11 +1037,11 @@ public static T checkNotNull( */ @CanIgnoreReturnValue public static T checkNotNull( - @CheckForNull T obj, String errorMessageTemplate, char p1, int p2) { - if (obj == null) { + @CheckForNull T reference, String errorMessageTemplate, char p1, int p2) { + if (reference == null) { throw new NullPointerException(lenientFormat(errorMessageTemplate, p1, p2)); } - return obj; + return reference; } /** @@ -1037,11 +1053,11 @@ public static T checkNotNull( */ @CanIgnoreReturnValue public static T checkNotNull( - @CheckForNull T obj, String errorMessageTemplate, char p1, long p2) { - if (obj == null) { + @CheckForNull T reference, String errorMessageTemplate, char p1, long p2) { + if (reference == null) { throw new NullPointerException(lenientFormat(errorMessageTemplate, p1, p2)); } - return obj; + return reference; } /** @@ -1053,11 +1069,11 @@ public static T checkNotNull( */ @CanIgnoreReturnValue public static T checkNotNull( - @CheckForNull T obj, String errorMessageTemplate, char p1, @CheckForNull Object p2) { - if (obj == null) { + @CheckForNull T reference, String errorMessageTemplate, char p1, @CheckForNull Object p2) { + if (reference == null) { throw new NullPointerException(lenientFormat(errorMessageTemplate, p1, p2)); } - return obj; + return reference; } /** @@ -1069,11 +1085,11 @@ public static T checkNotNull( */ @CanIgnoreReturnValue public static T checkNotNull( - @CheckForNull T obj, String errorMessageTemplate, int p1, char p2) { - if (obj == null) { + @CheckForNull T reference, String errorMessageTemplate, int p1, char p2) { + if (reference == null) { throw new NullPointerException(lenientFormat(errorMessageTemplate, p1, p2)); } - return obj; + return reference; } /** @@ -1085,11 +1101,11 @@ public static T checkNotNull( */ @CanIgnoreReturnValue public static T checkNotNull( - @CheckForNull T obj, String errorMessageTemplate, int p1, int p2) { - if (obj == null) { + @CheckForNull T reference, String errorMessageTemplate, int p1, int p2) { + if (reference == null) { throw new NullPointerException(lenientFormat(errorMessageTemplate, p1, p2)); } - return obj; + return reference; } /** @@ -1101,11 +1117,11 @@ public static T checkNotNull( */ @CanIgnoreReturnValue public static T checkNotNull( - @CheckForNull T obj, String errorMessageTemplate, int p1, long p2) { - if (obj == null) { + @CheckForNull T reference, String errorMessageTemplate, int p1, long p2) { + if (reference == null) { throw new NullPointerException(lenientFormat(errorMessageTemplate, p1, p2)); } - return obj; + return reference; } /** @@ -1117,11 +1133,11 @@ public static T checkNotNull( */ @CanIgnoreReturnValue public static T checkNotNull( - @CheckForNull T obj, String errorMessageTemplate, int p1, @CheckForNull Object p2) { - if (obj == null) { + @CheckForNull T reference, String errorMessageTemplate, int p1, @CheckForNull Object p2) { + if (reference == null) { throw new NullPointerException(lenientFormat(errorMessageTemplate, p1, p2)); } - return obj; + return reference; } /** @@ -1133,11 +1149,11 @@ public static T checkNotNull( */ @CanIgnoreReturnValue public static T checkNotNull( - @CheckForNull T obj, String errorMessageTemplate, long p1, char p2) { - if (obj == null) { + @CheckForNull T reference, String errorMessageTemplate, long p1, char p2) { + if (reference == null) { throw new NullPointerException(lenientFormat(errorMessageTemplate, p1, p2)); } - return obj; + return reference; } /** @@ -1149,11 +1165,11 @@ public static T checkNotNull( */ @CanIgnoreReturnValue public static T checkNotNull( - @CheckForNull T obj, String errorMessageTemplate, long p1, int p2) { - if (obj == null) { + @CheckForNull T reference, String errorMessageTemplate, long p1, int p2) { + if (reference == null) { throw new NullPointerException(lenientFormat(errorMessageTemplate, p1, p2)); } - return obj; + return reference; } /** @@ -1165,11 +1181,11 @@ public static T checkNotNull( */ @CanIgnoreReturnValue public static T checkNotNull( - @CheckForNull T obj, String errorMessageTemplate, long p1, long p2) { - if (obj == null) { + @CheckForNull T reference, String errorMessageTemplate, long p1, long p2) { + if (reference == null) { throw new NullPointerException(lenientFormat(errorMessageTemplate, p1, p2)); } - return obj; + return reference; } /** @@ -1181,11 +1197,11 @@ public static T checkNotNull( */ @CanIgnoreReturnValue public static T checkNotNull( - @CheckForNull T obj, String errorMessageTemplate, long p1, @CheckForNull Object p2) { - if (obj == null) { + @CheckForNull T reference, String errorMessageTemplate, long p1, @CheckForNull Object p2) { + if (reference == null) { throw new NullPointerException(lenientFormat(errorMessageTemplate, p1, p2)); } - return obj; + return reference; } /** @@ -1197,11 +1213,11 @@ public static T checkNotNull( */ @CanIgnoreReturnValue public static T checkNotNull( - @CheckForNull T obj, String errorMessageTemplate, @CheckForNull Object p1, char p2) { - if (obj == null) { + @CheckForNull T reference, String errorMessageTemplate, @CheckForNull Object p1, char p2) { + if (reference == null) { throw new NullPointerException(lenientFormat(errorMessageTemplate, p1, p2)); } - return obj; + return reference; } /** @@ -1213,11 +1229,11 @@ public static T checkNotNull( */ @CanIgnoreReturnValue public static T checkNotNull( - @CheckForNull T obj, String errorMessageTemplate, @CheckForNull Object p1, int p2) { - if (obj == null) { + @CheckForNull T reference, String errorMessageTemplate, @CheckForNull Object p1, int p2) { + if (reference == null) { throw new NullPointerException(lenientFormat(errorMessageTemplate, p1, p2)); } - return obj; + return reference; } /** @@ -1229,11 +1245,11 @@ public static T checkNotNull( */ @CanIgnoreReturnValue public static T checkNotNull( - @CheckForNull T obj, String errorMessageTemplate, @CheckForNull Object p1, long p2) { - if (obj == null) { + @CheckForNull T reference, String errorMessageTemplate, @CheckForNull Object p1, long p2) { + if (reference == null) { throw new NullPointerException(lenientFormat(errorMessageTemplate, p1, p2)); } - return obj; + return reference; } /** @@ -1245,14 +1261,14 @@ public static T checkNotNull( */ @CanIgnoreReturnValue public static T checkNotNull( - @CheckForNull T obj, + @CheckForNull T reference, String errorMessageTemplate, @CheckForNull Object p1, @CheckForNull Object p2) { - if (obj == null) { + if (reference == null) { throw new NullPointerException(lenientFormat(errorMessageTemplate, p1, p2)); } - return obj; + return reference; } /** @@ -1264,15 +1280,15 @@ public static T checkNotNull( */ @CanIgnoreReturnValue public static T checkNotNull( - @CheckForNull T obj, + @CheckForNull T reference, String errorMessageTemplate, @CheckForNull Object p1, @CheckForNull Object p2, @CheckForNull Object p3) { - if (obj == null) { + if (reference == null) { throw new NullPointerException(lenientFormat(errorMessageTemplate, p1, p2, p3)); } - return obj; + return reference; } /** @@ -1284,16 +1300,16 @@ public static T checkNotNull( */ @CanIgnoreReturnValue public static T checkNotNull( - @CheckForNull T obj, + @CheckForNull T reference, String errorMessageTemplate, @CheckForNull Object p1, @CheckForNull Object p2, @CheckForNull Object p3, @CheckForNull Object p4) { - if (obj == null) { + if (reference == null) { throw new NullPointerException(lenientFormat(errorMessageTemplate, p1, p2, p3, p4)); } - return obj; + return reference; } /* diff --git a/guava/src/com/google/common/base/Predicates.java b/guava/src/com/google/common/base/Predicates.java index dc487fc56ffa..30d2ac7dc8f5 100644 --- a/guava/src/com/google/common/base/Predicates.java +++ b/guava/src/com/google/common/base/Predicates.java @@ -16,9 +16,9 @@ import static com.google.common.base.Preconditions.checkNotNull; -import com.google.common.annotations.Beta; import com.google.common.annotations.GwtCompatible; import com.google.common.annotations.GwtIncompatible; +import com.google.common.annotations.J2ktIncompatible; import java.io.Serializable; import java.util.ArrayList; import java.util.Arrays; @@ -195,8 +195,8 @@ private Predicates() {} * * @since 20.0 (since 10.0 under the incorrect name {@code assignableFrom}) */ + @J2ktIncompatible @GwtIncompatible // Class.isAssignableFrom - @Beta public static Predicate> subtypeOf(Class clazz) { return new SubtypeOfPredicate(clazz); } @@ -235,6 +235,7 @@ public static Predicate> subtypeOf(Class clazz) { * @throws IllegalArgumentException if the pattern is invalid * @since 3.0 */ + @J2ktIncompatible @GwtIncompatible // Only used by other GWT-incompatible code. public static Predicate containsPattern(String pattern) { return new ContainsPatternFromStringPredicate(pattern); @@ -247,6 +248,7 @@ public static Predicate containsPattern(String pattern) { * * @since 3.0 */ + @J2ktIncompatible @GwtIncompatible(value = "java.util.regex.Pattern") public static Predicate contains(Pattern pattern) { return new ContainsPatternPredicate(new JdkPattern(pattern)); @@ -486,7 +488,9 @@ public String toString() { } } - /** @see Predicates#instanceOf(Class) */ + /** + * @see Predicates#instanceOf(Class) + */ @GwtIncompatible // Class.isInstance private static class InstanceOfPredicate implements Predicate, Serializable { @@ -520,10 +524,13 @@ public String toString() { return "Predicates.instanceOf(" + clazz.getName() + ")"; } - private static final long serialVersionUID = 0; + @J2ktIncompatible private static final long serialVersionUID = 0; } - /** @see Predicates#subtypeOf(Class) */ + /** + * @see Predicates#subtypeOf(Class) + */ + @J2ktIncompatible @GwtIncompatible // Class.isAssignableFrom private static class SubtypeOfPredicate implements Predicate>, Serializable { private final Class clazz; @@ -638,7 +645,10 @@ public String toString() { private static final long serialVersionUID = 0; } - /** @see Predicates#contains(Pattern) */ + /** + * @see Predicates#contains(Pattern) + */ + @J2ktIncompatible @GwtIncompatible // Only used by other GWT-incompatible code. private static class ContainsPatternPredicate implements Predicate, Serializable { final CommonPattern pattern; @@ -686,7 +696,10 @@ public String toString() { private static final long serialVersionUID = 0; } - /** @see Predicates#containsPattern(String) */ + /** + * @see Predicates#containsPattern(String) + */ + @J2ktIncompatible @GwtIncompatible // Only used by other GWT-incompatible code. private static class ContainsPatternFromStringPredicate extends ContainsPatternPredicate { diff --git a/guava/src/com/google/common/base/SmallCharMatcher.java b/guava/src/com/google/common/base/SmallCharMatcher.java index f0e801b67118..81682564143d 100644 --- a/guava/src/com/google/common/base/SmallCharMatcher.java +++ b/guava/src/com/google/common/base/SmallCharMatcher.java @@ -15,6 +15,7 @@ package com.google.common.base; import com.google.common.annotations.GwtIncompatible; +import com.google.common.annotations.J2ktIncompatible; import com.google.common.annotations.VisibleForTesting; import com.google.common.base.CharMatcher.NamedFastMatcher; import java.util.BitSet; @@ -25,6 +26,7 @@ * * @author Christopher Swenson */ +@J2ktIncompatible @GwtIncompatible // no precomputation is done in GWT @ElementTypesAreNonnullByDefault final class SmallCharMatcher extends NamedFastMatcher { diff --git a/guava/src/com/google/common/base/Splitter.java b/guava/src/com/google/common/base/Splitter.java index e60e9887dfca..f8415a79a507 100644 --- a/guava/src/com/google/common/base/Splitter.java +++ b/guava/src/com/google/common/base/Splitter.java @@ -17,9 +17,9 @@ import static com.google.common.base.Preconditions.checkArgument; import static com.google.common.base.Preconditions.checkNotNull; -import com.google.common.annotations.Beta; import com.google.common.annotations.GwtCompatible; import com.google.common.annotations.GwtIncompatible; +import com.google.common.annotations.J2ktIncompatible; import java.util.ArrayList; import java.util.Collections; import java.util.Iterator; @@ -214,6 +214,7 @@ public int separatorEnd(int separatorPosition) { * @return a splitter, with default settings, that uses this pattern * @throws IllegalArgumentException if {@code separatorPattern} matches the empty string */ + @J2ktIncompatible @GwtIncompatible // java.util.regex public static Splitter on(Pattern separatorPattern) { return on(new JdkPattern(separatorPattern)); @@ -257,6 +258,7 @@ public int separatorEnd(int separatorPosition) { * @throws IllegalArgumentException if {@code separatorPattern} matches the empty string or is a * malformed expression */ + @J2ktIncompatible @GwtIncompatible // java.util.regex public static Splitter onPattern(String separatorPattern) { return on(Platform.compilePattern(separatorPattern)); @@ -434,7 +436,6 @@ public List splitToList(CharSequence sequence) { * @return a stream over the segments split from the parameter * @since 28.2 */ - @Beta public Stream splitToStream(CharSequence sequence) { // Can't use Streams.stream() from base return StreamSupport.stream(split(sequence).spliterator(), false); @@ -446,7 +447,6 @@ public Stream splitToStream(CharSequence sequence) { * * @since 10.0 */ - @Beta public MapSplitter withKeyValueSeparator(String separator) { return withKeyValueSeparator(on(separator)); } @@ -457,7 +457,6 @@ public MapSplitter withKeyValueSeparator(String separator) { * * @since 14.0 */ - @Beta public MapSplitter withKeyValueSeparator(char separator) { return withKeyValueSeparator(on(separator)); } @@ -481,7 +480,6 @@ public MapSplitter withKeyValueSeparator(char separator) { * * @since 10.0 */ - @Beta public MapSplitter withKeyValueSeparator(Splitter keyValueSplitter) { return new MapSplitter(this, keyValueSplitter); } @@ -494,7 +492,6 @@ public MapSplitter withKeyValueSeparator(Splitter keyValueSplitter) { * * @since 10.0 */ - @Beta public static final class MapSplitter { private static final String INVALID_ENTRY_MESSAGE = "Chunk [%s] is not a valid entry"; private final Splitter outerSplitter; diff --git a/guava/src/com/google/common/base/StandardSystemProperty.java b/guava/src/com/google/common/base/StandardSystemProperty.java index cdac2d39baa8..155037761cd5 100644 --- a/guava/src/com/google/common/base/StandardSystemProperty.java +++ b/guava/src/com/google/common/base/StandardSystemProperty.java @@ -15,6 +15,7 @@ package com.google.common.base; import com.google.common.annotations.GwtIncompatible; +import com.google.common.annotations.J2ktIncompatible; import javax.annotation.CheckForNull; /** @@ -23,6 +24,7 @@ * @author Kurt Alfred Kluever * @since 15.0 */ +@J2ktIncompatible @GwtIncompatible // java.lang.System#getProperty @ElementTypesAreNonnullByDefault public enum StandardSystemProperty { diff --git a/guava/src/com/google/common/base/Stopwatch.java b/guava/src/com/google/common/base/Stopwatch.java index 2d251f722acd..d67b22cd87bb 100644 --- a/guava/src/com/google/common/base/Stopwatch.java +++ b/guava/src/com/google/common/base/Stopwatch.java @@ -26,6 +26,7 @@ import com.google.common.annotations.GwtCompatible; import com.google.common.annotations.GwtIncompatible; +import com.google.common.annotations.J2ktIncompatible; import com.google.errorprone.annotations.CanIgnoreReturnValue; import com.google.j2objc.annotations.J2ObjCIncompatible; import java.time.Duration; @@ -223,6 +224,7 @@ public long elapsed(TimeUnit desiredUnit) { * * @since 22.0 */ + @J2ktIncompatible @GwtIncompatible @J2ObjCIncompatible public Duration elapsed() { diff --git a/guava/src/com/google/common/base/Suppliers.java b/guava/src/com/google/common/base/Suppliers.java index 8b4fc7b3d437..7e8f7ccdaf7b 100644 --- a/guava/src/com/google/common/base/Suppliers.java +++ b/guava/src/com/google/common/base/Suppliers.java @@ -96,7 +96,7 @@ public String toString() { *

    The returned supplier is thread-safe. The delegate's {@code get()} method will be invoked at * most once unless the underlying {@code get()} throws an exception. The supplier's serialized * form does not contain the cached value, which will be recalculated when {@code get()} is called - * on the reserialized instance. + * on the deserialized instance. * *

    When the underlying delegate throws an exception then this memoizing supplier will keep * delegating calls until it returns valid data. diff --git a/guava/src/com/google/common/base/Throwables.java b/guava/src/com/google/common/base/Throwables.java index 91a4f1745c08..23936897d956 100644 --- a/guava/src/com/google/common/base/Throwables.java +++ b/guava/src/com/google/common/base/Throwables.java @@ -21,6 +21,7 @@ import com.google.common.annotations.GwtCompatible; import com.google.common.annotations.GwtIncompatible; +import com.google.common.annotations.J2ktIncompatible; import com.google.common.annotations.VisibleForTesting; import com.google.errorprone.annotations.CanIgnoreReturnValue; import java.io.IOException; @@ -69,6 +70,7 @@ private Throwables() {} * * @since 20.0 */ + @J2ktIncompatible @GwtIncompatible // Class.cast, Class.isInstance public static void throwIfInstanceOf( Throwable throwable, Class declaredType) throws X { @@ -98,6 +100,7 @@ public static void throwIfInstanceOf( * null}. */ @Deprecated + @J2ktIncompatible @GwtIncompatible // throwIfInstanceOf public static void propagateIfInstanceOf( @CheckForNull Throwable throwable, Class declaredType) throws X { @@ -154,6 +157,7 @@ public static void throwIfUnchecked(Throwable throwable) { * null}. */ @Deprecated + @J2ktIncompatible @GwtIncompatible public static void propagateIfPossible(@CheckForNull Throwable throwable) { if (throwable != null) { @@ -179,6 +183,7 @@ public static void propagateIfPossible(@CheckForNull Throwable throwable) { * @param throwable the Throwable to possibly propagate * @param declaredType the single checked exception type declared by the calling method */ + @J2ktIncompatible @GwtIncompatible // propagateIfInstanceOf public static void propagateIfPossible( @CheckForNull Throwable throwable, Class declaredType) throws X { @@ -197,6 +202,7 @@ public static void propagateIfPossible( * @param declaredType1 any checked exception type declared by the calling method * @param declaredType2 any other checked exception type declared by the calling method */ + @J2ktIncompatible @GwtIncompatible // propagateIfInstanceOf public static void propagateIfPossible( @CheckForNull Throwable throwable, Class declaredType1, Class declaredType2) @@ -235,6 +241,7 @@ public static void propagateIfPossi * {@code Throwables.propagate}. */ @CanIgnoreReturnValue + @J2ktIncompatible @GwtIncompatible @Deprecated public static RuntimeException propagate(Throwable throwable) { @@ -328,6 +335,7 @@ public static List getCausalChain(Throwable throwable) { * ClassCastException}'s cause is {@code throwable}. * @since 22.0 */ + @J2ktIncompatible @GwtIncompatible // Class.cast(Object) @CheckForNull public static X getCauseAs( @@ -384,6 +392,7 @@ public static String getStackTraceAsString(Throwable throwable) { * possible use the {@code java.lang.StackWalker.walk} method introduced in JDK 9. */ @Deprecated + @J2ktIncompatible @GwtIncompatible // lazyStackTraceIsLazy, jlaStackTrace public static List lazyStackTrace(Throwable throwable) { return lazyStackTraceIsLazy() @@ -400,11 +409,13 @@ public static List lazyStackTrace(Throwable throwable) { * versions. */ @Deprecated + @J2ktIncompatible @GwtIncompatible // getStackTraceElementMethod public static boolean lazyStackTraceIsLazy() { return getStackTraceElementMethod != null && getStackTraceDepthMethod != null; } + @J2ktIncompatible @GwtIncompatible // invokeAccessibleNonThrowingMethod private static List jlaStackTrace(Throwable t) { checkNotNull(t); @@ -435,6 +446,7 @@ public int size() { }; } + @J2ktIncompatible @GwtIncompatible // java.lang.reflect private static Object invokeAccessibleNonThrowingMethod( Method method, Object receiver, Object... params) { @@ -448,15 +460,17 @@ private static Object invokeAccessibleNonThrowingMethod( } /** JavaLangAccess class name to load using reflection */ - @GwtIncompatible // not used by GWT emulation + @J2ktIncompatible @GwtIncompatible // not used by GWT emulation private static final String JAVA_LANG_ACCESS_CLASSNAME = "sun.misc.JavaLangAccess"; /** SharedSecrets class name to load using reflection */ + @J2ktIncompatible @GwtIncompatible // not used by GWT emulation @VisibleForTesting static final String SHARED_SECRETS_CLASSNAME = "sun.misc.SharedSecrets"; /** Access to some fancy internal JVM internals. */ + @J2ktIncompatible @GwtIncompatible // java.lang.reflect @CheckForNull private static final Object jla = getJLA(); @@ -465,6 +479,7 @@ private static Object invokeAccessibleNonThrowingMethod( * The "getStackTraceElementMethod" method, only available on some JDKs so we use reflection to * find it when available. When this is null, use the slow way. */ + @J2ktIncompatible @GwtIncompatible // java.lang.reflect @CheckForNull private static final Method getStackTraceElementMethod = (jla == null) ? null : getGetMethod(); @@ -473,6 +488,7 @@ private static Object invokeAccessibleNonThrowingMethod( * The "getStackTraceDepth" method, only available on some JDKs so we use reflection to find it * when available. When this is null, use the slow way. */ + @J2ktIncompatible @GwtIncompatible // java.lang.reflect @CheckForNull private static final Method getStackTraceDepthMethod = (jla == null) ? null : getSizeMethod(jla); @@ -481,6 +497,7 @@ private static Object invokeAccessibleNonThrowingMethod( * Returns the JavaLangAccess class that is present in all Sun JDKs. It is not allowed in * AppEngine, and not present in non-Sun JDKs. */ + @J2ktIncompatible @GwtIncompatible // java.lang.reflect @CheckForNull private static Object getJLA() { @@ -507,6 +524,7 @@ private static Object getJLA() { * Returns the Method that can be used to resolve an individual StackTraceElement, or null if that * method cannot be found (it is only to be found in fairly recent JDKs). */ + @J2ktIncompatible @GwtIncompatible // java.lang.reflect @CheckForNull private static Method getGetMethod() { @@ -522,6 +540,7 @@ private static Method getGetMethod() { *

    See Throwables#lazyStackTrace throws * UnsupportedOperationException. */ + @J2ktIncompatible @GwtIncompatible // java.lang.reflect @CheckForNull private static Method getSizeMethod(Object jla) { @@ -537,6 +556,7 @@ private static Method getSizeMethod(Object jla) { } } + @J2ktIncompatible @GwtIncompatible // java.lang.reflect @CheckForNull private static Method getJlaMethod(String name, Class... parameterTypes) throws ThreadDeath { diff --git a/guava/src/com/google/common/base/Utf8.java b/guava/src/com/google/common/base/Utf8.java index bb945a35f095..f1209bf45730 100644 --- a/guava/src/com/google/common/base/Utf8.java +++ b/guava/src/com/google/common/base/Utf8.java @@ -18,7 +18,6 @@ import static java.lang.Character.MAX_SURROGATE; import static java.lang.Character.MIN_SURROGATE; -import com.google.common.annotations.Beta; import com.google.common.annotations.GwtCompatible; /** @@ -36,7 +35,6 @@ * @author Clément Roux * @since 16.0 */ -@Beta @GwtCompatible(emulated = true) @ElementTypesAreNonnullByDefault public final class Utf8 { diff --git a/guava/src/com/google/common/cache/CacheBuilder.java b/guava/src/com/google/common/cache/CacheBuilder.java index a609a1a77348..35e9196e12ac 100644 --- a/guava/src/com/google/common/cache/CacheBuilder.java +++ b/guava/src/com/google/common/cache/CacheBuilder.java @@ -36,11 +36,10 @@ import java.util.ConcurrentModificationException; import java.util.IdentityHashMap; import java.util.Map; -import java.util.concurrent.ConcurrentHashMap; import java.util.concurrent.TimeUnit; import java.util.logging.Level; import java.util.logging.Logger; -import org.checkerframework.checker.nullness.qual.Nullable; +import javax.annotation.CheckForNull; /** * A builder of {@link LoadingCache} and {@link Cache} instances. @@ -132,13 +131,11 @@ * }); * } * - *

    The returned cache is implemented as a hash table with similar performance characteristics to - * {@link ConcurrentHashMap}. It implements all optional operations of the {@link LoadingCache} and - * {@link Cache} interfaces. The {@code asMap} view (and its collection views) have weakly - * consistent iterators. This means that they are safe for concurrent use, but if other threads - * modify the cache after the iterator is created, it is undefined which of these changes, if any, - * are reflected in that iterator. These iterators never throw {@link - * ConcurrentModificationException}. + *

    The returned cache implements all optional operations of the {@link LoadingCache} and {@link + * Cache} interfaces. The {@code asMap} view (and its collection views) have weakly consistent + * iterators. This means that they are safe for concurrent use, but if other threads modify the + * cache after the iterator is created, it is undefined which of these changes, if any, are + * reflected in that iterator. These iterators never throw {@link ConcurrentModificationException}. * *

    Note: by default, the returned cache uses equality comparisons (the {@link * Object#equals equals} method) to determine equality for keys or values. However, if {@link @@ -146,34 +143,33 @@ * Likewise, if {@link #weakValues} or {@link #softValues} was specified, the cache uses identity * comparisons for values. * - *

    Entries are automatically evicted from the cache when any of {@linkplain #maximumSize(long) - * maximumSize}, {@linkplain #maximumWeight(long) maximumWeight}, {@linkplain #expireAfterWrite - * expireAfterWrite}, {@linkplain #expireAfterAccess expireAfterAccess}, {@linkplain #weakKeys - * weakKeys}, {@linkplain #weakValues weakValues}, or {@linkplain #softValues softValues} are - * requested. + *

    Entries are automatically evicted from the cache when any of {@link #maximumSize(long) + * maximumSize}, {@link #maximumWeight(long) maximumWeight}, {@link #expireAfterWrite + * expireAfterWrite}, {@link #expireAfterAccess expireAfterAccess}, {@link #weakKeys weakKeys}, + * {@link #weakValues weakValues}, or {@link #softValues softValues} are requested. * - *

    If {@linkplain #maximumSize(long) maximumSize} or {@linkplain #maximumWeight(long) - * maximumWeight} is requested entries may be evicted on each cache modification. + *

    If {@link #maximumSize(long) maximumSize} or {@link #maximumWeight(long) maximumWeight} is + * requested entries may be evicted on each cache modification. * - *

    If {@linkplain #expireAfterWrite expireAfterWrite} or {@linkplain #expireAfterAccess - * expireAfterAccess} is requested entries may be evicted on each cache modification, on occasional - * cache accesses, or on calls to {@link Cache#cleanUp}. Expired entries may be counted by {@link - * Cache#size}, but will never be visible to read or write operations. + *

    If {@link #expireAfterWrite expireAfterWrite} or {@link #expireAfterAccess expireAfterAccess} + * is requested entries may be evicted on each cache modification, on occasional cache accesses, or + * on calls to {@link Cache#cleanUp}. Expired entries may be counted by {@link Cache#size}, but will + * never be visible to read or write operations. * - *

    If {@linkplain #weakKeys weakKeys}, {@linkplain #weakValues weakValues}, or {@linkplain - * #softValues softValues} are requested, it is possible for a key or value present in the cache to - * be reclaimed by the garbage collector. Entries with reclaimed keys or values may be removed from - * the cache on each cache modification, on occasional cache accesses, or on calls to {@link - * Cache#cleanUp}; such entries may be counted in {@link Cache#size}, but will never be visible to - * read or write operations. + *

    If {@link #weakKeys weakKeys}, {@link #weakValues weakValues}, or {@link #softValues + * softValues} are requested, it is possible for a key or value present in the cache to be reclaimed + * by the garbage collector. Entries with reclaimed keys or values may be removed from the cache on + * each cache modification, on occasional cache accesses, or on calls to {@link Cache#cleanUp}; such + * entries may be counted in {@link Cache#size}, but will never be visible to read or write + * operations. * *

    Certain cache configurations will result in the accrual of periodic maintenance tasks which * will be performed during write operations, or during occasional read operations in the absence of * writes. The {@link Cache#cleanUp} method of the returned cache will also perform maintenance, but - * calling it should not be necessary with a high throughput cache. Only caches built with - * {@linkplain #removalListener removalListener}, {@linkplain #expireAfterWrite expireAfterWrite}, - * {@linkplain #expireAfterAccess expireAfterAccess}, {@linkplain #weakKeys weakKeys}, {@linkplain - * #weakValues weakValues}, or {@linkplain #softValues softValues} perform periodic maintenance. + * calling it should not be necessary with a high throughput cache. Only caches built with {@link + * #removalListener removalListener}, {@link #expireAfterWrite expireAfterWrite}, {@link + * #expireAfterAccess expireAfterAccess}, {@link #weakKeys weakKeys}, {@link #weakValues + * weakValues}, or {@link #softValues softValues} perform periodic maintenance. * *

    The caches produced by {@code CacheBuilder} are serializable, and the deserialized caches * retain all the configuration properties of the original cache. Note that the serialized form does @@ -277,10 +273,10 @@ public long read() { int concurrencyLevel = UNSET_INT; long maximumSize = UNSET_INT; long maximumWeight = UNSET_INT; - @Nullable Weigher weigher; + @CheckForNull Weigher weigher; - @Nullable Strength keyStrength; - @Nullable Strength valueStrength; + @CheckForNull Strength keyStrength; + @CheckForNull Strength valueStrength; @SuppressWarnings("GoodTime") // should be a java.time.Duration long expireAfterWriteNanos = UNSET_INT; @@ -291,11 +287,11 @@ public long read() { @SuppressWarnings("GoodTime") // should be a java.time.Duration long refreshNanos = UNSET_INT; - @Nullable Equivalence keyEquivalence; - @Nullable Equivalence valueEquivalence; + @CheckForNull Equivalence keyEquivalence; + @CheckForNull Equivalence valueEquivalence; - @Nullable RemovalListener removalListener; - @Nullable Ticker ticker; + @CheckForNull RemovalListener removalListener; + @CheckForNull Ticker ticker; Supplier statsCounterSupplier = NULL_STATS_COUNTER; diff --git a/guava/src/com/google/common/cache/CacheLoader.java b/guava/src/com/google/common/cache/CacheLoader.java index 97468c12e0b5..1401595c7f30 100644 --- a/guava/src/com/google/common/cache/CacheLoader.java +++ b/guava/src/com/google/common/cache/CacheLoader.java @@ -132,6 +132,8 @@ public Map loadAll(Iterable keys) throws Exception { * Returns a cache loader that uses {@code function} to load keys, without supporting either * reloading or bulk loading. This allows creating a cache loader using a lambda expression. * + *

    The returned object is serializable if {@code function} is serializable. + * * @param function the function to be used for loading values; must never return {@code null} * @return a cache loader that loads values by passing each key to {@code function} */ @@ -144,6 +146,8 @@ public static CacheLoader from(Function function) { * to create a new supplier just to pass it in here; just subclass {@code CacheLoader} and * implement {@link #load load} instead. * + *

    The returned object is serializable if {@code supplier} is serializable. + * * @param supplier the supplier to be used for loading values; must never return {@code null} * @return a cache loader that loads values by calling {@link Supplier#get}, irrespective of the * key diff --git a/guava/src/com/google/common/cache/LocalCache.java b/guava/src/com/google/common/cache/LocalCache.java index b256234be330..a0d58280d6df 100644 --- a/guava/src/com/google/common/cache/LocalCache.java +++ b/guava/src/com/google/common/cache/LocalCache.java @@ -4023,8 +4023,6 @@ public V getIfPresent(Object key) { return value; } - // Only becomes available in Java 8 when it's on the interface. - // @Override @Override @CheckForNull public V getOrDefault(@CheckForNull Object key, @CheckForNull V defaultValue) { diff --git a/guava/src/com/google/common/collect/AbstractBiMap.java b/guava/src/com/google/common/collect/AbstractBiMap.java index 9b2ad2af5787..e72462975a00 100644 --- a/guava/src/com/google/common/collect/AbstractBiMap.java +++ b/guava/src/com/google/common/collect/AbstractBiMap.java @@ -22,6 +22,7 @@ import com.google.common.annotations.GwtCompatible; import com.google.common.annotations.GwtIncompatible; +import com.google.common.annotations.J2ktIncompatible; import com.google.common.base.Objects; import com.google.errorprone.annotations.CanIgnoreReturnValue; import com.google.j2objc.annotations.RetainedWith; @@ -52,8 +53,12 @@ abstract class AbstractBiMap extends ForwardingMap implements BiMap, Serializable { + @SuppressWarnings("nullness:initialization.field.uninitialized") // For J2KT (lateinit) private transient Map delegate; - @RetainedWith transient AbstractBiMap inverse; + + @SuppressWarnings("nullness:initialization.field.uninitialized") // For J2KT (lateinit) + @RetainedWith + transient AbstractBiMap inverse; /** Package-private constructor for creating a map-backed bimap. */ AbstractBiMap(Map forward, Map backward) { @@ -422,15 +427,8 @@ public Iterator> iterator() { // See java.util.Collections.CheckedEntrySet for details on attacks. @Override - public Object[] toArray() { - /* - * standardToArray returns `@Nullable Object[]` rather than `Object[]` but only because it can - * be used with collections that may contain null. This collection never contains nulls, so we - * can treat it as a plain `Object[]`. - */ - @SuppressWarnings("nullness") - Object[] result = standardToArray(); - return result; + public @Nullable Object[] toArray() { + return standardToArray(); } @Override @@ -488,14 +486,18 @@ V checkValue(@ParametricNullness V value) { return inverse.checkKey(value); } - /** @serialData the forward bimap */ + /** + * @serialData the forward bimap + */ @GwtIncompatible // java.io.ObjectOutputStream + @J2ktIncompatible private void writeObject(ObjectOutputStream stream) throws IOException { stream.defaultWriteObject(); stream.writeObject(inverse()); } @GwtIncompatible // java.io.ObjectInputStream + @J2ktIncompatible @SuppressWarnings("unchecked") // reading data stored by writeObject private void readObject(ObjectInputStream stream) throws IOException, ClassNotFoundException { stream.defaultReadObject(); @@ -503,14 +505,17 @@ private void readObject(ObjectInputStream stream) throws IOException, ClassNotFo } @GwtIncompatible // Not needed in the emulated source. + @J2ktIncompatible Object readResolve() { return inverse().inverse(); } @GwtIncompatible // Not needed in emulated source. + @J2ktIncompatible private static final long serialVersionUID = 0; } @GwtIncompatible // Not needed in emulated source. + @J2ktIncompatible private static final long serialVersionUID = 0; } diff --git a/guava/src/com/google/common/collect/AbstractMapBasedMultimap.java b/guava/src/com/google/common/collect/AbstractMapBasedMultimap.java index 4c5a0f0418fb..1e48281bfbe7 100644 --- a/guava/src/com/google/common/collect/AbstractMapBasedMultimap.java +++ b/guava/src/com/google/common/collect/AbstractMapBasedMultimap.java @@ -1188,6 +1188,7 @@ public boolean hasNext() { } @Override + @ParametricNullness public T next() { if (!valueIterator.hasNext()) { Entry> mapEntry = keyIterator.next(); diff --git a/guava/src/com/google/common/collect/AbstractMapBasedMultiset.java b/guava/src/com/google/common/collect/AbstractMapBasedMultiset.java index b37214e02299..2b055b12fbc6 100644 --- a/guava/src/com/google/common/collect/AbstractMapBasedMultiset.java +++ b/guava/src/com/google/common/collect/AbstractMapBasedMultiset.java @@ -25,6 +25,7 @@ import com.google.common.annotations.GwtCompatible; import com.google.common.annotations.GwtIncompatible; +import com.google.common.annotations.J2ktIncompatible; import com.google.common.primitives.Ints; import com.google.errorprone.annotations.CanIgnoreReturnValue; import java.io.InvalidObjectException; @@ -344,10 +345,12 @@ private static int getAndSet(@CheckForNull Count i, int count) { // Don't allow default serialization. @GwtIncompatible // java.io.ObjectStreamException + @J2ktIncompatible private void readObjectNoData() throws ObjectStreamException { throw new InvalidObjectException("Stream data required"); } @GwtIncompatible // not needed in emulated source. + @J2ktIncompatible private static final long serialVersionUID = -2250766705698539974L; } diff --git a/guava/src/com/google/common/collect/AllEqualOrdering.java b/guava/src/com/google/common/collect/AllEqualOrdering.java index f6ca6faff797..366044b0146d 100644 --- a/guava/src/com/google/common/collect/AllEqualOrdering.java +++ b/guava/src/com/google/common/collect/AllEqualOrdering.java @@ -43,8 +43,7 @@ public int compare(@CheckForNull Object left, @CheckForNull Object right) { } @Override - @SuppressWarnings("nullness") // unsafe: see supertype - public ImmutableList immutableSortedCopy(Iterable iterable) { + public ImmutableList immutableSortedCopy(Iterable iterable) { return ImmutableList.copyOf(iterable); } diff --git a/guava/src/com/google/common/collect/ArrayListMultimap.java b/guava/src/com/google/common/collect/ArrayListMultimap.java index e31f491f0cfb..c0ed5571f83c 100644 --- a/guava/src/com/google/common/collect/ArrayListMultimap.java +++ b/guava/src/com/google/common/collect/ArrayListMultimap.java @@ -20,6 +20,7 @@ import com.google.common.annotations.GwtCompatible; import com.google.common.annotations.GwtIncompatible; +import com.google.common.annotations.J2ktIncompatible; import com.google.common.annotations.VisibleForTesting; import java.io.IOException; import java.io.ObjectInputStream; @@ -155,12 +156,14 @@ public void trimToSize() { * key, number of values for that key, and the key's values */ @GwtIncompatible // java.io.ObjectOutputStream + @J2ktIncompatible private void writeObject(ObjectOutputStream stream) throws IOException { stream.defaultWriteObject(); Serialization.writeMultimap(this, stream); } @GwtIncompatible // java.io.ObjectOutputStream + @J2ktIncompatible private void readObject(ObjectInputStream stream) throws IOException, ClassNotFoundException { stream.defaultReadObject(); expectedValuesPerKey = DEFAULT_VALUES_PER_KEY; @@ -171,5 +174,6 @@ private void readObject(ObjectInputStream stream) throws IOException, ClassNotFo } @GwtIncompatible // Not needed in emulated source. + @J2ktIncompatible private static final long serialVersionUID = 0; } diff --git a/guava/src/com/google/common/collect/ClassToInstanceMap.java b/guava/src/com/google/common/collect/ClassToInstanceMap.java index 8fbdfd9ebfc7..a34c6ad5f0c4 100644 --- a/guava/src/com/google/common/collect/ClassToInstanceMap.java +++ b/guava/src/com/google/common/collect/ClassToInstanceMap.java @@ -21,6 +21,8 @@ import com.google.errorprone.annotations.DoNotMock; import java.util.Map; import javax.annotation.CheckForNull; +import org.checkerframework.checker.nullness.qual.NonNull; +import org.checkerframework.checker.nullness.qual.Nullable; /** * A map, each entry of which maps a Java raw type to an @@ -30,17 +32,6 @@ *

    Like any other {@code Map}, this map may contain entries for primitive types, * and a primitive type and its corresponding wrapper type may map to different values. * - *

    This class's support for {@code null} requires some explanation: From release 31.0 onward, - * Guava specifies the nullness of its types through annotations. In the case of {@code - * ClassToInstanceMap}, it specifies that both the key and value types are restricted to - * non-nullable types. This specification is reasonable for keys, which must be non-null - * classes. This is in contrast to the specification for values: Null values are - * supported by the implementation {@link MutableClassToInstanceMap}, even though that - * implementation and this interface specify otherwise. Thus, if you use a nullness checker, you can - * safely suppress any warnings it produces when you write null values into a {@code - * MutableClassToInstanceMap}. Just be sure to be prepared for null values when reading from it, - * since nullness checkers will assume that values are non-null then, too. - * *

    See the Guava User Guide article on {@code * ClassToInstanceMap}. @@ -48,25 +39,22 @@ *

    To map a generic type to an instance of that type, use {@link * com.google.common.reflect.TypeToInstanceMap} instead. * - * @param the common supertype that all entries must share; often this is simply {@link Object} - * @author Kevin Bourrillion + * @param the common supertype that all values will share. When in doubt, just use {@link + * Object}, or use {@code @Nullable Object} to allow null values. * @since 2.0 */ @DoNotMock("Use ImmutableClassToInstanceMap or MutableClassToInstanceMap") @GwtCompatible @ElementTypesAreNonnullByDefault -// If we ever support non-null projections (https://github.com/jspecify/jspecify/issues/86), -// we might annotate this as... -// ClassToInstanceMap extends Map, B> -// ...and change its methods similarly ( or Class<@Nonnull T>). -public interface ClassToInstanceMap extends Map, B> { +public interface ClassToInstanceMap + extends Map, B> { /** * Returns the value the specified class is mapped to, or {@code null} if no entry for this class * is present. This will only return a value that was bound to this specific class, not a value * that may have been bound to a subtype. */ @CheckForNull - T getInstance(Class type); + T getInstance(Class type); /** * Maps the specified class to the specified value. Does not associate this value with any @@ -77,5 +65,5 @@ public interface ClassToInstanceMap extends Map, B> { */ @CanIgnoreReturnValue @CheckForNull - T putInstance(Class type, T value); + T putInstance(Class<@NonNull T> type, @ParametricNullness T value); } diff --git a/guava/src/com/google/common/collect/CollectCollectors.java b/guava/src/com/google/common/collect/CollectCollectors.java index f582660c8ee1..ae943ba1b020 100644 --- a/guava/src/com/google/common/collect/CollectCollectors.java +++ b/guava/src/com/google/common/collect/CollectCollectors.java @@ -21,6 +21,7 @@ import com.google.common.annotations.GwtCompatible; import com.google.common.annotations.GwtIncompatible; +import com.google.common.annotations.J2ktIncompatible; import com.google.common.base.Preconditions; import java.util.Collection; import java.util.Comparator; @@ -95,16 +96,20 @@ final class CollectCollectors { return (Collector) EnumSetAccumulator.TO_IMMUTABLE_ENUM_SET; } + private static > + Collector, ImmutableSet> toImmutableEnumSetGeneric() { + return Collector.of( + EnumSetAccumulator::new, + EnumSetAccumulator::add, + EnumSetAccumulator::combine, + EnumSetAccumulator::toImmutableSet, + Collector.Characteristics.UNORDERED); + } + private static final class EnumSetAccumulator> { @SuppressWarnings({"rawtypes", "unchecked"}) static final Collector, ?, ImmutableSet>> TO_IMMUTABLE_ENUM_SET = - (Collector) - Collector.>of( - EnumSetAccumulator::new, - EnumSetAccumulator::add, - EnumSetAccumulator::combine, - EnumSetAccumulator::toImmutableSet, - Collector.Characteristics.UNORDERED); + (Collector) toImmutableEnumSetGeneric(); @CheckForNull private EnumSet set; @@ -128,7 +133,12 @@ EnumSetAccumulator combine(EnumSetAccumulator other) { } ImmutableSet toImmutableSet() { - return (set == null) ? ImmutableSet.of() : ImmutableEnumSet.asImmutable(set); + if (set == null) { + return ImmutableSet.of(); + } + ImmutableSet ret = ImmutableEnumSet.asImmutable(set); + set = null; // subsequent manual manipulation of the accumulator mustn't affect ret + return ret; } } @@ -249,6 +259,7 @@ ImmutableSet toImmutableSet() { new Collector.Characteristics[0]); } + @J2ktIncompatible static , V> Collector> toImmutableEnumMap( Function keyFunction, @@ -277,6 +288,7 @@ ImmutableSet toImmutableSet() { Collector.Characteristics.UNORDERED); } + @J2ktIncompatible static , V> Collector> toImmutableEnumMap( Function keyFunction, @@ -303,6 +315,7 @@ ImmutableSet toImmutableSet() { EnumMapAccumulator::toImmutableMap); } + @J2ktIncompatible private static class EnumMapAccumulator, V> { private final BinaryOperator mergeFunction; @CheckForNull private EnumMap map = null; diff --git a/guava/src/com/google/common/collect/CompactHashMap.java b/guava/src/com/google/common/collect/CompactHashMap.java index e40b05edae77..83f27f8e6cfa 100644 --- a/guava/src/com/google/common/collect/CompactHashMap.java +++ b/guava/src/com/google/common/collect/CompactHashMap.java @@ -25,6 +25,7 @@ import static java.util.Objects.requireNonNull; import com.google.common.annotations.GwtIncompatible; +import com.google.common.annotations.J2ktIncompatible; import com.google.common.annotations.VisibleForTesting; import com.google.common.base.Objects; import com.google.common.base.Preconditions; @@ -1116,6 +1117,7 @@ public void clear() { } } + @J2ktIncompatible private void writeObject(ObjectOutputStream stream) throws IOException { stream.defaultWriteObject(); stream.writeInt(size()); @@ -1128,6 +1130,7 @@ private void writeObject(ObjectOutputStream stream) throws IOException { } @SuppressWarnings("unchecked") + @J2ktIncompatible private void readObject(ObjectInputStream stream) throws IOException, ClassNotFoundException { stream.defaultReadObject(); int elementCount = stream.readInt(); diff --git a/guava/src/com/google/common/collect/CompactHashSet.java b/guava/src/com/google/common/collect/CompactHashSet.java index 2cfcf0a13237..dc3c76934bd8 100644 --- a/guava/src/com/google/common/collect/CompactHashSet.java +++ b/guava/src/com/google/common/collect/CompactHashSet.java @@ -23,6 +23,7 @@ import static java.util.Objects.requireNonNull; import com.google.common.annotations.GwtIncompatible; +import com.google.common.annotations.J2ktIncompatible; import com.google.common.annotations.VisibleForTesting; import com.google.common.base.Objects; import com.google.common.base.Preconditions; @@ -698,6 +699,7 @@ public void clear() { } } + @J2ktIncompatible private void writeObject(ObjectOutputStream stream) throws IOException { stream.defaultWriteObject(); stream.writeInt(size()); @@ -707,6 +709,7 @@ private void writeObject(ObjectOutputStream stream) throws IOException { } @SuppressWarnings("unchecked") + @J2ktIncompatible private void readObject(ObjectInputStream stream) throws IOException, ClassNotFoundException { stream.defaultReadObject(); int elementCount = stream.readInt(); diff --git a/guava/src/com/google/common/collect/CompactLinkedHashMap.java b/guava/src/com/google/common/collect/CompactLinkedHashMap.java index 97b3a4b1c3b9..8a3f93dfc8c9 100644 --- a/guava/src/com/google/common/collect/CompactLinkedHashMap.java +++ b/guava/src/com/google/common/collect/CompactLinkedHashMap.java @@ -19,6 +19,7 @@ import static java.util.Objects.requireNonNull; import com.google.common.annotations.GwtIncompatible; +import com.google.common.annotations.J2ktIncompatible; import com.google.common.annotations.VisibleForTesting; import com.google.errorprone.annotations.CanIgnoreReturnValue; import com.google.j2objc.annotations.WeakOuter; @@ -52,6 +53,7 @@ * * @author Louis Wasserman */ +@J2ktIncompatible // no support for access-order mode in LinkedHashMap delegate @GwtIncompatible // not worth using in GWT for now @ElementTypesAreNonnullByDefault class CompactLinkedHashMap diff --git a/guava/src/com/google/common/collect/CompoundOrdering.java b/guava/src/com/google/common/collect/CompoundOrdering.java index 42feed373193..95ebb82bba9f 100644 --- a/guava/src/com/google/common/collect/CompoundOrdering.java +++ b/guava/src/com/google/common/collect/CompoundOrdering.java @@ -30,12 +30,14 @@ final class CompoundOrdering extends Ordering implements Serializable { final Comparator[] comparators; + @SuppressWarnings("unchecked") // Generic array creation CompoundOrdering(Comparator primary, Comparator secondary) { this.comparators = (Comparator[]) new Comparator[] {primary, secondary}; } + @SuppressWarnings("unchecked") // Generic array creation CompoundOrdering(Iterable> comparators) { - this.comparators = Iterables.toArray(comparators, new Comparator[0]); + this.comparators = Iterables.toArray(comparators, (Comparator[]) new Comparator[0]); } @Override diff --git a/guava/src/com/google/common/collect/ConcurrentHashMultiset.java b/guava/src/com/google/common/collect/ConcurrentHashMultiset.java index 47248412bffa..c01004039ca0 100644 --- a/guava/src/com/google/common/collect/ConcurrentHashMultiset.java +++ b/guava/src/com/google/common/collect/ConcurrentHashMultiset.java @@ -23,6 +23,7 @@ import com.google.common.annotations.Beta; import com.google.common.annotations.GwtIncompatible; +import com.google.common.annotations.J2ktIncompatible; import com.google.common.annotations.VisibleForTesting; import com.google.common.collect.Serialization.FieldSetter; import com.google.common.math.IntMath; @@ -55,6 +56,7 @@ * @author mike nonemacher * @since 2.0 */ +@J2ktIncompatible @GwtIncompatible @ElementTypesAreNonnullByDefault public final class ConcurrentHashMultiset extends AbstractMultiset implements Serializable { @@ -594,6 +596,7 @@ private void writeObject(ObjectOutputStream stream) throws IOException { stream.writeObject(countMap); } + @J2ktIncompatible // serialization private void readObject(ObjectInputStream stream) throws IOException, ClassNotFoundException { stream.defaultReadObject(); @SuppressWarnings("unchecked") // reading data stored by writeObject diff --git a/guava/src/com/google/common/collect/ConsumingQueueIterator.java b/guava/src/com/google/common/collect/ConsumingQueueIterator.java index 7721e1277ca8..3a923ae21f10 100644 --- a/guava/src/com/google/common/collect/ConsumingQueueIterator.java +++ b/guava/src/com/google/common/collect/ConsumingQueueIterator.java @@ -23,7 +23,7 @@ /** * An Iterator implementation which draws elements from a queue, removing them from the queue as it - * iterates. + * iterates. This class is not thread safe. */ @GwtCompatible @ElementTypesAreNonnullByDefault @@ -36,7 +36,7 @@ final class ConsumingQueueIterator extends AbstractI @Override @CheckForNull - public T computeNext() { + protected T computeNext() { // TODO(b/192579700): Use a ternary once it no longer confuses our nullness checker. if (queue.isEmpty()) { return endOfData(); diff --git a/guava/src/com/google/common/collect/DiscreteDomain.java b/guava/src/com/google/common/collect/DiscreteDomain.java index 222ebe5283f3..c32ea8408979 100644 --- a/guava/src/com/google/common/collect/DiscreteDomain.java +++ b/guava/src/com/google/common/collect/DiscreteDomain.java @@ -50,6 +50,9 @@ public abstract class DiscreteDomain { /** * Returns the discrete domain for values of type {@code Integer}. * + *

    This method always returns the same object. That object is serializable; deserializing it + * results in the same object too. + * * @since 14.0 (since 10.0 as {@code DiscreteDomains.integers()}) */ public static DiscreteDomain integers() { @@ -113,6 +116,9 @@ public String toString() { /** * Returns the discrete domain for values of type {@code Long}. * + *

    This method always returns the same object. That object is serializable; deserializing it + * results in the same object too. + * * @since 14.0 (since 10.0 as {@code DiscreteDomains.longs()}) */ public static DiscreteDomain longs() { @@ -187,6 +193,9 @@ public String toString() { /** * Returns the discrete domain for values of type {@code BigInteger}. * + *

    This method always returns the same object. That object is serializable; deserializing it + * results in the same object too. + * * @since 15.0 */ public static DiscreteDomain bigIntegers() { diff --git a/guava/src/com/google/common/collect/EmptyContiguousSet.java b/guava/src/com/google/common/collect/EmptyContiguousSet.java index 6ae7459f7bfa..5ae3d23f4b85 100644 --- a/guava/src/com/google/common/collect/EmptyContiguousSet.java +++ b/guava/src/com/google/common/collect/EmptyContiguousSet.java @@ -15,6 +15,7 @@ import com.google.common.annotations.GwtCompatible; import com.google.common.annotations.GwtIncompatible; +import com.google.common.annotations.J2ktIncompatible; import java.io.InvalidObjectException; import java.io.ObjectInputStream; import java.io.Serializable; @@ -144,6 +145,7 @@ public int hashCode() { } @GwtIncompatible // serialization + @J2ktIncompatible private static final class SerializedForm implements Serializable { private final DiscreteDomain domain; @@ -159,12 +161,14 @@ private Object readResolve() { } @GwtIncompatible // serialization + @J2ktIncompatible @Override Object writeReplace() { return new SerializedForm<>(domain); } @GwtIncompatible // serialization + @J2ktIncompatible private void readObject(ObjectInputStream stream) throws InvalidObjectException { throw new InvalidObjectException("Use SerializedForm"); } @@ -172,6 +176,6 @@ private void readObject(ObjectInputStream stream) throws InvalidObjectException @GwtIncompatible // NavigableSet @Override ImmutableSortedSet createDescendingSet() { - return ImmutableSortedSet.emptySet(Ordering.natural().reverse()); + return ImmutableSortedSet.emptySet(Ordering.natural().reverse()); } } diff --git a/guava/src/com/google/common/collect/EnumBiMap.java b/guava/src/com/google/common/collect/EnumBiMap.java index 97d3c2e7cd09..cb5ce71fd862 100644 --- a/guava/src/com/google/common/collect/EnumBiMap.java +++ b/guava/src/com/google/common/collect/EnumBiMap.java @@ -21,6 +21,7 @@ import com.google.common.annotations.GwtCompatible; import com.google.common.annotations.GwtIncompatible; +import com.google.common.annotations.J2ktIncompatible; import java.io.IOException; import java.io.ObjectInputStream; import java.io.ObjectOutputStream; @@ -38,6 +39,7 @@ * @since 2.0 */ @GwtCompatible(emulated = true) +@J2ktIncompatible @ElementTypesAreNonnullByDefault public final class EnumBiMap, V extends Enum> extends AbstractBiMap { private transient Class keyType; diff --git a/guava/src/com/google/common/collect/EnumHashBiMap.java b/guava/src/com/google/common/collect/EnumHashBiMap.java index 5fbbb70c6303..e2bc841a7776 100644 --- a/guava/src/com/google/common/collect/EnumHashBiMap.java +++ b/guava/src/com/google/common/collect/EnumHashBiMap.java @@ -20,6 +20,7 @@ import com.google.common.annotations.GwtCompatible; import com.google.common.annotations.GwtIncompatible; +import com.google.common.annotations.J2ktIncompatible; import com.google.errorprone.annotations.CanIgnoreReturnValue; import java.io.IOException; import java.io.ObjectInputStream; @@ -42,6 +43,7 @@ * @since 2.0 */ @GwtCompatible(emulated = true) +@J2ktIncompatible @ElementTypesAreNonnullByDefault public final class EnumHashBiMap, V extends @Nullable Object> extends AbstractBiMap { diff --git a/guava/src/com/google/common/collect/EnumMultiset.java b/guava/src/com/google/common/collect/EnumMultiset.java index 778902ede684..d6ced718bbca 100644 --- a/guava/src/com/google/common/collect/EnumMultiset.java +++ b/guava/src/com/google/common/collect/EnumMultiset.java @@ -21,6 +21,7 @@ import com.google.common.annotations.GwtCompatible; import com.google.common.annotations.GwtIncompatible; +import com.google.common.annotations.J2ktIncompatible; import com.google.common.primitives.Ints; import com.google.errorprone.annotations.CanIgnoreReturnValue; import java.io.IOException; @@ -44,6 +45,7 @@ * @since 2.0 */ @GwtCompatible(emulated = true) +@J2ktIncompatible @ElementTypesAreNonnullByDefault public final class EnumMultiset> extends AbstractMultiset implements Serializable { diff --git a/guava/src/com/google/common/collect/EvictingQueue.java b/guava/src/com/google/common/collect/EvictingQueue.java index 5667dfa8c054..fe95f30b6049 100644 --- a/guava/src/com/google/common/collect/EvictingQueue.java +++ b/guava/src/com/google/common/collect/EvictingQueue.java @@ -21,6 +21,7 @@ import com.google.common.annotations.Beta; import com.google.common.annotations.GwtCompatible; +import com.google.common.annotations.J2ktIncompatible; import com.google.common.annotations.VisibleForTesting; import com.google.errorprone.annotations.CanIgnoreReturnValue; import java.io.Serializable; @@ -127,6 +128,7 @@ public boolean addAll(Collection collection) { } @Override + @J2ktIncompatible // Incompatible return type change. Use inherited implementation public Object[] toArray() { /* * If we could, we'd declare the no-arg `Collection.toArray()` to return "Object[] but elements diff --git a/guava/src/com/google/common/collect/FluentIterable.java b/guava/src/com/google/common/collect/FluentIterable.java index 61053780dab8..4ad12926a82b 100644 --- a/guava/src/com/google/common/collect/FluentIterable.java +++ b/guava/src/com/google/common/collect/FluentIterable.java @@ -16,7 +16,6 @@ import static com.google.common.base.Preconditions.checkNotNull; -import com.google.common.annotations.Beta; import com.google.common.annotations.GwtCompatible; import com.google.common.annotations.GwtIncompatible; import com.google.common.base.Function; @@ -34,6 +33,7 @@ import java.util.SortedSet; import java.util.stream.Stream; import javax.annotation.CheckForNull; +import org.checkerframework.checker.nullness.qual.NonNull; import org.checkerframework.checker.nullness.qual.Nullable; /** @@ -159,7 +159,6 @@ public Iterator iterator() { * * @since 20.0 (since 18.0 as an overload of {@code of}) */ - @Beta public static FluentIterable from(E[] elements) { return from(Arrays.asList(elements)); } @@ -192,7 +191,6 @@ public Iterator iterator() { * * @since 20.0 */ - @Beta public static FluentIterable concat( Iterable a, Iterable b) { return concatNoDefensiveCopy(a, b); @@ -211,7 +209,6 @@ public Iterator iterator() { * * @since 20.0 */ - @Beta public static FluentIterable concat( Iterable a, Iterable b, Iterable c) { return concatNoDefensiveCopy(a, b, c); @@ -231,7 +228,6 @@ public Iterator iterator() { * * @since 20.0 */ - @Beta public static FluentIterable concat( Iterable a, Iterable b, @@ -255,7 +251,6 @@ public Iterator iterator() { * @throws NullPointerException if any of the provided iterables is {@code null} * @since 20.0 */ - @Beta public static FluentIterable concat( Iterable... inputs) { return concatNoDefensiveCopy(Arrays.copyOf(inputs, inputs.length)); @@ -275,14 +270,13 @@ public Iterator iterator() { * * @since 20.0 */ - @Beta public static FluentIterable concat( final Iterable> inputs) { checkNotNull(inputs); return new FluentIterable() { @Override public Iterator iterator() { - return Iterators.concat(Iterators.transform(inputs.iterator(), Iterables.toIterator())); + return Iterators.concat(Iterators.transform(inputs.iterator(), Iterable::iterator)); } }; } @@ -315,7 +309,6 @@ public Iterator get(int i) { * * @since 20.0 */ - @Beta public static FluentIterable of() { return FluentIterable.from(Collections.emptyList()); } @@ -328,7 +321,6 @@ public Iterator get(int i) { * * @since 20.0 */ - @Beta public static FluentIterable of( @ParametricNullness E element, E... elements) { return from(Lists.asList(element, elements)); @@ -397,7 +389,6 @@ public final FluentIterable cycle() { * * @since 18.0 */ - @Beta public final FluentIterable append(Iterable other) { return FluentIterable.concat(getDelegate(), other); } @@ -410,7 +401,6 @@ public final FluentIterable append(Iterable other) { * * @since 18.0 */ - @Beta public final FluentIterable append(E... elements) { return FluentIterable.concat(getDelegate(), Arrays.asList(elements)); } @@ -472,8 +462,8 @@ public final boolean allMatch(Predicate predicate) { *

    {@code Stream} equivalent: {@code stream.filter(predicate).findFirst()}. */ @SuppressWarnings("nullness") // Unsafe, but we can't do much about it now. - public final Optional firstMatch(Predicate predicate) { - return Iterables.tryFind(getDelegate(), predicate); + public final Optional<@NonNull E> firstMatch(Predicate predicate) { + return Iterables.tryFind((Iterable<@NonNull E>) getDelegate(), predicate); } /** @@ -520,9 +510,9 @@ public final Optional firstMatch(Predicate predicate) { * iterator().next()} or {@link Iterables#getFirst} instead. */ @SuppressWarnings("nullness") // Unsafe, but we can't do much about it now. - public final Optional first() { + public final Optional<@NonNull E> first() { Iterator iterator = getDelegate().iterator(); - return iterator.hasNext() ? Optional.of(iterator.next()) : Optional.absent(); + return iterator.hasNext() ? Optional.of(iterator.next()) : Optional.absent(); } /** @@ -537,7 +527,7 @@ public final Optional first() { * Iterables#getLast} instead. */ @SuppressWarnings("nullness") // Unsafe, but we can't do much about it now. - public final Optional last() { + public final Optional<@NonNull E> last() { // Iterables#getLast was inlined here so we don't have to throw/catch a NSEE // TODO(kevinb): Support a concurrently modified collection? @@ -627,8 +617,8 @@ public final boolean isEmpty() { * @since 14.0 (since 12.0 as {@code toImmutableList()}). */ @SuppressWarnings("nullness") // Unsafe, but we can't do much about it now. - public final ImmutableList toList() { - return ImmutableList.copyOf(getDelegate()); + public final ImmutableList<@NonNull E> toList() { + return ImmutableList.copyOf((Iterable<@NonNull E>) getDelegate()); } /** @@ -644,8 +634,8 @@ public final ImmutableList toList() { * @since 14.0 (since 13.0 as {@code toSortedImmutableList()}). */ @SuppressWarnings("nullness") // Unsafe, but we can't do much about it now. - public final ImmutableList toSortedList(Comparator comparator) { - return Ordering.from(comparator).immutableSortedCopy(getDelegate()); + public final ImmutableList<@NonNull E> toSortedList(Comparator comparator) { + return Ordering.from(comparator).immutableSortedCopy((Iterable<@NonNull E>) getDelegate()); } /** @@ -659,8 +649,8 @@ public final ImmutableList toSortedList(Comparator comparator) { * @since 14.0 (since 12.0 as {@code toImmutableSet()}). */ @SuppressWarnings("nullness") // Unsafe, but we can't do much about it now. - public final ImmutableSet toSet() { - return ImmutableSet.copyOf(getDelegate()); + public final ImmutableSet<@NonNull E> toSet() { + return ImmutableSet.copyOf((Iterable<@NonNull E>) getDelegate()); } /** @@ -677,8 +667,8 @@ public final ImmutableSet toSet() { * @since 14.0 (since 12.0 as {@code toImmutableSortedSet()}). */ @SuppressWarnings("nullness") // Unsafe, but we can't do much about it now. - public final ImmutableSortedSet toSortedSet(Comparator comparator) { - return ImmutableSortedSet.copyOf(comparator, getDelegate()); + public final ImmutableSortedSet<@NonNull E> toSortedSet(Comparator comparator) { + return ImmutableSortedSet.copyOf(comparator, (Iterable<@NonNull E>) getDelegate()); } /** @@ -691,8 +681,8 @@ public final ImmutableSortedSet toSortedSet(Comparator comparator) * @since 19.0 */ @SuppressWarnings("nullness") // Unsafe, but we can't do much about it now. - public final ImmutableMultiset toMultiset() { - return ImmutableMultiset.copyOf(getDelegate()); + public final ImmutableMultiset<@NonNull E> toMultiset() { + return ImmutableMultiset.copyOf((Iterable<@NonNull E>) getDelegate()); } /** @@ -712,8 +702,8 @@ public final ImmutableMultiset toMultiset() { * @since 14.0 */ @SuppressWarnings("nullness") // Unsafe, but we can't do much about it now. - public final ImmutableMap toMap(Function valueFunction) { - return Maps.toMap(getDelegate(), valueFunction); + public final ImmutableMap<@NonNull E, V> toMap(Function valueFunction) { + return Maps.toMap((Iterable<@NonNull E>) getDelegate(), valueFunction); } /** @@ -735,8 +725,8 @@ public final ImmutableMap toMap(Function valueFunction) * @since 14.0 */ @SuppressWarnings("nullness") // Unsafe, but we can't do much about it now. - public final ImmutableListMultimap index(Function keyFunction) { - return Multimaps.index(getDelegate(), keyFunction); + public final ImmutableListMultimap index(Function keyFunction) { + return Multimaps.index((Iterable<@NonNull E>) getDelegate(), keyFunction); } /** @@ -770,8 +760,8 @@ public final ImmutableListMultimap index(Function keyFun * @since 14.0 */ @SuppressWarnings("nullness") // Unsafe, but we can't do much about it now. - public final ImmutableMap uniqueIndex(Function keyFunction) { - return Maps.uniqueIndex(getDelegate(), keyFunction); + public final ImmutableMap uniqueIndex(Function keyFunction) { + return Maps.uniqueIndex((Iterable<@NonNull E>) getDelegate(), keyFunction); } /** @@ -787,15 +777,7 @@ public final ImmutableMap uniqueIndex(Function keyFuncti * copied */ @GwtIncompatible // Array.newArray(Class, int) - /* - * Both the declaration of our Class parameter and its usage in a call to Iterables.toArray - * produce a nullness error: E may be a nullable type, and our nullness checker has Class's type - * parameter bounded to non-null types. To avoid that, we'd use Class<@Nonnull E> if we could. - * (Granted, this is only one of many nullness-checking problems that arise from letting - * FluentIterable support null elements, and most of the other produce outright unsoundness.) - */ - @SuppressWarnings("nullness") - public final @Nullable E[] toArray(Class type) { + public final @Nullable E[] toArray(Class<@NonNull E> type) { return Iterables.toArray(getDelegate(), type); } @@ -834,7 +816,6 @@ public final > C copyInto(C collection) { * * @since 18.0 */ - @Beta public final String join(Joiner joiner) { return joiner.join(this); } diff --git a/guava/src/com/google/common/collect/ForwardingBlockingDeque.java b/guava/src/com/google/common/collect/ForwardingBlockingDeque.java index 49d4bcf6c232..13b5b236e3fb 100644 --- a/guava/src/com/google/common/collect/ForwardingBlockingDeque.java +++ b/guava/src/com/google/common/collect/ForwardingBlockingDeque.java @@ -17,6 +17,7 @@ package com.google.common.collect; import com.google.common.annotations.GwtIncompatible; +import com.google.common.annotations.J2ktIncompatible; import java.util.Collection; import java.util.concurrent.BlockingDeque; import java.util.concurrent.TimeUnit; @@ -46,6 +47,7 @@ * com.google.common.util.concurrent.ForwardingBlockingDeque} instead. */ @Deprecated +@J2ktIncompatible @GwtIncompatible @ElementTypesAreNonnullByDefault public abstract class ForwardingBlockingDeque extends ForwardingDeque diff --git a/guava/src/com/google/common/collect/ForwardingDeque.java b/guava/src/com/google/common/collect/ForwardingDeque.java index 571535cab917..2730dad0ee8b 100644 --- a/guava/src/com/google/common/collect/ForwardingDeque.java +++ b/guava/src/com/google/common/collect/ForwardingDeque.java @@ -17,6 +17,7 @@ package com.google.common.collect; import com.google.common.annotations.GwtIncompatible; +import com.google.common.annotations.J2ktIncompatible; import com.google.errorprone.annotations.CanIgnoreReturnValue; import java.util.Deque; import java.util.Iterator; @@ -40,6 +41,7 @@ * @author Kurt Alfred Kluever * @since 12.0 */ +@J2ktIncompatible @GwtIncompatible @ElementTypesAreNonnullByDefault public abstract class ForwardingDeque extends ForwardingQueue diff --git a/guava/src/com/google/common/collect/HashBiMap.java b/guava/src/com/google/common/collect/HashBiMap.java index 3c77d54afdba..f6ce5d42bb78 100644 --- a/guava/src/com/google/common/collect/HashBiMap.java +++ b/guava/src/com/google/common/collect/HashBiMap.java @@ -22,6 +22,7 @@ import com.google.common.annotations.GwtCompatible; import com.google.common.annotations.GwtIncompatible; +import com.google.common.annotations.J2ktIncompatible; import com.google.common.base.Objects; import com.google.common.collect.Maps.IteratorBasedAbstractMap; import com.google.errorprone.annotations.CanIgnoreReturnValue; @@ -120,8 +121,12 @@ private static final class BiEntry[] hashTableKToV; + + @SuppressWarnings("nullness:initialization.field.uninitialized") // For J2KT (see above) private transient @Nullable BiEntry[] hashTableVToK; + @Weak @CheckForNull private transient BiEntry firstInKeyInsertionOrder; @Weak @CheckForNull private transient BiEntry lastInKeyInsertionOrder; private transient int size; @@ -763,6 +768,7 @@ Object writeReplace() { } @GwtIncompatible // serialization + @J2ktIncompatible private void readObject(ObjectInputStream in) throws InvalidObjectException { throw new InvalidObjectException("Use InverseSerializedForm"); } @@ -786,12 +792,14 @@ Object readResolve() { * @serialData the number of entries, first key, first value, second key, second value, and so on. */ @GwtIncompatible // java.io.ObjectOutputStream + @J2ktIncompatible private void writeObject(ObjectOutputStream stream) throws IOException { stream.defaultWriteObject(); Serialization.writeMap(this, stream); } @GwtIncompatible // java.io.ObjectInputStream + @J2ktIncompatible private void readObject(ObjectInputStream stream) throws IOException, ClassNotFoundException { stream.defaultReadObject(); int size = Serialization.readCount(stream); @@ -800,5 +808,6 @@ private void readObject(ObjectInputStream stream) throws IOException, ClassNotFo } @GwtIncompatible // Not needed in emulated source + @J2ktIncompatible private static final long serialVersionUID = 0; } diff --git a/guava/src/com/google/common/collect/HashMultimap.java b/guava/src/com/google/common/collect/HashMultimap.java index 9e4c1c2233f1..51567cdce4f4 100644 --- a/guava/src/com/google/common/collect/HashMultimap.java +++ b/guava/src/com/google/common/collect/HashMultimap.java @@ -18,6 +18,7 @@ import com.google.common.annotations.GwtCompatible; import com.google.common.annotations.GwtIncompatible; +import com.google.common.annotations.J2ktIncompatible; import com.google.common.annotations.VisibleForTesting; import com.google.common.base.Preconditions; import java.io.IOException; @@ -131,12 +132,14 @@ Set createCollection() { * key, number of values for that key, and the key's values */ @GwtIncompatible // java.io.ObjectOutputStream + @J2ktIncompatible private void writeObject(ObjectOutputStream stream) throws IOException { stream.defaultWriteObject(); Serialization.writeMultimap(this, stream); } @GwtIncompatible // java.io.ObjectInputStream + @J2ktIncompatible private void readObject(ObjectInputStream stream) throws IOException, ClassNotFoundException { stream.defaultReadObject(); expectedValuesPerKey = DEFAULT_VALUES_PER_KEY; @@ -147,5 +150,6 @@ private void readObject(ObjectInputStream stream) throws IOException, ClassNotFo } @GwtIncompatible // Not needed in emulated source + @J2ktIncompatible private static final long serialVersionUID = 0; } diff --git a/guava/src/com/google/common/collect/HashMultiset.java b/guava/src/com/google/common/collect/HashMultiset.java index b91645739c54..357dc62c71a7 100644 --- a/guava/src/com/google/common/collect/HashMultiset.java +++ b/guava/src/com/google/common/collect/HashMultiset.java @@ -18,6 +18,7 @@ import com.google.common.annotations.GwtCompatible; import com.google.common.annotations.GwtIncompatible; +import com.google.common.annotations.J2ktIncompatible; import java.io.IOException; import java.io.ObjectInputStream; import java.io.ObjectOutputStream; @@ -78,12 +79,14 @@ private HashMultiset(int distinctElements) { * its count, and so on */ @GwtIncompatible // java.io.ObjectOutputStream + @J2ktIncompatible private void writeObject(ObjectOutputStream stream) throws IOException { stream.defaultWriteObject(); Serialization.writeMultiset(this, stream); } @GwtIncompatible // java.io.ObjectInputStream + @J2ktIncompatible private void readObject(ObjectInputStream stream) throws IOException, ClassNotFoundException { stream.defaultReadObject(); int distinctElements = Serialization.readCount(stream); @@ -92,5 +95,6 @@ private void readObject(ObjectInputStream stream) throws IOException, ClassNotFo } @GwtIncompatible // Not needed in emulated source. + @J2ktIncompatible private static final long serialVersionUID = 0; } diff --git a/guava/src/com/google/common/collect/ImmutableAsList.java b/guava/src/com/google/common/collect/ImmutableAsList.java index c39747931796..b7c585cc2f1a 100644 --- a/guava/src/com/google/common/collect/ImmutableAsList.java +++ b/guava/src/com/google/common/collect/ImmutableAsList.java @@ -18,6 +18,7 @@ import com.google.common.annotations.GwtCompatible; import com.google.common.annotations.GwtIncompatible; +import com.google.common.annotations.J2ktIncompatible; import java.io.InvalidObjectException; import java.io.ObjectInputStream; import java.io.Serializable; @@ -60,6 +61,7 @@ boolean isPartialView() { /** Serialized form that leads to the same performance as the original list. */ @GwtIncompatible // serialization + @J2ktIncompatible static class SerializedForm implements Serializable { final ImmutableCollection collection; @@ -75,11 +77,13 @@ Object readResolve() { } @GwtIncompatible // serialization + @J2ktIncompatible private void readObject(ObjectInputStream stream) throws InvalidObjectException { throw new InvalidObjectException("Use SerializedForm"); } @GwtIncompatible // serialization + @J2ktIncompatible @Override Object writeReplace() { return new SerializedForm(delegateCollection()); diff --git a/guava/src/com/google/common/collect/ImmutableBiMap.java b/guava/src/com/google/common/collect/ImmutableBiMap.java index 41a98f21ce34..c0d3ed715350 100644 --- a/guava/src/com/google/common/collect/ImmutableBiMap.java +++ b/guava/src/com/google/common/collect/ImmutableBiMap.java @@ -20,8 +20,8 @@ import static com.google.common.collect.CollectPreconditions.checkNonnegative; import static java.util.Objects.requireNonNull; -import com.google.common.annotations.Beta; import com.google.common.annotations.GwtCompatible; +import com.google.common.annotations.J2ktIncompatible; import com.google.common.annotations.VisibleForTesting; import com.google.errorprone.annotations.CanIgnoreReturnValue; import com.google.errorprone.annotations.DoNotCall; @@ -302,7 +302,6 @@ public static Builder builder() { * * @since 23.1 */ - @Beta public static Builder builderWithExpectedSize(int expectedSize) { checkNonnegative(expectedSize, "expectedSize"); return new Builder<>(expectedSize); @@ -393,7 +392,6 @@ public Builder putAll(Map map) { * @since 19.0 */ @CanIgnoreReturnValue - @Beta @Override public Builder putAll(Iterable> entries) { super.putAll(entries); @@ -411,7 +409,6 @@ public Builder putAll(Iterable> * @since 19.0 */ @CanIgnoreReturnValue - @Beta @Override public Builder orderEntriesByValue(Comparator valueComparator) { super.orderEntriesByValue(valueComparator); @@ -472,10 +469,10 @@ public ImmutableBiMap buildOrThrow() { entries = Arrays.copyOf(entries, size); } Arrays.sort( - entries, + (Entry[]) entries, // Entries up to size are not null 0, size, - Ordering.from(valueComparator).onResultOf(Maps.valueFunction())); + Ordering.from(valueComparator).onResultOf(Maps.valueFunction())); } entriesUsed = true; return RegularImmutableBiMap.fromEntryArray(size, entries); @@ -555,7 +552,6 @@ public static ImmutableBiMap copyOf(Map m * @throws NullPointerException if any key, value, or entry is null * @since 19.0 */ - @Beta public static ImmutableBiMap copyOf( Iterable> entries) { @SuppressWarnings("unchecked") // we'll only be using getKey and getValue, which are covariant @@ -622,6 +618,7 @@ public final V forcePut(K key, V value) { *

    Since the bimap is immutable, ImmutableBiMap doesn't require special logic for keeping the * bimap and its inverse in sync during serialization, the way AbstractBiMap does. */ + @J2ktIncompatible // serialization private static class SerializedForm extends ImmutableMap.SerializedForm { SerializedForm(ImmutableBiMap bimap) { super(bimap); @@ -636,10 +633,12 @@ Builder makeBuilder(int size) { } @Override + @J2ktIncompatible // serialization Object writeReplace() { return new SerializedForm<>(this); } + @J2ktIncompatible // serialization private void readObject(ObjectInputStream stream) throws InvalidObjectException { throw new InvalidObjectException("Use SerializedForm"); } diff --git a/guava/src/com/google/common/collect/ImmutableClassToInstanceMap.java b/guava/src/com/google/common/collect/ImmutableClassToInstanceMap.java index c59e9fdaba8e..5c907f7cd468 100644 --- a/guava/src/com/google/common/collect/ImmutableClassToInstanceMap.java +++ b/guava/src/com/google/common/collect/ImmutableClassToInstanceMap.java @@ -26,6 +26,7 @@ import java.io.Serializable; import java.util.Map; import javax.annotation.CheckForNull; +import org.checkerframework.checker.nullness.qual.NonNull; /** * A {@link ClassToInstanceMap} whose contents will never change, with many other important @@ -37,7 +38,9 @@ @Immutable(containerOf = "B") @GwtIncompatible @ElementTypesAreNonnullByDefault -public final class ImmutableClassToInstanceMap extends ForwardingMap, B> +// TODO(b/278589132): Remove the redundant "@NonNull" on B once it's no longer required by J2KT. +public final class ImmutableClassToInstanceMap + extends ForwardingMap, B> implements ClassToInstanceMap, Serializable { private static final ImmutableClassToInstanceMap EMPTY = @@ -154,8 +157,10 @@ public ImmutableClassToInstanceMap build() { public static ImmutableClassToInstanceMap copyOf( Map, ? extends S> map) { if (map instanceof ImmutableClassToInstanceMap) { + @SuppressWarnings("rawtypes") // JDT-based J2KT Java frontend does not permit the direct cast + Map rawMap = map; @SuppressWarnings("unchecked") // covariant casts safe (unmodifiable) - ImmutableClassToInstanceMap cast = (ImmutableClassToInstanceMap) map; + ImmutableClassToInstanceMap cast = (ImmutableClassToInstanceMap) rawMap; return cast; } return new Builder().putAll(map).build(); diff --git a/guava/src/com/google/common/collect/ImmutableCollection.java b/guava/src/com/google/common/collect/ImmutableCollection.java index 86f062b48497..68b175ffa298 100644 --- a/guava/src/com/google/common/collect/ImmutableCollection.java +++ b/guava/src/com/google/common/collect/ImmutableCollection.java @@ -19,6 +19,7 @@ import static com.google.common.base.Preconditions.checkNotNull; import com.google.common.annotations.GwtCompatible; +import com.google.common.annotations.J2ktIncompatible; import com.google.errorprone.annotations.CanIgnoreReturnValue; import com.google.errorprone.annotations.DoNotCall; import com.google.errorprone.annotations.DoNotMock; @@ -191,6 +192,7 @@ public Spliterator spliterator() { private static final Object[] EMPTY_ARRAY = {}; @Override + @J2ktIncompatible // Incompatible return type change. Use inherited (unoptimized) implementation public final Object[] toArray() { return toArray(EMPTY_ARRAY); } @@ -389,11 +391,13 @@ int copyIntoArray(@Nullable Object[] dst, int offset) { return offset; } + @J2ktIncompatible // serialization Object writeReplace() { // We serialize by default to ImmutableList, the simplest thing that works. return new ImmutableList.SerializedForm(toArray()); } + @J2ktIncompatible // serialization private void readObject(ObjectInputStream stream) throws InvalidObjectException { throw new InvalidObjectException("Use SerializedForm"); } diff --git a/guava/src/com/google/common/collect/ImmutableEntry.java b/guava/src/com/google/common/collect/ImmutableEntry.java index edc25f490fd5..f88fcc1c6a3f 100644 --- a/guava/src/com/google/common/collect/ImmutableEntry.java +++ b/guava/src/com/google/common/collect/ImmutableEntry.java @@ -20,7 +20,11 @@ import java.io.Serializable; import org.checkerframework.checker.nullness.qual.Nullable; -/** @see com.google.common.collect.Maps#immutableEntry(Object, Object) */ +/** + * An immutable {@code Map.Entry}, used both by {@link + * com.google.common.collect.Maps#immutableEntry(Object, Object)} and by other parts of {@code + * common.collect} as a superclass. + */ @GwtCompatible(serializable = true) @ElementTypesAreNonnullByDefault class ImmutableEntry diff --git a/guava/src/com/google/common/collect/ImmutableEnumMap.java b/guava/src/com/google/common/collect/ImmutableEnumMap.java index f81377ba5d22..ba62d9c76425 100644 --- a/guava/src/com/google/common/collect/ImmutableEnumMap.java +++ b/guava/src/com/google/common/collect/ImmutableEnumMap.java @@ -19,6 +19,7 @@ import static com.google.common.base.Preconditions.checkArgument; import com.google.common.annotations.GwtCompatible; +import com.google.common.annotations.J2ktIncompatible; import com.google.common.collect.ImmutableMap.IteratorBasedImmutableMap; import java.io.InvalidObjectException; import java.io.ObjectInputStream; @@ -115,10 +116,12 @@ boolean isPartialView() { // All callers of the constructor are restricted to >. @Override + @J2ktIncompatible // serialization Object writeReplace() { return new EnumSerializedForm<>(delegate); } + @J2ktIncompatible // serialization private void readObject(ObjectInputStream stream) throws InvalidObjectException { throw new InvalidObjectException("Use EnumSerializedForm"); } @@ -126,6 +129,7 @@ private void readObject(ObjectInputStream stream) throws InvalidObjectException /* * This class is used to serialize ImmutableEnumMap instances. */ + @J2ktIncompatible // serialization private static class EnumSerializedForm, V> implements Serializable { final EnumMap delegate; diff --git a/guava/src/com/google/common/collect/ImmutableEnumSet.java b/guava/src/com/google/common/collect/ImmutableEnumSet.java index 8bd265043f1b..5488039af824 100644 --- a/guava/src/com/google/common/collect/ImmutableEnumSet.java +++ b/guava/src/com/google/common/collect/ImmutableEnumSet.java @@ -17,6 +17,7 @@ package com.google.common.collect; import com.google.common.annotations.GwtCompatible; +import com.google.common.annotations.J2ktIncompatible; import com.google.errorprone.annotations.concurrent.LazyInit; import java.io.InvalidObjectException; import java.io.ObjectInputStream; @@ -36,15 +37,14 @@ @SuppressWarnings("serial") // we're overriding default serialization @ElementTypesAreNonnullByDefault final class ImmutableEnumSet> extends ImmutableSet { - @SuppressWarnings("rawtypes") // necessary to compile against Java 8 - static ImmutableSet asImmutable(EnumSet set) { + static > ImmutableSet asImmutable(EnumSet set) { switch (set.size()) { case 0: return ImmutableSet.of(); case 1: return ImmutableSet.of(Iterables.getOnlyElement(set)); default: - return new ImmutableEnumSet(set); + return new ImmutableEnumSet(set); } } @@ -136,10 +136,12 @@ public String toString() { // All callers of the constructor are restricted to >. @Override + @J2ktIncompatible // serialization Object writeReplace() { return new EnumSerializedForm(delegate); } + @J2ktIncompatible // serialization private void readObject(ObjectInputStream stream) throws InvalidObjectException { throw new InvalidObjectException("Use SerializedForm"); } @@ -147,6 +149,7 @@ private void readObject(ObjectInputStream stream) throws InvalidObjectException /* * This class is used to serialize ImmutableEnumSet instances. */ + @J2ktIncompatible // serialization private static class EnumSerializedForm> implements Serializable { final EnumSet delegate; diff --git a/guava/src/com/google/common/collect/ImmutableList.java b/guava/src/com/google/common/collect/ImmutableList.java index bc8166507daf..14859db14995 100644 --- a/guava/src/com/google/common/collect/ImmutableList.java +++ b/guava/src/com/google/common/collect/ImmutableList.java @@ -25,8 +25,8 @@ import static com.google.common.collect.RegularImmutableList.EMPTY; import static java.util.Objects.requireNonNull; -import com.google.common.annotations.Beta; import com.google.common.annotations.GwtCompatible; +import com.google.common.annotations.J2ktIncompatible; import com.google.common.annotations.VisibleForTesting; import com.google.errorprone.annotations.CanIgnoreReturnValue; import com.google.errorprone.annotations.DoNotCall; @@ -702,6 +702,7 @@ public int hashCode() { * Serializes ImmutableLists as their logical contents. This ensures that * implementation types do not leak into the serialized representation. */ + @J2ktIncompatible // serialization static class SerializedForm implements Serializable { final Object[] elements; @@ -716,11 +717,13 @@ Object readResolve() { private static final long serialVersionUID = 0; } + @J2ktIncompatible // serialization private void readObject(ObjectInputStream stream) throws InvalidObjectException { throw new InvalidObjectException("Use SerializedForm"); } @Override + @J2ktIncompatible // serialization Object writeReplace() { return new SerializedForm(toArray()); } @@ -745,7 +748,6 @@ public static Builder builder() { * * @since 23.1 */ - @Beta public static Builder builderWithExpectedSize(int expectedSize) { checkNonnegative(expectedSize, "expectedSize"); return new ImmutableList.Builder(expectedSize); diff --git a/guava/src/com/google/common/collect/ImmutableListMultimap.java b/guava/src/com/google/common/collect/ImmutableListMultimap.java index 0184c5bf1f7d..c344ff36e461 100644 --- a/guava/src/com/google/common/collect/ImmutableListMultimap.java +++ b/guava/src/com/google/common/collect/ImmutableListMultimap.java @@ -16,10 +16,10 @@ package com.google.common.collect; - import com.google.common.annotations.Beta; import com.google.common.annotations.GwtCompatible; import com.google.common.annotations.GwtIncompatible; +import com.google.common.annotations.J2ktIncompatible; import com.google.errorprone.annotations.CanIgnoreReturnValue; import com.google.errorprone.annotations.DoNotCall; import com.google.errorprone.annotations.concurrent.LazyInit; @@ -356,7 +356,7 @@ public static ImmutableListMultimap copyOf( /** Creates an ImmutableListMultimap from an asMap.entrySet. */ static ImmutableListMultimap fromMapEntries( Collection>> mapEntries, - @Nullable Comparator valueComparator) { + @CheckForNull Comparator valueComparator) { if (mapEntries.isEmpty()) { return of(); } @@ -458,12 +458,14 @@ public final ImmutableList replaceValues(K key, Iterable values) * values for that key, and the key's values */ @GwtIncompatible // java.io.ObjectOutputStream + @J2ktIncompatible private void writeObject(ObjectOutputStream stream) throws IOException { stream.defaultWriteObject(); Serialization.writeMultimap(this, stream); } @GwtIncompatible // java.io.ObjectInputStream + @J2ktIncompatible private void readObject(ObjectInputStream stream) throws IOException, ClassNotFoundException { stream.defaultReadObject(); int keyCount = stream.readInt(); @@ -500,5 +502,6 @@ private void readObject(ObjectInputStream stream) throws IOException, ClassNotFo } @GwtIncompatible // Not needed in emulated source + @J2ktIncompatible private static final long serialVersionUID = 0; } diff --git a/guava/src/com/google/common/collect/ImmutableMap.java b/guava/src/com/google/common/collect/ImmutableMap.java index 7d29f6ed94f3..d1b890a9de03 100644 --- a/guava/src/com/google/common/collect/ImmutableMap.java +++ b/guava/src/com/google/common/collect/ImmutableMap.java @@ -22,8 +22,8 @@ import static com.google.common.collect.CollectPreconditions.checkNonnegative; import static java.util.Objects.requireNonNull; -import com.google.common.annotations.Beta; import com.google.common.annotations.GwtCompatible; +import com.google.common.annotations.J2ktIncompatible; import com.google.common.annotations.VisibleForTesting; import com.google.errorprone.annotations.CanIgnoreReturnValue; import com.google.errorprone.annotations.DoNotCall; @@ -361,7 +361,6 @@ public static Builder builder() { * * @since 23.1 */ - @Beta public static Builder builderWithExpectedSize(int expectedSize) { checkNonnegative(expectedSize, "expectedSize"); return new Builder<>(expectedSize); @@ -487,7 +486,6 @@ public Builder putAll(Map map) { * @since 19.0 */ @CanIgnoreReturnValue - @Beta public Builder putAll(Iterable> entries) { if (entries instanceof Collection) { ensureCapacity(size + ((Collection) entries).size()); @@ -509,7 +507,6 @@ public Builder putAll(Iterable> * @since 19.0 */ @CanIgnoreReturnValue - @Beta public Builder orderEntriesByValue(Comparator valueComparator) { checkState(this.valueComparator == null, "valueComparator was already set"); this.valueComparator = checkNotNull(valueComparator, "valueComparator"); @@ -556,20 +553,20 @@ private ImmutableMap build(boolean throwIfDuplicateKeys) { if (entriesUsed) { entries = Arrays.copyOf(entries, size); } - localEntries = entries; + @SuppressWarnings("nullness") // entries 0..localSize-1 are non-null + Entry[] nonNullEntries = (Entry[]) entries; if (!throwIfDuplicateKeys) { // We want to retain only the last-put value for any given key, before sorting. // This could be improved, but orderEntriesByValue is rather rarely used anyway. - @SuppressWarnings("nullness") // entries 0..size-1 are non-null - Entry[] nonNullEntries = (Entry[]) localEntries; - localEntries = lastEntryForEachKey(nonNullEntries, size); - localSize = localEntries.length; + nonNullEntries = lastEntryForEachKey(nonNullEntries, size); + localSize = nonNullEntries.length; } Arrays.sort( - localEntries, + nonNullEntries, 0, localSize, Ordering.from(valueComparator).onResultOf(Maps.valueFunction())); + localEntries = (@Nullable Entry[]) nonNullEntries; } entriesUsed = true; return RegularImmutableMap.fromEntryArray(localSize, localEntries, throwIfDuplicateKeys); @@ -682,7 +679,10 @@ public static ImmutableMap copyOf(Map map } } else if (map instanceof EnumMap) { @SuppressWarnings("unchecked") // safe since map is not writable - ImmutableMap kvMap = (ImmutableMap) copyOfEnumMap((EnumMap) map); + ImmutableMap kvMap = + (ImmutableMap) + copyOfEnumMap( + (EnumMap) map); // hide K (violates bounds) from J2KT, preserve V. return kvMap; } return copyOf(map.entrySet()); @@ -696,7 +696,6 @@ public static ImmutableMap copyOf(Map map * @throws IllegalArgumentException if two entries have the same key * @since 19.0 */ - @Beta public static ImmutableMap copyOf( Iterable> entries) { @SuppressWarnings("unchecked") // we'll only be using getKey and getValue, which are covariant @@ -717,9 +716,9 @@ public static ImmutableMap copyOf( } } - private static , V> ImmutableMap copyOfEnumMap( - EnumMap original) { - EnumMap copy = new EnumMap<>(original); + private static , V> ImmutableMap copyOfEnumMap( + EnumMap original) { + EnumMap copy = new EnumMap<>((EnumMap) original); for (Entry entry : copy.entrySet()) { checkEntryNotNull(entry.getKey(), entry.getValue()); } @@ -1193,6 +1192,7 @@ public String toString() { * reconstructed using public factory methods. This ensures that the implementation types remain * as implementation details. */ + @J2ktIncompatible // serialization static class SerializedForm implements Serializable { // This object retains references to collections returned by keySet() and value(). This saves // bytes when the both the map and its keySet or value collection are written to the same @@ -1272,10 +1272,12 @@ Builder makeBuilder(int size) { * method. Publicly-accessible subclasses must override this method and should return a subclass * of SerializedForm whose readResolve() method returns objects of the subclass type. */ + @J2ktIncompatible // serialization Object writeReplace() { return new SerializedForm<>(this); } + @J2ktIncompatible // java.io.ObjectInputStream private void readObject(ObjectInputStream stream) throws InvalidObjectException { throw new InvalidObjectException("Use SerializedForm"); } diff --git a/guava/src/com/google/common/collect/ImmutableMapEntrySet.java b/guava/src/com/google/common/collect/ImmutableMapEntrySet.java index 126eae150524..46df158b069f 100644 --- a/guava/src/com/google/common/collect/ImmutableMapEntrySet.java +++ b/guava/src/com/google/common/collect/ImmutableMapEntrySet.java @@ -18,6 +18,7 @@ import com.google.common.annotations.GwtCompatible; import com.google.common.annotations.GwtIncompatible; +import com.google.common.annotations.J2ktIncompatible; import java.io.InvalidObjectException; import java.io.ObjectInputStream; import java.io.Serializable; @@ -117,17 +118,20 @@ public int hashCode() { } @GwtIncompatible // serialization + @J2ktIncompatible @Override Object writeReplace() { return new EntrySetSerializedForm<>(map()); } @GwtIncompatible // serialization + @J2ktIncompatible private void readObject(ObjectInputStream stream) throws InvalidObjectException { throw new InvalidObjectException("Use EntrySetSerializedForm"); } @GwtIncompatible // serialization + @J2ktIncompatible private static class EntrySetSerializedForm implements Serializable { final ImmutableMap map; diff --git a/guava/src/com/google/common/collect/ImmutableMapKeySet.java b/guava/src/com/google/common/collect/ImmutableMapKeySet.java index d10ee10e7a8f..6d1b51671d60 100644 --- a/guava/src/com/google/common/collect/ImmutableMapKeySet.java +++ b/guava/src/com/google/common/collect/ImmutableMapKeySet.java @@ -20,6 +20,7 @@ import com.google.common.annotations.GwtCompatible; import com.google.common.annotations.GwtIncompatible; +import com.google.common.annotations.J2ktIncompatible; import java.io.Serializable; import java.util.Spliterator; import java.util.function.Consumer; @@ -78,6 +79,7 @@ boolean isPartialView() { // No longer used for new writes, but kept so that old data can still be read. @GwtIncompatible // serialization + @J2ktIncompatible @SuppressWarnings("unused") private static class KeySetSerializedForm implements Serializable { final ImmutableMap map; diff --git a/guava/src/com/google/common/collect/ImmutableMapValues.java b/guava/src/com/google/common/collect/ImmutableMapValues.java index 702191c6499d..8884c1af6363 100644 --- a/guava/src/com/google/common/collect/ImmutableMapValues.java +++ b/guava/src/com/google/common/collect/ImmutableMapValues.java @@ -20,6 +20,7 @@ import com.google.common.annotations.GwtCompatible; import com.google.common.annotations.GwtIncompatible; +import com.google.common.annotations.J2ktIncompatible; import java.io.Serializable; import java.util.Map.Entry; import java.util.Spliterator; @@ -103,6 +104,7 @@ public void forEach(Consumer action) { // No longer used for new writes, but kept so that old data can still be read. @GwtIncompatible // serialization + @J2ktIncompatible @SuppressWarnings("unused") private static class SerializedForm implements Serializable { final ImmutableMap map; diff --git a/guava/src/com/google/common/collect/ImmutableMultimap.java b/guava/src/com/google/common/collect/ImmutableMultimap.java index 7e274922d7d9..4b6d0227edb9 100644 --- a/guava/src/com/google/common/collect/ImmutableMultimap.java +++ b/guava/src/com/google/common/collect/ImmutableMultimap.java @@ -24,6 +24,7 @@ import com.google.common.annotations.Beta; import com.google.common.annotations.GwtCompatible; import com.google.common.annotations.GwtIncompatible; +import com.google.common.annotations.J2ktIncompatible; import com.google.errorprone.annotations.CanIgnoreReturnValue; import com.google.errorprone.annotations.DoNotCall; import com.google.errorprone.annotations.DoNotMock; @@ -346,6 +347,7 @@ public static ImmutableMultimap copyOf( // holder class makes sure they are not initialized unless an instance is // deserialized. @GwtIncompatible // java serialization is not supported + @J2ktIncompatible static class FieldSettersHolder { static final Serialization.FieldSetter MAP_FIELD_SETTER = Serialization.getFieldSetter(ImmutableMultimap.class, "map"); @@ -684,18 +686,21 @@ boolean isPartialView() { } @GwtIncompatible + @J2ktIncompatible @Override Object writeReplace() { return new KeysSerializedForm(ImmutableMultimap.this); } @GwtIncompatible + @J2ktIncompatible private void readObject(ObjectInputStream stream) throws InvalidObjectException { throw new InvalidObjectException("Use KeysSerializedForm"); } } @GwtIncompatible + @J2ktIncompatible private static final class KeysSerializedForm implements Serializable { final ImmutableMultimap multimap; @@ -779,8 +784,10 @@ boolean isPartialView() { return true; } + @J2ktIncompatible // serialization private static final long serialVersionUID = 0; } + @J2ktIncompatible // serialization private static final long serialVersionUID = 0; } diff --git a/guava/src/com/google/common/collect/ImmutableMultiset.java b/guava/src/com/google/common/collect/ImmutableMultiset.java index ce481e47886f..cdc9f405a455 100644 --- a/guava/src/com/google/common/collect/ImmutableMultiset.java +++ b/guava/src/com/google/common/collect/ImmutableMultiset.java @@ -21,6 +21,7 @@ import com.google.common.annotations.GwtCompatible; import com.google.common.annotations.GwtIncompatible; +import com.google.common.annotations.J2ktIncompatible; import com.google.common.annotations.VisibleForTesting; import com.google.errorprone.annotations.CanIgnoreReturnValue; import com.google.errorprone.annotations.DoNotCall; @@ -404,20 +405,23 @@ public int hashCode() { } @GwtIncompatible + @J2ktIncompatible @Override Object writeReplace() { return new EntrySetSerializedForm(ImmutableMultiset.this); } @GwtIncompatible + @J2ktIncompatible private void readObject(ObjectInputStream stream) throws InvalidObjectException { throw new InvalidObjectException("Use EntrySetSerializedForm"); } - private static final long serialVersionUID = 0; + @J2ktIncompatible private static final long serialVersionUID = 0; } @GwtIncompatible + @J2ktIncompatible static class EntrySetSerializedForm implements Serializable { final ImmutableMultiset multiset; @@ -431,12 +435,14 @@ Object readResolve() { } @GwtIncompatible + @J2ktIncompatible @Override Object writeReplace() { return new SerializedForm(this); } @GwtIncompatible + @J2ktIncompatible private void readObject(ObjectInputStream stream) throws InvalidObjectException { throw new InvalidObjectException("Use SerializedForm"); } @@ -626,6 +632,7 @@ public int size() { } } + @J2ktIncompatible static final class SerializedForm implements Serializable { final Object[] elements; final int[] counts; diff --git a/guava/src/com/google/common/collect/ImmutableRangeMap.java b/guava/src/com/google/common/collect/ImmutableRangeMap.java index 221be507b3fe..72444245f848 100644 --- a/guava/src/com/google/common/collect/ImmutableRangeMap.java +++ b/guava/src/com/google/common/collect/ImmutableRangeMap.java @@ -18,8 +18,8 @@ import static com.google.common.base.Preconditions.checkElementIndex; import static com.google.common.base.Preconditions.checkNotNull; -import com.google.common.annotations.Beta; import com.google.common.annotations.GwtIncompatible; +import com.google.common.annotations.J2ktIncompatible; import com.google.common.collect.SortedLists.KeyAbsentBehavior; import com.google.common.collect.SortedLists.KeyPresentBehavior; import com.google.errorprone.annotations.CanIgnoreReturnValue; @@ -46,7 +46,6 @@ * @author Louis Wasserman * @since 14.0 */ -@Beta @GwtIncompatible // NavigableMap @ElementTypesAreNonnullByDefault public class ImmutableRangeMap, V> implements RangeMap, Serializable { @@ -441,6 +440,7 @@ Object writeReplace() { return new SerializedForm<>(asMapOfRanges()); } + @J2ktIncompatible // java.io.ObjectInputStream private void readObject(ObjectInputStream stream) throws InvalidObjectException { throw new InvalidObjectException("Use SerializedForm"); } diff --git a/guava/src/com/google/common/collect/ImmutableRangeSet.java b/guava/src/com/google/common/collect/ImmutableRangeSet.java index ac83b53d578c..6084564964b1 100644 --- a/guava/src/com/google/common/collect/ImmutableRangeSet.java +++ b/guava/src/com/google/common/collect/ImmutableRangeSet.java @@ -22,8 +22,8 @@ import static com.google.common.collect.SortedLists.KeyPresentBehavior.ANY_PRESENT; import static java.util.Objects.requireNonNull; -import com.google.common.annotations.Beta; import com.google.common.annotations.GwtIncompatible; +import com.google.common.annotations.J2ktIncompatible; import com.google.common.collect.SortedLists.KeyAbsentBehavior; import com.google.common.collect.SortedLists.KeyPresentBehavior; import com.google.common.primitives.Ints; @@ -48,7 +48,6 @@ * @author Louis Wasserman * @since 14.0 */ -@Beta @GwtIncompatible @ElementTypesAreNonnullByDefault public final class ImmutableRangeSet extends AbstractRangeSet @@ -692,10 +691,12 @@ public String toString() { } @Override + @J2ktIncompatible // serialization Object writeReplace() { return new AsSetSerializedForm(ranges, domain); } + @J2ktIncompatible // java.io.ObjectInputStream private void readObject(ObjectInputStream stream) throws InvalidObjectException { throw new InvalidObjectException("Use SerializedForm"); } @@ -845,10 +846,12 @@ Object readResolve() { } } + @J2ktIncompatible // java.io.ObjectInputStream Object writeReplace() { return new SerializedForm(ranges); } + @J2ktIncompatible // java.io.ObjectInputStream private void readObject(ObjectInputStream stream) throws InvalidObjectException { throw new InvalidObjectException("Use SerializedForm"); } diff --git a/guava/src/com/google/common/collect/ImmutableSet.java b/guava/src/com/google/common/collect/ImmutableSet.java index 71577303df9d..f4912a3283be 100644 --- a/guava/src/com/google/common/collect/ImmutableSet.java +++ b/guava/src/com/google/common/collect/ImmutableSet.java @@ -21,8 +21,8 @@ import static com.google.common.collect.CollectPreconditions.checkNonnegative; import static java.util.Objects.requireNonNull; -import com.google.common.annotations.Beta; import com.google.common.annotations.GwtCompatible; +import com.google.common.annotations.J2ktIncompatible; import com.google.common.annotations.VisibleForTesting; import com.google.common.math.IntMath; import com.google.common.primitives.Ints; @@ -406,6 +406,7 @@ Indexed delegateCollection() { * static factories. This is necessary to ensure that the existence of a * particular implementation type is an implementation detail. */ + @J2ktIncompatible // serialization private static class SerializedForm implements Serializable { final Object[] elements; @@ -421,10 +422,12 @@ Object readResolve() { } @Override + @J2ktIncompatible // serialization Object writeReplace() { return new SerializedForm(toArray()); } + @J2ktIncompatible // serialization private void readObject(ObjectInputStream stream) throws InvalidObjectException { throw new InvalidObjectException("Use SerializedForm"); } @@ -449,7 +452,6 @@ public static Builder builder() { * * @since 23.1 */ - @Beta public static Builder builderWithExpectedSize(int expectedSize) { checkNonnegative(expectedSize, "expectedSize"); return new Builder(expectedSize); @@ -724,7 +726,7 @@ static int chooseTableSize(int setSize) { */ private static final class RegularSetBuilderImpl extends SetBuilderImpl { // null until at least two elements are present - private @Nullable Object @Nullable [] hashTable; + @CheckForNull private @Nullable Object[] hashTable; private int maxRunBeforeFallback; private int expandTableThreshold; private int hashCode; diff --git a/guava/src/com/google/common/collect/ImmutableSetMultimap.java b/guava/src/com/google/common/collect/ImmutableSetMultimap.java index 52d6e55c3488..8fbf452eee54 100644 --- a/guava/src/com/google/common/collect/ImmutableSetMultimap.java +++ b/guava/src/com/google/common/collect/ImmutableSetMultimap.java @@ -21,6 +21,7 @@ import com.google.common.annotations.Beta; import com.google.common.annotations.GwtCompatible; import com.google.common.annotations.GwtIncompatible; +import com.google.common.annotations.J2ktIncompatible; import com.google.common.base.MoreObjects; import com.google.errorprone.annotations.CanIgnoreReturnValue; import com.google.errorprone.annotations.DoNotCall; @@ -581,6 +582,7 @@ private static ImmutableSet.Builder valuesBuilder( * values for that key, and the key's values */ @GwtIncompatible // java.io.ObjectOutputStream + @J2ktIncompatible private void writeObject(ObjectOutputStream stream) throws IOException { stream.defaultWriteObject(); stream.writeObject(valueComparator()); @@ -595,12 +597,14 @@ Comparator valueComparator() { } @GwtIncompatible // java serialization + @J2ktIncompatible private static final class SetFieldSettersHolder { static final Serialization.FieldSetter EMPTY_SET_FIELD_SETTER = Serialization.getFieldSetter(ImmutableSetMultimap.class, "emptySet"); } @GwtIncompatible // java.io.ObjectInputStream + @J2ktIncompatible // Serialization type safety is at the caller's mercy. @SuppressWarnings("unchecked") private void readObject(ObjectInputStream stream) throws IOException, ClassNotFoundException { @@ -645,5 +649,6 @@ private void readObject(ObjectInputStream stream) throws IOException, ClassNotFo } @GwtIncompatible // not needed in emulated source. + @J2ktIncompatible private static final long serialVersionUID = 0; } diff --git a/guava/src/com/google/common/collect/ImmutableSortedMap.java b/guava/src/com/google/common/collect/ImmutableSortedMap.java index abc5ac1815a1..791f7763ab21 100644 --- a/guava/src/com/google/common/collect/ImmutableSortedMap.java +++ b/guava/src/com/google/common/collect/ImmutableSortedMap.java @@ -24,6 +24,7 @@ import com.google.common.annotations.Beta; import com.google.common.annotations.GwtCompatible; +import com.google.common.annotations.J2ktIncompatible; import com.google.errorprone.annotations.CanIgnoreReturnValue; import com.google.errorprone.annotations.DoNotCall; import java.io.InvalidObjectException; @@ -537,14 +538,11 @@ private static ImmutableSortedMap fromEntries( entryArray, 0, size, - new Comparator<@Nullable Entry>() { - @Override - public int compare(@CheckForNull Entry e1, @CheckForNull Entry e2) { - // requireNonNull is safe because the first `size` elements have been filled in. - requireNonNull(e1); - requireNonNull(e2); - return comparator.compare(e1.getKey(), e2.getKey()); - } + (e1, e2) -> { + // requireNonNull is safe because the first `size` elements have been filled in. + requireNonNull(e1); + requireNonNull(e2); + return comparator.compare(e1.getKey(), e2.getKey()); }); // requireNonNull is safe because the first `size` elements have been filled in. Entry firstEntry = requireNonNull(entryArray[0]); @@ -596,7 +594,7 @@ public static Builder orderedBy(Comparator comparator) { * their natural ordering. */ public static , V> Builder reverseOrder() { - return new Builder<>(Ordering.natural().reverse()); + return new Builder<>(Ordering.natural().reverse()); } /** @@ -1141,6 +1139,7 @@ public ImmutableSortedSet descendingKeySet() { * are reconstructed using public factory methods. This ensures that the implementation types * remain as implementation details. */ + @J2ktIncompatible // serialization private static class SerializedForm extends ImmutableMap.SerializedForm { private final Comparator comparator; @@ -1158,10 +1157,12 @@ Builder makeBuilder(int size) { } @Override + @J2ktIncompatible // serialization Object writeReplace() { return new SerializedForm<>(this); } + @J2ktIncompatible // java.io.ObjectInputStream private void readObject(ObjectInputStream stream) throws InvalidObjectException { throw new InvalidObjectException("Use SerializedForm"); } diff --git a/guava/src/com/google/common/collect/ImmutableSortedMultiset.java b/guava/src/com/google/common/collect/ImmutableSortedMultiset.java index ae43053a9076..d2991bce9c61 100644 --- a/guava/src/com/google/common/collect/ImmutableSortedMultiset.java +++ b/guava/src/com/google/common/collect/ImmutableSortedMultiset.java @@ -18,6 +18,7 @@ import static com.google.common.base.Preconditions.checkNotNull; import com.google.common.annotations.GwtIncompatible; +import com.google.common.annotations.J2ktIncompatible; import com.google.errorprone.annotations.CanIgnoreReturnValue; import com.google.errorprone.annotations.DoNotCall; import com.google.errorprone.annotations.concurrent.LazyInit; @@ -419,7 +420,7 @@ public static Builder orderedBy(Comparator comparator) { * href="http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6468354">bug 6468354. */ public static > Builder reverseOrder() { - return new Builder(Ordering.natural().reverse()); + return new Builder(Ordering.natural().reverse()); } /** @@ -565,6 +566,7 @@ public ImmutableSortedMultiset build() { } } + @J2ktIncompatible // serialization private static final class SerializedForm implements Serializable { final Comparator comparator; final E[] elements; @@ -595,10 +597,12 @@ Object readResolve() { } @Override + @J2ktIncompatible // serialization Object writeReplace() { return new SerializedForm(this); } + @J2ktIncompatible // java.io.ObjectInputStream private void readObject(ObjectInputStream stream) throws InvalidObjectException { throw new InvalidObjectException("Use SerializedForm"); } diff --git a/guava/src/com/google/common/collect/ImmutableSortedSet.java b/guava/src/com/google/common/collect/ImmutableSortedSet.java index 20d007271298..7daaba9a9c52 100644 --- a/guava/src/com/google/common/collect/ImmutableSortedSet.java +++ b/guava/src/com/google/common/collect/ImmutableSortedSet.java @@ -22,6 +22,7 @@ import com.google.common.annotations.GwtCompatible; import com.google.common.annotations.GwtIncompatible; +import com.google.common.annotations.J2ktIncompatible; import com.google.errorprone.annotations.CanIgnoreReturnValue; import com.google.errorprone.annotations.DoNotCall; import com.google.errorprone.annotations.concurrent.LazyInit; @@ -825,6 +826,7 @@ public Comparator getComparator() { * only. This is necessary to ensure that the existence of a particular * implementation type is an implementation detail. */ + @J2ktIncompatible // serialization private static class SerializedForm implements Serializable { final Comparator comparator; final Object[] elements; @@ -842,11 +844,13 @@ Object readResolve() { private static final long serialVersionUID = 0; } + @J2ktIncompatible // serialization private void readObject(ObjectInputStream unused) throws InvalidObjectException { throw new InvalidObjectException("Use SerializedForm"); } @Override + @J2ktIncompatible // serialization Object writeReplace() { return new SerializedForm(comparator, toArray()); } diff --git a/guava/src/com/google/common/collect/ImmutableTable.java b/guava/src/com/google/common/collect/ImmutableTable.java index 2e1630832f26..7a53578252fa 100644 --- a/guava/src/com/google/common/collect/ImmutableTable.java +++ b/guava/src/com/google/common/collect/ImmutableTable.java @@ -20,6 +20,7 @@ import com.google.common.annotations.GwtCompatible; import com.google.common.annotations.GwtIncompatible; +import com.google.common.annotations.J2ktIncompatible; import com.google.common.base.MoreObjects; import com.google.errorprone.annotations.CanIgnoreReturnValue; import com.google.errorprone.annotations.DoNotCall; @@ -507,6 +508,7 @@ final Object writeReplace() { } @GwtIncompatible // serialization + @J2ktIncompatible private void readObject(ObjectInputStream stream) throws InvalidObjectException { throw new InvalidObjectException("Use SerializedForm"); } diff --git a/guava/src/com/google/common/collect/Interner.java b/guava/src/com/google/common/collect/Interner.java index d98632598602..8b48fcded9ef 100644 --- a/guava/src/com/google/common/collect/Interner.java +++ b/guava/src/com/google/common/collect/Interner.java @@ -17,6 +17,7 @@ package com.google.common.collect; import com.google.common.annotations.GwtIncompatible; +import com.google.common.annotations.J2ktIncompatible; import com.google.errorprone.annotations.DoNotMock; /** @@ -31,6 +32,7 @@ * @since 3.0 */ @DoNotMock("Use Interners.new*Interner") +@J2ktIncompatible @GwtIncompatible @ElementTypesAreNonnullByDefault public interface Interner { diff --git a/guava/src/com/google/common/collect/Interners.java b/guava/src/com/google/common/collect/Interners.java index 10ae2746332b..449806b439dd 100644 --- a/guava/src/com/google/common/collect/Interners.java +++ b/guava/src/com/google/common/collect/Interners.java @@ -17,6 +17,7 @@ import static com.google.common.base.Preconditions.checkNotNull; import com.google.common.annotations.GwtIncompatible; +import com.google.common.annotations.J2ktIncompatible; import com.google.common.annotations.VisibleForTesting; import com.google.common.base.Equivalence; import com.google.common.base.Function; @@ -30,6 +31,7 @@ * @author Kevin Bourrillion * @since 3.0 */ +@J2ktIncompatible @GwtIncompatible @ElementTypesAreNonnullByDefault public final class Interners { diff --git a/guava/src/com/google/common/collect/Iterables.java b/guava/src/com/google/common/collect/Iterables.java index 7928b15d67e4..acd14e51086c 100644 --- a/guava/src/com/google/common/collect/Iterables.java +++ b/guava/src/com/google/common/collect/Iterables.java @@ -997,10 +997,13 @@ public Spliterator spliterator() { * Returns a view of the supplied iterable that wraps each generated {@link Iterator} through * {@link Iterators#consumingIterator(Iterator)}. * - *

    Note: If {@code iterable} is a {@link Queue}, the returned iterable will get entries from - * {@link Queue#remove()} since {@link Queue}'s iteration order is undefined. Calling {@link - * Iterator#hasNext()} on a generated iterator from the returned iterable may cause an item to be - * immediately dequeued for return on a subsequent call to {@link Iterator#next()}. + *

    Note: If {@code iterable} is a {@link Queue}, the returned iterable will instead use {@link + * Queue#isEmpty} and {@link Queue#remove()}, since {@link Queue}'s iteration order is undefined. + * Calling {@link Iterator#hasNext()} on a generated iterator from the returned iterable may cause + * an item to be immediately dequeued for return on a subsequent call to {@link Iterator#next()}. + * + *

    Whether the input {@code iterable} is a {@link Queue} or not, the returned {@code Iterable} + * is not thread-safe. * * @param iterable the iterable to wrap * @return a view of the supplied iterable that wraps each generated iterator through {@link @@ -1071,21 +1074,9 @@ public static boolean isEmpty(Iterable iterable) { @Override public Iterator iterator() { return Iterators.mergeSorted( - Iterables.transform(iterables, Iterables.toIterator()), comparator); + Iterables.transform(iterables, Iterable::iterator), comparator); } }; return new UnmodifiableIterable<>(iterable); } - - // TODO(user): Is this the best place for this? Move to fluent functions? - // Useful as a public method? - static - Function, Iterator> toIterator() { - return new Function, Iterator>() { - @Override - public Iterator apply(Iterable iterable) { - return iterable.iterator(); - } - }; - } } diff --git a/guava/src/com/google/common/collect/Iterators.java b/guava/src/com/google/common/collect/Iterators.java index 2f9fd3b4aa11..71a93c63a129 100644 --- a/guava/src/com/google/common/collect/Iterators.java +++ b/guava/src/com/google/common/collect/Iterators.java @@ -988,7 +988,8 @@ public void remove() { * {@code iterator} as it is returned. * *

    The provided iterator must support {@link Iterator#remove()} or else the returned iterator - * will fail on the first call to {@code next}. + * will fail on the first call to {@code next}. The returned {@link Iterator} is also not + * thread-safe. * * @param iterator the iterator to remove and return elements from * @return an iterator that removes and returns elements from the supplied iterator diff --git a/guava/src/com/google/common/collect/LinkedHashMultimap.java b/guava/src/com/google/common/collect/LinkedHashMultimap.java index 019ee76f5975..78afd3268c35 100644 --- a/guava/src/com/google/common/collect/LinkedHashMultimap.java +++ b/guava/src/com/google/common/collect/LinkedHashMultimap.java @@ -23,6 +23,7 @@ import com.google.common.annotations.GwtCompatible; import com.google.common.annotations.GwtIncompatible; +import com.google.common.annotations.J2ktIncompatible; import com.google.common.annotations.VisibleForTesting; import com.google.common.base.Objects; import com.google.errorprone.annotations.CanIgnoreReturnValue; @@ -616,6 +617,7 @@ public void clear() { * and the entries in order */ @GwtIncompatible // java.io.ObjectOutputStream + @J2ktIncompatible private void writeObject(ObjectOutputStream stream) throws IOException { stream.defaultWriteObject(); stream.writeInt(keySet().size()); @@ -630,6 +632,7 @@ private void writeObject(ObjectOutputStream stream) throws IOException { } @GwtIncompatible // java.io.ObjectInputStream + @J2ktIncompatible private void readObject(ObjectInputStream stream) throws IOException, ClassNotFoundException { stream.defaultReadObject(); multimapHeaderEntry = ValueEntry.newHeader(); @@ -658,5 +661,6 @@ private void readObject(ObjectInputStream stream) throws IOException, ClassNotFo } @GwtIncompatible // java serialization not supported + @J2ktIncompatible private static final long serialVersionUID = 1; } diff --git a/guava/src/com/google/common/collect/LinkedHashMultiset.java b/guava/src/com/google/common/collect/LinkedHashMultiset.java index 5ee2015e93cc..21e290467b9d 100644 --- a/guava/src/com/google/common/collect/LinkedHashMultiset.java +++ b/guava/src/com/google/common/collect/LinkedHashMultiset.java @@ -18,6 +18,7 @@ import com.google.common.annotations.GwtCompatible; import com.google.common.annotations.GwtIncompatible; +import com.google.common.annotations.J2ktIncompatible; import java.io.IOException; import java.io.ObjectInputStream; import java.io.ObjectOutputStream; @@ -86,12 +87,14 @@ private LinkedHashMultiset(int distinctElements) { * its count, and so on */ @GwtIncompatible // java.io.ObjectOutputStream + @J2ktIncompatible private void writeObject(ObjectOutputStream stream) throws IOException { stream.defaultWriteObject(); Serialization.writeMultiset(this, stream); } @GwtIncompatible // java.io.ObjectInputStream + @J2ktIncompatible private void readObject(ObjectInputStream stream) throws IOException, ClassNotFoundException { stream.defaultReadObject(); int distinctElements = Serialization.readCount(stream); @@ -100,5 +103,6 @@ private void readObject(ObjectInputStream stream) throws IOException, ClassNotFo } @GwtIncompatible // not needed in emulated source + @J2ktIncompatible private static final long serialVersionUID = 0; } diff --git a/guava/src/com/google/common/collect/LinkedListMultimap.java b/guava/src/com/google/common/collect/LinkedListMultimap.java index dcbd32f29989..d88564ca549e 100644 --- a/guava/src/com/google/common/collect/LinkedListMultimap.java +++ b/guava/src/com/google/common/collect/LinkedListMultimap.java @@ -24,6 +24,7 @@ import com.google.common.annotations.GwtCompatible; import com.google.common.annotations.GwtIncompatible; +import com.google.common.annotations.J2ktIncompatible; import com.google.errorprone.annotations.CanIgnoreReturnValue; import com.google.j2objc.annotations.WeakOuter; import java.io.IOException; @@ -678,7 +679,7 @@ private List getCopy(@ParametricNullness K key) { */ @CanIgnoreReturnValue @Override - public List removeAll(@Nullable Object key) { + public List removeAll(@CheckForNull Object key) { /* * Safe because all we do is remove values for the key, not add them. (If we wanted to make sure * to call getCopy and removeAllNodes only with a true K, then we could check containsKey first. @@ -863,6 +864,7 @@ Map> createAsMap() { * from the entries() ordering */ @GwtIncompatible // java.io.ObjectOutputStream + @J2ktIncompatible private void writeObject(ObjectOutputStream stream) throws IOException { stream.defaultWriteObject(); stream.writeInt(size()); @@ -873,6 +875,7 @@ private void writeObject(ObjectOutputStream stream) throws IOException { } @GwtIncompatible // java.io.ObjectInputStream + @J2ktIncompatible private void readObject(ObjectInputStream stream) throws IOException, ClassNotFoundException { stream.defaultReadObject(); keyToKeyList = Maps.newLinkedHashMap(); @@ -887,5 +890,6 @@ private void readObject(ObjectInputStream stream) throws IOException, ClassNotFo } @GwtIncompatible // java serialization not supported + @J2ktIncompatible private static final long serialVersionUID = 0; } diff --git a/guava/src/com/google/common/collect/Lists.java b/guava/src/com/google/common/collect/Lists.java index 55dc73e373db..94e30ff331a0 100644 --- a/guava/src/com/google/common/collect/Lists.java +++ b/guava/src/com/google/common/collect/Lists.java @@ -28,6 +28,7 @@ import com.google.common.annotations.Beta; import com.google.common.annotations.GwtCompatible; import com.google.common.annotations.GwtIncompatible; +import com.google.common.annotations.J2ktIncompatible; import com.google.common.annotations.VisibleForTesting; import com.google.common.base.Function; import com.google.common.base.Objects; @@ -251,6 +252,7 @@ static int computeArrayListCapacity(int arraySize) { * @return a new, empty {@code CopyOnWriteArrayList} * @since 12.0 */ + @J2ktIncompatible @GwtIncompatible // CopyOnWriteArrayList public static CopyOnWriteArrayList newCopyOnWriteArrayList() { return new CopyOnWriteArrayList<>(); @@ -263,6 +265,7 @@ static int computeArrayListCapacity(int arraySize) { * @return a new {@code CopyOnWriteArrayList} containing those elements * @since 12.0 */ + @J2ktIncompatible @GwtIncompatible // CopyOnWriteArrayList public static CopyOnWriteArrayList newCopyOnWriteArrayList( Iterable elements) { @@ -338,7 +341,7 @@ public E get(int index) { return (index == 0) ? first : rest[index - 1]; } - private static final long serialVersionUID = 0; + @J2ktIncompatible private static final long serialVersionUID = 0; } /** @see Lists#asList(Object, Object, Object[]) */ @@ -374,7 +377,7 @@ public E get(int index) { } } - private static final long serialVersionUID = 0; + @J2ktIncompatible private static final long serialVersionUID = 0; } /** @@ -1104,7 +1107,7 @@ public ListIterator listIterator(int index) { return backingList.listIterator(index); } - private static final long serialVersionUID = 0; + @J2ktIncompatible private static final long serialVersionUID = 0; }; } else { wrapper = @@ -1114,7 +1117,7 @@ public ListIterator listIterator(int index) { return backingList.listIterator(index); } - private static final long serialVersionUID = 0; + @J2ktIncompatible private static final long serialVersionUID = 0; }; } return wrapper.subList(fromIndex, toIndex); diff --git a/guava/src/com/google/common/collect/MapMaker.java b/guava/src/com/google/common/collect/MapMaker.java index a2612c1bd286..4fb4ec8242cf 100644 --- a/guava/src/com/google/common/collect/MapMaker.java +++ b/guava/src/com/google/common/collect/MapMaker.java @@ -20,6 +20,7 @@ import com.google.common.annotations.GwtCompatible; import com.google.common.annotations.GwtIncompatible; +import com.google.common.annotations.J2ktIncompatible; import com.google.common.base.Ascii; import com.google.common.base.Equivalence; import com.google.common.base.MoreObjects; @@ -85,6 +86,7 @@ * @author Kevin Bourrillion * @since 2.0 */ +@J2ktIncompatible @GwtCompatible(emulated = true) @ElementTypesAreNonnullByDefault public final class MapMaker { diff --git a/guava/src/com/google/common/collect/MapMakerInternalMap.java b/guava/src/com/google/common/collect/MapMakerInternalMap.java index e3a6b3b36be6..815fdb4d79db 100644 --- a/guava/src/com/google/common/collect/MapMakerInternalMap.java +++ b/guava/src/com/google/common/collect/MapMakerInternalMap.java @@ -18,6 +18,7 @@ import static com.google.common.collect.CollectPreconditions.checkRemove; import com.google.common.annotations.GwtIncompatible; +import com.google.common.annotations.J2ktIncompatible; import com.google.common.annotations.VisibleForTesting; import com.google.common.base.Equivalence; import com.google.common.collect.MapMaker.Dummy; @@ -65,6 +66,7 @@ * @author Doug Lea ({@code ConcurrentHashMap}) */ // TODO(kak): Consider removing @CanIgnoreReturnValue from this class. +@J2ktIncompatible @GwtIncompatible @SuppressWarnings({ "GuardedBy", // TODO(b/35466881): Fix or suppress. @@ -2868,6 +2870,7 @@ Object writeReplace() { this); } + @J2ktIncompatible // java.io.ObjectInputStream private void readObject(ObjectInputStream in) throws InvalidObjectException { throw new InvalidObjectException("Use SerializationProxy"); } @@ -2918,6 +2921,7 @@ void writeMapTo(ObjectOutputStream out) throws IOException { } @SuppressWarnings("deprecation") // serialization of deprecated feature + @J2ktIncompatible // java.io.ObjectInputStream MapMaker readMapMaker(ObjectInputStream in) throws IOException { int size = in.readInt(); return new MapMaker() @@ -2929,6 +2933,7 @@ MapMaker readMapMaker(ObjectInputStream in) throws IOException { } @SuppressWarnings("unchecked") + @J2ktIncompatible // java.io.ObjectInputStream void readEntries(ObjectInputStream in) throws IOException, ClassNotFoundException { while (true) { K key = (K) in.readObject(); @@ -2964,6 +2969,7 @@ private void writeObject(ObjectOutputStream out) throws IOException { writeMapTo(out); } + @J2ktIncompatible // java.io.ObjectInputStream private void readObject(ObjectInputStream in) throws IOException, ClassNotFoundException { in.defaultReadObject(); MapMaker mapMaker = readMapMaker(in); diff --git a/guava/src/com/google/common/collect/Maps.java b/guava/src/com/google/common/collect/Maps.java index b4f48e1634a9..212829fa2d5c 100644 --- a/guava/src/com/google/common/collect/Maps.java +++ b/guava/src/com/google/common/collect/Maps.java @@ -27,6 +27,7 @@ import com.google.common.annotations.Beta; import com.google.common.annotations.GwtCompatible; import com.google.common.annotations.GwtIncompatible; +import com.google.common.annotations.J2ktIncompatible; import com.google.common.base.Converter; import com.google.common.base.Equivalence; import com.google.common.base.Function; @@ -71,6 +72,7 @@ import java.util.function.Consumer; import java.util.stream.Collector; import javax.annotation.CheckForNull; +import org.checkerframework.checker.nullness.qual.NonNull; import org.checkerframework.checker.nullness.qual.Nullable; /** @@ -153,6 +155,7 @@ V transform(Entry entry) { * @since 14.0 */ @GwtCompatible(serializable = true) + @J2ktIncompatible public static , V> ImmutableMap immutableEnumMap( Map map) { if (map instanceof ImmutableEnumMap) { @@ -195,6 +198,7 @@ public static , V> ImmutableMap immutableEnumMap( * * @since 21.0 */ + @J2ktIncompatible public static , V> Collector> toImmutableEnumMap( java.util.function.Function keyFunction, @@ -213,6 +217,7 @@ public static , V> ImmutableMap immutableEnumMap( * * @since 21.0 */ + @J2ktIncompatible public static , V> Collector> toImmutableEnumMap( java.util.function.Function keyFunction, @@ -478,28 +483,15 @@ IdentityHashMap newIdentityHashMap() { * @param right the map to treat as the "right" map for purposes of comparison * @return the difference between the two maps */ - @SuppressWarnings("unchecked") public static MapDifference difference( Map left, Map right) { if (left instanceof SortedMap) { + @SuppressWarnings("unchecked") SortedMap sortedLeft = (SortedMap) left; return difference(sortedLeft, right); } - /* - * This cast is safe: The Equivalence-accepting overload of difference() (which we call below) - * has a weird signature because Equivalence is itself a little weird. Still, we know that - * Equivalence.equals() can handle all inputs, and we know that the resulting MapDifference will - * contain only Ks and Vs (as opposed to possibly containing @Nullable objects even when K and V - * are *not* @Nullable). - * - * An alternative to suppressing the warning would be to inline the body of the other - * difference() method into this one. - */ - @SuppressWarnings("nullness") - MapDifference result = - (MapDifference) difference(left, right, Equivalence.equals()); - return result; + return difference(left, right, Equivalence.equals()); } /** @@ -516,36 +508,11 @@ MapDifference difference( * @return the difference between the two maps * @since 10.0 */ - /* - * This method should really be annotated to accept maps with @Nullable value types. Fortunately, - * no existing Google callers appear to pass null values (much less pass null values *and* run a - * nullness checker). - * - * Still, if we decide that we want to make that work, we'd need to introduce a new type parameter - * for the Equivalence input type: - * - * ... difference(..., Equivalence ...) - * - * Maybe we should, even though it will break source compatibility. - * - * Alternatively, this is a case in which it would be useful to be able to express Equivalence). - * - * As things stand now, though, we have to either: - * - * - require non-null inputs so that we can guarantee non-null outputs - * - * - accept nullable inputs but force users to cope with nullable outputs - * - * And the non-null option is far more useful to existing users. - * - * (Vaguely related: Another thing we could consider is an overload that accepts a BiPredicate: - * https://github.com/google/guava/issues/3913) - */ - public static MapDifference difference( - Map left, - Map right, - Equivalence valueEquivalence) { + public static + MapDifference difference( + Map left, + Map right, + Equivalence valueEquivalence) { Preconditions.checkNotNull(valueEquivalence); Map onlyOnLeft = newLinkedHashMap(); @@ -585,26 +552,14 @@ SortedMapDifference difference( SortedMap onBoth = Maps.newTreeMap(comparator); SortedMap> differences = Maps.newTreeMap(comparator); - /* - * V is a possibly nullable type, but we decided to declare Equivalence with a type parameter - * that is restricted to non-nullable types. Still, this code is safe: We made that decision - * about Equivalence not because Equivalence is null-hostile but because *every* Equivalence can - * handle null inputs -- and thus it would be meaningless for the type system to distinguish - * between "an Equivalence for nullable Foo" and "an Equivalence for non-nullable Foo." - * - * (And the unchecked cast is safe because Equivalence is contravariant.) - */ - @SuppressWarnings({"nullness", "unchecked"}) - Equivalence equalsEquivalence = (Equivalence) Equivalence.equals(); - - doDifference(left, right, equalsEquivalence, onlyOnLeft, onlyOnRight, onBoth, differences); + doDifference(left, right, Equivalence.equals(), onlyOnLeft, onlyOnRight, onBoth, differences); return new SortedMapDifferenceImpl<>(onlyOnLeft, onlyOnRight, onBoth, differences); } private static void doDifference( Map left, Map right, - Equivalence valueEquivalence, + Equivalence valueEquivalence, Map onlyOnLeft, Map onlyOnRight, Map onBoth, @@ -1338,14 +1293,26 @@ public static ImmutableMap toMap( * ... * ImmutableSet allColors = ImmutableSet.of(red, green, blue); * - * Map colorForName = - * uniqueIndex(allColors, toStringFunction()); + * ImmutableMap colorForName = + * uniqueIndex(allColors, c -> c.toString()); * assertThat(colorForName).containsEntry("red", red); * } * *

    If your index may associate multiple values with each key, use {@link * Multimaps#index(Iterable, Function) Multimaps.index}. * + *

    Note: on Java 8 and later, it is usually better to use streams. For example: + * + *

    {@code
    +   * import static com.google.common.collect.ImmutableMap.toImmutableMap;
    +   * ...
    +   * ImmutableMap colorForName =
    +   *     allColors.stream().collect(toImmutableMap(c -> c.toString(), c -> c));
    +   * }
    + * + *

    Streams provide a more standard and flexible API and the lambdas make it clear what the keys + * and values in the map are. + * * @param values the values to use when constructing the {@code Map} * @param keyFunction the function used to produce the key for each value * @return a map mapping the result of evaluating the function {@code keyFunction} on each value @@ -1428,6 +1395,7 @@ private static ImmutableMap uniqueIndex( * @throws ClassCastException if any key in {@code properties} is not a {@code String} * @throws NullPointerException if any key or value in {@code properties} is null */ + @J2ktIncompatible @GwtIncompatible // java.util.Properties public static ImmutableMap fromProperties(Properties properties) { ImmutableMap.Builder builder = ImmutableMap.builder(); @@ -1540,7 +1508,7 @@ public Entry next() { }; } - /** @see Multimaps#unmodifiableEntries */ + /** The implementation of {@link Multimaps#unmodifiableEntries}. */ static class UnmodifiableEntries extends ForwardingCollection> { private final Collection> entries; @@ -1562,15 +1530,14 @@ public Iterator> iterator() { // See java.util.Collections.UnmodifiableEntrySet for details on attacks. @Override - public Object[] toArray() { + public @Nullable Object[] toArray() { /* - * standardToArray returns `@Nullable Object[]` rather than `Object[]` but only because it can + * standardToArray returns `@Nullable Object[]` rather than `Object[]` but because it can * be used with collections that may contain null. This collection never contains nulls, so we - * can treat it as a plain `Object[]`. + * could return `Object[]`. But this class is private and J2KT cannot change return types in + * overrides, so we declare `@Nullable Object[]` as the return type. */ - @SuppressWarnings("nullness") - Object[] result = standardToArray(); - return result; + return standardToArray(); } @Override @@ -1580,7 +1547,7 @@ public Object[] toArray() { } } - /** @see Maps#unmodifiableEntrySet(Set) */ + /** The implementation of {@link Maps#unmodifiableEntrySet(Set)}. */ static class UnmodifiableEntrySet extends UnmodifiableEntries implements Set> { UnmodifiableEntrySet(Set> entries) { @@ -1710,7 +1677,9 @@ BiMap unmodifiableBiMap(BiMap bimap) { return new UnmodifiableBiMap<>(bimap, null); } - /** @see Maps#unmodifiableBiMap(BiMap) */ + /** + * @see Maps#unmodifiableBiMap(BiMap) + */ private static class UnmodifiableBiMap extends ForwardingMap implements BiMap, Serializable { final Map unmodifiableMap; @@ -2121,6 +2090,7 @@ public interface EntryTransformer< * @throws NullPointerException if the key or value is null and this transformer does not accept * null arguments */ + @ParametricNullness V2 transformEntry(@ParametricNullness K key, @ParametricNullness V1 value); } diff --git a/guava/src/com/google/common/collect/MinMaxPriorityQueue.java b/guava/src/com/google/common/collect/MinMaxPriorityQueue.java index 3bec704191e7..5774bb4ead7b 100644 --- a/guava/src/com/google/common/collect/MinMaxPriorityQueue.java +++ b/guava/src/com/google/common/collect/MinMaxPriorityQueue.java @@ -25,6 +25,7 @@ import com.google.common.annotations.Beta; import com.google.common.annotations.GwtCompatible; +import com.google.common.annotations.J2ktIncompatible; import com.google.common.annotations.VisibleForTesting; import com.google.common.math.IntMath; import com.google.errorprone.annotations.CanIgnoreReturnValue; @@ -108,7 +109,7 @@ public final class MinMaxPriorityQueue extends AbstractQueue { * initial contents, and an initial expected size of 11. */ public static > MinMaxPriorityQueue create() { - return new Builder(Ordering.natural()).create(); + return new Builder>(Ordering.natural()).create(); } /** @@ -525,7 +526,10 @@ boolean isIntact() { @WeakOuter private class Heap { final Ordering ordering; - @Weak Heap otherHeap; // always initialized immediately after construction + + @SuppressWarnings("nullness:initialization.field.uninitialized") + @Weak + Heap otherHeap; // always initialized immediately after construction Heap(Ordering ordering) { this.ordering = ordering; @@ -644,17 +648,18 @@ int crossOverUp(int index, E x) { int parentIndex = getParentIndex(index); E parentElement = elementData(parentIndex); if (parentIndex != 0) { - // This is a guard for the case of the childless uncle. - // Since the end of the array is actually the middle of the heap, - // a smaller childless uncle can become a child of x when we - // bubble up alternate levels, violating the invariant. + /* + * This is a guard for the case of the childless aunt node. Since the end of the array is + * actually the middle of the heap, a smaller childless aunt node can become a child of x + * when we bubble up alternate levels, violating the invariant. + */ int grandparentIndex = getParentIndex(parentIndex); - int uncleIndex = getRightChildIndex(grandparentIndex); - if (uncleIndex != parentIndex && getLeftChildIndex(uncleIndex) >= size) { - E uncleElement = elementData(uncleIndex); - if (ordering.compare(uncleElement, parentElement) < 0) { - parentIndex = uncleIndex; - parentElement = uncleElement; + int auntIndex = getRightChildIndex(grandparentIndex); + if (auntIndex != parentIndex && getLeftChildIndex(auntIndex) >= size) { + E auntElement = elementData(auntIndex); + if (ordering.compare(auntElement, parentElement) < 0) { + parentIndex = auntIndex; + parentElement = auntElement; } } } @@ -667,26 +672,30 @@ int crossOverUp(int index, E x) { return index; } + // About the term "aunt node": it's better to leave gender out of it, but for this the English + // language has nothing for us. Except for the whimsical neologism "pibling" (!) which we + // obviously could not expect to increase anyone's understanding of the code. + /** * Swap {@code actualLastElement} with the conceptually correct last element of the heap. * Returns the index that {@code actualLastElement} now resides in. * *

    Since the last element of the array is actually in the middle of the sorted structure, a - * childless uncle node could be smaller, which would corrupt the invariant if this element - * becomes the new parent of the uncle. In that case, we first switch the last element with its - * uncle, before returning. + * childless aunt node could be smaller, which would corrupt the invariant if this element + * becomes the new parent of the aunt node. In that case, we first switch the last element with + * its aunt node, before returning. */ int swapWithConceptuallyLastElement(E actualLastElement) { int parentIndex = getParentIndex(size); if (parentIndex != 0) { int grandparentIndex = getParentIndex(parentIndex); - int uncleIndex = getRightChildIndex(grandparentIndex); - if (uncleIndex != parentIndex && getLeftChildIndex(uncleIndex) >= size) { - E uncleElement = elementData(uncleIndex); - if (ordering.compare(uncleElement, actualLastElement) < 0) { - queue[uncleIndex] = actualLastElement; - queue[size] = uncleElement; - return uncleIndex; + int auntIndex = getRightChildIndex(grandparentIndex); + if (auntIndex != parentIndex && getLeftChildIndex(auntIndex) >= size) { + E auntElement = elementData(auntIndex); + if (ordering.compare(auntElement, actualLastElement) < 0) { + queue[auntIndex] = actualLastElement; + queue[size] = auntElement; + return auntIndex; } } } @@ -911,6 +920,7 @@ public void clear() { } @Override + @J2ktIncompatible // Incompatible return type change. Use inherited (unoptimized) implementation public Object[] toArray() { Object[] copyTo = new Object[size]; System.arraycopy(queue, 0, copyTo, 0, size); diff --git a/guava/src/com/google/common/collect/MoreCollectors.java b/guava/src/com/google/common/collect/MoreCollectors.java index 5a84a4628e3b..3c57ea0a9388 100644 --- a/guava/src/com/google/common/collect/MoreCollectors.java +++ b/guava/src/com/google/common/collect/MoreCollectors.java @@ -25,6 +25,7 @@ import java.util.NoSuchElementException; import java.util.Optional; import java.util.stream.Collector; +import javax.annotation.CheckForNull; import org.checkerframework.checker.nullness.qual.Nullable; /** @@ -93,7 +94,7 @@ public final class MoreCollectors { private static final class ToOptionalState { static final int MAX_EXTRAS = 4; - @Nullable Object element; + @CheckForNull Object element; List extras; ToOptionalState() { diff --git a/guava/src/com/google/common/collect/Multimaps.java b/guava/src/com/google/common/collect/Multimaps.java index 22e457ca48fb..084cb69d786c 100644 --- a/guava/src/com/google/common/collect/Multimaps.java +++ b/guava/src/com/google/common/collect/Multimaps.java @@ -25,6 +25,7 @@ import com.google.common.annotations.Beta; import com.google.common.annotations.GwtCompatible; import com.google.common.annotations.GwtIncompatible; +import com.google.common.annotations.J2ktIncompatible; import com.google.common.base.Function; import com.google.common.base.Predicate; import com.google.common.base.Predicates; @@ -270,8 +271,11 @@ Collection wrapCollection(@ParametricNullness K key, Collection collection // can't use Serialization writeMultimap and populateMultimap methods since // there's no way to generate the empty backing map. - /** @serialData the factory and the backing map */ + /** + * @serialData the factory and the backing map + */ @GwtIncompatible // java.io.ObjectOutputStream + @J2ktIncompatible private void writeObject(ObjectOutputStream stream) throws IOException { stream.defaultWriteObject(); stream.writeObject(factory); @@ -279,6 +283,7 @@ private void writeObject(ObjectOutputStream stream) throws IOException { } @GwtIncompatible // java.io.ObjectInputStream + @J2ktIncompatible @SuppressWarnings("unchecked") // reading data stored by writeObject private void readObject(ObjectInputStream stream) throws IOException, ClassNotFoundException { stream.defaultReadObject(); @@ -288,6 +293,7 @@ private void readObject(ObjectInputStream stream) throws IOException, ClassNotFo } @GwtIncompatible // java serialization not supported + @J2ktIncompatible private static final long serialVersionUID = 0; } @@ -351,8 +357,11 @@ protected List createCollection() { return factory.get(); } - /** @serialData the factory and the backing map */ + /** + * @serialData the factory and the backing map + */ @GwtIncompatible // java.io.ObjectOutputStream + @J2ktIncompatible private void writeObject(ObjectOutputStream stream) throws IOException { stream.defaultWriteObject(); stream.writeObject(factory); @@ -360,6 +369,7 @@ private void writeObject(ObjectOutputStream stream) throws IOException { } @GwtIncompatible // java.io.ObjectInputStream + @J2ktIncompatible @SuppressWarnings("unchecked") // reading data stored by writeObject private void readObject(ObjectInputStream stream) throws IOException, ClassNotFoundException { stream.defaultReadObject(); @@ -369,6 +379,7 @@ private void readObject(ObjectInputStream stream) throws IOException, ClassNotFo } @GwtIncompatible // java serialization not supported + @J2ktIncompatible private static final long serialVersionUID = 0; } @@ -454,8 +465,11 @@ Collection wrapCollection(@ParametricNullness K key, Collection collection } } - /** @serialData the factory and the backing map */ + /** + * @serialData the factory and the backing map + */ @GwtIncompatible // java.io.ObjectOutputStream + @J2ktIncompatible private void writeObject(ObjectOutputStream stream) throws IOException { stream.defaultWriteObject(); stream.writeObject(factory); @@ -463,6 +477,7 @@ private void writeObject(ObjectOutputStream stream) throws IOException { } @GwtIncompatible // java.io.ObjectInputStream + @J2ktIncompatible @SuppressWarnings("unchecked") // reading data stored by writeObject private void readObject(ObjectInputStream stream) throws IOException, ClassNotFoundException { stream.defaultReadObject(); @@ -472,6 +487,7 @@ private void readObject(ObjectInputStream stream) throws IOException, ClassNotFo } @GwtIncompatible // not needed in emulated source + @J2ktIncompatible private static final long serialVersionUID = 0; } @@ -543,8 +559,11 @@ public Comparator valueComparator() { return valueComparator; } - /** @serialData the factory and the backing map */ + /** + * @serialData the factory and the backing map + */ @GwtIncompatible // java.io.ObjectOutputStream + @J2ktIncompatible private void writeObject(ObjectOutputStream stream) throws IOException { stream.defaultWriteObject(); stream.writeObject(factory); @@ -552,6 +571,7 @@ private void writeObject(ObjectOutputStream stream) throws IOException { } @GwtIncompatible // java.io.ObjectInputStream + @J2ktIncompatible @SuppressWarnings("unchecked") // reading data stored by writeObject private void readObject(ObjectInputStream stream) throws IOException, ClassNotFoundException { stream.defaultReadObject(); @@ -562,6 +582,7 @@ private void readObject(ObjectInputStream stream) throws IOException, ClassNotFo } @GwtIncompatible // not needed in emulated source + @J2ktIncompatible private static final long serialVersionUID = 0; } @@ -684,13 +705,7 @@ public Map> asMap() { map = Collections.unmodifiableMap( Maps.transformValues( - delegate.asMap(), - new Function, Collection>() { - @Override - public Collection apply(Collection collection) { - return unmodifiableValueCollection(collection); - } - })); + delegate.asMap(), collection -> unmodifiableValueCollection(collection))); } return result; } @@ -1046,7 +1061,6 @@ Collection> unmodifiableEntries(Collection> entries) { * * @since 15.0 */ - @Beta @SuppressWarnings("unchecked") // safe by specification of ListMultimap.asMap() public static Map> asMap( @@ -1060,7 +1074,6 @@ Collection> unmodifiableEntries(Collection> entries) { * * @since 15.0 */ - @Beta @SuppressWarnings("unchecked") // safe by specification of SetMultimap.asMap() public static Map> asMap( @@ -1074,7 +1087,6 @@ Collection> unmodifiableEntries(Collection> entries) { * * @since 15.0 */ - @Beta @SuppressWarnings("unchecked") // safe by specification of SortedSetMultimap.asMap() public static Map> asMap( @@ -1088,7 +1100,6 @@ Collection> unmodifiableEntries(Collection> entries) { * * @since 15.0 */ - @Beta public static Map> asMap(Multimap multimap) { return multimap.asMap(); @@ -1505,14 +1516,7 @@ Collection transform(@ParametricNullness K key, Collection values) { @Override Map> createAsMap() { - return Maps.transformEntries( - fromMultimap.asMap(), - new EntryTransformer, Collection>() { - @Override - public Collection transformEntry(@ParametricNullness K key, Collection value) { - return transform(key, value); - } - }); + return Maps.transformEntries(fromMultimap.asMap(), (key, value) -> transform(key, value)); } @Override @@ -1894,14 +1898,7 @@ Map> map() { @Override public Iterator>> iterator() { - return Maps.asMapEntryIterator( - multimap.keySet(), - new Function>() { - @Override - public Collection apply(@ParametricNullness K key) { - return multimap.get(key); - } - }); + return Maps.asMapEntryIterator(multimap.keySet(), key -> multimap.get(key)); } @Override diff --git a/guava/src/com/google/common/collect/MutableClassToInstanceMap.java b/guava/src/com/google/common/collect/MutableClassToInstanceMap.java index 7f0e781fea2a..740d66715bcc 100644 --- a/guava/src/com/google/common/collect/MutableClassToInstanceMap.java +++ b/guava/src/com/google/common/collect/MutableClassToInstanceMap.java @@ -19,6 +19,7 @@ import static com.google.common.base.Preconditions.checkNotNull; import com.google.common.annotations.GwtIncompatible; +import com.google.common.annotations.J2ktIncompatible; import com.google.common.primitives.Primitives; import com.google.errorprone.annotations.CanIgnoreReturnValue; import java.io.InvalidObjectException; @@ -31,6 +32,7 @@ import java.util.Set; import java.util.Spliterator; import javax.annotation.CheckForNull; +import org.checkerframework.checker.nullness.qual.NonNull; import org.checkerframework.checker.nullness.qual.Nullable; /** @@ -41,24 +43,23 @@ * "https://github.com/google/guava/wiki/NewCollectionTypesExplained#classtoinstancemap">{@code * ClassToInstanceMap}. * - *

    This implementation does support null values, despite how it is annotated; see - * discussion at {@link ClassToInstanceMap}. - * * @author Kevin Bourrillion * @since 2.0 */ +@J2ktIncompatible @GwtIncompatible @SuppressWarnings("serial") // using writeReplace instead of standard serialization @ElementTypesAreNonnullByDefault -public final class MutableClassToInstanceMap extends ForwardingMap, B> +public final class MutableClassToInstanceMap + extends ForwardingMap, B> implements ClassToInstanceMap, Serializable { /** * Returns a new {@code MutableClassToInstanceMap} instance backed by a {@link HashMap} using the * default initial capacity and load factor. */ - public static MutableClassToInstanceMap create() { - return new MutableClassToInstanceMap(new HashMap, B>()); + public static MutableClassToInstanceMap create() { + return new MutableClassToInstanceMap(new HashMap, B>()); } /** @@ -66,60 +67,64 @@ public static MutableClassToInstanceMap create() { * backingMap}. The caller surrenders control of the backing map, and thus should not allow any * direct references to it to remain accessible. */ - public static MutableClassToInstanceMap create(Map, B> backingMap) { + public static MutableClassToInstanceMap create( + Map, B> backingMap) { return new MutableClassToInstanceMap(backingMap); } - private final Map, B> delegate; + private final Map, B> delegate; - private MutableClassToInstanceMap(Map, B> delegate) { + private MutableClassToInstanceMap(Map, B> delegate) { this.delegate = checkNotNull(delegate); } @Override - protected Map, B> delegate() { + protected Map, B> delegate() { return delegate; } /** * Wraps the {@code setValue} implementation of an {@code Entry} to enforce the class constraint. */ - private static Entry, B> checkedEntry( - final Entry, B> entry) { - return new ForwardingMapEntry, B>() { + private static Entry, B> checkedEntry( + final Entry, B> entry) { + return new ForwardingMapEntry, B>() { @Override - protected Entry, B> delegate() { + protected Entry, B> delegate() { return entry; } @Override - public B setValue(B value) { + @ParametricNullness + public B setValue(@ParametricNullness B value) { return super.setValue(cast(getKey(), value)); } }; } @Override - public Set, B>> entrySet() { - return new ForwardingSet, B>>() { + public Set, B>> entrySet() { + return new ForwardingSet, B>>() { @Override - protected Set, B>> delegate() { + protected Set, B>> delegate() { return MutableClassToInstanceMap.this.delegate().entrySet(); } @Override - public Spliterator, B>> spliterator() { + public Spliterator, B>> spliterator() { return CollectSpliterators.map( delegate().spliterator(), MutableClassToInstanceMap::checkedEntry); } @Override - public Iterator, B>> iterator() { - return new TransformedIterator, B>, Entry, B>>( + public Iterator, B>> iterator() { + return new TransformedIterator< + Entry, B>, Entry, B>>( delegate().iterator()) { @Override - Entry, B> transform(Entry, B> from) { + Entry, B> transform( + Entry, B> from) { return checkedEntry(from); } }; @@ -149,14 +154,14 @@ public Object[] toArray() { @Override @CanIgnoreReturnValue @CheckForNull - public B put(Class key, B value) { + public B put(Class key, @ParametricNullness B value) { return super.put(key, cast(key, value)); } @Override - public void putAll(Map, ? extends B> map) { - Map, B> copy = new LinkedHashMap<>(map); - for (Entry, B> entry : copy.entrySet()) { + public void putAll(Map, ? extends B> map) { + Map, B> copy = new LinkedHashMap<>(map); + for (Entry, B> entry : copy.entrySet()) { cast(entry.getKey(), entry.getValue()); } super.putAll(copy); @@ -165,19 +170,19 @@ public void putAll(Map, ? extends B> map) { @CanIgnoreReturnValue @Override @CheckForNull - public T putInstance(Class type, T value) { + public T putInstance(Class<@NonNull T> type, @ParametricNullness T value) { return cast(type, put(type, value)); } @Override @CheckForNull - public T getInstance(Class type) { + public T getInstance(Class type) { return cast(type, get(type)); } @CanIgnoreReturnValue @CheckForNull - private static T cast(Class type, @CheckForNull B value) { + private static T cast(Class<@NonNull T> type, @CheckForNull B value) { return Primitives.wrap(type).cast(value); } @@ -190,10 +195,10 @@ private void readObject(ObjectInputStream stream) throws InvalidObjectException } /** Serialized form of the map, to avoid serializing the constraint. */ - private static final class SerializedForm implements Serializable { - private final Map, B> backingMap; + private static final class SerializedForm implements Serializable { + private final Map, B> backingMap; - SerializedForm(Map, B> backingMap) { + SerializedForm(Map, B> backingMap) { this.backingMap = backingMap; } diff --git a/guava/src/com/google/common/collect/NullsFirstOrdering.java b/guava/src/com/google/common/collect/NullsFirstOrdering.java index 7da8938abaa2..c451ea8c0aed 100644 --- a/guava/src/com/google/common/collect/NullsFirstOrdering.java +++ b/guava/src/com/google/common/collect/NullsFirstOrdering.java @@ -19,6 +19,7 @@ import com.google.common.annotations.GwtCompatible; import java.io.Serializable; import javax.annotation.CheckForNull; +import org.checkerframework.checker.nullness.qual.NonNull; import org.checkerframework.checker.nullness.qual.Nullable; /** An ordering that treats {@code null} as less than all other values. */ @@ -50,7 +51,7 @@ public int compare(@CheckForNull T left, @CheckForNull T right) { @SuppressWarnings("nullness") // should be safe, but not sure if we can avoid the warning public Ordering reverse() { // ordering.reverse() might be optimized, so let it do its thing - return ordering.reverse().nullsLast(); + return ordering.reverse().<@NonNull S>nullsLast(); } @SuppressWarnings("unchecked") // still need the right way to explain this @@ -61,7 +62,7 @@ public int compare(@CheckForNull T left, @CheckForNull T right) { @Override public Ordering<@Nullable S> nullsLast() { - return ordering.nullsLast(); + return ordering.<@NonNull S>nullsLast(); } @Override diff --git a/guava/src/com/google/common/collect/NullsLastOrdering.java b/guava/src/com/google/common/collect/NullsLastOrdering.java index 4ccb0bd49e35..88917852e67d 100644 --- a/guava/src/com/google/common/collect/NullsLastOrdering.java +++ b/guava/src/com/google/common/collect/NullsLastOrdering.java @@ -19,6 +19,7 @@ import com.google.common.annotations.GwtCompatible; import java.io.Serializable; import javax.annotation.CheckForNull; +import org.checkerframework.checker.nullness.qual.NonNull; import org.checkerframework.checker.nullness.qual.Nullable; /** An ordering that treats {@code null} as greater than all other values. */ @@ -50,12 +51,12 @@ public int compare(@CheckForNull T left, @CheckForNull T right) { @SuppressWarnings("nullness") // should be safe, but not sure if we can avoid the warning public Ordering reverse() { // ordering.reverse() might be optimized, so let it do its thing - return ordering.reverse().nullsFirst(); + return ordering.reverse().<@NonNull S>nullsFirst(); } @Override public Ordering<@Nullable S> nullsFirst() { - return ordering.nullsFirst(); + return ordering.<@NonNull S>nullsFirst(); } @SuppressWarnings("unchecked") // still need the right way to explain this diff --git a/guava/src/com/google/common/collect/Ordering.java b/guava/src/com/google/common/collect/Ordering.java index 2807839a7fe6..cca04f6e7ae5 100644 --- a/guava/src/com/google/common/collect/Ordering.java +++ b/guava/src/com/google/common/collect/Ordering.java @@ -20,6 +20,7 @@ import static com.google.common.collect.CollectPreconditions.checkNonnegative; import com.google.common.annotations.GwtCompatible; +import com.google.common.annotations.J2ktIncompatible; import com.google.common.annotations.VisibleForTesting; import com.google.common.base.Function; import java.util.ArrayList; @@ -38,6 +39,7 @@ import java.util.concurrent.ConcurrentMap; import java.util.concurrent.atomic.AtomicInteger; import javax.annotation.CheckForNull; +import org.checkerframework.checker.nullness.qual.NonNull; import org.checkerframework.checker.nullness.qual.Nullable; /** @@ -171,6 +173,8 @@ public static Ordering natural() { * to pass it in here. Instead, simply subclass {@code Ordering} and implement its {@code compare} * method directly. * + *

    The returned object is serializable if {@code comparator} is serializable. + * *

    Java 8 users: this class is now obsolete as explained in the class documentation, so * there is no need to use this method. * @@ -312,14 +316,17 @@ public static Ordering usingToString() { * @since 2.0 */ // TODO(kevinb): copy to Comparators, etc. + @J2ktIncompatible // MapMaker public static Ordering<@Nullable Object> arbitrary() { return ArbitraryOrderingHolder.ARBITRARY_ORDERING; } + @J2ktIncompatible // MapMaker private static class ArbitraryOrderingHolder { static final Ordering<@Nullable Object> ARBITRARY_ORDERING = new ArbitraryOrdering(); } + @J2ktIncompatible // MapMaker @VisibleForTesting static class ArbitraryOrdering extends Ordering<@Nullable Object> { @@ -410,6 +417,8 @@ public Ordering reverse() { * Returns an ordering that treats {@code null} as less than all other values and uses {@code * this} to compare non-null values. * + *

    The returned object is serializable if this object is serializable. + * *

    Java 8 users: Use {@code Comparator.nullsFirst(thisComparator)} instead. */ // type parameter lets us avoid the extra in statements like: @@ -423,6 +432,8 @@ public Ordering reverse() { * Returns an ordering that treats {@code null} as greater than all other values and uses this * ordering to compare non-null values. * + *

    The returned object is serializable if this object is serializable. + * *

    Java 8 users: Use {@code Comparator.nullsLast(thisComparator)} instead. */ // type parameter lets us avoid the extra in statements like: @@ -463,6 +474,9 @@ public Ordering reverse() { *

    An ordering produced by this method, or a chain of calls to this method, is equivalent to * one created using {@link Ordering#compound(Iterable)} on the same component comparators. * + *

    The returned object is serializable if this object and {@code secondaryComparator} are both + * serializable. + * *

    Java 8 users: Use {@code thisComparator.thenComparing(secondaryComparator)} instead. * Depending on what {@code secondaryComparator} is, one of the other overloads of {@code * thenComparing} may be even more useful. @@ -481,6 +495,8 @@ public Ordering compound(Comparator secondaryCompara *

    The returned ordering is equivalent to that produced using {@code * Ordering.from(comp1).compound(comp2).compound(comp3) . . .}. * + *

    The returned object is serializable if each of the {@code comparators} is serializable. + * *

    Warning: Supplying an argument with undefined iteration order, such as a {@link * HashSet}, will produce non-deterministic results. * @@ -807,7 +823,7 @@ public List leastOf(Iterator iterator, int k) { public List greatestOf(Iterable iterable, int k) { // TODO(kevinb): see if delegation is hurting performance noticeably // TODO(kevinb): if we change this implementation, add full unit tests. - return reverse().leastOf(iterable, k); + return this.reverse().leastOf(iterable, k); } /** @@ -827,7 +843,7 @@ public List greatestOf(Iterable iterable, int k) { * @since 14.0 */ public List greatestOf(Iterator iterator, int k) { - return reverse().leastOf(iterator, k); + return this.reverse().leastOf(iterator, k); } /** @@ -869,8 +885,7 @@ public List sortedCopy(Iterable elements) { * @since 3.0 */ // TODO(kevinb): rerun benchmarks including new options - @SuppressWarnings("nullness") // unsafe, but there's not much we can do about it now - public ImmutableList immutableSortedCopy(Iterable elements) { + public ImmutableList immutableSortedCopy(Iterable elements) { return ImmutableList.sortedCopyOf(this, elements); } diff --git a/guava/src/com/google/common/collect/Platform.java b/guava/src/com/google/common/collect/Platform.java index b1d6b2f4382d..718ee465e47a 100644 --- a/guava/src/com/google/common/collect/Platform.java +++ b/guava/src/com/google/common/collect/Platform.java @@ -17,7 +17,7 @@ package com.google.common.collect; import com.google.common.annotations.GwtCompatible; -import java.lang.reflect.Array; +import com.google.common.annotations.J2ktIncompatible; import java.util.Arrays; import java.util.Map; import java.util.Set; @@ -98,13 +98,8 @@ Map preservesInsertionOrderOnPutsMap() { * ObjectArrays, which is the main caller of this method.) */ static T[] newArray(T[] reference, int length) { - Class type = reference.getClass().getComponentType(); - - // the cast is safe because - // result.getClass() == reference.getClass().getComponentType() - @SuppressWarnings("unchecked") - T[] result = (T[]) Array.newInstance(type, length); - return result; + T[] empty = reference.length == 0 ? reference : Arrays.copyOf(reference, 0); + return Arrays.copyOf(empty, length); } /** Equivalent to Arrays.copyOfRange(source, from, to, arrayOfType.getClass()). */ @@ -126,6 +121,7 @@ Map preservesInsertionOrderOnPutsMap() { * GWT). This is sometimes acceptable, when only server-side code could generate enough volume * that reclamation becomes important. */ + @J2ktIncompatible static MapMaker tryWeakKeys(MapMaker mapMaker) { return mapMaker.weakKeys(); } diff --git a/guava/src/com/google/common/collect/Queues.java b/guava/src/com/google/common/collect/Queues.java index a140102fd6db..ea6e1489e14a 100644 --- a/guava/src/com/google/common/collect/Queues.java +++ b/guava/src/com/google/common/collect/Queues.java @@ -17,6 +17,7 @@ import com.google.common.annotations.Beta; import com.google.common.annotations.GwtCompatible; import com.google.common.annotations.GwtIncompatible; +import com.google.common.annotations.J2ktIncompatible; import com.google.common.base.Preconditions; import com.google.errorprone.annotations.CanIgnoreReturnValue; import java.util.ArrayDeque; @@ -52,6 +53,7 @@ private Queues() {} * Creates an empty {@code ArrayBlockingQueue} with the given (fixed) capacity and nonfair access * policy. */ + @J2ktIncompatible @GwtIncompatible // ArrayBlockingQueue public static ArrayBlockingQueue newArrayBlockingQueue(int capacity) { return new ArrayBlockingQueue(capacity); @@ -86,6 +88,7 @@ public static ArrayDeque newArrayDeque(Iterable elements) { // ConcurrentLinkedQueue /** Creates an empty {@code ConcurrentLinkedQueue}. */ + @J2ktIncompatible @GwtIncompatible // ConcurrentLinkedQueue public static ConcurrentLinkedQueue newConcurrentLinkedQueue() { return new ConcurrentLinkedQueue(); @@ -95,6 +98,7 @@ public static ConcurrentLinkedQueue newConcurrentLinkedQueue() { * Creates a {@code ConcurrentLinkedQueue} containing the elements of the specified iterable, in * the order they are returned by the iterable's iterator. */ + @J2ktIncompatible @GwtIncompatible // ConcurrentLinkedQueue public static ConcurrentLinkedQueue newConcurrentLinkedQueue( Iterable elements) { @@ -113,6 +117,7 @@ public static ConcurrentLinkedQueue newConcurrentLinkedQueue( * * @since 12.0 */ + @J2ktIncompatible @GwtIncompatible // LinkedBlockingDeque public static LinkedBlockingDeque newLinkedBlockingDeque() { return new LinkedBlockingDeque(); @@ -124,6 +129,7 @@ public static LinkedBlockingDeque newLinkedBlockingDeque() { * @throws IllegalArgumentException if {@code capacity} is less than 1 * @since 12.0 */ + @J2ktIncompatible @GwtIncompatible // LinkedBlockingDeque public static LinkedBlockingDeque newLinkedBlockingDeque(int capacity) { return new LinkedBlockingDeque(capacity); @@ -136,6 +142,7 @@ public static LinkedBlockingDeque newLinkedBlockingDeque(int capacity) { * * @since 12.0 */ + @J2ktIncompatible @GwtIncompatible // LinkedBlockingDeque public static LinkedBlockingDeque newLinkedBlockingDeque(Iterable elements) { if (elements instanceof Collection) { @@ -149,6 +156,7 @@ public static LinkedBlockingDeque newLinkedBlockingDeque(Iterable LinkedBlockingQueue newLinkedBlockingQueue() { return new LinkedBlockingQueue(); @@ -159,6 +167,7 @@ public static LinkedBlockingQueue newLinkedBlockingQueue() { * * @throws IllegalArgumentException if {@code capacity} is less than 1 */ + @J2ktIncompatible @GwtIncompatible // LinkedBlockingQueue public static LinkedBlockingQueue newLinkedBlockingQueue(int capacity) { return new LinkedBlockingQueue(capacity); @@ -172,6 +181,7 @@ public static LinkedBlockingQueue newLinkedBlockingQueue(int capacity) { * @param elements the elements that the queue should contain, in order * @return a new {@code LinkedBlockingQueue} containing those elements */ + @J2ktIncompatible @GwtIncompatible // LinkedBlockingQueue public static LinkedBlockingQueue newLinkedBlockingQueue(Iterable elements) { if (elements instanceof Collection) { @@ -193,6 +203,7 @@ public static LinkedBlockingQueue newLinkedBlockingQueue(Iterable PriorityBlockingQueue newPriorityBlockingQueue() { return new PriorityBlockingQueue(); @@ -207,6 +218,7 @@ public static PriorityBlockingQueue newPriorityBlockin * @since 11.0 (but the bound of {@code E} was changed from {@code Object} to {@code Comparable} * in 15.0) */ + @J2ktIncompatible @GwtIncompatible // PriorityBlockingQueue public static PriorityBlockingQueue newPriorityBlockingQueue( Iterable elements) { @@ -253,6 +265,7 @@ public static PriorityQueue newPriorityQueue( // SynchronousQueue /** Creates an empty {@code SynchronousQueue} with nonfair access policy. */ + @J2ktIncompatible @GwtIncompatible // SynchronousQueue public static SynchronousQueue newSynchronousQueue() { return new SynchronousQueue(); @@ -272,6 +285,7 @@ public static SynchronousQueue newSynchronousQueue() { */ @Beta @CanIgnoreReturnValue + @J2ktIncompatible @GwtIncompatible // BlockingQueue public static int drain( BlockingQueue q, Collection buffer, int numElements, java.time.Duration timeout) @@ -294,6 +308,7 @@ public static int drain( */ @Beta @CanIgnoreReturnValue + @J2ktIncompatible @GwtIncompatible // BlockingQueue @SuppressWarnings("GoodTime") // should accept a java.time.Duration public static int drain( @@ -342,6 +357,7 @@ public static int drain( */ @Beta @CanIgnoreReturnValue + @J2ktIncompatible @GwtIncompatible // BlockingQueue public static int drainUninterruptibly( BlockingQueue q, @@ -367,6 +383,7 @@ public static int drainUninterruptibly( */ @Beta @CanIgnoreReturnValue + @J2ktIncompatible @GwtIncompatible // BlockingQueue @SuppressWarnings("GoodTime") // should accept a java.time.Duration public static int drainUninterruptibly( diff --git a/guava/src/com/google/common/collect/Range.java b/guava/src/com/google/common/collect/Range.java index 21d4ea376a69..fa6607dd840b 100644 --- a/guava/src/com/google/common/collect/Range.java +++ b/guava/src/com/google/common/collect/Range.java @@ -106,6 +106,7 @@ * P if, for all ranges {@code b} also having property P, {@code a.encloses(b)}. * Likewise, {@code a} is minimal when {@code b.encloses(a)} for all {@code b} having * property P. See, for example, the definition of {@link #intersection intersection}. + *

  • A {@code Range} is serializable if it has no bounds, or if each bound is serializable. * * *

    Further reading

    @@ -335,7 +336,7 @@ public static > Range encloseAll(Iterable values) if (values instanceof SortedSet) { SortedSet set = (SortedSet) values; Comparator comparator = set.comparator(); - if (Ordering.natural().equals(comparator) || comparator == null) { + if (Ordering.natural().equals(comparator) || comparator == null) { return closed(set.first(), set.last()); } } @@ -344,8 +345,8 @@ public static > Range encloseAll(Iterable values) C max = min; while (valueIterator.hasNext()) { C value = checkNotNull(valueIterator.next()); - min = Ordering.natural().min(min, value); - max = Ordering.natural().max(max, value); + min = Ordering.natural().min(min, value); + max = Ordering.natural().max(max, value); } return closed(min, max); } diff --git a/guava/src/com/google/common/collect/RangeMap.java b/guava/src/com/google/common/collect/RangeMap.java index 7dd353986576..7185ee6d1ba1 100644 --- a/guava/src/com/google/common/collect/RangeMap.java +++ b/guava/src/com/google/common/collect/RangeMap.java @@ -16,7 +16,6 @@ package com.google.common.collect; -import com.google.common.annotations.Beta; import com.google.common.annotations.GwtIncompatible; import com.google.errorprone.annotations.DoNotMock; import java.util.Collection; @@ -37,7 +36,6 @@ * @author Louis Wasserman * @since 14.0 */ -@Beta @DoNotMock("Use ImmutableRangeMap or TreeRangeMap") @GwtIncompatible @ElementTypesAreNonnullByDefault diff --git a/guava/src/com/google/common/collect/RangeSet.java b/guava/src/com/google/common/collect/RangeSet.java index 79fbab159fa5..9138c5d98ba9 100644 --- a/guava/src/com/google/common/collect/RangeSet.java +++ b/guava/src/com/google/common/collect/RangeSet.java @@ -14,7 +14,6 @@ package com.google.common.collect; -import com.google.common.annotations.Beta; import com.google.common.annotations.GwtIncompatible; import com.google.errorprone.annotations.DoNotMock; import java.util.NoSuchElementException; @@ -49,7 +48,6 @@ * @author Louis Wasserman * @since 14.0 */ -@Beta @DoNotMock("Use ImmutableRangeSet or TreeRangeSet") @GwtIncompatible @ElementTypesAreNonnullByDefault diff --git a/guava/src/com/google/common/collect/RegularContiguousSet.java b/guava/src/com/google/common/collect/RegularContiguousSet.java index 5eb9340927bc..9c2e5a26f1d3 100644 --- a/guava/src/com/google/common/collect/RegularContiguousSet.java +++ b/guava/src/com/google/common/collect/RegularContiguousSet.java @@ -22,6 +22,7 @@ import com.google.common.annotations.GwtCompatible; import com.google.common.annotations.GwtIncompatible; +import com.google.common.annotations.J2ktIncompatible; import java.io.InvalidObjectException; import java.io.ObjectInputStream; import java.io.Serializable; @@ -183,8 +184,8 @@ public ContiguousSet intersection(ContiguousSet other) { if (other.isEmpty()) { return other; } else { - C lowerEndpoint = Ordering.natural().max(this.first(), other.first()); - C upperEndpoint = Ordering.natural().min(this.last(), other.last()); + C lowerEndpoint = Ordering.natural().max(this.first(), other.first()); + C upperEndpoint = Ordering.natural().min(this.last(), other.last()); return (lowerEndpoint.compareTo(upperEndpoint) <= 0) ? ContiguousSet.create(Range.closed(lowerEndpoint, upperEndpoint), domain) : new EmptyContiguousSet(domain); @@ -223,6 +224,7 @@ public int hashCode() { } @GwtIncompatible // serialization + @J2ktIncompatible private static final class SerializedForm implements Serializable { final Range range; final DiscreteDomain domain; @@ -238,12 +240,14 @@ private Object readResolve() { } @GwtIncompatible // serialization + @J2ktIncompatible @Override Object writeReplace() { return new SerializedForm<>(range, domain); } @GwtIncompatible // serialization + @J2ktIncompatible private void readObject(ObjectInputStream stream) throws InvalidObjectException { throw new InvalidObjectException("Use SerializedForm"); } diff --git a/guava/src/com/google/common/collect/RegularImmutableBiMap.java b/guava/src/com/google/common/collect/RegularImmutableBiMap.java index 4ca50abec840..333b801777af 100644 --- a/guava/src/com/google/common/collect/RegularImmutableBiMap.java +++ b/guava/src/com/google/common/collect/RegularImmutableBiMap.java @@ -25,6 +25,7 @@ import static java.util.Objects.requireNonNull; import com.google.common.annotations.GwtCompatible; +import com.google.common.annotations.J2ktIncompatible; import com.google.common.annotations.VisibleForTesting; import com.google.common.collect.ImmutableMapEntry.NonTerminalImmutableBiMapEntry; import com.google.common.collect.RegularImmutableMap.BucketOverflowException; @@ -294,15 +295,18 @@ boolean isPartialView() { } @Override + @J2ktIncompatible // serialization Object writeReplace() { return new InverseSerializedForm<>(RegularImmutableBiMap.this); } + @J2ktIncompatible // java.io.ObjectInputStream private void readObject(ObjectInputStream stream) throws InvalidObjectException { throw new InvalidObjectException("Use InverseSerializedForm"); } } + @J2ktIncompatible // serialization private static class InverseSerializedForm implements Serializable { private final ImmutableBiMap forward; diff --git a/guava/src/com/google/common/collect/RegularImmutableMap.java b/guava/src/com/google/common/collect/RegularImmutableMap.java index f0f2031b9483..42649109a826 100644 --- a/guava/src/com/google/common/collect/RegularImmutableMap.java +++ b/guava/src/com/google/common/collect/RegularImmutableMap.java @@ -24,6 +24,7 @@ import com.google.common.annotations.GwtCompatible; import com.google.common.annotations.GwtIncompatible; +import com.google.common.annotations.J2ktIncompatible; import com.google.common.annotations.VisibleForTesting; import com.google.common.collect.ImmutableMapEntry.NonTerminalImmutableMapEntry; import com.google.errorprone.annotations.CanIgnoreReturnValue; @@ -149,7 +150,10 @@ private static ImmutableMap fromEntryArrayCheckingBucketOverflow( // Make sure we are not overwriting the original entries array, in case we later do // buildOrThrow(). We would want an exception to include two values for the duplicate key. if (entries == entryArray) { - entries = entries.clone(); + // Temporary variable is necessary to defeat bad smartcast (entries adopting the type of + // entryArray) in the Kotlin translation. + Entry[] originalEntries = entries; + entries = originalEntries.clone(); } } entries[entryIndex] = effectiveEntry; @@ -228,7 +232,8 @@ private RegularImmutableMap( * flooding attack */ @CanIgnoreReturnValue - static @Nullable ImmutableMapEntry checkNoConflictInKeyBucket( + @CheckForNull + static ImmutableMapEntry checkNoConflictInKeyBucket( Object key, Object newValue, @CheckForNull ImmutableMapEntry keyBucketHead, @@ -343,6 +348,7 @@ public int size() { // No longer used for new writes, but kept so that old data can still be read. @GwtIncompatible // serialization + @J2ktIncompatible @SuppressWarnings("unused") private static class SerializedForm implements Serializable { final ImmutableMap map; @@ -355,6 +361,7 @@ Object readResolve() { return map.keySet(); } + @J2ktIncompatible // serialization private static final long serialVersionUID = 0; } } @@ -389,6 +396,7 @@ boolean isPartialView() { // No longer used for new writes, but kept so that old data can still be read. @GwtIncompatible // serialization + @J2ktIncompatible @SuppressWarnings("unused") private static class SerializedForm implements Serializable { final ImmutableMap map; @@ -401,11 +409,13 @@ Object readResolve() { return map.values(); } + @J2ktIncompatible // serialization private static final long serialVersionUID = 0; } } // This class is never actually serialized directly, but we have to make the // warning go away (and suppressing would suppress for all nested classes too) + @J2ktIncompatible // serialization private static final long serialVersionUID = 0; } diff --git a/guava/src/com/google/common/collect/Serialization.java b/guava/src/com/google/common/collect/Serialization.java index 4ab53f2d7808..e12e84cd2b2a 100644 --- a/guava/src/com/google/common/collect/Serialization.java +++ b/guava/src/com/google/common/collect/Serialization.java @@ -17,6 +17,7 @@ package com.google.common.collect; import com.google.common.annotations.GwtIncompatible; +import com.google.common.annotations.J2ktIncompatible; import java.io.IOException; import java.io.ObjectInputStream; import java.io.ObjectOutputStream; @@ -34,6 +35,7 @@ * @author Jared Levy */ @GwtIncompatible +@J2ktIncompatible @ElementTypesAreNonnullByDefault final class Serialization { private Serialization() {} diff --git a/guava/src/com/google/common/collect/Sets.java b/guava/src/com/google/common/collect/Sets.java index c8cdc38cae77..3e2d8cfbfbf0 100644 --- a/guava/src/com/google/common/collect/Sets.java +++ b/guava/src/com/google/common/collect/Sets.java @@ -23,6 +23,7 @@ import com.google.common.annotations.Beta; import com.google.common.annotations.GwtCompatible; import com.google.common.annotations.GwtIncompatible; +import com.google.common.annotations.J2ktIncompatible; import com.google.common.base.Predicate; import com.google.common.base.Predicates; import com.google.common.collect.Collections2.FilteredCollection; @@ -53,6 +54,7 @@ import java.util.stream.Collector; import java.util.stream.Stream; import javax.annotation.CheckForNull; +import org.checkerframework.checker.nullness.qual.NonNull; import org.checkerframework.checker.nullness.qual.Nullable; /** @@ -439,6 +441,7 @@ public static TreeSet newTreeSet(Iterable * @return a new, empty {@code CopyOnWriteArraySet} * @since 12.0 */ + @J2ktIncompatible @GwtIncompatible // CopyOnWriteArraySet public static CopyOnWriteArraySet newCopyOnWriteArraySet() { return new CopyOnWriteArraySet(); @@ -451,6 +454,7 @@ public static TreeSet newTreeSet(Iterable * @return a new {@code CopyOnWriteArraySet} containing those elements * @since 12.0 */ + @J2ktIncompatible @GwtIncompatible // CopyOnWriteArraySet public static CopyOnWriteArraySet newCopyOnWriteArraySet( Iterable elements) { @@ -476,6 +480,7 @@ public static TreeSet newTreeSet(Iterable * @throws IllegalArgumentException if {@code collection} is not an {@code EnumSet} instance and * contains no elements */ + @J2ktIncompatible public static > EnumSet complementOf(Collection collection) { if (collection instanceof EnumSet) { return EnumSet.complementOf((EnumSet) collection); @@ -567,8 +572,8 @@ private SetView() {} // no subclasses but our own * that is inconsistent with {@link Object#equals(Object)}. */ @SuppressWarnings("nullness") // Unsafe, but we can't fix it now. - public ImmutableSet immutableCopy() { - return ImmutableSet.copyOf(this); + public ImmutableSet<@NonNull E> immutableCopy() { + return ImmutableSet.copyOf((SetView<@NonNull E>) this); } /** @@ -770,9 +775,13 @@ public > S copyInto(S set) { } @Override - @SuppressWarnings("nullness") // see supertype - public ImmutableSet immutableCopy() { - return new ImmutableSet.Builder().addAll(set1).addAll(set2).build(); + @SuppressWarnings({"nullness", "unchecked"}) // see supertype + public ImmutableSet<@NonNull E> immutableCopy() { + ImmutableSet.Builder<@NonNull E> builder = + new ImmutableSet.Builder<@NonNull E>() + .addAll((Iterable<@NonNull E>) set1) + .addAll((Iterable<@NonNull E>) set2); + return (ImmutableSet<@NonNull E>) builder.build(); } }; } diff --git a/guava/src/com/google/common/collect/Synchronized.java b/guava/src/com/google/common/collect/Synchronized.java index 29fe61a89b8a..cad654ca6bd9 100644 --- a/guava/src/com/google/common/collect/Synchronized.java +++ b/guava/src/com/google/common/collect/Synchronized.java @@ -20,6 +20,7 @@ import com.google.common.annotations.GwtCompatible; import com.google.common.annotations.GwtIncompatible; +import com.google.common.annotations.J2ktIncompatible; import com.google.common.annotations.VisibleForTesting; import com.google.j2objc.annotations.RetainedWith; import java.io.IOException; @@ -104,6 +105,7 @@ public String toString() { // following writeObject() handles the SynchronizedObject members. @GwtIncompatible // java.io.ObjectOutputStream + @J2ktIncompatible private void writeObject(ObjectOutputStream stream) throws IOException { synchronized (mutex) { stream.defaultWriteObject(); @@ -111,6 +113,7 @@ private void writeObject(ObjectOutputStream stream) throws IOException { } @GwtIncompatible // not needed in emulated source + @J2ktIncompatible private static final long serialVersionUID = 0; } @@ -516,7 +519,7 @@ public int count(@CheckForNull Object o) { } @Override - public int add(E e, int n) { + public int add(@ParametricNullness E e, int n) { synchronized (mutex) { return delegate().add(e, n); } @@ -530,14 +533,14 @@ public int remove(@CheckForNull Object o, int n) { } @Override - public int setCount(E element, int count) { + public int setCount(@ParametricNullness E element, int count) { synchronized (mutex) { return delegate().setCount(element, count); } } @Override - public boolean setCount(E element, int oldCount, int newCount) { + public boolean setCount(@ParametricNullness E element, int oldCount, int newCount) { synchronized (mutex) { return delegate().setCount(element, oldCount, newCount); } @@ -645,21 +648,21 @@ public boolean containsEntry(@CheckForNull Object key, @CheckForNull Object valu } @Override - public Collection get(K key) { + public Collection get(@ParametricNullness K key) { synchronized (mutex) { return typePreservingCollection(delegate().get(key), mutex); } } @Override - public boolean put(K key, V value) { + public boolean put(@ParametricNullness K key, @ParametricNullness V value) { synchronized (mutex) { return delegate().put(key, value); } } @Override - public boolean putAll(K key, Iterable values) { + public boolean putAll(@ParametricNullness K key, Iterable values) { synchronized (mutex) { return delegate().putAll(key, values); } @@ -673,7 +676,7 @@ public boolean putAll(Multimap multimap) { } @Override - public Collection replaceValues(K key, Iterable values) { + public Collection replaceValues(@ParametricNullness K key, Iterable values) { synchronized (mutex) { return delegate().replaceValues(key, values); // copy not synchronized } @@ -986,16 +989,15 @@ public Collection getValue() { // See Collections.CheckedMap.CheckedEntrySet for details on attacks. @Override - public Object[] toArray() { + public @Nullable Object[] toArray() { synchronized (mutex) { /* * toArrayImpl returns `@Nullable Object[]` rather than `Object[]` but only because it can * be used with collections that may contain null. This collection never contains nulls, so - * we can treat it as a plain `Object[]`. + * we could return `Object[]`. But this class is private and J2KT cannot change return types + * in overrides, so we declare `@Nullable Object[]` as the return type. */ - @SuppressWarnings("nullness") - Object[] result = (Object[]) ObjectArrays.toArrayImpl(delegate()); - return result; + return ObjectArrays.toArrayImpl(delegate()); } } @@ -1376,7 +1378,7 @@ public Set values() { @Override @CheckForNull - public V forcePut(K key, V value) { + public V forcePut(@ParametricNullness K key, @ParametricNullness V value) { synchronized (mutex) { return delegate().forcePut(key, value); } @@ -2136,7 +2138,10 @@ public void clear() { @Override @CheckForNull - public V put(R rowKey, C columnKey, V value) { + public V put( + @ParametricNullness R rowKey, + @ParametricNullness C columnKey, + @ParametricNullness V value) { synchronized (mutex) { return delegate().put(rowKey, columnKey, value); } @@ -2158,14 +2163,14 @@ public V remove(@CheckForNull Object rowKey, @CheckForNull Object columnKey) { } @Override - public Map row(R rowKey) { + public Map row(@ParametricNullness R rowKey) { synchronized (mutex) { return map(delegate().row(rowKey), mutex); } } @Override - public Map column(C columnKey) { + public Map column(@ParametricNullness C columnKey) { synchronized (mutex) { return map(delegate().column(columnKey), mutex); } diff --git a/guava/src/com/google/common/collect/Tables.java b/guava/src/com/google/common/collect/Tables.java index 9c58611d41b5..134834ab53c3 100644 --- a/guava/src/com/google/common/collect/Tables.java +++ b/guava/src/com/google/common/collect/Tables.java @@ -317,7 +317,7 @@ public Collection values() { } // Will cast TRANSPOSE_CELL to a type that always succeeds - private static final Function, Cell> TRANSPOSE_CELL = + private static final Function TRANSPOSE_CELL = new Function, Cell>() { @Override public Cell apply(Cell cell) { @@ -328,13 +328,16 @@ public Collection values() { @SuppressWarnings("unchecked") @Override Iterator> cellIterator() { - return Iterators.transform(original.cellSet().iterator(), (Function) TRANSPOSE_CELL); + return Iterators.transform( + original.cellSet().iterator(), (Function, Cell>) TRANSPOSE_CELL); } @SuppressWarnings("unchecked") @Override Spliterator> cellSpliterator() { - return CollectSpliterators.map(original.cellSet().spliterator(), (Function) TRANSPOSE_CELL); + return CollectSpliterators.map( + original.cellSet().spliterator(), + (Function, Cell>) TRANSPOSE_CELL); } } diff --git a/guava/src/com/google/common/collect/TopKSelector.java b/guava/src/com/google/common/collect/TopKSelector.java index 20b17fdef10e..f819f84a3537 100644 --- a/guava/src/com/google/common/collect/TopKSelector.java +++ b/guava/src/com/google/common/collect/TopKSelector.java @@ -281,7 +281,9 @@ public List topK() { bufferSize = k; threshold = buffer[k - 1]; } + // Up to bufferSize, all elements of buffer are real Ts (not null unless T includes null) + T[] topK = Arrays.copyOf(castBuffer, bufferSize); // we have to support null elements, so no ImmutableList for us - return Collections.unmodifiableList(Arrays.asList(Arrays.copyOf(buffer, bufferSize))); + return Collections.unmodifiableList(Arrays.asList(topK)); } } diff --git a/guava/src/com/google/common/collect/TreeMultimap.java b/guava/src/com/google/common/collect/TreeMultimap.java index 99d31e7e0b13..e449caa30014 100644 --- a/guava/src/com/google/common/collect/TreeMultimap.java +++ b/guava/src/com/google/common/collect/TreeMultimap.java @@ -20,6 +20,7 @@ import com.google.common.annotations.GwtCompatible; import com.google.common.annotations.GwtIncompatible; +import com.google.common.annotations.J2ktIncompatible; import java.io.IOException; import java.io.ObjectInputStream; import java.io.ObjectOutputStream; @@ -201,6 +202,7 @@ public NavigableMap> asMap() { * distinct key: the key, number of values for that key, and key values */ @GwtIncompatible // java.io.ObjectOutputStream + @J2ktIncompatible private void writeObject(ObjectOutputStream stream) throws IOException { stream.defaultWriteObject(); stream.writeObject(keyComparator()); @@ -209,6 +211,7 @@ private void writeObject(ObjectOutputStream stream) throws IOException { } @GwtIncompatible // java.io.ObjectInputStream + @J2ktIncompatible @SuppressWarnings("unchecked") // reading data stored by writeObject private void readObject(ObjectInputStream stream) throws IOException, ClassNotFoundException { stream.defaultReadObject(); @@ -219,5 +222,6 @@ private void readObject(ObjectInputStream stream) throws IOException, ClassNotFo } @GwtIncompatible // not needed in emulated source + @J2ktIncompatible private static final long serialVersionUID = 0; } diff --git a/guava/src/com/google/common/collect/TreeMultiset.java b/guava/src/com/google/common/collect/TreeMultiset.java index 844bda9a2a5c..7efafd8ec6c0 100644 --- a/guava/src/com/google/common/collect/TreeMultiset.java +++ b/guava/src/com/google/common/collect/TreeMultiset.java @@ -25,6 +25,7 @@ import com.google.common.annotations.GwtCompatible; import com.google.common.annotations.GwtIncompatible; +import com.google.common.annotations.J2ktIncompatible; import com.google.common.base.MoreObjects; import com.google.common.primitives.Ints; import com.google.errorprone.annotations.CanIgnoreReturnValue; @@ -1073,6 +1074,7 @@ public String toString() { * @serialData the comparator, the number of distinct elements, the first element, its count, the * second element, its count, and so on */ + @J2ktIncompatible @GwtIncompatible // java.io.ObjectOutputStream private void writeObject(ObjectOutputStream stream) throws IOException { stream.defaultWriteObject(); @@ -1080,6 +1082,7 @@ private void writeObject(ObjectOutputStream stream) throws IOException { Serialization.writeMultiset(this, stream); } + @J2ktIncompatible @GwtIncompatible // java.io.ObjectInputStream private void readObject(ObjectInputStream stream) throws IOException, ClassNotFoundException { stream.defaultReadObject(); @@ -1098,5 +1101,6 @@ private void readObject(ObjectInputStream stream) throws IOException, ClassNotFo } @GwtIncompatible // not needed in emulated source + @J2ktIncompatible private static final long serialVersionUID = 1; } diff --git a/guava/src/com/google/common/collect/TreeRangeMap.java b/guava/src/com/google/common/collect/TreeRangeMap.java index a47ec2837175..747afb1842a1 100644 --- a/guava/src/com/google/common/collect/TreeRangeMap.java +++ b/guava/src/com/google/common/collect/TreeRangeMap.java @@ -23,7 +23,6 @@ import static com.google.common.base.Predicates.not; import static java.util.Objects.requireNonNull; -import com.google.common.annotations.Beta; import com.google.common.annotations.GwtIncompatible; import com.google.common.base.MoreObjects; import com.google.common.base.Predicate; @@ -51,7 +50,6 @@ * @author Louis Wasserman * @since 14.0 */ -@Beta @GwtIncompatible // NavigableMap @ElementTypesAreNonnullByDefault public final class TreeRangeMap implements RangeMap { diff --git a/guava/src/com/google/common/collect/TreeRangeSet.java b/guava/src/com/google/common/collect/TreeRangeSet.java index 7ba71139eb96..967981ff6d59 100644 --- a/guava/src/com/google/common/collect/TreeRangeSet.java +++ b/guava/src/com/google/common/collect/TreeRangeSet.java @@ -17,7 +17,6 @@ import static com.google.common.base.Preconditions.checkArgument; import static com.google.common.base.Preconditions.checkNotNull; -import com.google.common.annotations.Beta; import com.google.common.annotations.GwtIncompatible; import com.google.common.annotations.VisibleForTesting; import com.google.common.base.MoreObjects; @@ -38,7 +37,6 @@ * @author Louis Wasserman * @since 14.0 */ -@Beta @GwtIncompatible // uses NavigableMap @ElementTypesAreNonnullByDefault public class TreeRangeSet> extends AbstractRangeSet @@ -802,7 +800,7 @@ Iterator, Range>> entryIterator() { .iterator(); } Cut> upperBoundOnLowerBounds = - Ordering.natural() + Ordering.>>natural() .min(lowerBoundWindow.upperBound, Cut.belowValue(restriction.upperBound)); return new AbstractIterator, Range>>() { @Override @@ -828,7 +826,7 @@ Iterator, Range>> descendingEntryIterator() { return Iterators.emptyIterator(); } Cut> upperBoundOnLowerBounds = - Ordering.natural() + Ordering.>>natural() .min(lowerBoundWindow.upperBound, Cut.belowValue(restriction.upperBound)); Iterator> completeRangeItr = rangesByLowerBound diff --git a/guava/src/com/google/common/eventbus/EventBus.java b/guava/src/com/google/common/eventbus/EventBus.java index 4afc19775627..7ca671686962 100644 --- a/guava/src/com/google/common/eventbus/EventBus.java +++ b/guava/src/com/google/common/eventbus/EventBus.java @@ -27,6 +27,7 @@ /** * Dispatches events to listeners, and provides ways for listeners to register themselves. + * *

    Avoid EventBus

    * @@ -82,6 +83,8 @@ * to more verbose. * * + --> + * *

    EventBus Summary

    * *

    The EventBus allows publish-subscribe-style communication between components without requiring diff --git a/guava/src/com/google/common/graph/AbstractNetwork.java b/guava/src/com/google/common/graph/AbstractNetwork.java index 633ea0bfa773..6ad96cb06867 100644 --- a/guava/src/com/google/common/graph/AbstractNetwork.java +++ b/guava/src/com/google/common/graph/AbstractNetwork.java @@ -23,7 +23,6 @@ import static java.util.Collections.unmodifiableSet; import com.google.common.annotations.Beta; -import com.google.common.base.Function; import com.google.common.base.Predicate; import com.google.common.collect.ImmutableSet; import com.google.common.collect.Iterators; @@ -72,13 +71,7 @@ public Set> edges() { @Override public Iterator> iterator() { return Iterators.transform( - AbstractNetwork.this.edges().iterator(), - new Function>() { - @Override - public EndpointPair apply(E edge) { - return incidentNodes(edge); - } - }); + AbstractNetwork.this.edges().iterator(), edge -> incidentNodes(edge)); } @Override @@ -292,13 +285,6 @@ public String toString() { } private static Map> edgeIncidentNodesMap(final Network network) { - Function> edgeToIncidentNodesFn = - new Function>() { - @Override - public EndpointPair apply(E edge) { - return network.incidentNodes(edge); - } - }; - return Maps.asMap(network.edges(), edgeToIncidentNodesFn); + return Maps.asMap(network.edges(), network::incidentNodes); } } diff --git a/guava/src/com/google/common/graph/AbstractValueGraph.java b/guava/src/com/google/common/graph/AbstractValueGraph.java index 5b8e520c35e8..f7beaa6956f3 100644 --- a/guava/src/com/google/common/graph/AbstractValueGraph.java +++ b/guava/src/com/google/common/graph/AbstractValueGraph.java @@ -19,7 +19,6 @@ import static java.util.Objects.requireNonNull; import com.google.common.annotations.Beta; -import com.google.common.base.Function; import com.google.common.collect.Maps; import java.util.Map; import java.util.Optional; @@ -152,14 +151,10 @@ public String toString() { } private static Map, V> edgeValueMap(final ValueGraph graph) { - Function, V> edgeToValueFn = - new Function, V>() { - @Override - public V apply(EndpointPair edge) { + return Maps.asMap( + graph.edges(), + edge -> // requireNonNull is safe because the endpoint pair comes from the graph. - return requireNonNull(graph.edgeValueOrDefault(edge.nodeU(), edge.nodeV(), null)); - } - }; - return Maps.asMap(graph.edges(), edgeToValueFn); + requireNonNull(graph.edgeValueOrDefault(edge.nodeU(), edge.nodeV(), null))); } } diff --git a/guava/src/com/google/common/graph/Graphs.java b/guava/src/com/google/common/graph/Graphs.java index 6ab9f5661557..059bc889a3c5 100644 --- a/guava/src/com/google/common/graph/Graphs.java +++ b/guava/src/com/google/common/graph/Graphs.java @@ -21,7 +21,6 @@ import static java.util.Objects.requireNonNull; import com.google.common.annotations.Beta; -import com.google.common.base.Function; import com.google.common.base.Objects; import com.google.common.collect.ImmutableSet; import com.google.common.collect.Iterables; @@ -289,12 +288,7 @@ public Set> incidentEdges(N node) { public Iterator> iterator() { return Iterators.transform( delegate().incidentEdges(node).iterator(), - new Function, EndpointPair>() { - @Override - public EndpointPair apply(EndpointPair edge) { - return EndpointPair.of(delegate(), edge.nodeV(), edge.nodeU()); - } - }); + edge -> EndpointPair.of(delegate(), edge.nodeV(), edge.nodeU())); } }; } diff --git a/guava/src/com/google/common/hash/Hashing.java b/guava/src/com/google/common/hash/Hashing.java index f740b25d923f..c348e6c29fa0 100644 --- a/guava/src/com/google/common/hash/Hashing.java +++ b/guava/src/com/google/common/hash/Hashing.java @@ -57,7 +57,8 @@ public final class Hashing { *

    Repeated calls to this method on the same loaded {@code Hashing} class, using the same value * for {@code minimumBits}, will return identically-behaving {@link HashFunction} instances. * - * @param minimumBits a positive integer (can be arbitrarily large) + * @param minimumBits a positive integer. This can be arbitrarily large. The returned {@link + * HashFunction} instance may use memory proportional to this integer. * @return a hash function, described above, that produces hash codes of length {@code * minimumBits} or greater */ @@ -393,7 +394,19 @@ private static String hmacToString(String methodName, Key key) { * @since 18.0 */ public static HashFunction crc32c() { - return Crc32cHashFunction.CRC_32_C; + return Crc32CSupplier.HASH_FUNCTION; + } + + @Immutable + private enum Crc32CSupplier implements ImmutableSupplier { + ABSTRACT_HASH_FUNCTION { + @Override + public HashFunction get() { + return Crc32cHashFunction.CRC_32_C; + } + }; + + static final HashFunction HASH_FUNCTION = values()[0].get(); } /** diff --git a/guava/src/com/google/common/io/AppendableWriter.java b/guava/src/com/google/common/io/AppendableWriter.java index d9aab342f29e..8566569a96d1 100644 --- a/guava/src/com/google/common/io/AppendableWriter.java +++ b/guava/src/com/google/common/io/AppendableWriter.java @@ -17,6 +17,7 @@ import static com.google.common.base.Preconditions.checkNotNull; import com.google.common.annotations.GwtIncompatible; +import com.google.common.annotations.J2ktIncompatible; import java.io.Closeable; import java.io.Flushable; import java.io.IOException; @@ -31,6 +32,7 @@ * @author Sebastian Kanthak * @since 1.0 */ +@J2ktIncompatible @GwtIncompatible @ElementTypesAreNonnullByDefault class AppendableWriter extends Writer { diff --git a/guava/src/com/google/common/io/BaseEncoding.java b/guava/src/com/google/common/io/BaseEncoding.java index c228979f5f9e..ebb26ee9c252 100644 --- a/guava/src/com/google/common/io/BaseEncoding.java +++ b/guava/src/com/google/common/io/BaseEncoding.java @@ -26,6 +26,7 @@ import com.google.common.annotations.GwtCompatible; import com.google.common.annotations.GwtIncompatible; +import com.google.common.annotations.J2ktIncompatible; import com.google.common.base.Ascii; import com.google.errorprone.annotations.concurrent.LazyInit; import java.io.IOException; @@ -169,12 +170,14 @@ public final String encode(byte[] bytes, int off, int len) { * {@code Writer}. When the returned {@code OutputStream} is closed, so is the backing {@code * Writer}. */ + @J2ktIncompatible @GwtIncompatible // Writer,OutputStream public abstract OutputStream encodingStream(Writer writer); /** * Returns a {@code ByteSink} that writes base-encoded bytes to the specified {@code CharSink}. */ + @J2ktIncompatible @GwtIncompatible // ByteSink,CharSink public final ByteSink encodingSink(CharSink encodedSink) { checkNotNull(encodedSink); @@ -239,6 +242,7 @@ final byte[] decodeChecked(CharSequence chars) * Returns an {@code InputStream} that decodes base-encoded input from the specified {@code * Reader}. The returned stream throws a {@link DecodingException} upon decoding-specific errors. */ + @J2ktIncompatible @GwtIncompatible // Reader,InputStream public abstract InputStream decodingStream(Reader reader); @@ -246,6 +250,7 @@ final byte[] decodeChecked(CharSequence chars) * Returns a {@code ByteSource} that reads base-encoded bytes from the specified {@code * CharSource}. */ + @J2ktIncompatible @GwtIncompatible // ByteSource,CharSource public final ByteSource decodingSource(CharSource encodedSource) { checkNotNull(encodedSource); @@ -631,6 +636,7 @@ int maxEncodedSize(int bytes) { return alphabet.charsPerChunk * divide(bytes, alphabet.bytesPerChunk, CEILING); } + @J2ktIncompatible @GwtIncompatible // Writer,OutputStream @Override public OutputStream encodingStream(Writer out) { @@ -772,6 +778,7 @@ int decodeTo(byte[] target, CharSequence chars) throws DecodingException { } @Override + @J2ktIncompatible @GwtIncompatible // Reader,InputStream public InputStream decodingStream(Reader reader) { checkNotNull(reader); @@ -1047,6 +1054,7 @@ BaseEncoding newInstance(Alphabet alphabet, @CheckForNull Character paddingChar) } } + @J2ktIncompatible @GwtIncompatible static Reader ignoringReader(Reader delegate, String toIgnore) { checkNotNull(delegate); @@ -1104,6 +1112,7 @@ public Appendable append(@CheckForNull CharSequence chars) { }; } + @J2ktIncompatible @GwtIncompatible // Writer static Writer separatingWriter(Writer delegate, String separator, int afterEveryChars) { Appendable separatingAppendable = separatingAppendable(delegate, separator, afterEveryChars); @@ -1155,6 +1164,7 @@ int maxEncodedSize(int bytes) { + separator.length() * divide(Math.max(0, unseparatedSize - 1), afterEveryChars, FLOOR); } + @J2ktIncompatible @GwtIncompatible // Writer,OutputStream @Override public OutputStream encodingStream(Writer output) { @@ -1196,6 +1206,7 @@ int decodeTo(byte[] target, CharSequence chars) throws DecodingException { } @Override + @J2ktIncompatible @GwtIncompatible // Reader,InputStream public InputStream decodingStream(Reader reader) { return delegate.decodingStream(ignoringReader(reader, separator)); diff --git a/guava/src/com/google/common/io/ByteArrayDataInput.java b/guava/src/com/google/common/io/ByteArrayDataInput.java index cf84fcc136b7..9fa295904d48 100644 --- a/guava/src/com/google/common/io/ByteArrayDataInput.java +++ b/guava/src/com/google/common/io/ByteArrayDataInput.java @@ -15,6 +15,7 @@ package com.google.common.io; import com.google.common.annotations.GwtIncompatible; +import com.google.common.annotations.J2ktIncompatible; import com.google.errorprone.annotations.CanIgnoreReturnValue; import java.io.DataInput; import java.io.IOException; @@ -32,6 +33,7 @@ * @author Kevin Bourrillion * @since 1.0 */ +@J2ktIncompatible @GwtIncompatible @ElementTypesAreNonnullByDefault public interface ByteArrayDataInput extends DataInput { diff --git a/guava/src/com/google/common/io/ByteArrayDataOutput.java b/guava/src/com/google/common/io/ByteArrayDataOutput.java index 373907361d8c..487783531601 100644 --- a/guava/src/com/google/common/io/ByteArrayDataOutput.java +++ b/guava/src/com/google/common/io/ByteArrayDataOutput.java @@ -15,6 +15,7 @@ package com.google.common.io; import com.google.common.annotations.GwtIncompatible; +import com.google.common.annotations.J2ktIncompatible; import java.io.DataOutput; import java.io.IOException; @@ -25,6 +26,7 @@ * @author Jayaprabhakar Kadarkarai * @since 1.0 */ +@J2ktIncompatible @GwtIncompatible @ElementTypesAreNonnullByDefault public interface ByteArrayDataOutput extends DataOutput { diff --git a/guava/src/com/google/common/io/ByteProcessor.java b/guava/src/com/google/common/io/ByteProcessor.java index 98ea3ffbb27d..5271c409579a 100644 --- a/guava/src/com/google/common/io/ByteProcessor.java +++ b/guava/src/com/google/common/io/ByteProcessor.java @@ -16,6 +16,7 @@ import com.google.common.annotations.Beta; import com.google.common.annotations.GwtIncompatible; +import com.google.common.annotations.J2ktIncompatible; import com.google.errorprone.annotations.CanIgnoreReturnValue; import com.google.errorprone.annotations.DoNotMock; import java.io.IOException; @@ -32,6 +33,7 @@ */ @Beta @DoNotMock("Implement it normally") +@J2ktIncompatible @GwtIncompatible @ElementTypesAreNonnullByDefault public interface ByteProcessor { diff --git a/guava/src/com/google/common/io/ByteSink.java b/guava/src/com/google/common/io/ByteSink.java index 7a6af6fc588b..230216919a24 100644 --- a/guava/src/com/google/common/io/ByteSink.java +++ b/guava/src/com/google/common/io/ByteSink.java @@ -17,6 +17,7 @@ import static com.google.common.base.Preconditions.checkNotNull; import com.google.common.annotations.GwtIncompatible; +import com.google.common.annotations.J2ktIncompatible; import com.google.errorprone.annotations.CanIgnoreReturnValue; import java.io.BufferedOutputStream; import java.io.IOException; @@ -45,6 +46,7 @@ * @since 14.0 * @author Colin Decker */ +@J2ktIncompatible @GwtIncompatible @ElementTypesAreNonnullByDefault public abstract class ByteSink { diff --git a/guava/src/com/google/common/io/ByteSource.java b/guava/src/com/google/common/io/ByteSource.java index bf99ee0ca8ae..cda48af84cd0 100644 --- a/guava/src/com/google/common/io/ByteSource.java +++ b/guava/src/com/google/common/io/ByteSource.java @@ -21,6 +21,7 @@ import com.google.common.annotations.Beta; import com.google.common.annotations.GwtIncompatible; +import com.google.common.annotations.J2ktIncompatible; import com.google.common.base.Ascii; import com.google.common.base.Optional; import com.google.common.collect.ImmutableList; @@ -73,6 +74,7 @@ * @since 14.0 * @author Colin Decker */ +@J2ktIncompatible @GwtIncompatible @ElementTypesAreNonnullByDefault public abstract class ByteSource { @@ -316,6 +318,7 @@ public byte[] read() throws IOException { */ @Beta @CanIgnoreReturnValue // some processors won't return a useful result + @ParametricNullness public T read(ByteProcessor processor) throws IOException { checkNotNull(processor); diff --git a/guava/src/com/google/common/io/ByteStreams.java b/guava/src/com/google/common/io/ByteStreams.java index 99213bf16bef..dcd0d48221f6 100644 --- a/guava/src/com/google/common/io/ByteStreams.java +++ b/guava/src/com/google/common/io/ByteStreams.java @@ -21,8 +21,8 @@ import static java.lang.Math.max; import static java.lang.Math.min; -import com.google.common.annotations.Beta; import com.google.common.annotations.GwtIncompatible; +import com.google.common.annotations.J2ktIncompatible; import com.google.common.math.IntMath; import com.google.errorprone.annotations.CanIgnoreReturnValue; import java.io.ByteArrayInputStream; @@ -53,6 +53,7 @@ * @author Colin Decker * @since 1.0 */ +@J2ktIncompatible @GwtIncompatible @ElementTypesAreNonnullByDefault public final class ByteStreams { @@ -283,7 +284,6 @@ static byte[] toByteArray(InputStream in, long expectedSize) throws IOException * @since 20.0 */ @CanIgnoreReturnValue - @Beta public static long exhaust(InputStream in) throws IOException { long total = 0; long read; @@ -298,7 +298,6 @@ public static long exhaust(InputStream in) throws IOException { * Returns a new {@link ByteArrayDataInput} instance to read from the {@code bytes} array from the * beginning. */ - @Beta public static ByteArrayDataInput newDataInput(byte[] bytes) { return newDataInput(new ByteArrayInputStream(bytes)); } @@ -310,7 +309,6 @@ public static ByteArrayDataInput newDataInput(byte[] bytes) { * @throws IndexOutOfBoundsException if {@code start} is negative or greater than the length of * the array */ - @Beta public static ByteArrayDataInput newDataInput(byte[] bytes, int start) { checkPositionIndex(start, bytes.length); return newDataInput(new ByteArrayInputStream(bytes, start, bytes.length - start)); @@ -323,7 +321,6 @@ public static ByteArrayDataInput newDataInput(byte[] bytes, int start) { * * @since 17.0 */ - @Beta public static ByteArrayDataInput newDataInput(ByteArrayInputStream byteArrayInputStream) { return new ByteArrayDataInputStream(checkNotNull(byteArrayInputStream)); } @@ -475,7 +472,6 @@ public String readUTF() { } /** Returns a new {@link ByteArrayDataOutput} instance with a default size. */ - @Beta public static ByteArrayDataOutput newDataOutput() { return newDataOutput(new ByteArrayOutputStream()); } @@ -486,7 +482,6 @@ public static ByteArrayDataOutput newDataOutput() { * * @throws IllegalArgumentException if {@code size} is negative */ - @Beta public static ByteArrayDataOutput newDataOutput(int size) { // When called at high frequency, boxing size generates too much garbage, // so avoid doing that if we can. @@ -508,7 +503,6 @@ public static ByteArrayDataOutput newDataOutput(int size) { * * @since 17.0 */ - @Beta public static ByteArrayDataOutput newDataOutput(ByteArrayOutputStream byteArrayOutputStream) { return new ByteArrayDataOutputStream(checkNotNull(byteArrayOutputStream)); } @@ -685,7 +679,6 @@ public String toString() { * * @since 14.0 (since 1.0 as com.google.common.io.NullOutputStream) */ - @Beta public static OutputStream nullOutputStream() { return NULL_OUTPUT_STREAM; } @@ -698,7 +691,6 @@ public static OutputStream nullOutputStream() { * @return a length-limited {@link InputStream} * @since 14.0 (since 1.0 as com.google.common.io.LimitInputStream) */ - @Beta public static InputStream limit(InputStream in, long limit) { return new LimitedInputStream(in, limit); } @@ -785,7 +777,6 @@ public long skip(long n) throws IOException { * @throws EOFException if this stream reaches the end before reading all the bytes. * @throws IOException if an I/O error occurs. */ - @Beta public static void readFully(InputStream in, byte[] b) throws IOException { readFully(in, b, 0, b.length); } @@ -802,7 +793,6 @@ public static void readFully(InputStream in, byte[] b) throws IOException { * @throws EOFException if this stream reaches the end before reading all the bytes. * @throws IOException if an I/O error occurs. */ - @Beta public static void readFully(InputStream in, byte[] b, int off, int len) throws IOException { int read = read(in, b, off, len); if (read != len) { @@ -820,7 +810,6 @@ public static void readFully(InputStream in, byte[] b, int off, int len) throws * @throws EOFException if this stream reaches the end before skipping all the bytes * @throws IOException if an I/O error occurs, or the stream does not support skipping */ - @Beta public static void skipFully(InputStream in, long n) throws IOException { long skipped = skipUpTo(in, n); if (skipped < n) { @@ -886,7 +875,6 @@ private static long skipSafely(InputStream in, long n) throws IOException { * @throws IOException if an I/O error occurs * @since 14.0 */ - @Beta @CanIgnoreReturnValue // some processors won't return a useful result @ParametricNullness public static T readBytes( @@ -926,7 +914,6 @@ private static long skipSafely(InputStream in, long n) throws IOException { * @throws IndexOutOfBoundsException if {@code off} is negative, if {@code len} is negative, or if * {@code off + len} is greater than {@code b.length} */ - @Beta @CanIgnoreReturnValue // Sometimes you don't care how many bytes you actually read, I guess. // (You know that it's either going to read len bytes or stop at EOF.) diff --git a/guava/src/com/google/common/io/CharSequenceReader.java b/guava/src/com/google/common/io/CharSequenceReader.java index 790e26623625..152743fecafa 100644 --- a/guava/src/com/google/common/io/CharSequenceReader.java +++ b/guava/src/com/google/common/io/CharSequenceReader.java @@ -20,6 +20,7 @@ import static java.util.Objects.requireNonNull; import com.google.common.annotations.GwtIncompatible; +import com.google.common.annotations.J2ktIncompatible; import java.io.IOException; import java.io.Reader; import java.nio.CharBuffer; @@ -32,6 +33,7 @@ * @author Colin Decker */ // TODO(cgdecker): make this public? as a type, or a method in CharStreams? +@J2ktIncompatible @GwtIncompatible @ElementTypesAreNonnullByDefault final class CharSequenceReader extends Reader { diff --git a/guava/src/com/google/common/io/CharSink.java b/guava/src/com/google/common/io/CharSink.java index f804daeb7a38..f3f443369cbb 100644 --- a/guava/src/com/google/common/io/CharSink.java +++ b/guava/src/com/google/common/io/CharSink.java @@ -18,6 +18,7 @@ import com.google.common.annotations.Beta; import com.google.common.annotations.GwtIncompatible; +import com.google.common.annotations.J2ktIncompatible; import com.google.errorprone.annotations.CanIgnoreReturnValue; import java.io.BufferedWriter; import java.io.IOException; @@ -50,6 +51,7 @@ * @since 14.0 * @author Colin Decker */ +@J2ktIncompatible @GwtIncompatible @ElementTypesAreNonnullByDefault public abstract class CharSink { diff --git a/guava/src/com/google/common/io/CharSource.java b/guava/src/com/google/common/io/CharSource.java index 24a67af5c6e7..75492f5b90f0 100644 --- a/guava/src/com/google/common/io/CharSource.java +++ b/guava/src/com/google/common/io/CharSource.java @@ -18,6 +18,7 @@ import com.google.common.annotations.Beta; import com.google.common.annotations.GwtIncompatible; +import com.google.common.annotations.J2ktIncompatible; import com.google.common.base.Ascii; import com.google.common.base.Optional; import com.google.common.base.Splitter; @@ -81,6 +82,7 @@ * @since 14.0 * @author Colin Decker */ +@J2ktIncompatible @GwtIncompatible @ElementTypesAreNonnullByDefault public abstract class CharSource { diff --git a/guava/src/com/google/common/io/CharStreams.java b/guava/src/com/google/common/io/CharStreams.java index d36f9a3c5cd6..0f7dae83ecac 100644 --- a/guava/src/com/google/common/io/CharStreams.java +++ b/guava/src/com/google/common/io/CharStreams.java @@ -19,6 +19,7 @@ import com.google.common.annotations.Beta; import com.google.common.annotations.GwtIncompatible; +import com.google.common.annotations.J2ktIncompatible; import com.google.errorprone.annotations.CanIgnoreReturnValue; import java.io.Closeable; import java.io.EOFException; @@ -43,6 +44,7 @@ * @author Colin Decker * @since 1.0 */ +@J2ktIncompatible @GwtIncompatible @ElementTypesAreNonnullByDefault public final class CharStreams { diff --git a/guava/src/com/google/common/io/Closeables.java b/guava/src/com/google/common/io/Closeables.java index b45f5f0fde65..1da5f279a452 100644 --- a/guava/src/com/google/common/io/Closeables.java +++ b/guava/src/com/google/common/io/Closeables.java @@ -16,6 +16,7 @@ import com.google.common.annotations.Beta; import com.google.common.annotations.GwtIncompatible; +import com.google.common.annotations.J2ktIncompatible; import com.google.common.annotations.VisibleForTesting; import java.io.Closeable; import java.io.IOException; @@ -32,6 +33,7 @@ * @since 1.0 */ @Beta +@J2ktIncompatible @GwtIncompatible @ElementTypesAreNonnullByDefault public final class Closeables { diff --git a/guava/src/com/google/common/io/Closer.java b/guava/src/com/google/common/io/Closer.java index 12998eff95bb..a74e084ee79e 100644 --- a/guava/src/com/google/common/io/Closer.java +++ b/guava/src/com/google/common/io/Closer.java @@ -18,6 +18,7 @@ import com.google.common.annotations.Beta; import com.google.common.annotations.GwtIncompatible; +import com.google.common.annotations.J2ktIncompatible; import com.google.common.annotations.VisibleForTesting; import com.google.common.base.Throwables; import com.google.errorprone.annotations.CanIgnoreReturnValue; @@ -88,6 +89,7 @@ */ // Coffee's for {@link Closer closers} only. @Beta +@J2ktIncompatible @GwtIncompatible @ElementTypesAreNonnullByDefault public final class Closer implements Closeable { diff --git a/guava/src/com/google/common/io/CountingInputStream.java b/guava/src/com/google/common/io/CountingInputStream.java index a37807ae7341..1624cf537b66 100644 --- a/guava/src/com/google/common/io/CountingInputStream.java +++ b/guava/src/com/google/common/io/CountingInputStream.java @@ -18,6 +18,7 @@ import com.google.common.annotations.Beta; import com.google.common.annotations.GwtIncompatible; +import com.google.common.annotations.J2ktIncompatible; import java.io.FilterInputStream; import java.io.IOException; import java.io.InputStream; @@ -29,6 +30,7 @@ * @since 1.0 */ @Beta +@J2ktIncompatible @GwtIncompatible @ElementTypesAreNonnullByDefault public final class CountingInputStream extends FilterInputStream { diff --git a/guava/src/com/google/common/io/CountingOutputStream.java b/guava/src/com/google/common/io/CountingOutputStream.java index cf62b9c377a4..1cbfe081fdfb 100644 --- a/guava/src/com/google/common/io/CountingOutputStream.java +++ b/guava/src/com/google/common/io/CountingOutputStream.java @@ -17,6 +17,7 @@ import static com.google.common.base.Preconditions.checkNotNull; import com.google.common.annotations.GwtIncompatible; +import com.google.common.annotations.J2ktIncompatible; import java.io.FilterOutputStream; import java.io.IOException; import java.io.OutputStream; @@ -27,6 +28,7 @@ * @author Chris Nokleberg * @since 1.0 */ +@J2ktIncompatible @GwtIncompatible @ElementTypesAreNonnullByDefault public final class CountingOutputStream extends FilterOutputStream { diff --git a/guava/src/com/google/common/io/FileBackedOutputStream.java b/guava/src/com/google/common/io/FileBackedOutputStream.java index 9912e2fcd19c..dc89ba772835 100644 --- a/guava/src/com/google/common/io/FileBackedOutputStream.java +++ b/guava/src/com/google/common/io/FileBackedOutputStream.java @@ -18,6 +18,7 @@ import com.google.common.annotations.Beta; import com.google.common.annotations.GwtIncompatible; +import com.google.common.annotations.J2ktIncompatible; import com.google.common.annotations.VisibleForTesting; import com.google.errorprone.annotations.concurrent.GuardedBy; import java.io.ByteArrayInputStream; @@ -51,6 +52,7 @@ * @since 1.0 */ @Beta +@J2ktIncompatible @GwtIncompatible @ElementTypesAreNonnullByDefault public final class FileBackedOutputStream extends OutputStream { diff --git a/guava/src/com/google/common/io/FileWriteMode.java b/guava/src/com/google/common/io/FileWriteMode.java index 86872d1badb2..47cf251e76eb 100644 --- a/guava/src/com/google/common/io/FileWriteMode.java +++ b/guava/src/com/google/common/io/FileWriteMode.java @@ -15,6 +15,7 @@ package com.google.common.io; import com.google.common.annotations.GwtIncompatible; +import com.google.common.annotations.J2ktIncompatible; /** * Modes for opening a file for writing. The default when mode when none is specified is to truncate @@ -22,6 +23,7 @@ * * @author Colin Decker */ +@J2ktIncompatible @GwtIncompatible @ElementTypesAreNonnullByDefault public enum FileWriteMode { diff --git a/guava/src/com/google/common/io/Files.java b/guava/src/com/google/common/io/Files.java index ebe7024fc786..940dcbde2804 100644 --- a/guava/src/com/google/common/io/Files.java +++ b/guava/src/com/google/common/io/Files.java @@ -20,6 +20,7 @@ import com.google.common.annotations.Beta; import com.google.common.annotations.GwtIncompatible; +import com.google.common.annotations.J2ktIncompatible; import com.google.common.base.Joiner; import com.google.common.base.Optional; import com.google.common.base.Predicate; @@ -66,6 +67,7 @@ * @author Colin Decker * @since 1.0 */ +@J2ktIncompatible @GwtIncompatible @ElementTypesAreNonnullByDefault public final class Files { diff --git a/guava/src/com/google/common/io/Flushables.java b/guava/src/com/google/common/io/Flushables.java index 1f795a24ab24..7d4b06efc13e 100644 --- a/guava/src/com/google/common/io/Flushables.java +++ b/guava/src/com/google/common/io/Flushables.java @@ -16,6 +16,7 @@ import com.google.common.annotations.Beta; import com.google.common.annotations.GwtIncompatible; +import com.google.common.annotations.J2ktIncompatible; import java.io.Flushable; import java.io.IOException; import java.util.logging.Level; @@ -28,6 +29,7 @@ * @since 1.0 */ @Beta +@J2ktIncompatible @GwtIncompatible @ElementTypesAreNonnullByDefault public final class Flushables { diff --git a/guava/src/com/google/common/io/InsecureRecursiveDeleteException.java b/guava/src/com/google/common/io/InsecureRecursiveDeleteException.java index 414093606b51..080b0c39465d 100644 --- a/guava/src/com/google/common/io/InsecureRecursiveDeleteException.java +++ b/guava/src/com/google/common/io/InsecureRecursiveDeleteException.java @@ -18,6 +18,7 @@ import com.google.common.annotations.Beta; import com.google.common.annotations.GwtIncompatible; +import com.google.common.annotations.J2ktIncompatible; import com.google.j2objc.annotations.J2ObjCIncompatible; import java.nio.file.FileSystemException; import java.nio.file.SecureDirectoryStream; @@ -36,6 +37,7 @@ * @author Colin Decker */ @Beta +@J2ktIncompatible @GwtIncompatible @J2ObjCIncompatible // java.nio.file @ElementTypesAreNonnullByDefault diff --git a/guava/src/com/google/common/io/Java8Compatibility.java b/guava/src/com/google/common/io/Java8Compatibility.java index 705d97b4dfa5..bd3e6e055339 100644 --- a/guava/src/com/google/common/io/Java8Compatibility.java +++ b/guava/src/com/google/common/io/Java8Compatibility.java @@ -15,12 +15,14 @@ package com.google.common.io; import com.google.common.annotations.GwtIncompatible; +import com.google.common.annotations.J2ktIncompatible; import java.nio.Buffer; /** * Wrappers around {@link Buffer} methods that are covariantly overridden in Java 9+. See * https://github.com/google/guava/issues/3990 */ +@J2ktIncompatible @GwtIncompatible @ElementTypesAreNonnullByDefault final class Java8Compatibility { diff --git a/guava/src/com/google/common/io/LineBuffer.java b/guava/src/com/google/common/io/LineBuffer.java index f944abc49099..201dfd61617d 100644 --- a/guava/src/com/google/common/io/LineBuffer.java +++ b/guava/src/com/google/common/io/LineBuffer.java @@ -15,6 +15,7 @@ package com.google.common.io; import com.google.common.annotations.GwtIncompatible; +import com.google.common.annotations.J2ktIncompatible; import com.google.errorprone.annotations.CanIgnoreReturnValue; import java.io.IOException; @@ -29,6 +30,7 @@ * @author Chris Nokleberg * @since 1.0 */ +@J2ktIncompatible @GwtIncompatible @ElementTypesAreNonnullByDefault abstract class LineBuffer { diff --git a/guava/src/com/google/common/io/LineProcessor.java b/guava/src/com/google/common/io/LineProcessor.java index e28bebcc5f2b..5886c8d7737c 100644 --- a/guava/src/com/google/common/io/LineProcessor.java +++ b/guava/src/com/google/common/io/LineProcessor.java @@ -16,6 +16,7 @@ import com.google.common.annotations.Beta; import com.google.common.annotations.GwtIncompatible; +import com.google.common.annotations.J2ktIncompatible; import com.google.errorprone.annotations.CanIgnoreReturnValue; import java.io.IOException; import org.checkerframework.checker.nullness.qual.Nullable; @@ -30,6 +31,7 @@ * @since 1.0 */ @Beta +@J2ktIncompatible @GwtIncompatible @ElementTypesAreNonnullByDefault public interface LineProcessor { diff --git a/guava/src/com/google/common/io/LineReader.java b/guava/src/com/google/common/io/LineReader.java index 2c57ac4546b7..a42a02296127 100644 --- a/guava/src/com/google/common/io/LineReader.java +++ b/guava/src/com/google/common/io/LineReader.java @@ -19,6 +19,7 @@ import com.google.common.annotations.Beta; import com.google.common.annotations.GwtIncompatible; +import com.google.common.annotations.J2ktIncompatible; import com.google.errorprone.annotations.CanIgnoreReturnValue; import java.io.IOException; import java.io.Reader; @@ -36,6 +37,7 @@ * @since 1.0 */ @Beta +@J2ktIncompatible @GwtIncompatible @ElementTypesAreNonnullByDefault public final class LineReader { diff --git a/guava/src/com/google/common/io/LittleEndianDataInputStream.java b/guava/src/com/google/common/io/LittleEndianDataInputStream.java index 88c8e27bc3f9..76f674f84d83 100644 --- a/guava/src/com/google/common/io/LittleEndianDataInputStream.java +++ b/guava/src/com/google/common/io/LittleEndianDataInputStream.java @@ -16,6 +16,7 @@ import com.google.common.annotations.Beta; import com.google.common.annotations.GwtIncompatible; +import com.google.common.annotations.J2ktIncompatible; import com.google.common.base.Preconditions; import com.google.common.primitives.Ints; import com.google.common.primitives.Longs; @@ -40,6 +41,7 @@ * @since 8.0 */ @Beta +@J2ktIncompatible @GwtIncompatible @ElementTypesAreNonnullByDefault public final class LittleEndianDataInputStream extends FilterInputStream implements DataInput { diff --git a/guava/src/com/google/common/io/LittleEndianDataOutputStream.java b/guava/src/com/google/common/io/LittleEndianDataOutputStream.java index 6e51aff49d92..2adf6f76e79f 100644 --- a/guava/src/com/google/common/io/LittleEndianDataOutputStream.java +++ b/guava/src/com/google/common/io/LittleEndianDataOutputStream.java @@ -16,6 +16,7 @@ import com.google.common.annotations.Beta; import com.google.common.annotations.GwtIncompatible; +import com.google.common.annotations.J2ktIncompatible; import com.google.common.base.Preconditions; import com.google.common.primitives.Longs; import java.io.DataOutput; @@ -36,6 +37,7 @@ * @since 8.0 */ @Beta +@J2ktIncompatible @GwtIncompatible @ElementTypesAreNonnullByDefault public final class LittleEndianDataOutputStream extends FilterOutputStream implements DataOutput { diff --git a/guava/src/com/google/common/io/MoreFiles.java b/guava/src/com/google/common/io/MoreFiles.java index b4796c316446..c4dcf28313cf 100644 --- a/guava/src/com/google/common/io/MoreFiles.java +++ b/guava/src/com/google/common/io/MoreFiles.java @@ -23,10 +23,10 @@ import com.google.common.annotations.Beta; import com.google.common.annotations.GwtIncompatible; +import com.google.common.annotations.J2ktIncompatible; import com.google.common.base.Optional; import com.google.common.base.Predicate; import com.google.common.collect.ImmutableList; -import com.google.common.graph.SuccessorsFunction; import com.google.common.graph.Traverser; import com.google.j2objc.annotations.J2ObjCIncompatible; import java.io.IOException; @@ -68,6 +68,7 @@ * @author Colin Decker */ @Beta +@J2ktIncompatible @GwtIncompatible @J2ObjCIncompatible // java.nio.file @ElementTypesAreNonnullByDefault @@ -294,17 +295,9 @@ public static ImmutableList listFiles(Path dir) throws IOException { * @since 23.5 */ public static Traverser fileTraverser() { - return Traverser.forTree(FILE_TREE); + return Traverser.forTree(MoreFiles::fileTreeChildren); } - private static final SuccessorsFunction FILE_TREE = - new SuccessorsFunction() { - @Override - public Iterable successors(Path path) { - return fileTreeChildren(path); - } - }; - private static Iterable fileTreeChildren(Path dir) { if (Files.isDirectory(dir, NOFOLLOW_LINKS)) { try { diff --git a/guava/src/com/google/common/io/MultiInputStream.java b/guava/src/com/google/common/io/MultiInputStream.java index 9a7e0fd1c0e7..068baf679010 100644 --- a/guava/src/com/google/common/io/MultiInputStream.java +++ b/guava/src/com/google/common/io/MultiInputStream.java @@ -17,6 +17,7 @@ import static com.google.common.base.Preconditions.checkNotNull; import com.google.common.annotations.GwtIncompatible; +import com.google.common.annotations.J2ktIncompatible; import java.io.IOException; import java.io.InputStream; import java.util.Iterator; @@ -29,6 +30,7 @@ * @author Chris Nokleberg * @since 1.0 */ +@J2ktIncompatible @GwtIncompatible @ElementTypesAreNonnullByDefault final class MultiInputStream extends InputStream { diff --git a/guava/src/com/google/common/io/MultiReader.java b/guava/src/com/google/common/io/MultiReader.java index cc36e527b620..9e3a7eccbb9e 100644 --- a/guava/src/com/google/common/io/MultiReader.java +++ b/guava/src/com/google/common/io/MultiReader.java @@ -17,6 +17,7 @@ import static com.google.common.base.Preconditions.checkNotNull; import com.google.common.annotations.GwtIncompatible; +import com.google.common.annotations.J2ktIncompatible; import com.google.common.base.Preconditions; import java.io.IOException; import java.io.Reader; @@ -29,6 +30,7 @@ * @author Bin Zhu * @since 1.0 */ +@J2ktIncompatible @GwtIncompatible @ElementTypesAreNonnullByDefault class MultiReader extends Reader { diff --git a/guava/src/com/google/common/io/PatternFilenameFilter.java b/guava/src/com/google/common/io/PatternFilenameFilter.java index 3cb2371e2fd4..59e816842756 100644 --- a/guava/src/com/google/common/io/PatternFilenameFilter.java +++ b/guava/src/com/google/common/io/PatternFilenameFilter.java @@ -16,6 +16,7 @@ import com.google.common.annotations.Beta; import com.google.common.annotations.GwtIncompatible; +import com.google.common.annotations.J2ktIncompatible; import com.google.common.base.Preconditions; import java.io.File; import java.io.FilenameFilter; @@ -30,6 +31,7 @@ * @since 1.0 */ @Beta +@J2ktIncompatible @GwtIncompatible @ElementTypesAreNonnullByDefault public final class PatternFilenameFilter implements FilenameFilter { diff --git a/guava/src/com/google/common/io/ReaderInputStream.java b/guava/src/com/google/common/io/ReaderInputStream.java index b8222a7a518d..af84686ecfd7 100644 --- a/guava/src/com/google/common/io/ReaderInputStream.java +++ b/guava/src/com/google/common/io/ReaderInputStream.java @@ -19,6 +19,7 @@ import static com.google.common.base.Preconditions.checkPositionIndexes; import com.google.common.annotations.GwtIncompatible; +import com.google.common.annotations.J2ktIncompatible; import com.google.common.primitives.UnsignedBytes; import java.io.IOException; import java.io.InputStream; @@ -43,6 +44,7 @@ * * @author Chris Nokleberg */ +@J2ktIncompatible @GwtIncompatible @ElementTypesAreNonnullByDefault final class ReaderInputStream extends InputStream { diff --git a/guava/src/com/google/common/io/RecursiveDeleteOption.java b/guava/src/com/google/common/io/RecursiveDeleteOption.java index 1bb27a16b2df..7d55199f5f8f 100644 --- a/guava/src/com/google/common/io/RecursiveDeleteOption.java +++ b/guava/src/com/google/common/io/RecursiveDeleteOption.java @@ -18,6 +18,7 @@ import com.google.common.annotations.Beta; import com.google.common.annotations.GwtIncompatible; +import com.google.common.annotations.J2ktIncompatible; import com.google.j2objc.annotations.J2ObjCIncompatible; import java.nio.file.SecureDirectoryStream; @@ -29,6 +30,7 @@ * @author Colin Decker */ @Beta +@J2ktIncompatible @GwtIncompatible @J2ObjCIncompatible // java.nio.file @ElementTypesAreNonnullByDefault diff --git a/guava/src/com/google/common/io/Resources.java b/guava/src/com/google/common/io/Resources.java index d1e37070a91c..aedf3ade2f56 100644 --- a/guava/src/com/google/common/io/Resources.java +++ b/guava/src/com/google/common/io/Resources.java @@ -18,6 +18,7 @@ import static com.google.common.base.Preconditions.checkNotNull; import com.google.common.annotations.GwtIncompatible; +import com.google.common.annotations.J2ktIncompatible; import com.google.common.base.Charsets; import com.google.common.base.MoreObjects; import com.google.common.collect.Lists; @@ -40,6 +41,7 @@ * @author Colin Decker * @since 1.0 */ +@J2ktIncompatible @GwtIncompatible @ElementTypesAreNonnullByDefault public final class Resources { diff --git a/guava/src/com/google/common/math/BigDecimalMath.java b/guava/src/com/google/common/math/BigDecimalMath.java index 33a55d356312..d7094047999f 100644 --- a/guava/src/com/google/common/math/BigDecimalMath.java +++ b/guava/src/com/google/common/math/BigDecimalMath.java @@ -15,6 +15,7 @@ package com.google.common.math; import com.google.common.annotations.GwtIncompatible; +import com.google.common.annotations.J2ktIncompatible; import java.math.BigDecimal; import java.math.RoundingMode; @@ -24,6 +25,7 @@ * @author Louis Wasserman * @since 30.0 */ +@J2ktIncompatible @GwtIncompatible @ElementTypesAreNonnullByDefault public class BigDecimalMath { diff --git a/guava/src/com/google/common/math/BigIntegerMath.java b/guava/src/com/google/common/math/BigIntegerMath.java index 6ef1e81ed4d7..3ba5685ccde5 100644 --- a/guava/src/com/google/common/math/BigIntegerMath.java +++ b/guava/src/com/google/common/math/BigIntegerMath.java @@ -28,6 +28,7 @@ import com.google.common.annotations.Beta; import com.google.common.annotations.GwtCompatible; import com.google.common.annotations.GwtIncompatible; +import com.google.common.annotations.J2ktIncompatible; import com.google.common.annotations.VisibleForTesting; import java.math.BigDecimal; import java.math.BigInteger; @@ -146,6 +147,7 @@ public static int log2(BigInteger x, RoundingMode mode) { * @throws ArithmeticException if {@code mode} is {@link RoundingMode#UNNECESSARY} and {@code x} * is not a power of ten */ + @J2ktIncompatible @GwtIncompatible // TODO @SuppressWarnings("fallthrough") public static int log10(BigInteger x, RoundingMode mode) { @@ -224,6 +226,7 @@ public static int log10(BigInteger x, RoundingMode mode) { * @throws ArithmeticException if {@code mode} is {@link RoundingMode#UNNECESSARY} and {@code * sqrt(x)} is not an integer */ + @J2ktIncompatible @GwtIncompatible // TODO @SuppressWarnings("fallthrough") public static BigInteger sqrt(BigInteger x, RoundingMode mode) { @@ -260,6 +263,7 @@ public static BigInteger sqrt(BigInteger x, RoundingMode mode) { } } + @J2ktIncompatible @GwtIncompatible // TODO private static BigInteger sqrtFloor(BigInteger x) { /* @@ -304,6 +308,7 @@ private static BigInteger sqrtFloor(BigInteger x) { return sqrt0; } + @J2ktIncompatible @GwtIncompatible // TODO private static BigInteger sqrtApproxWithDoubles(BigInteger x) { return DoubleMath.roundToBigInteger(Math.sqrt(DoubleUtils.bigToDouble(x)), HALF_EVEN); @@ -330,11 +335,13 @@ private static BigInteger sqrtApproxWithDoubles(BigInteger x) { * is not precisely representable as a {@code double} * @since 30.0 */ + @J2ktIncompatible @GwtIncompatible public static double roundToDouble(BigInteger x, RoundingMode mode) { return BigIntegerToDoubleRounder.INSTANCE.roundToDouble(x, mode); } + @J2ktIncompatible @GwtIncompatible private static class BigIntegerToDoubleRounder extends ToDoubleRounder { static final BigIntegerToDoubleRounder INSTANCE = new BigIntegerToDoubleRounder(); @@ -369,6 +376,7 @@ BigInteger minus(BigInteger a, BigInteger b) { * @throws ArithmeticException if {@code q == 0}, or if {@code mode == UNNECESSARY} and {@code a} * is not an integer multiple of {@code b} */ + @J2ktIncompatible @GwtIncompatible // TODO public static BigInteger divide(BigInteger p, BigInteger q, RoundingMode mode) { BigDecimal pDec = new BigDecimal(p); @@ -521,6 +529,7 @@ public static BigInteger binomial(int n, int k) { } // Returns true if BigInteger.valueOf(x.longValue()).equals(x). + @J2ktIncompatible @GwtIncompatible // TODO static boolean fitsInLong(BigInteger x) { return x.bitLength() <= Long.SIZE - 1; diff --git a/guava/src/com/google/common/math/DoubleMath.java b/guava/src/com/google/common/math/DoubleMath.java index cdd0a4b39e3b..36de5378f345 100644 --- a/guava/src/com/google/common/math/DoubleMath.java +++ b/guava/src/com/google/common/math/DoubleMath.java @@ -32,6 +32,7 @@ import com.google.common.annotations.GwtCompatible; import com.google.common.annotations.GwtIncompatible; +import com.google.common.annotations.J2ktIncompatible; import com.google.common.annotations.VisibleForTesting; import com.google.common.primitives.Booleans; import com.google.errorprone.annotations.CanIgnoreReturnValue; @@ -52,6 +53,7 @@ public final class DoubleMath { * This method returns a value y such that rounding y DOWN (towards zero) gives the same result as * rounding x according to the specified mode. */ + @J2ktIncompatible @GwtIncompatible // #isMathematicalInteger, com.google.common.math.DoubleUtils static double roundIntermediate(double x, RoundingMode mode) { if (!isFinite(x)) { @@ -128,6 +130,7 @@ static double roundIntermediate(double x, RoundingMode mode) { * RoundingMode#UNNECESSARY} * */ + @J2ktIncompatible @GwtIncompatible // #roundIntermediate public static int roundToInt(double x, RoundingMode mode) { double z = roundIntermediate(x, mode); @@ -153,6 +156,7 @@ public static int roundToInt(double x, RoundingMode mode) { * RoundingMode#UNNECESSARY} * */ + @J2ktIncompatible @GwtIncompatible // #roundIntermediate public static long roundToLong(double x, RoundingMode mode) { double z = roundIntermediate(x, mode); @@ -180,6 +184,7 @@ public static long roundToLong(double x, RoundingMode mode) { * */ // #roundIntermediate, java.lang.Math.getExponent, com.google.common.math.DoubleUtils + @J2ktIncompatible @GwtIncompatible public static BigInteger roundToBigInteger(double x, RoundingMode mode) { x = roundIntermediate(x, mode); @@ -196,6 +201,7 @@ public static BigInteger roundToBigInteger(double x, RoundingMode mode) { * Returns {@code true} if {@code x} is exactly equal to {@code 2^k} for some finite integer * {@code k}. */ + @J2ktIncompatible @GwtIncompatible // com.google.common.math.DoubleUtils public static boolean isPowerOfTwo(double x) { if (x > 0.0 && isFinite(x)) { @@ -234,6 +240,7 @@ public static double log2(double x) { * @throws IllegalArgumentException if {@code x <= 0.0}, {@code x} is NaN, or {@code x} is * infinite */ + @J2ktIncompatible @GwtIncompatible // java.lang.Math.getExponent, com.google.common.math.DoubleUtils @SuppressWarnings("fallthrough") public static int log2(double x, RoundingMode mode) { @@ -404,6 +411,7 @@ public static int fuzzyCompare(double a, double b, double tolerance) { */ @Deprecated // com.google.common.math.DoubleUtils + @J2ktIncompatible @GwtIncompatible public static double mean(double... values) { checkArgument(values.length > 0, "Cannot take mean of 0 values"); @@ -484,6 +492,7 @@ public static double mean(long... values) { */ @Deprecated // com.google.common.math.DoubleUtils + @J2ktIncompatible @GwtIncompatible public static double mean(Iterable values) { return mean(values.iterator()); @@ -504,6 +513,7 @@ public static double mean(Iterable values) { */ @Deprecated // com.google.common.math.DoubleUtils + @J2ktIncompatible @GwtIncompatible public static double mean(Iterator values) { checkArgument(values.hasNext(), "Cannot take mean of 0 values"); @@ -518,6 +528,7 @@ public static double mean(Iterator values) { return mean; } + @J2ktIncompatible @GwtIncompatible // com.google.common.math.DoubleUtils @CanIgnoreReturnValue private static double checkFinite(double argument) { diff --git a/guava/src/com/google/common/math/IntMath.java b/guava/src/com/google/common/math/IntMath.java index 17a18c69999a..1ceaa7e00e65 100644 --- a/guava/src/com/google/common/math/IntMath.java +++ b/guava/src/com/google/common/math/IntMath.java @@ -28,6 +28,7 @@ import com.google.common.annotations.Beta; import com.google.common.annotations.GwtCompatible; import com.google.common.annotations.GwtIncompatible; +import com.google.common.annotations.J2ktIncompatible; import com.google.common.annotations.VisibleForTesting; import com.google.common.primitives.Ints; import java.math.BigInteger; @@ -155,6 +156,7 @@ public static int log2(int x, RoundingMode mode) { * @throws ArithmeticException if {@code mode} is {@link RoundingMode#UNNECESSARY} and {@code x} * is not a power of ten */ + @J2ktIncompatible @GwtIncompatible // need BigIntegerMath to adequately test @SuppressWarnings("fallthrough") public static int log10(int x, RoundingMode mode) { @@ -224,6 +226,7 @@ private static int log10Floor(int x) { * * @throws IllegalArgumentException if {@code k < 0} */ + @J2ktIncompatible @GwtIncompatible // failing tests public static int pow(int b, int k) { checkNonNegative("exponent", k); @@ -719,6 +722,7 @@ public static int mean(int x, int y) { * @throws IllegalArgumentException if {@code n} is negative * @since 20.0 */ + @J2ktIncompatible @GwtIncompatible // TODO @Beta public static boolean isPrime(int n) { diff --git a/guava/src/com/google/common/math/LinearTransformation.java b/guava/src/com/google/common/math/LinearTransformation.java index 4cc1eb87dbe9..1dee78e8b8f6 100644 --- a/guava/src/com/google/common/math/LinearTransformation.java +++ b/guava/src/com/google/common/math/LinearTransformation.java @@ -20,6 +20,7 @@ import com.google.common.annotations.Beta; import com.google.common.annotations.GwtIncompatible; +import com.google.common.annotations.J2ktIncompatible; import com.google.errorprone.annotations.concurrent.LazyInit; import javax.annotation.CheckForNull; @@ -35,6 +36,7 @@ * @since 20.0 */ @Beta +@J2ktIncompatible @GwtIncompatible @ElementTypesAreNonnullByDefault public abstract class LinearTransformation { diff --git a/guava/src/com/google/common/math/LongMath.java b/guava/src/com/google/common/math/LongMath.java index f4995133a924..620e2bd48ee6 100644 --- a/guava/src/com/google/common/math/LongMath.java +++ b/guava/src/com/google/common/math/LongMath.java @@ -28,6 +28,7 @@ import com.google.common.annotations.Beta; import com.google.common.annotations.GwtCompatible; import com.google.common.annotations.GwtIncompatible; +import com.google.common.annotations.J2ktIncompatible; import com.google.common.annotations.VisibleForTesting; import com.google.common.primitives.Longs; import com.google.common.primitives.UnsignedLongs; @@ -157,6 +158,7 @@ public static int log2(long x, RoundingMode mode) { * @throws ArithmeticException if {@code mode} is {@link RoundingMode#UNNECESSARY} and {@code x} * is not a power of ten */ + @J2ktIncompatible @GwtIncompatible // TODO @SuppressWarnings("fallthrough") // TODO(kevinb): remove after this warning is disabled globally @@ -183,6 +185,7 @@ public static int log10(long x, RoundingMode mode) { throw new AssertionError(); } + @J2ktIncompatible @GwtIncompatible // TODO static int log10Floor(long x) { /* @@ -208,6 +211,7 @@ static int log10Floor(long x) { 3, 2, 2, 2, 1, 1, 1, 0, 0, 0 }; + @J2ktIncompatible @GwtIncompatible // TODO @VisibleForTesting static final long[] powersOf10 = { @@ -233,6 +237,7 @@ static int log10Floor(long x) { }; // halfPowersOf10[i] = largest long less than 10^(i + 0.5) + @J2ktIncompatible @GwtIncompatible // TODO @VisibleForTesting static final long[] halfPowersOf10 = { @@ -264,6 +269,7 @@ static int log10Floor(long x) { * * @throws IllegalArgumentException if {@code k < 0} */ + @J2ktIncompatible @GwtIncompatible // TODO public static long pow(long b, int k) { checkNonNegative("exponent", k); @@ -307,6 +313,7 @@ public static long pow(long b, int k) { * @throws ArithmeticException if {@code mode} is {@link RoundingMode#UNNECESSARY} and {@code * sqrt(x)} is not an integer */ + @J2ktIncompatible @GwtIncompatible // TODO public static long sqrt(long x, RoundingMode mode) { checkNonNegative("x", x); @@ -377,6 +384,7 @@ public static long sqrt(long x, RoundingMode mode) { * @throws ArithmeticException if {@code q == 0}, or if {@code mode == UNNECESSARY} and {@code a} * is not an integer multiple of {@code b} */ + @J2ktIncompatible @GwtIncompatible // TODO @SuppressWarnings("fallthrough") public static long divide(long p, long q, RoundingMode mode) { @@ -450,6 +458,7 @@ public static long divide(long p, long q, RoundingMode mode) { * @see * Remainder Operator */ + @J2ktIncompatible @GwtIncompatible // TODO public static int mod(long x, int m) { // Cast is safe because the result is guaranteed in the range [0, m) @@ -474,6 +483,7 @@ public static int mod(long x, int m) { * @see * Remainder Operator */ + @J2ktIncompatible @GwtIncompatible // TODO public static long mod(long x, long m) { if (m <= 0) { @@ -551,6 +561,7 @@ public static long checkedAdd(long a, long b) { * * @throws ArithmeticException if {@code a - b} overflows in signed {@code long} arithmetic */ + @J2ktIncompatible @GwtIncompatible // TODO @SuppressWarnings("ShortCircuitBoolean") public static long checkedSubtract(long a, long b) { @@ -598,6 +609,7 @@ public static long checkedMultiply(long a, long b) { * @throws ArithmeticException if {@code b} to the {@code k}th power overflows in signed {@code * long} arithmetic */ + @J2ktIncompatible @GwtIncompatible // TODO @SuppressWarnings("ShortCircuitBoolean") public static long checkedPow(long b, int k) { @@ -774,6 +786,7 @@ public static long saturatedPow(long b, int k) { * * @throws IllegalArgumentException if {@code n < 0} */ + @J2ktIncompatible @GwtIncompatible // TODO public static long factorial(int n) { checkNonNegative("n", n); @@ -1002,6 +1015,7 @@ public static long mean(long x, long y) { * @throws IllegalArgumentException if {@code n} is negative * @since 20.0 */ + @J2ktIncompatible @GwtIncompatible // TODO @Beta public static boolean isPrime(long n) { @@ -1246,6 +1260,7 @@ private boolean testWitness(long base, long n) { * @since 30.0 */ @SuppressWarnings("deprecation") + @J2ktIncompatible @GwtIncompatible public static double roundToDouble(long x, RoundingMode mode) { // Logic adapted from ToDoubleRounder. diff --git a/guava/src/com/google/common/math/PairedStats.java b/guava/src/com/google/common/math/PairedStats.java index 31ab9b71966f..82b657f451ee 100644 --- a/guava/src/com/google/common/math/PairedStats.java +++ b/guava/src/com/google/common/math/PairedStats.java @@ -23,6 +23,7 @@ import com.google.common.annotations.Beta; import com.google.common.annotations.GwtIncompatible; +import com.google.common.annotations.J2ktIncompatible; import com.google.common.base.MoreObjects; import com.google.common.base.Objects; import java.io.Serializable; @@ -38,6 +39,7 @@ * @since 20.0 */ @Beta +@J2ktIncompatible @GwtIncompatible @ElementTypesAreNonnullByDefault public final class PairedStats implements Serializable { diff --git a/guava/src/com/google/common/math/PairedStatsAccumulator.java b/guava/src/com/google/common/math/PairedStatsAccumulator.java index 072ef13b3b17..f6aa10f3d4fe 100644 --- a/guava/src/com/google/common/math/PairedStatsAccumulator.java +++ b/guava/src/com/google/common/math/PairedStatsAccumulator.java @@ -21,6 +21,7 @@ import com.google.common.annotations.Beta; import com.google.common.annotations.GwtIncompatible; +import com.google.common.annotations.J2ktIncompatible; import com.google.common.primitives.Doubles; /** @@ -31,6 +32,7 @@ * @since 20.0 */ @Beta +@J2ktIncompatible @GwtIncompatible @ElementTypesAreNonnullByDefault public final class PairedStatsAccumulator { diff --git a/guava/src/com/google/common/math/Quantiles.java b/guava/src/com/google/common/math/Quantiles.java index 6ddea9bcfdc7..563ec2911752 100644 --- a/guava/src/com/google/common/math/Quantiles.java +++ b/guava/src/com/google/common/math/Quantiles.java @@ -23,6 +23,7 @@ import com.google.common.annotations.Beta; import com.google.common.annotations.GwtIncompatible; +import com.google.common.annotations.J2ktIncompatible; import com.google.common.primitives.Doubles; import com.google.common.primitives.Ints; import java.math.RoundingMode; @@ -127,6 +128,7 @@ * @since 20.0 */ @Beta +@J2ktIncompatible @GwtIncompatible @ElementTypesAreNonnullByDefault public final class Quantiles { diff --git a/guava/src/com/google/common/math/Stats.java b/guava/src/com/google/common/math/Stats.java index bb32f6f4fa15..36e067f657b3 100644 --- a/guava/src/com/google/common/math/Stats.java +++ b/guava/src/com/google/common/math/Stats.java @@ -26,6 +26,7 @@ import com.google.common.annotations.Beta; import com.google.common.annotations.GwtIncompatible; +import com.google.common.annotations.J2ktIncompatible; import com.google.common.base.MoreObjects; import com.google.common.base.Objects; import java.io.Serializable; @@ -63,6 +64,7 @@ * @since 20.0 */ @Beta +@J2ktIncompatible @GwtIncompatible @ElementTypesAreNonnullByDefault public final class Stats implements Serializable { diff --git a/guava/src/com/google/common/math/StatsAccumulator.java b/guava/src/com/google/common/math/StatsAccumulator.java index b28229c9625e..2c4b83ba67aa 100644 --- a/guava/src/com/google/common/math/StatsAccumulator.java +++ b/guava/src/com/google/common/math/StatsAccumulator.java @@ -22,6 +22,7 @@ import com.google.common.annotations.Beta; import com.google.common.annotations.GwtIncompatible; +import com.google.common.annotations.J2ktIncompatible; import java.util.Iterator; import java.util.stream.DoubleStream; import java.util.stream.IntStream; @@ -36,6 +37,7 @@ * @since 20.0 */ @Beta +@J2ktIncompatible @GwtIncompatible @ElementTypesAreNonnullByDefault public final class StatsAccumulator { diff --git a/guava/src/com/google/common/math/ToDoubleRounder.java b/guava/src/com/google/common/math/ToDoubleRounder.java index 2e7e7fae0944..5bfcd12caa80 100644 --- a/guava/src/com/google/common/math/ToDoubleRounder.java +++ b/guava/src/com/google/common/math/ToDoubleRounder.java @@ -18,12 +18,14 @@ import static com.google.common.math.MathPreconditions.checkRoundingUnnecessary; import com.google.common.annotations.GwtIncompatible; +import com.google.common.annotations.J2ktIncompatible; import java.math.RoundingMode; /** * Helper type to implement rounding {@code X} to a representable {@code double} value according to * a {@link RoundingMode}. */ +@J2ktIncompatible @GwtIncompatible @ElementTypesAreNonnullByDefault abstract class ToDoubleRounder> { diff --git a/guava/src/com/google/common/net/HostSpecifier.java b/guava/src/com/google/common/net/HostSpecifier.java index c57f3d97593c..65194112ebb8 100644 --- a/guava/src/com/google/common/net/HostSpecifier.java +++ b/guava/src/com/google/common/net/HostSpecifier.java @@ -15,6 +15,7 @@ package com.google.common.net; import com.google.common.annotations.GwtIncompatible; +import com.google.common.annotations.J2ktIncompatible; import com.google.common.base.Preconditions; import com.google.errorprone.annotations.CanIgnoreReturnValue; import java.net.InetAddress; @@ -41,6 +42,7 @@ * @author Craig Berry * @since 5.0 */ +@J2ktIncompatible @GwtIncompatible @ElementTypesAreNonnullByDefault public final class HostSpecifier { diff --git a/guava/src/com/google/common/net/InetAddresses.java b/guava/src/com/google/common/net/InetAddresses.java index 012d1c8ab59e..6d83093812d9 100644 --- a/guava/src/com/google/common/net/InetAddresses.java +++ b/guava/src/com/google/common/net/InetAddresses.java @@ -18,6 +18,7 @@ import static com.google.common.base.Preconditions.checkNotNull; import com.google.common.annotations.GwtIncompatible; +import com.google.common.annotations.J2ktIncompatible; import com.google.common.base.CharMatcher; import com.google.common.base.MoreObjects; import com.google.common.hash.Hashing; @@ -95,6 +96,7 @@ * @author Erik Kline * @since 5.0 */ +@J2ktIncompatible @GwtIncompatible @ElementTypesAreNonnullByDefault public final class InetAddresses { diff --git a/guava/src/com/google/common/primitives/Booleans.java b/guava/src/com/google/common/primitives/Booleans.java index e637550ad91b..f6bea3d8329d 100644 --- a/guava/src/com/google/common/primitives/Booleans.java +++ b/guava/src/com/google/common/primitives/Booleans.java @@ -361,9 +361,10 @@ public static boolean[] toArray(Collection collection) { * Arrays#asList(Object[])}. The list supports {@link List#set(int, Object)}, but any attempt to * set a value to {@code null} will result in a {@link NullPointerException}. * - *

    The returned list maintains the values, but not the identities, of {@code Boolean} objects - * written to or read from it. For example, whether {@code list.get(0) == list.get(0)} is true for - * the returned list is unspecified. + *

    There are at most two distinct objects in this list, {@code (Boolean) true} and {@code + * (Boolean) false}. Java guarantees that those are always represented by the same objects. + * + *

    The returned list is serializable. * * @param backingArray the array to back the list * @return a list view of the array diff --git a/guava/src/com/google/common/primitives/Bytes.java b/guava/src/com/google/common/primitives/Bytes.java index 11832742e5fa..0ab0328fbf6d 100644 --- a/guava/src/com/google/common/primitives/Bytes.java +++ b/guava/src/com/google/common/primitives/Bytes.java @@ -227,6 +227,8 @@ public static byte[] toArray(Collection collection) { * written to or read from it. For example, whether {@code list.get(0) == list.get(0)} is true for * the returned list is unspecified. * + *

    The returned list is serializable. + * * @param backingArray the array to back the list * @return a list view of the array */ diff --git a/guava/src/com/google/common/primitives/Chars.java b/guava/src/com/google/common/primitives/Chars.java index c677021f1aa4..67fb77ed9d83 100644 --- a/guava/src/com/google/common/primitives/Chars.java +++ b/guava/src/com/google/common/primitives/Chars.java @@ -547,6 +547,8 @@ public static void rotate(char[] array, int distance, int fromIndex, int toIndex * written to or read from it. For example, whether {@code list.get(0) == list.get(0)} is true for * the returned list is unspecified. * + *

    The returned list is serializable. + * * @param backingArray the array to back the list * @return a list view of the array */ diff --git a/guava/src/com/google/common/primitives/Doubles.java b/guava/src/com/google/common/primitives/Doubles.java index 19beb5d25a50..81b24e75f630 100644 --- a/guava/src/com/google/common/primitives/Doubles.java +++ b/guava/src/com/google/common/primitives/Doubles.java @@ -559,6 +559,8 @@ public static double[] toArray(Collection collection) { *

    The returned list may have unexpected behavior if it contains {@code NaN}, or if {@code NaN} * is used as a parameter to any of its methods. * + *

    The returned list is serializable. + * *

    Note: when possible, you should represent your data as an {@link * ImmutableDoubleArray} instead, which has an {@link ImmutableDoubleArray#asList asList} view. * @@ -758,7 +760,6 @@ public String toString() { * @throws NullPointerException if {@code string} is {@code null} * @since 14.0 */ - @Beta @GwtIncompatible // regular expressions @CheckForNull public static Double tryParse(String string) { diff --git a/guava/src/com/google/common/primitives/Floats.java b/guava/src/com/google/common/primitives/Floats.java index a9a44d6e3532..1ea5fb20dad3 100644 --- a/guava/src/com/google/common/primitives/Floats.java +++ b/guava/src/com/google/common/primitives/Floats.java @@ -554,6 +554,8 @@ public static float[] toArray(Collection collection) { *

    The returned list may have unexpected behavior if it contains {@code NaN}, or if {@code NaN} * is used as a parameter to any of its methods. * + *

    The returned list is serializable. + * * @param backingArray the array to back the list * @return a list view of the array */ @@ -710,7 +712,6 @@ float[] toFloatArray() { * @throws NullPointerException if {@code string} is {@code null} * @since 14.0 */ - @Beta @GwtIncompatible // regular expressions @CheckForNull public static Float tryParse(String string) { diff --git a/guava/src/com/google/common/primitives/Ints.java b/guava/src/com/google/common/primitives/Ints.java index 6aadc5d846c9..732c64639c64 100644 --- a/guava/src/com/google/common/primitives/Ints.java +++ b/guava/src/com/google/common/primitives/Ints.java @@ -625,6 +625,8 @@ public static int[] toArray(Collection collection) { * written to or read from it. For example, whether {@code list.get(0) == list.get(0)} is true for * the returned list is unspecified. * + *

    The returned list is serializable. + * *

    Note: when possible, you should represent your data as an {@link ImmutableIntArray} * instead, which has an {@link ImmutableIntArray#asList asList} view. * @@ -789,7 +791,6 @@ int[] toIntArray() { * @throws NullPointerException if {@code string} is {@code null} * @since 11.0 */ - @Beta @CheckForNull public static Integer tryParse(String string) { return tryParse(string, 10); @@ -815,7 +816,6 @@ public static Integer tryParse(String string) { * @throws NullPointerException if {@code string} is {@code null} * @since 19.0 */ - @Beta @CheckForNull public static Integer tryParse(String string, int radix) { Long result = Longs.tryParse(string, radix); diff --git a/guava/src/com/google/common/primitives/Longs.java b/guava/src/com/google/common/primitives/Longs.java index 8af4b037aee2..c60596213a11 100644 --- a/guava/src/com/google/common/primitives/Longs.java +++ b/guava/src/com/google/common/primitives/Longs.java @@ -363,7 +363,6 @@ static int digit(char c) { * @throws NullPointerException if {@code string} is {@code null} * @since 14.0 */ - @Beta @CheckForNull public static Long tryParse(String string) { return tryParse(string, 10); @@ -389,7 +388,6 @@ public static Long tryParse(String string) { * @throws NullPointerException if {@code string} is {@code null} * @since 19.0 */ - @Beta @CheckForNull public static Long tryParse(String string, int radix) { if (checkNotNull(string).isEmpty()) { @@ -695,6 +693,8 @@ public static long[] toArray(Collection collection) { * written to or read from it. For example, whether {@code list.get(0) == list.get(0)} is true for * the returned list is unspecified. * + *

    The returned list is serializable. + * *

    Note: when possible, you should represent your data as an {@link ImmutableLongArray} * instead, which has an {@link ImmutableLongArray#asList asList} view. * diff --git a/guava/src/com/google/common/primitives/Shorts.java b/guava/src/com/google/common/primitives/Shorts.java index a53108672134..5713adcf4325 100644 --- a/guava/src/com/google/common/primitives/Shorts.java +++ b/guava/src/com/google/common/primitives/Shorts.java @@ -599,6 +599,8 @@ public static short[] toArray(Collection collection) { * written to or read from it. For example, whether {@code list.get(0) == list.get(0)} is true for * the returned list is unspecified. * + *

    The returned list is serializable. + * * @param backingArray the array to back the list * @return a list view of the array */ diff --git a/guava/src/com/google/common/primitives/UnsignedBytes.java b/guava/src/com/google/common/primitives/UnsignedBytes.java index db4f489e491f..becd6b8e9491 100644 --- a/guava/src/com/google/common/primitives/UnsignedBytes.java +++ b/guava/src/com/google/common/primitives/UnsignedBytes.java @@ -21,6 +21,7 @@ import com.google.common.annotations.Beta; import com.google.common.annotations.GwtIncompatible; +import com.google.common.annotations.J2ktIncompatible; import com.google.common.annotations.VisibleForTesting; import com.google.errorprone.annotations.CanIgnoreReturnValue; import java.nio.ByteOrder; @@ -43,6 +44,7 @@ * @author Louis Wasserman * @since 1.0 */ +@J2ktIncompatible @GwtIncompatible @ElementTypesAreNonnullByDefault public final class UnsignedBytes { diff --git a/guava/src/com/google/common/primitives/UnsignedInteger.java b/guava/src/com/google/common/primitives/UnsignedInteger.java index 0b30cef3f4c6..52b05e4e7dd1 100644 --- a/guava/src/com/google/common/primitives/UnsignedInteger.java +++ b/guava/src/com/google/common/primitives/UnsignedInteger.java @@ -22,6 +22,7 @@ import com.google.common.annotations.GwtCompatible; import com.google.common.annotations.GwtIncompatible; +import com.google.common.annotations.J2ktIncompatible; import java.math.BigInteger; import javax.annotation.CheckForNull; @@ -143,6 +144,7 @@ public UnsignedInteger minus(UnsignedInteger val) { * * @since 14.0 */ + @J2ktIncompatible @GwtIncompatible // Does not truncate correctly public UnsignedInteger times(UnsignedInteger val) { // TODO(lowasser): make this GWT-compatible diff --git a/guava/src/com/google/common/primitives/UnsignedLongs.java b/guava/src/com/google/common/primitives/UnsignedLongs.java index 31c51cc3464d..04631ee9d3c7 100644 --- a/guava/src/com/google/common/primitives/UnsignedLongs.java +++ b/guava/src/com/google/common/primitives/UnsignedLongs.java @@ -18,7 +18,6 @@ import static com.google.common.base.Preconditions.checkNotNull; import static com.google.common.base.Preconditions.checkPositionIndexes; -import com.google.common.annotations.Beta; import com.google.common.annotations.GwtCompatible; import com.google.errorprone.annotations.CanIgnoreReturnValue; import java.math.BigInteger; @@ -48,7 +47,6 @@ * @author Colin Evans * @since 10.0 */ -@Beta @GwtCompatible @ElementTypesAreNonnullByDefault public final class UnsignedLongs { diff --git a/guava/src/com/google/common/reflect/IgnoreJRERequirement.java b/guava/src/com/google/common/reflect/IgnoreJRERequirement.java new file mode 100644 index 000000000000..8b03ca33209b --- /dev/null +++ b/guava/src/com/google/common/reflect/IgnoreJRERequirement.java @@ -0,0 +1,30 @@ +/* + * Copyright 2019 The Guava Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ + +package com.google.common.reflect; + +import static java.lang.annotation.ElementType.CONSTRUCTOR; +import static java.lang.annotation.ElementType.METHOD; +import static java.lang.annotation.ElementType.TYPE; + +import java.lang.annotation.Target; + +/** + * Disables Animal Sniffer's checking of compatibility with older versions of Java/Android. + * + *

    Each package's copy of this annotation needs to be listed in our {@code pom.xml}. + */ +@Target({METHOD, CONSTRUCTOR, TYPE}) +@ElementTypesAreNonnullByDefault +@interface IgnoreJRERequirement {} diff --git a/guava/src/com/google/common/reflect/Invokable.java b/guava/src/com/google/common/reflect/Invokable.java index e6d3b6c53f7f..29f4a4ed985b 100644 --- a/guava/src/com/google/common/reflect/Invokable.java +++ b/guava/src/com/google/common/reflect/Invokable.java @@ -16,7 +16,6 @@ import static com.google.common.base.Preconditions.checkNotNull; -import com.google.common.annotations.Beta; import com.google.common.collect.ImmutableList; import com.google.errorprone.annotations.CanIgnoreReturnValue; import java.lang.annotation.Annotation; @@ -63,7 +62,6 @@ * @since 14.0 (no longer implements {@link AccessibleObject} or {@code GenericDeclaration} since * 31.0) */ -@Beta @ElementTypesAreNonnullByDefault public abstract class Invokable implements AnnotatedElement, Member { private final AccessibleObject accessibleObject; @@ -273,10 +271,12 @@ public final TypeToken getReturnType() { * of a non-static inner class, unlike {@link Constructor#getParameterTypes}, the hidden {@code * this} parameter of the enclosing class is excluded from the returned parameters. */ + @IgnoreJRERequirement public final ImmutableList getParameters() { Type[] parameterTypes = getGenericParameterTypes(); Annotation[][] annotations = getParameterAnnotations(); - AnnotatedType[] annotatedTypes = getAnnotatedParameterTypes(); + @Nullable Object[] annotatedTypes = + ANNOTATED_TYPE_EXISTS ? getAnnotatedParameterTypes() : new Object[parameterTypes.length]; ImmutableList.Builder builder = ImmutableList.builder(); for (int i = 0; i < parameterTypes.length; i++) { builder.add( @@ -341,6 +341,8 @@ abstract Object invokeInternal(@CheckForNull Object receiver, @Nullable Object[] abstract Type[] getGenericParameterTypes(); + @SuppressWarnings({"Java7ApiChecker", "AndroidJdkLibsChecker"}) + @IgnoreJRERequirement abstract AnnotatedType[] getAnnotatedParameterTypes(); /** This should never return a type that's not a subtype of Throwable. */ @@ -350,6 +352,15 @@ abstract Object invokeInternal(@CheckForNull Object receiver, @Nullable Object[] abstract Type getGenericReturnType(); + /** + * Returns the {@link AnnotatedType} for the return type. + * + *

    This method will fail if run under an Android VM. + * + * @since 14.0 for guava-jre (available since 32.0.0 in guava-android) + */ + @SuppressWarnings({"Java7ApiChecker", "AndroidJdkLibsChecker"}) + @IgnoreJRERequirement public abstract AnnotatedType getAnnotatedReturnType(); static class MethodInvokable extends Invokable { @@ -379,11 +390,15 @@ Type[] getGenericParameterTypes() { } @Override + @SuppressWarnings({"Java7ApiChecker", "AndroidJdkLibsChecker"}) + @IgnoreJRERequirement AnnotatedType[] getAnnotatedParameterTypes() { return method.getAnnotatedParameterTypes(); } @Override + @SuppressWarnings({"Java7ApiChecker", "AndroidJdkLibsChecker", "DoNotCall"}) + @IgnoreJRERequirement public AnnotatedType getAnnotatedReturnType() { return method.getAnnotatedReturnType(); } @@ -466,11 +481,15 @@ Type[] getGenericParameterTypes() { } @Override + @SuppressWarnings({"Java7ApiChecker", "AndroidJdkLibsChecker"}) + @IgnoreJRERequirement AnnotatedType[] getAnnotatedParameterTypes() { return constructor.getAnnotatedParameterTypes(); } @Override + @SuppressWarnings({"Java7ApiChecker", "AndroidJdkLibsChecker", "DoNotCall"}) + @IgnoreJRERequirement public AnnotatedType getAnnotatedReturnType() { return constructor.getAnnotatedReturnType(); } @@ -538,4 +557,15 @@ private boolean mayNeedHiddenThis() { } } } + + private static final boolean ANNOTATED_TYPE_EXISTS = initAnnotatedTypeExists(); + + private static boolean initAnnotatedTypeExists() { + try { + Class.forName("java.lang.reflect.AnnotatedType"); + } catch (ClassNotFoundException e) { + return false; + } + return true; + } } diff --git a/guava/src/com/google/common/reflect/MutableTypeToInstanceMap.java b/guava/src/com/google/common/reflect/MutableTypeToInstanceMap.java index 9542e0a7ed51..7690d2eef928 100644 --- a/guava/src/com/google/common/reflect/MutableTypeToInstanceMap.java +++ b/guava/src/com/google/common/reflect/MutableTypeToInstanceMap.java @@ -27,47 +27,45 @@ import java.util.Map; import java.util.Set; import javax.annotation.CheckForNull; +import org.checkerframework.checker.nullness.qual.NonNull; import org.checkerframework.checker.nullness.qual.Nullable; /** * A mutable type-to-instance map. See also {@link ImmutableTypeToInstanceMap}. * - *

    This implementation does support null values, despite how it is annotated; see - * discussion at {@link TypeToInstanceMap}. - * * @author Ben Yu * @since 13.0 */ @ElementTypesAreNonnullByDefault -public final class MutableTypeToInstanceMap extends ForwardingMap, B> - implements TypeToInstanceMap { +public final class MutableTypeToInstanceMap + extends ForwardingMap, B> implements TypeToInstanceMap { - private final Map, B> backingMap = Maps.newHashMap(); + private final Map, B> backingMap = Maps.newHashMap(); @Override @CheckForNull - public T getInstance(Class type) { + public T getInstance(Class type) { return trustedGet(TypeToken.of(type)); } @Override @CheckForNull - public T getInstance(TypeToken type) { + public T getInstance(TypeToken type) { return trustedGet(type.rejectTypeVariables()); } @Override @CanIgnoreReturnValue @CheckForNull - public T putInstance(Class type, T value) { + public T putInstance(Class<@NonNull T> type, @ParametricNullness T value) { return trustedPut(TypeToken.of(type), value); } @Override @CanIgnoreReturnValue @CheckForNull - public T putInstance(TypeToken type, T value) { - return trustedPut(type.rejectTypeVariables(), value); + public T putInstance(TypeToken<@NonNull T> type, @ParametricNullness T value) { + return this.trustedPut(type.rejectTypeVariables(), value); } /** @@ -81,7 +79,7 @@ public T putInstance(TypeToken type, T value) { @Override @DoNotCall("Always throws UnsupportedOperationException") @CheckForNull - public B put(TypeToken key, B value) { + public B put(TypeToken key, @ParametricNullness B value) { throw new UnsupportedOperationException("Please use putInstance() instead."); } @@ -94,37 +92,39 @@ public B put(TypeToken key, B value) { @Deprecated @Override @DoNotCall("Always throws UnsupportedOperationException") - public void putAll(Map, ? extends B> map) { + public void putAll(Map, ? extends B> map) { throw new UnsupportedOperationException("Please use putInstance() instead."); } @Override - public Set, B>> entrySet() { + public Set, B>> entrySet() { return UnmodifiableEntry.transformEntries(super.entrySet()); } @Override - protected Map, B> delegate() { + protected Map, B> delegate() { return backingMap; } @SuppressWarnings("unchecked") // value could not get in if not a T @CheckForNull - private T trustedPut(TypeToken type, T value) { + private T trustedPut(TypeToken<@NonNull T> type, @ParametricNullness T value) { return (T) backingMap.put(type, value); } @SuppressWarnings("unchecked") // value could not get in if not a T @CheckForNull - private T trustedGet(TypeToken type) { + private T trustedGet(TypeToken type) { return (T) backingMap.get(type); } - private static final class UnmodifiableEntry extends ForwardingMapEntry { + private static final class UnmodifiableEntry + extends ForwardingMapEntry { private final Entry delegate; - static Set> transformEntries(Set> entries) { + static Set> transformEntries( + Set> entries) { return new ForwardingSet>() { @Override protected Set> delegate() { @@ -157,7 +157,8 @@ public Object[] toArray() { }; } - private static Iterator> transformEntries(Iterator> entries) { + private static Iterator> transformEntries( + Iterator> entries) { return Iterators.transform(entries, UnmodifiableEntry::new); } @@ -171,7 +172,8 @@ protected Entry delegate() { } @Override - public V setValue(V value) { + @ParametricNullness + public V setValue(@ParametricNullness V value) { throw new UnsupportedOperationException(); } } diff --git a/guava/src/com/google/common/reflect/Parameter.java b/guava/src/com/google/common/reflect/Parameter.java index c3c46eca9d08..92926a984037 100644 --- a/guava/src/com/google/common/reflect/Parameter.java +++ b/guava/src/com/google/common/reflect/Parameter.java @@ -15,6 +15,7 @@ package com.google.common.reflect; import static com.google.common.base.Preconditions.checkNotNull; +import static java.util.Objects.requireNonNull; import com.google.common.annotations.Beta; import com.google.common.collect.FluentIterable; @@ -43,14 +44,22 @@ public final class Parameter implements AnnotatedElement { private final int position; private final TypeToken type; private final ImmutableList annotations; - private final AnnotatedType annotatedType; + + /** + * An {@link AnnotatedType} instance, or {@code null} under Android VMs (possible only when using + * the Android flavor of Guava). The field is declared with a type of {@code Object} to avoid + * compatibility problems on Android VMs. The corresponding accessor method, however, can have the + * more specific return type as long as users are careful to guard calls to it with version checks + * or reflection: Android VMs ignore the types of elements that aren't used. + */ + private final @Nullable Object annotatedType; Parameter( Invokable declaration, int position, TypeToken type, Annotation[] annotations, - AnnotatedType annotatedType) { + @Nullable Object annotatedType) { this.declaration = declaration; this.position = position; this.type = type; @@ -91,21 +100,18 @@ public Annotation[] getAnnotations() { } /** @since 18.0 */ - // @Override on JDK8 @Override public A[] getAnnotationsByType(Class annotationType) { return getDeclaredAnnotationsByType(annotationType); } /** @since 18.0 */ - // @Override on JDK8 @Override public Annotation[] getDeclaredAnnotations() { return annotations.toArray(new Annotation[0]); } /** @since 18.0 */ - // @Override on JDK8 @Override @CheckForNull public A getDeclaredAnnotation(Class annotationType) { @@ -114,7 +120,6 @@ public A getDeclaredAnnotation(Class annotationType) { } /** @since 18.0 */ - // @Override on JDK8 @Override public A[] getDeclaredAnnotationsByType(Class annotationType) { @Nullable @@ -124,10 +129,17 @@ public A[] getDeclaredAnnotationsByType(Class annotati return cast; } - /** @since 25.1 */ - // @Override on JDK8 + /** + * Returns the {@link AnnotatedType} of the parameter. + * + *

    This method will fail if run under an Android VM. + * + * @since 25.1 for guava-jre (available since 32.0.0 in guava-android) + */ + @SuppressWarnings({"Java7ApiChecker", "AndroidJdkLibsChecker"}) + @IgnoreJRERequirement public AnnotatedType getAnnotatedType() { - return annotatedType; + return requireNonNull((AnnotatedType) annotatedType); } @Override diff --git a/guava/src/com/google/common/reflect/TypeToInstanceMap.java b/guava/src/com/google/common/reflect/TypeToInstanceMap.java index 0134dffcb036..fe61a2cc510b 100644 --- a/guava/src/com/google/common/reflect/TypeToInstanceMap.java +++ b/guava/src/com/google/common/reflect/TypeToInstanceMap.java @@ -18,6 +18,8 @@ import com.google.errorprone.annotations.DoNotMock; import java.util.Map; import javax.annotation.CheckForNull; +import org.checkerframework.checker.nullness.qual.NonNull; +import org.checkerframework.checker.nullness.qual.Nullable; /** * A map, each entry of which maps a {@link TypeToken} to an instance of that type. In addition to @@ -34,17 +36,14 @@ *

    Like any other {@code Map}, this map may contain entries for primitive types, * and a primitive type and its corresponding wrapper type may map to different values. * - *

    This class's support for {@code null} requires some explanation. For details, see {@link - * com.google.common.collect.ClassToInstanceMap}. Its explanation applies equally well to {@code - * TypeToInstanceMap}. - * * @param the common supertype that all entries must share; often this is simply {@link Object} * @author Ben Yu * @since 13.0 */ @DoNotMock("Use ImmutableTypeToInstanceMap or MutableTypeToInstanceMap") @ElementTypesAreNonnullByDefault -public interface TypeToInstanceMap extends Map, B> { +public interface TypeToInstanceMap + extends Map, B> { /** * Returns the value the specified class is mapped to, or {@code null} if no entry for this class @@ -55,7 +54,7 @@ public interface TypeToInstanceMap extends Map, B> { * getInstance(TypeToken.of(Foo.class))}. */ @CheckForNull - T getInstance(Class type); + T getInstance(Class type); /** * Returns the value the specified type is mapped to, or {@code null} if no entry for this type is @@ -63,7 +62,7 @@ public interface TypeToInstanceMap extends Map, B> { * may have been bound to a subtype. */ @CheckForNull - T getInstance(TypeToken type); + T getInstance(TypeToken type); /** * Maps the specified class to the specified value. Does not associate this value with any @@ -77,7 +76,7 @@ public interface TypeToInstanceMap extends Map, B> { */ @CanIgnoreReturnValue @CheckForNull - T putInstance(Class type, T value); + T putInstance(Class<@NonNull T> type, @ParametricNullness T value); /** * Maps the specified type to the specified value. Does not associate this value with any @@ -88,5 +87,5 @@ public interface TypeToInstanceMap extends Map, B> { */ @CanIgnoreReturnValue @CheckForNull - T putInstance(TypeToken type, T value); + T putInstance(TypeToken<@NonNull T> type, @ParametricNullness T value); } diff --git a/guava/src/com/google/common/reflect/TypeToken.java b/guava/src/com/google/common/reflect/TypeToken.java index 1ec9e28506cb..8abec1a57cab 100644 --- a/guava/src/com/google/common/reflect/TypeToken.java +++ b/guava/src/com/google/common/reflect/TypeToken.java @@ -19,7 +19,6 @@ import static com.google.common.base.Preconditions.checkState; import static java.util.Objects.requireNonNull; -import com.google.common.annotations.Beta; import com.google.common.annotations.VisibleForTesting; import com.google.common.base.Joiner; import com.google.common.base.Predicate; @@ -590,7 +589,6 @@ public final TypeToken getComponentType() { * * @since 14.0 */ - @Beta public final Invokable method(Method method) { checkArgument( this.someRawTypeIsSubclassOf(method.getDeclaringClass()), @@ -630,7 +628,6 @@ public String toString() { * * @since 14.0 */ - @Beta public final Invokable constructor(Constructor constructor) { checkArgument( constructor.getDeclaringClass() == getRawType(), diff --git a/guava/src/com/google/common/util/concurrent/AbstractExecutionThreadService.java b/guava/src/com/google/common/util/concurrent/AbstractExecutionThreadService.java index 2a0dbc794df2..9eadb2196b91 100644 --- a/guava/src/com/google/common/util/concurrent/AbstractExecutionThreadService.java +++ b/guava/src/com/google/common/util/concurrent/AbstractExecutionThreadService.java @@ -18,7 +18,7 @@ import com.google.common.annotations.Beta; import com.google.common.annotations.GwtIncompatible; -import com.google.common.base.Supplier; +import com.google.common.annotations.J2ktIncompatible; import com.google.errorprone.annotations.CanIgnoreReturnValue; import java.time.Duration; import java.util.concurrent.Executor; @@ -36,6 +36,7 @@ * @since 1.0 */ @GwtIncompatible +@J2ktIncompatible @ElementTypesAreNonnullByDefault public abstract class AbstractExecutionThreadService implements Service { private static final Logger logger = @@ -46,52 +47,41 @@ public abstract class AbstractExecutionThreadService implements Service { new AbstractService() { @Override protected final void doStart() { - Executor executor = - MoreExecutors.renamingDecorator( - executor(), - new Supplier() { - @Override - public String get() { - return serviceName(); - } - }); + Executor executor = MoreExecutors.renamingDecorator(executor(), () -> serviceName()); executor.execute( - new Runnable() { - @Override - public void run() { - try { - startUp(); - notifyStarted(); - // If stopAsync() is called while starting we may be in the STOPPING state in - // which case we should skip right down to shutdown. - if (isRunning()) { + () -> { + try { + startUp(); + notifyStarted(); + // If stopAsync() is called while starting we may be in the STOPPING state in + // which case we should skip right down to shutdown. + if (isRunning()) { + try { + AbstractExecutionThreadService.this.run(); + } catch (Throwable t) { + restoreInterruptIfIsInterruptedException(t); try { - AbstractExecutionThreadService.this.run(); - } catch (Throwable t) { - restoreInterruptIfIsInterruptedException(t); - try { - shutDown(); - } catch (Exception ignored) { - restoreInterruptIfIsInterruptedException(ignored); - // TODO(lukes): if guava ever moves to java7, this would be a good - // candidate for a suppressed exception, or maybe we could generalize - // Closer.Suppressor - logger.log( - Level.WARNING, - "Error while attempting to shut down the service after failure.", - ignored); - } - notifyFailed(t); - return; + shutDown(); + } catch (Exception ignored) { + restoreInterruptIfIsInterruptedException(ignored); + // TODO(lukes): if guava ever moves to java7, this would be a good + // candidate for a suppressed exception, or maybe we could generalize + // Closer.Suppressor + logger.log( + Level.WARNING, + "Error while attempting to shut down the service after failure.", + ignored); } + notifyFailed(t); + return; } - - shutDown(); - notifyStopped(); - } catch (Throwable t) { - restoreInterruptIfIsInterruptedException(t); - notifyFailed(t); } + + shutDown(); + notifyStopped(); + } catch (Throwable t) { + restoreInterruptIfIsInterruptedException(t); + notifyFailed(t); } }); } @@ -167,12 +157,7 @@ protected void triggerShutdown() {} * to the string returned by {@link #serviceName} */ protected Executor executor() { - return new Executor() { - @Override - public void execute(Runnable command) { - MoreExecutors.newThread(serviceName(), command).start(); - } - }; + return command -> MoreExecutors.newThread(serviceName(), command).start(); } @Override diff --git a/guava/src/com/google/common/util/concurrent/AbstractIdleService.java b/guava/src/com/google/common/util/concurrent/AbstractIdleService.java index 3b52fb70972a..c1d32eefe374 100644 --- a/guava/src/com/google/common/util/concurrent/AbstractIdleService.java +++ b/guava/src/com/google/common/util/concurrent/AbstractIdleService.java @@ -17,6 +17,7 @@ import static com.google.common.util.concurrent.Platform.restoreInterruptIfIsInterruptedException; import com.google.common.annotations.GwtIncompatible; +import com.google.common.annotations.J2ktIncompatible; import com.google.common.base.Supplier; import com.google.errorprone.annotations.CanIgnoreReturnValue; import com.google.j2objc.annotations.WeakOuter; @@ -34,6 +35,7 @@ * @since 1.0 */ @GwtIncompatible +@J2ktIncompatible @ElementTypesAreNonnullByDefault public abstract class AbstractIdleService implements Service { @@ -57,16 +59,13 @@ private final class DelegateService extends AbstractService { protected final void doStart() { MoreExecutors.renamingDecorator(executor(), threadNameSupplier) .execute( - new Runnable() { - @Override - public void run() { - try { - startUp(); - notifyStarted(); - } catch (Throwable t) { - restoreInterruptIfIsInterruptedException(t); - notifyFailed(t); - } + () -> { + try { + startUp(); + notifyStarted(); + } catch (Throwable t) { + restoreInterruptIfIsInterruptedException(t); + notifyFailed(t); } }); } @@ -75,16 +74,13 @@ public void run() { protected final void doStop() { MoreExecutors.renamingDecorator(executor(), threadNameSupplier) .execute( - new Runnable() { - @Override - public void run() { - try { - shutDown(); - notifyStopped(); - } catch (Throwable t) { - restoreInterruptIfIsInterruptedException(t); - notifyFailed(t); - } + () -> { + try { + shutDown(); + notifyStopped(); + } catch (Throwable t) { + restoreInterruptIfIsInterruptedException(t); + notifyFailed(t); } }); } @@ -112,12 +108,7 @@ protected AbstractIdleService() {} * stopped, and should return promptly. */ protected Executor executor() { - return new Executor() { - @Override - public void execute(Runnable command) { - MoreExecutors.newThread(threadNameSupplier.get(), command).start(); - } - }; + return command -> MoreExecutors.newThread(threadNameSupplier.get(), command).start(); } @Override diff --git a/guava/src/com/google/common/util/concurrent/AbstractListeningExecutorService.java b/guava/src/com/google/common/util/concurrent/AbstractListeningExecutorService.java index f6dad81807c6..72334be2e033 100644 --- a/guava/src/com/google/common/util/concurrent/AbstractListeningExecutorService.java +++ b/guava/src/com/google/common/util/concurrent/AbstractListeningExecutorService.java @@ -16,6 +16,7 @@ import com.google.common.annotations.Beta; import com.google.common.annotations.GwtIncompatible; +import com.google.common.annotations.J2ktIncompatible; import com.google.errorprone.annotations.CanIgnoreReturnValue; import com.google.errorprone.annotations.CheckReturnValue; import java.util.concurrent.AbstractExecutorService; @@ -37,6 +38,7 @@ @CheckReturnValue @Beta @GwtIncompatible +@J2ktIncompatible @ElementTypesAreNonnullByDefault public abstract class AbstractListeningExecutorService extends AbstractExecutorService implements ListeningExecutorService { diff --git a/guava/src/com/google/common/util/concurrent/AbstractScheduledService.java b/guava/src/com/google/common/util/concurrent/AbstractScheduledService.java index d7f51c5891b4..164a6dbb435d 100644 --- a/guava/src/com/google/common/util/concurrent/AbstractScheduledService.java +++ b/guava/src/com/google/common/util/concurrent/AbstractScheduledService.java @@ -24,7 +24,7 @@ import static java.util.concurrent.TimeUnit.NANOSECONDS; import com.google.common.annotations.GwtIncompatible; -import com.google.common.base.Supplier; +import com.google.common.annotations.J2ktIncompatible; import com.google.errorprone.annotations.CanIgnoreReturnValue; import com.google.errorprone.annotations.concurrent.GuardedBy; import com.google.j2objc.annotations.WeakOuter; @@ -102,6 +102,7 @@ * @since 11.0 */ @GwtIncompatible +@J2ktIncompatible @ElementTypesAreNonnullByDefault public abstract class AbstractScheduledService implements Service { private static final Logger logger = Logger.getLogger(AbstractScheduledService.class.getName()); @@ -257,33 +258,28 @@ public void run() { @Override protected final void doStart() { executorService = - MoreExecutors.renamingDecorator( - executor(), - new Supplier() { - @Override - public String get() { - return serviceName() + " " + state(); - } - }); + MoreExecutors.renamingDecorator(executor(), () -> serviceName() + " " + state()); executorService.execute( - new Runnable() { - @Override - public void run() { - lock.lock(); - try { - startUp(); - runningTask = scheduler().schedule(delegate, executorService, task); - notifyStarted(); - } catch (Throwable t) { - restoreInterruptIfIsInterruptedException(t); - notifyFailed(t); - if (runningTask != null) { - // prevent the task from running if possible - runningTask.cancel(false); - } - } finally { - lock.unlock(); + () -> { + lock.lock(); + try { + startUp(); + /* + * requireNonNull is safe because executorService is never cleared after the + * assignment above. + */ + requireNonNull(executorService); + runningTask = scheduler().schedule(delegate, executorService, task); + notifyStarted(); + } catch (Throwable t) { + restoreInterruptIfIsInterruptedException(t); + notifyFailed(t); + if (runningTask != null) { + // prevent the task from running if possible + runningTask.cancel(false); } + } finally { + lock.unlock(); } }); } @@ -295,28 +291,25 @@ protected final void doStop() { requireNonNull(executorService); runningTask.cancel(false); executorService.execute( - new Runnable() { - @Override - public void run() { + () -> { + try { + lock.lock(); try { - lock.lock(); - try { - if (state() != State.STOPPING) { - // This means that the state has changed since we were scheduled. This implies - // that an execution of runOneIteration has thrown an exception and we have - // transitioned to a failed state, also this means that shutDown has already - // been called, so we do not want to call it again. - return; - } - shutDown(); - } finally { - lock.unlock(); + if (state() != State.STOPPING) { + // This means that the state has changed since we were scheduled. This implies + // that an execution of runOneIteration has thrown an exception and we have + // transitioned to a failed state, also this means that shutDown has already + // been called, so we do not want to call it again. + return; } - notifyStopped(); - } catch (Throwable t) { - restoreInterruptIfIsInterruptedException(t); - notifyFailed(t); + shutDown(); + } finally { + lock.unlock(); } + notifyStopped(); + } catch (Throwable t) { + restoreInterruptIfIsInterruptedException(t); + notifyFailed(t); } }); } diff --git a/guava/src/com/google/common/util/concurrent/AbstractService.java b/guava/src/com/google/common/util/concurrent/AbstractService.java index bfef79b80dc3..1ba3f79a4522 100644 --- a/guava/src/com/google/common/util/concurrent/AbstractService.java +++ b/guava/src/com/google/common/util/concurrent/AbstractService.java @@ -28,6 +28,7 @@ import com.google.common.annotations.Beta; import com.google.common.annotations.GwtIncompatible; +import com.google.common.annotations.J2ktIncompatible; import com.google.common.util.concurrent.Monitor.Guard; import com.google.common.util.concurrent.Service.State; // javadoc needs this import com.google.errorprone.annotations.CanIgnoreReturnValue; @@ -51,6 +52,7 @@ * @since 1.0 */ @GwtIncompatible +@J2ktIncompatible @ElementTypesAreNonnullByDefault public abstract class AbstractService implements Service { private static final ListenerCallQueue.Event STARTING_EVENT = diff --git a/guava/src/com/google/common/util/concurrent/AtomicDouble.java b/guava/src/com/google/common/util/concurrent/AtomicDouble.java index 56360a8703dd..7e3cb23039ae 100644 --- a/guava/src/com/google/common/util/concurrent/AtomicDouble.java +++ b/guava/src/com/google/common/util/concurrent/AtomicDouble.java @@ -19,6 +19,7 @@ import static java.lang.Double.longBitsToDouble; import com.google.common.annotations.GwtIncompatible; +import com.google.common.annotations.J2ktIncompatible; import com.google.errorprone.annotations.CanIgnoreReturnValue; import com.google.j2objc.annotations.ReflectionSupport; import java.util.concurrent.atomic.AtomicLongFieldUpdater; @@ -55,6 +56,7 @@ * @since 11.0 */ @GwtIncompatible +@J2ktIncompatible @ReflectionSupport(value = ReflectionSupport.Level.FULL) @ElementTypesAreNonnullByDefault public class AtomicDouble extends Number implements java.io.Serializable { diff --git a/guava/src/com/google/common/util/concurrent/AtomicDoubleArray.java b/guava/src/com/google/common/util/concurrent/AtomicDoubleArray.java index 3e21281a80f0..6f88671893a0 100644 --- a/guava/src/com/google/common/util/concurrent/AtomicDoubleArray.java +++ b/guava/src/com/google/common/util/concurrent/AtomicDoubleArray.java @@ -18,6 +18,7 @@ import static java.lang.Double.longBitsToDouble; import com.google.common.annotations.GwtIncompatible; +import com.google.common.annotations.J2ktIncompatible; import com.google.common.primitives.ImmutableLongArray; import com.google.errorprone.annotations.CanIgnoreReturnValue; import java.util.concurrent.atomic.AtomicLongArray; @@ -47,6 +48,7 @@ * @since 11.0 */ @GwtIncompatible +@J2ktIncompatible @ElementTypesAreNonnullByDefault public class AtomicDoubleArray implements java.io.Serializable { private static final long serialVersionUID = 0L; diff --git a/guava/src/com/google/common/util/concurrent/AtomicLongMap.java b/guava/src/com/google/common/util/concurrent/AtomicLongMap.java index 456b3aceb1ac..1768c96a02f7 100644 --- a/guava/src/com/google/common/util/concurrent/AtomicLongMap.java +++ b/guava/src/com/google/common/util/concurrent/AtomicLongMap.java @@ -20,6 +20,7 @@ import com.google.common.annotations.Beta; import com.google.common.annotations.GwtCompatible; +import com.google.common.annotations.J2ktIncompatible; import com.google.errorprone.annotations.CanIgnoreReturnValue; import java.io.Serializable; import java.util.Collections; @@ -44,6 +45,8 @@ *

    Instances of this class may be used by multiple threads concurrently. All operations are * atomic unless otherwise noted. * + *

    Instances of this class are serializable if the keys are serializable. + * *

    Note: If your values are always positive and less than 2^31, you may wish to use a * {@link com.google.common.collect.Multiset} such as {@link * com.google.common.collect.ConcurrentHashMultiset} instead. @@ -55,6 +58,7 @@ * @since 11.0 */ @GwtCompatible +@J2ktIncompatible @ElementTypesAreNonnullByDefault public final class AtomicLongMap implements Serializable { private final ConcurrentHashMap map; diff --git a/guava/src/com/google/common/util/concurrent/Callables.java b/guava/src/com/google/common/util/concurrent/Callables.java index 3b52c2e98217..0533605dd1b8 100644 --- a/guava/src/com/google/common/util/concurrent/Callables.java +++ b/guava/src/com/google/common/util/concurrent/Callables.java @@ -19,6 +19,7 @@ import com.google.common.annotations.Beta; import com.google.common.annotations.GwtCompatible; import com.google.common.annotations.GwtIncompatible; +import com.google.common.annotations.J2ktIncompatible; import com.google.common.base.Supplier; import java.util.concurrent.Callable; import org.checkerframework.checker.nullness.qual.Nullable; @@ -48,6 +49,7 @@ private Callables() {} * @since 20.0 */ @Beta + @J2ktIncompatible @GwtIncompatible public static AsyncCallable asAsyncCallable( Callable callable, ListeningExecutorService listeningExecutorService) { @@ -64,6 +66,7 @@ private Callables() {} * @param nameSupplier The supplier of thread names, {@link Supplier#get get} will be called once * for each invocation of the wrapped callable. */ + @J2ktIncompatible @GwtIncompatible // threads static Callable threadRenaming( Callable callable, Supplier nameSupplier) { @@ -91,6 +94,7 @@ private Callables() {} * @param nameSupplier The supplier of thread names, {@link Supplier#get get} will be called once * for each invocation of the wrapped callable. */ + @J2ktIncompatible @GwtIncompatible // threads static Runnable threadRenaming(Runnable task, Supplier nameSupplier) { checkNotNull(nameSupplier); @@ -110,6 +114,7 @@ static Runnable threadRenaming(Runnable task, Supplier nameSupplier) { } /** Tries to set name of the given {@link Thread}, returns true if successful. */ + @J2ktIncompatible @GwtIncompatible // threads private static boolean trySetName(String threadName, Thread currentThread) { /* diff --git a/guava/src/com/google/common/util/concurrent/ClosingFuture.java b/guava/src/com/google/common/util/concurrent/ClosingFuture.java index 798620db3991..79aa0aa0ef1d 100644 --- a/guava/src/com/google/common/util/concurrent/ClosingFuture.java +++ b/guava/src/com/google/common/util/concurrent/ClosingFuture.java @@ -37,8 +37,8 @@ import static java.util.logging.Level.SEVERE; import static java.util.logging.Level.WARNING; +import com.google.common.annotations.J2ktIncompatible; import com.google.common.annotations.VisibleForTesting; -import com.google.common.base.Function; import com.google.common.collect.FluentIterable; import com.google.common.collect.ImmutableList; import com.google.common.util.concurrent.ClosingFuture.Combiner.AsyncCombiningCallable; @@ -191,6 +191,7 @@ */ // TODO(dpb): Consider reusing one CloseableList for the entire pipeline, modulo combinations. @DoNotMock("Use ClosingFuture.from(Futures.immediate*Future)") +@J2ktIncompatible @ElementTypesAreNonnullByDefault // TODO(dpb): GWT compatibility. public final class ClosingFuture { @@ -1383,16 +1384,11 @@ public String toString() { : Futures.whenAllComplete(inputFutures()); } - private static final Function, FluentFuture> INNER_FUTURE = - new Function, FluentFuture>() { - @Override - public FluentFuture apply(ClosingFuture future) { - return future.future; - } - }; private ImmutableList> inputFutures() { - return FluentIterable.from(inputs).transform(INNER_FUTURE).toList(); + return FluentIterable.from(inputs) + .>transform(future -> future.future) + .toList(); } } @@ -2159,15 +2155,12 @@ private static void closeQuietly(@CheckForNull final AutoCloseable closeable, Ex } try { executor.execute( - new Runnable() { - @Override - public void run() { - try { - closeable.close(); - } catch (Exception e) { - restoreInterruptIfIsInterruptedException(e); - logger.log(WARNING, "thrown by close()", e); - } + () -> { + try { + closeable.close(); + } catch (Exception e) { + restoreInterruptIfIsInterruptedException(e); + logger.log(WARNING, "thrown by close()", e); } }); } catch (RejectedExecutionException e) { diff --git a/guava/src/com/google/common/util/concurrent/CollectionFuture.java b/guava/src/com/google/common/util/concurrent/CollectionFuture.java index 1fd18523db04..062aee7a79dc 100644 --- a/guava/src/com/google/common/util/concurrent/CollectionFuture.java +++ b/guava/src/com/google/common/util/concurrent/CollectionFuture.java @@ -102,9 +102,9 @@ static final class ListFuture /** The result of a successful {@code Future}. */ private static final class Present { - final V value; + @ParametricNullness final V value; - Present(V value) { + Present(@ParametricNullness V value) { this.value = value; } } diff --git a/guava/src/com/google/common/util/concurrent/CycleDetectingLockFactory.java b/guava/src/com/google/common/util/concurrent/CycleDetectingLockFactory.java index 51a36e822c41..21c77e8f9ef1 100644 --- a/guava/src/com/google/common/util/concurrent/CycleDetectingLockFactory.java +++ b/guava/src/com/google/common/util/concurrent/CycleDetectingLockFactory.java @@ -19,6 +19,7 @@ import com.google.common.annotations.Beta; import com.google.common.annotations.GwtIncompatible; +import com.google.common.annotations.J2ktIncompatible; import com.google.common.annotations.VisibleForTesting; import com.google.common.base.MoreObjects; import com.google.common.base.Preconditions; @@ -160,6 +161,7 @@ * @since 13.0 */ @Beta +@J2ktIncompatible @GwtIncompatible @ElementTypesAreNonnullByDefault public class CycleDetectingLockFactory { diff --git a/guava/src/com/google/common/util/concurrent/ExecutionList.java b/guava/src/com/google/common/util/concurrent/ExecutionList.java index 96fc51ca88d0..645817c4af36 100644 --- a/guava/src/com/google/common/util/concurrent/ExecutionList.java +++ b/guava/src/com/google/common/util/concurrent/ExecutionList.java @@ -17,6 +17,7 @@ import static com.google.common.base.Preconditions.checkNotNull; import com.google.common.annotations.GwtIncompatible; +import com.google.common.annotations.J2ktIncompatible; import com.google.errorprone.annotations.concurrent.GuardedBy; import java.util.concurrent.Executor; import java.util.logging.Level; @@ -39,6 +40,7 @@ * @author Sven Mawson * @since 1.0 */ +@J2ktIncompatible @GwtIncompatible @ElementTypesAreNonnullByDefault public final class ExecutionList { diff --git a/guava/src/com/google/common/util/concurrent/ExecutionSequencer.java b/guava/src/com/google/common/util/concurrent/ExecutionSequencer.java index 6a58dab2cea6..c335711c064f 100644 --- a/guava/src/com/google/common/util/concurrent/ExecutionSequencer.java +++ b/guava/src/com/google/common/util/concurrent/ExecutionSequencer.java @@ -25,6 +25,7 @@ import static com.google.common.util.concurrent.MoreExecutors.directExecutor; import static java.util.Objects.requireNonNull; +import com.google.common.annotations.J2ktIncompatible; import java.util.concurrent.Callable; import java.util.concurrent.Executor; import java.util.concurrent.Future; @@ -85,6 +86,7 @@ * @since 26.0 */ @ElementTypesAreNonnullByDefault +@J2ktIncompatible public final class ExecutionSequencer { private ExecutionSequencer() {} diff --git a/guava/src/com/google/common/util/concurrent/FakeTimeLimiter.java b/guava/src/com/google/common/util/concurrent/FakeTimeLimiter.java index 5528b8ff443a..ddaca50f5e3a 100644 --- a/guava/src/com/google/common/util/concurrent/FakeTimeLimiter.java +++ b/guava/src/com/google/common/util/concurrent/FakeTimeLimiter.java @@ -19,6 +19,7 @@ import com.google.common.annotations.Beta; import com.google.common.annotations.GwtIncompatible; +import com.google.common.annotations.J2ktIncompatible; import com.google.errorprone.annotations.CanIgnoreReturnValue; import java.util.concurrent.Callable; import java.util.concurrent.ExecutionException; @@ -36,6 +37,7 @@ * @since 1.0 */ @Beta +@J2ktIncompatible @GwtIncompatible @ElementTypesAreNonnullByDefault public final class FakeTimeLimiter implements TimeLimiter { diff --git a/guava/src/com/google/common/util/concurrent/FluentFuture.java b/guava/src/com/google/common/util/concurrent/FluentFuture.java index b47e67927f08..9dbbca37f2cb 100644 --- a/guava/src/com/google/common/util/concurrent/FluentFuture.java +++ b/guava/src/com/google/common/util/concurrent/FluentFuture.java @@ -17,9 +17,9 @@ import static com.google.common.base.Preconditions.checkNotNull; import static com.google.common.util.concurrent.Internal.toNanosSaturated; -import com.google.common.annotations.Beta; import com.google.common.annotations.GwtCompatible; import com.google.common.annotations.GwtIncompatible; +import com.google.common.annotations.J2ktIncompatible; import com.google.common.base.Function; import com.google.errorprone.annotations.CanIgnoreReturnValue; import com.google.errorprone.annotations.DoNotMock; @@ -184,8 +184,8 @@ public final boolean cancel(boolean mayInterruptIfRunning) { * {@code get()} throws a different kind of exception, that exception itself. * @param executor the executor that runs {@code fallback} if the input fails */ + @J2ktIncompatible @Partially.GwtIncompatible("AVAILABLE but requires exceptionType to be Throwable.class") - @Beta public final FluentFuture catching( Class exceptionType, Function fallback, Executor executor) { return (FluentFuture) Futures.catching(this, exceptionType, fallback, executor); @@ -249,8 +249,8 @@ public final FluentFuture catching( * {@code get()} throws a different kind of exception, that exception itself. * @param executor the executor that runs {@code fallback} if the input fails */ + @J2ktIncompatible @Partially.GwtIncompatible("AVAILABLE but requires exceptionType to be Throwable.class") - @Beta public final FluentFuture catchingAsync( Class exceptionType, AsyncFunction fallback, Executor executor) { return (FluentFuture) Futures.catchingAsync(this, exceptionType, fallback, executor); @@ -266,8 +266,8 @@ public final FluentFuture catchingAsync( * @param scheduledExecutor The executor service to enforce the timeout. * @since 28.0 */ + @J2ktIncompatible @GwtIncompatible // ScheduledExecutorService - @Beta public final FluentFuture withTimeout( Duration timeout, ScheduledExecutorService scheduledExecutor) { return withTimeout(toNanosSaturated(timeout), TimeUnit.NANOSECONDS, scheduledExecutor); @@ -283,9 +283,9 @@ public final FluentFuture withTimeout( * @param unit the time unit of the time parameter * @param scheduledExecutor The executor service to enforce the timeout. */ + @J2ktIncompatible @GwtIncompatible // ScheduledExecutorService @SuppressWarnings("GoodTime") // should accept a java.time.Duration - @Beta public final FluentFuture withTimeout( long timeout, TimeUnit unit, ScheduledExecutorService scheduledExecutor) { return (FluentFuture) Futures.withTimeout(this, timeout, unit, scheduledExecutor); @@ -330,7 +330,6 @@ public final FluentFuture withTimeout( * @return A future that holds result of the function (if the input succeeded) or the original * input's failure (if not) */ - @Beta public final FluentFuture transformAsync( AsyncFunction function, Executor executor) { return (FluentFuture) Futures.transformAsync(this, function, executor); @@ -368,7 +367,6 @@ public final FluentFuture withTimeout( * @param executor Executor to run the function in. * @return A future that holds result of the transformation. */ - @Beta public final FluentFuture transform( Function function, Executor executor) { return (FluentFuture) Futures.transform(this, function, executor); diff --git a/guava/src/com/google/common/util/concurrent/ForwardingBlockingDeque.java b/guava/src/com/google/common/util/concurrent/ForwardingBlockingDeque.java index d0d72a815918..13aa80b5129b 100644 --- a/guava/src/com/google/common/util/concurrent/ForwardingBlockingDeque.java +++ b/guava/src/com/google/common/util/concurrent/ForwardingBlockingDeque.java @@ -17,6 +17,7 @@ package com.google.common.util.concurrent; import com.google.common.annotations.GwtIncompatible; +import com.google.common.annotations.J2ktIncompatible; import com.google.common.collect.ForwardingDeque; import java.util.Collection; import java.util.concurrent.BlockingDeque; @@ -44,6 +45,7 @@ * @author Emily Soldal * @since 21.0 (since 14.0 as {@link com.google.common.collect.ForwardingBlockingDeque}) */ +@J2ktIncompatible @GwtIncompatible @ElementTypesAreNonnullByDefault public abstract class ForwardingBlockingDeque extends ForwardingDeque diff --git a/guava/src/com/google/common/util/concurrent/ForwardingBlockingQueue.java b/guava/src/com/google/common/util/concurrent/ForwardingBlockingQueue.java index 2c9bdebe3129..79ec94a1e5db 100644 --- a/guava/src/com/google/common/util/concurrent/ForwardingBlockingQueue.java +++ b/guava/src/com/google/common/util/concurrent/ForwardingBlockingQueue.java @@ -15,6 +15,7 @@ package com.google.common.util.concurrent; import com.google.common.annotations.GwtIncompatible; +import com.google.common.annotations.J2ktIncompatible; import com.google.common.collect.ForwardingQueue; import com.google.errorprone.annotations.CanIgnoreReturnValue; import java.util.Collection; @@ -36,6 +37,7 @@ * @param the type of elements held in this collection * @since 4.0 */ +@J2ktIncompatible @GwtIncompatible @ElementTypesAreNonnullByDefault public abstract class ForwardingBlockingQueue extends ForwardingQueue diff --git a/guava/src/com/google/common/util/concurrent/ForwardingCondition.java b/guava/src/com/google/common/util/concurrent/ForwardingCondition.java index d17f98cf2aa1..885cca7fcd3a 100644 --- a/guava/src/com/google/common/util/concurrent/ForwardingCondition.java +++ b/guava/src/com/google/common/util/concurrent/ForwardingCondition.java @@ -14,11 +14,13 @@ package com.google.common.util.concurrent; +import com.google.common.annotations.J2ktIncompatible; import java.util.Date; import java.util.concurrent.TimeUnit; import java.util.concurrent.locks.Condition; /** Forwarding wrapper around a {@code Condition}. */ +@J2ktIncompatible @ElementTypesAreNonnullByDefault abstract class ForwardingCondition implements Condition { abstract Condition delegate(); diff --git a/guava/src/com/google/common/util/concurrent/ForwardingExecutorService.java b/guava/src/com/google/common/util/concurrent/ForwardingExecutorService.java index 9a87b5c981ad..986278dafa02 100644 --- a/guava/src/com/google/common/util/concurrent/ForwardingExecutorService.java +++ b/guava/src/com/google/common/util/concurrent/ForwardingExecutorService.java @@ -15,6 +15,7 @@ package com.google.common.util.concurrent; import com.google.common.annotations.GwtIncompatible; +import com.google.common.annotations.J2ktIncompatible; import com.google.common.collect.ForwardingObject; import com.google.errorprone.annotations.CanIgnoreReturnValue; import com.google.errorprone.annotations.CheckReturnValue; @@ -33,9 +34,14 @@ * should override one or more methods to modify the behavior of the backing executor service as * desired per the decorator pattern. * + *

    {@code default} method warning: This class does not forward calls to {@code + * default} methods. Instead, it inherits their default implementations. When those implementations + * invoke methods, they invoke methods on the {@code ForwardingExecutorService}. + * * @author Kurt Alfred Kluever * @since 10.0 */ +@J2ktIncompatible @GwtIncompatible @ElementTypesAreNonnullByDefault public abstract class ForwardingExecutorService extends ForwardingObject diff --git a/guava/src/com/google/common/util/concurrent/ForwardingListeningExecutorService.java b/guava/src/com/google/common/util/concurrent/ForwardingListeningExecutorService.java index 592a9f5eed74..25dbf0de76f5 100644 --- a/guava/src/com/google/common/util/concurrent/ForwardingListeningExecutorService.java +++ b/guava/src/com/google/common/util/concurrent/ForwardingListeningExecutorService.java @@ -15,6 +15,7 @@ package com.google.common.util.concurrent; import com.google.common.annotations.GwtIncompatible; +import com.google.common.annotations.J2ktIncompatible; import java.util.concurrent.Callable; import org.checkerframework.checker.nullness.qual.Nullable; @@ -24,9 +25,14 @@ * executor service as desired per the decorator pattern. * + *

    {@code default} method warning: This class does not forward calls to {@code + * default} methods. Instead, it inherits their default implementations. When those implementations + * invoke methods, they invoke methods on the {@code ForwardingListeningExecutorService}. + * * @author Isaac Shum * @since 10.0 */ +@J2ktIncompatible @GwtIncompatible @ElementTypesAreNonnullByDefault public abstract class ForwardingListeningExecutorService extends ForwardingExecutorService diff --git a/guava/src/com/google/common/util/concurrent/ForwardingLock.java b/guava/src/com/google/common/util/concurrent/ForwardingLock.java index db2026ab414c..558b6e3decc0 100644 --- a/guava/src/com/google/common/util/concurrent/ForwardingLock.java +++ b/guava/src/com/google/common/util/concurrent/ForwardingLock.java @@ -14,11 +14,13 @@ package com.google.common.util.concurrent; +import com.google.common.annotations.J2ktIncompatible; import java.util.concurrent.TimeUnit; import java.util.concurrent.locks.Condition; import java.util.concurrent.locks.Lock; /** Forwarding wrapper around a {@code Lock}. */ +@J2ktIncompatible @ElementTypesAreNonnullByDefault abstract class ForwardingLock implements Lock { abstract Lock delegate(); diff --git a/guava/src/com/google/common/util/concurrent/Futures.java b/guava/src/com/google/common/util/concurrent/Futures.java index 856aacda7c52..31889609a773 100644 --- a/guava/src/com/google/common/util/concurrent/Futures.java +++ b/guava/src/com/google/common/util/concurrent/Futures.java @@ -21,9 +21,9 @@ import static com.google.common.util.concurrent.Uninterruptibles.getUninterruptibly; import static java.util.Objects.requireNonNull; -import com.google.common.annotations.Beta; import com.google.common.annotations.GwtCompatible; import com.google.common.annotations.GwtIncompatible; +import com.google.common.annotations.J2ktIncompatible; import com.google.common.base.Function; import com.google.common.base.MoreObjects; import com.google.common.base.Preconditions; @@ -225,6 +225,7 @@ private Futures() {} * @throws RejectedExecutionException if the task cannot be scheduled for execution * @since 28.0 */ + @J2ktIncompatible @GwtIncompatible // java.util.concurrent.ScheduledExecutorService // TODO(cpovirk): Return ListenableScheduledFuture? public static ListenableFuture scheduleAsync( @@ -238,6 +239,7 @@ private Futures() {} * @throws RejectedExecutionException if the task cannot be scheduled for execution * @since 23.0 */ + @J2ktIncompatible @GwtIncompatible // java.util.concurrent.ScheduledExecutorService @SuppressWarnings("GoodTime") // should accept a java.time.Duration // TODO(cpovirk): Return ListenableScheduledFuture? @@ -247,16 +249,12 @@ private Futures() {} TimeUnit timeUnit, ScheduledExecutorService executorService) { TrustedListenableFutureTask task = TrustedListenableFutureTask.create(callable); - final Future scheduled = executorService.schedule(task, delay, timeUnit); - task.addListener( - new Runnable() { - @Override - public void run() { - // Don't want to interrupt twice - scheduled.cancel(false); - } - }, - directExecutor()); + Future scheduled = executorService.schedule(task, delay, timeUnit); + /* + * Even when the user interrupts the task, we pass `false` to `cancel` so that we don't + * interrupt a second time after the interruption performed by TrustedListenableFutureTask. + */ + task.addListener(() -> scheduled.cancel(false), directExecutor()); return task; } @@ -296,7 +294,7 @@ public void run() { * @param executor the executor that runs {@code fallback} if {@code input} fails * @since 19.0 */ - @Beta + @J2ktIncompatible @Partially.GwtIncompatible("AVAILABLE but requires exceptionType to be Throwable.class") public static ListenableFuture catching( ListenableFuture input, @@ -361,7 +359,7 @@ public void run() { * @param executor the executor that runs {@code fallback} if {@code input} fails * @since 19.0 (similar functionality in 14.0 as {@code withFallback}) */ - @Beta + @J2ktIncompatible @Partially.GwtIncompatible("AVAILABLE but requires exceptionType to be Throwable.class") public static ListenableFuture catchingAsync( ListenableFuture input, @@ -382,7 +380,7 @@ public void run() { * @param scheduledExecutor The executor service to enforce the timeout. * @since 28.0 */ - @Beta + @J2ktIncompatible @GwtIncompatible // java.util.concurrent.ScheduledExecutorService public static ListenableFuture withTimeout( ListenableFuture delegate, Duration time, ScheduledExecutorService scheduledExecutor) { @@ -401,7 +399,7 @@ public void run() { * @param scheduledExecutor The executor service to enforce the timeout. * @since 19.0 */ - @Beta + @J2ktIncompatible @GwtIncompatible // java.util.concurrent.ScheduledExecutorService @SuppressWarnings("GoodTime") // should accept a java.time.Duration public static ListenableFuture withTimeout( @@ -447,7 +445,6 @@ public void run() { * input's failure (if not) * @since 19.0 (in 11.0 as {@code transform}) */ - @Beta public static ListenableFuture transformAsync( ListenableFuture input, @@ -485,7 +482,6 @@ ListenableFuture transformAsync( * @return A future that holds result of the transformation. * @since 9.0 (in 2.0 as {@code compose}) */ - @Beta public static ListenableFuture transform( ListenableFuture input, Function function, Executor executor) { @@ -512,7 +508,7 @@ ListenableFuture transform( * @return A future that returns the result of the transformation. * @since 10.0 */ - @Beta + @J2ktIncompatible @GwtIncompatible // TODO public static Future lazyTransform( final Future input, final Function function) { @@ -572,7 +568,6 @@ private O applyTransformation(I input) throws ExecutionException { * @return a future that provides a list of the results of the component futures * @since 10.0 */ - @Beta @SafeVarargs public static ListenableFuture> allAsList( ListenableFuture... futures) { @@ -600,7 +595,6 @@ private O applyTransformation(I input) throws ExecutionException { * @return a future that provides a list of the results of the component futures * @since 10.0 */ - @Beta public static ListenableFuture> allAsList( Iterable> futures) { ListenableFuture> nullable = @@ -619,7 +613,6 @@ private O applyTransformation(I input) throws ExecutionException { * * @since 20.0 */ - @Beta @SafeVarargs public static FutureCombiner whenAllComplete( ListenableFuture... futures) { @@ -634,7 +627,6 @@ private O applyTransformation(I input) throws ExecutionException { * * @since 20.0 */ - @Beta public static FutureCombiner whenAllComplete( Iterable> futures) { return new FutureCombiner(false, ImmutableList.copyOf(futures)); @@ -647,7 +639,6 @@ private O applyTransformation(I input) throws ExecutionException { * * @since 20.0 */ - @Beta @SafeVarargs public static FutureCombiner whenAllSucceed( ListenableFuture... futures) { @@ -661,7 +652,6 @@ private O applyTransformation(I input) throws ExecutionException { * * @since 20.0 */ - @Beta public static FutureCombiner whenAllSucceed( Iterable> futures) { return new FutureCombiner(true, ImmutableList.copyOf(futures)); @@ -693,7 +683,6 @@ private O applyTransformation(I input) throws ExecutionException { * * @since 20.0 */ - @Beta @GwtCompatible public static final class FutureCombiner { private final boolean allMustSucceed; @@ -855,7 +844,6 @@ protected void afterDone() { * @return a future that provides a list of the results of the component futures * @since 10.0 */ - @Beta @SafeVarargs public static ListenableFuture> successfulAsList( ListenableFuture... futures) { @@ -892,7 +880,6 @@ protected void afterDone() { * @return a future that provides a list of the results of the component futures * @since 10.0 */ - @Beta public static ListenableFuture> successfulAsList( Iterable> futures) { return new ListFuture(ImmutableList.copyOf(futures), false); @@ -932,14 +919,7 @@ protected void afterDone() { final ImmutableList> delegates = delegatesBuilder.build(); for (int i = 0; i < copy.length; i++) { final int localI = i; - copy[i].addListener( - new Runnable() { - @Override - public void run() { - state.recordInputCompletion(delegates, localI); - } - }, - directExecutor()); + copy[i].addListener(() -> state.recordInputCompletion(delegates, localI), directExecutor()); } @SuppressWarnings("unchecked") @@ -1238,8 +1218,8 @@ public String toString() { * does not have a suitable constructor * @since 19.0 (in 10.0 as {@code get}) */ - @Beta @CanIgnoreReturnValue + @J2ktIncompatible @GwtIncompatible // reflection @ParametricNullness public static V getChecked( @@ -1290,8 +1270,8 @@ public String toString() { * does not have a suitable constructor * @since 28.0 */ - @Beta @CanIgnoreReturnValue + @J2ktIncompatible @GwtIncompatible // reflection @ParametricNullness public static V getChecked( @@ -1342,8 +1322,8 @@ public String toString() { * does not have a suitable constructor * @since 19.0 (in 10.0 as {@code get} and with different parameter order) */ - @Beta @CanIgnoreReturnValue + @J2ktIncompatible @GwtIncompatible // reflection @SuppressWarnings("GoodTime") // should accept a java.time.Duration @ParametricNullness diff --git a/guava/src/com/google/common/util/concurrent/FuturesGetChecked.java b/guava/src/com/google/common/util/concurrent/FuturesGetChecked.java index c7bc89e548d9..c512d82ee37f 100644 --- a/guava/src/com/google/common/util/concurrent/FuturesGetChecked.java +++ b/guava/src/com/google/common/util/concurrent/FuturesGetChecked.java @@ -19,6 +19,7 @@ import static java.util.Arrays.asList; import com.google.common.annotations.GwtIncompatible; +import com.google.common.annotations.J2ktIncompatible; import com.google.common.annotations.VisibleForTesting; import com.google.common.base.Function; import com.google.common.collect.Ordering; @@ -39,6 +40,7 @@ import org.checkerframework.checker.nullness.qual.Nullable; /** Static methods used to implement {@link Futures#getChecked(Future, Class)}. */ +@J2ktIncompatible @GwtIncompatible @ElementTypesAreNonnullByDefault final class FuturesGetChecked { @@ -256,12 +258,8 @@ private static List> preferringStrings( private static final Ordering> WITH_STRING_PARAM_FIRST = Ordering.natural() .onResultOf( - new Function, Boolean>() { - @Override - public Boolean apply(Constructor input) { - return asList(input.getParameterTypes()).contains(String.class); - } - }) + (Function, Boolean>) + input -> asList(input.getParameterTypes()).contains(String.class)) .reverse(); @CheckForNull diff --git a/guava/src/com/google/common/util/concurrent/GwtFluentFutureCatchingSpecialization.java b/guava/src/com/google/common/util/concurrent/GwtFluentFutureCatchingSpecialization.java index d29a673dd854..fdbe50909a7d 100644 --- a/guava/src/com/google/common/util/concurrent/GwtFluentFutureCatchingSpecialization.java +++ b/guava/src/com/google/common/util/concurrent/GwtFluentFutureCatchingSpecialization.java @@ -15,6 +15,7 @@ package com.google.common.util.concurrent; import com.google.common.annotations.GwtCompatible; +import com.google.common.annotations.J2ktIncompatible; import org.checkerframework.checker.nullness.qual.Nullable; /** @@ -23,6 +24,7 @@ * FluentFuture.catching} family of methods. Those versions have slightly different signatures. */ @GwtCompatible(emulated = true) +@J2ktIncompatible // Super-sourced @ElementTypesAreNonnullByDefault abstract class GwtFluentFutureCatchingSpecialization extends AbstractFuture { diff --git a/guava/src/com/google/common/util/concurrent/GwtFuturesCatchingSpecialization.java b/guava/src/com/google/common/util/concurrent/GwtFuturesCatchingSpecialization.java index 95131cec33f6..35adfdb67201 100644 --- a/guava/src/com/google/common/util/concurrent/GwtFuturesCatchingSpecialization.java +++ b/guava/src/com/google/common/util/concurrent/GwtFuturesCatchingSpecialization.java @@ -15,6 +15,7 @@ package com.google.common.util.concurrent; import com.google.common.annotations.GwtCompatible; +import com.google.common.annotations.J2ktIncompatible; /** * Hidden superclass of {@link Futures} that provides us a place to declare special GWT versions of @@ -23,6 +24,7 @@ * different signatures. */ @GwtCompatible(emulated = true) +@J2ktIncompatible // Super-sourced @ElementTypesAreNonnullByDefault abstract class GwtFuturesCatchingSpecialization { /* diff --git a/guava/src/com/google/common/util/concurrent/ImmediateFuture.java b/guava/src/com/google/common/util/concurrent/ImmediateFuture.java index 8b1c17ae48be..f09816c4e3cb 100644 --- a/guava/src/com/google/common/util/concurrent/ImmediateFuture.java +++ b/guava/src/com/google/common/util/concurrent/ImmediateFuture.java @@ -23,6 +23,7 @@ import java.util.concurrent.TimeUnit; import java.util.logging.Level; import java.util.logging.Logger; +import javax.annotation.CheckForNull; import org.checkerframework.checker.nullness.qual.Nullable; /** Implementation of {@link Futures#immediateFuture}. */ @@ -98,7 +99,8 @@ static final class ImmediateFailedFuture extends Tru } static final class ImmediateCancelledFuture extends TrustedFuture { - static final @Nullable ImmediateCancelledFuture INSTANCE = + @CheckForNull + static final ImmediateCancelledFuture INSTANCE = AbstractFuture.GENERATE_CANCELLATION_CAUSES ? null : new ImmediateCancelledFuture<>(); ImmediateCancelledFuture() { diff --git a/guava/src/com/google/common/util/concurrent/Internal.java b/guava/src/com/google/common/util/concurrent/Internal.java index 06bee2ea0919..1fc3f4f8c464 100644 --- a/guava/src/com/google/common/util/concurrent/Internal.java +++ b/guava/src/com/google/common/util/concurrent/Internal.java @@ -15,9 +15,11 @@ package com.google.common.util.concurrent; import com.google.common.annotations.GwtIncompatible; +import com.google.common.annotations.J2ktIncompatible; import java.time.Duration; /** This class is for {@code com.google.common.util.concurrent} use only! */ +@J2ktIncompatible @GwtIncompatible // java.time.Duration @ElementTypesAreNonnullByDefault final class Internal { diff --git a/guava/src/com/google/common/util/concurrent/JdkFutureAdapters.java b/guava/src/com/google/common/util/concurrent/JdkFutureAdapters.java index 5e951aa1d2b9..b91b5fe7ebc3 100644 --- a/guava/src/com/google/common/util/concurrent/JdkFutureAdapters.java +++ b/guava/src/com/google/common/util/concurrent/JdkFutureAdapters.java @@ -19,6 +19,7 @@ import com.google.common.annotations.Beta; import com.google.common.annotations.GwtIncompatible; +import com.google.common.annotations.J2ktIncompatible; import java.util.concurrent.ExecutionException; import java.util.concurrent.Executor; import java.util.concurrent.Executors; @@ -32,10 +33,14 @@ * that, whenever possible, it is strongly preferred to modify those libraries to return {@code * ListenableFuture} directly. * + *

    For interoperability between {@code ListenableFuture} and {@code CompletableFuture}, + * consider Future Converter. + * * @author Sven Mawson * @since 10.0 (replacing {@code Futures.makeListenable}, which existed in 1.0) */ @Beta +@J2ktIncompatible @GwtIncompatible @ElementTypesAreNonnullByDefault public final class JdkFutureAdapters { diff --git a/guava/src/com/google/common/util/concurrent/ListenableFutureTask.java b/guava/src/com/google/common/util/concurrent/ListenableFutureTask.java index 678a6c671a46..161fa895f416 100644 --- a/guava/src/com/google/common/util/concurrent/ListenableFutureTask.java +++ b/guava/src/com/google/common/util/concurrent/ListenableFutureTask.java @@ -18,6 +18,7 @@ import static java.util.concurrent.TimeUnit.NANOSECONDS; import com.google.common.annotations.GwtIncompatible; +import com.google.common.annotations.J2ktIncompatible; import com.google.errorprone.annotations.CanIgnoreReturnValue; import java.util.concurrent.Callable; import java.util.concurrent.ExecutionException; @@ -40,6 +41,7 @@ * @author Sven Mawson * @since 1.0 */ +@J2ktIncompatible @GwtIncompatible @ElementTypesAreNonnullByDefault public class ListenableFutureTask extends FutureTask diff --git a/guava/src/com/google/common/util/concurrent/ListenerCallQueue.java b/guava/src/com/google/common/util/concurrent/ListenerCallQueue.java index 451d13c2ad7a..4ef7ed36c056 100644 --- a/guava/src/com/google/common/util/concurrent/ListenerCallQueue.java +++ b/guava/src/com/google/common/util/concurrent/ListenerCallQueue.java @@ -17,6 +17,7 @@ import static com.google.common.base.Preconditions.checkNotNull; import com.google.common.annotations.GwtIncompatible; +import com.google.common.annotations.J2ktIncompatible; import com.google.common.base.Preconditions; import com.google.common.collect.Queues; import com.google.errorprone.annotations.concurrent.GuardedBy; @@ -52,6 +53,7 @@ * the listeners can be delayed slightly so that locks can be dropped. Also, because {@link * #dispatch} is expected to be called concurrently, it is idempotent. */ +@J2ktIncompatible @GwtIncompatible @ElementTypesAreNonnullByDefault final class ListenerCallQueue { diff --git a/guava/src/com/google/common/util/concurrent/ListeningScheduledExecutorService.java b/guava/src/com/google/common/util/concurrent/ListeningScheduledExecutorService.java index 25185b91a454..19f9a8c327ae 100644 --- a/guava/src/com/google/common/util/concurrent/ListeningScheduledExecutorService.java +++ b/guava/src/com/google/common/util/concurrent/ListeningScheduledExecutorService.java @@ -17,6 +17,7 @@ import static com.google.common.util.concurrent.Internal.toNanosSaturated; import com.google.common.annotations.GwtIncompatible; +import com.google.common.annotations.J2ktIncompatible; import java.time.Duration; import java.util.concurrent.Callable; import java.util.concurrent.ScheduledExecutorService; @@ -32,6 +33,7 @@ * @author Chris Povirk * @since 10.0 */ +@J2ktIncompatible @GwtIncompatible @ElementTypesAreNonnullByDefault public interface ListeningScheduledExecutorService diff --git a/guava/src/com/google/common/util/concurrent/Monitor.java b/guava/src/com/google/common/util/concurrent/Monitor.java index fdb7cf543666..2ed31eda4ecc 100644 --- a/guava/src/com/google/common/util/concurrent/Monitor.java +++ b/guava/src/com/google/common/util/concurrent/Monitor.java @@ -18,6 +18,7 @@ import static com.google.common.util.concurrent.Internal.toNanosSaturated; import com.google.common.annotations.GwtIncompatible; +import com.google.common.annotations.J2ktIncompatible; import com.google.common.primitives.Longs; import com.google.errorprone.annotations.concurrent.GuardedBy; import com.google.j2objc.annotations.Weak; @@ -199,6 +200,7 @@ * @author Martin Buchholz * @since 10.0 */ +@J2ktIncompatible @GwtIncompatible @SuppressWarnings("GuardedBy") // TODO(b/35466881): Fix or suppress. @ElementTypesAreNonnullByDefault diff --git a/guava/src/com/google/common/util/concurrent/MoreExecutors.java b/guava/src/com/google/common/util/concurrent/MoreExecutors.java index 73f5cad7b4af..55a778a5c213 100644 --- a/guava/src/com/google/common/util/concurrent/MoreExecutors.java +++ b/guava/src/com/google/common/util/concurrent/MoreExecutors.java @@ -21,6 +21,7 @@ import com.google.common.annotations.Beta; import com.google.common.annotations.GwtCompatible; import com.google.common.annotations.GwtIncompatible; +import com.google.common.annotations.J2ktIncompatible; import com.google.common.annotations.VisibleForTesting; import com.google.common.base.Supplier; import com.google.common.base.Throwables; @@ -81,6 +82,7 @@ private MoreExecutors() {} * @since 28.0 */ @Beta + @J2ktIncompatible @GwtIncompatible // TODO public static ExecutorService getExitingExecutorService( ThreadPoolExecutor executor, Duration terminationTimeout) { @@ -102,6 +104,7 @@ public static ExecutorService getExitingExecutorService( * @return an unmodifiable version of the input which will not hang the JVM */ @Beta + @J2ktIncompatible @GwtIncompatible // TODO @SuppressWarnings("GoodTime") // should accept a java.time.Duration public static ExecutorService getExitingExecutorService( @@ -123,6 +126,7 @@ public static ExecutorService getExitingExecutorService( * @return an unmodifiable version of the input which will not hang the JVM */ @Beta + @J2ktIncompatible @GwtIncompatible // concurrency public static ExecutorService getExitingExecutorService(ThreadPoolExecutor executor) { return new Application().getExitingExecutorService(executor); @@ -142,6 +146,7 @@ public static ExecutorService getExitingExecutorService(ThreadPoolExecutor execu * @since 28.0 */ @Beta + @J2ktIncompatible @GwtIncompatible // java.time.Duration public static ScheduledExecutorService getExitingScheduledExecutorService( ScheduledThreadPoolExecutor executor, Duration terminationTimeout) { @@ -163,6 +168,7 @@ public static ScheduledExecutorService getExitingScheduledExecutorService( * @return an unmodifiable version of the input which will not hang the JVM */ @Beta + @J2ktIncompatible @GwtIncompatible // TODO @SuppressWarnings("GoodTime") // should accept a java.time.Duration public static ScheduledExecutorService getExitingScheduledExecutorService( @@ -185,6 +191,7 @@ public static ScheduledExecutorService getExitingScheduledExecutorService( * @return an unmodifiable version of the input which will not hang the JVM */ @Beta + @J2ktIncompatible @GwtIncompatible // TODO public static ScheduledExecutorService getExitingScheduledExecutorService( ScheduledThreadPoolExecutor executor) { @@ -203,6 +210,7 @@ public static ScheduledExecutorService getExitingScheduledExecutorService( * @since 28.0 */ @Beta + @J2ktIncompatible @GwtIncompatible // java.time.Duration public static void addDelayedShutdownHook(ExecutorService service, Duration terminationTimeout) { addDelayedShutdownHook(service, toNanosSaturated(terminationTimeout), TimeUnit.NANOSECONDS); @@ -220,6 +228,7 @@ public static void addDelayedShutdownHook(ExecutorService service, Duration term * @param timeUnit unit of time for the time parameter */ @Beta + @J2ktIncompatible @GwtIncompatible // TODO @SuppressWarnings("GoodTime") // should accept a java.time.Duration public static void addDelayedShutdownHook( @@ -228,6 +237,7 @@ public static void addDelayedShutdownHook( } /** Represents the current application to register shutdown hooks. */ + @J2ktIncompatible @GwtIncompatible // TODO @VisibleForTesting static class Application { @@ -288,6 +298,7 @@ void addShutdownHook(Thread hook) { } } + @J2ktIncompatible @GwtIncompatible // TODO private static void useDaemonThreadFactory(ThreadPoolExecutor executor) { executor.setThreadFactory( @@ -298,6 +309,7 @@ private static void useDaemonThreadFactory(ThreadPoolExecutor executor) { } // See newDirectExecutorService javadoc for behavioral notes. + @J2ktIncompatible @GwtIncompatible // TODO private static final class DirectExecutorService extends AbstractListeningExecutorService { /** Lock used whenever accessing the state variables (runningTasks, shutdown) of the executor */ @@ -426,6 +438,7 @@ private void endTask() { * * @since 18.0 (present as MoreExecutors.sameThreadExecutor() since 10.0) */ + @J2ktIncompatible @GwtIncompatible // TODO public static ListeningExecutorService newDirectExecutorService() { return new DirectExecutorService(); @@ -540,6 +553,7 @@ public static Executor directExecutor() { * * @since 23.3 (since 23.1 as {@code sequentialExecutor}) */ + @J2ktIncompatible @GwtIncompatible public static Executor newSequentialExecutor(Executor delegate) { return new SequentialExecutor(delegate); @@ -560,6 +574,7 @@ public static Executor newSequentialExecutor(Executor delegate) { * * @since 10.0 */ + @J2ktIncompatible @GwtIncompatible // TODO public static ListeningExecutorService listeningDecorator(ExecutorService delegate) { return (delegate instanceof ListeningExecutorService) @@ -585,6 +600,7 @@ public static ListeningExecutorService listeningDecorator(ExecutorService delega * * @since 10.0 */ + @J2ktIncompatible @GwtIncompatible // TODO public static ListeningScheduledExecutorService listeningDecorator( ScheduledExecutorService delegate) { @@ -593,6 +609,7 @@ public static ListeningScheduledExecutorService listeningDecorator( : new ScheduledListeningDecorator(delegate); } + @J2ktIncompatible @GwtIncompatible // TODO private static class ListeningDecorator extends AbstractListeningExecutorService { private final ExecutorService delegate; @@ -637,6 +654,7 @@ public final String toString() { } } + @J2ktIncompatible @GwtIncompatible // TODO private static final class ScheduledListeningDecorator extends ListeningDecorator implements ListeningScheduledExecutorService { @@ -715,6 +733,7 @@ public int compareTo(Delayed other) { } } + @J2ktIncompatible @GwtIncompatible // TODO private static final class NeverSuccessfulListenableFutureTask extends AbstractFuture.TrustedFuture<@Nullable Void> implements Runnable { @@ -756,6 +775,7 @@ protected String pendingToString() { * An implementation of {@link ExecutorService#invokeAny} for {@link ListeningExecutorService} * implementations. */ + @J2ktIncompatible @GwtIncompatible @ParametricNullness static T invokeAnyImpl( @@ -773,6 +793,7 @@ protected String pendingToString() { * implementations. */ @SuppressWarnings("GoodTime") // should accept a java.time.Duration + @J2ktIncompatible @GwtIncompatible @ParametricNullness static T invokeAnyImpl( @@ -854,6 +875,7 @@ protected String pendingToString() { /** * Submits the task and adds a listener that adds the future to {@code queue} when it completes. */ + @J2ktIncompatible @GwtIncompatible // TODO private static ListenableFuture submitAndAddQueueListener( ListeningExecutorService executorService, @@ -882,6 +904,7 @@ public void run() { * @since 14.0 */ @Beta + @J2ktIncompatible @GwtIncompatible // concurrency public static ThreadFactory platformThreadFactory() { if (!isAppEngineWithApiClasses()) { @@ -908,6 +931,7 @@ public static ThreadFactory platformThreadFactory() { } } + @J2ktIncompatible @GwtIncompatible // TODO private static boolean isAppEngineWithApiClasses() { if (System.getProperty("com.google.appengine.runtime.environment") == null) { @@ -943,6 +967,7 @@ private static boolean isAppEngineWithApiClasses() { * Creates a thread using {@link #platformThreadFactory}, and sets its name to {@code name} unless * changing the name is forbidden by the security manager. */ + @J2ktIncompatible @GwtIncompatible // concurrency static Thread newThread(String name, Runnable runnable) { checkNotNull(name); @@ -970,6 +995,7 @@ static Thread newThread(String name, Runnable runnable) { * @param executor The executor to decorate * @param nameSupplier The source of names for each task */ + @J2ktIncompatible @GwtIncompatible // concurrency static Executor renamingDecorator(final Executor executor, final Supplier nameSupplier) { checkNotNull(executor); @@ -993,6 +1019,7 @@ public void execute(Runnable command) { * @param service The executor to decorate * @param nameSupplier The source of names for each task */ + @J2ktIncompatible @GwtIncompatible // concurrency static ExecutorService renamingDecorator( final ExecutorService service, final Supplier nameSupplier) { @@ -1022,6 +1049,7 @@ protected Runnable wrapTask(Runnable command) { * @param service The executor to decorate * @param nameSupplier The source of names for each task */ + @J2ktIncompatible @GwtIncompatible // concurrency static ScheduledExecutorService renamingDecorator( final ScheduledExecutorService service, final Supplier nameSupplier) { @@ -1065,6 +1093,7 @@ protected Runnable wrapTask(Runnable command) { */ @Beta @CanIgnoreReturnValue + @J2ktIncompatible @GwtIncompatible // java.time.Duration public static boolean shutdownAndAwaitTermination(ExecutorService service, Duration timeout) { return shutdownAndAwaitTermination(service, toNanosSaturated(timeout), TimeUnit.NANOSECONDS); @@ -1096,6 +1125,7 @@ public static boolean shutdownAndAwaitTermination(ExecutorService service, Durat */ @Beta @CanIgnoreReturnValue + @J2ktIncompatible @GwtIncompatible // concurrency @SuppressWarnings("GoodTime") // should accept a java.time.Duration public static boolean shutdownAndAwaitTermination( diff --git a/guava/src/com/google/common/util/concurrent/OverflowAvoidingLockSupport.java b/guava/src/com/google/common/util/concurrent/OverflowAvoidingLockSupport.java index 3038ab7bd004..905726597fcb 100644 --- a/guava/src/com/google/common/util/concurrent/OverflowAvoidingLockSupport.java +++ b/guava/src/com/google/common/util/concurrent/OverflowAvoidingLockSupport.java @@ -16,6 +16,7 @@ import static java.lang.Math.min; +import com.google.common.annotations.J2ktIncompatible; import java.util.concurrent.locks.LockSupport; import javax.annotation.CheckForNull; @@ -23,6 +24,7 @@ * Works around an android bug, where parking for more than INT_MAX seconds can produce an abort * signal on 32 bit devices running Android Q. */ +@J2ktIncompatible @ElementTypesAreNonnullByDefault final class OverflowAvoidingLockSupport { // Represents the max nanoseconds representable on a linux timespec with a 32 bit tv_sec diff --git a/guava/src/com/google/common/util/concurrent/RateLimiter.java b/guava/src/com/google/common/util/concurrent/RateLimiter.java index 4b8b02554165..1dd733f3bc6a 100644 --- a/guava/src/com/google/common/util/concurrent/RateLimiter.java +++ b/guava/src/com/google/common/util/concurrent/RateLimiter.java @@ -23,6 +23,7 @@ import com.google.common.annotations.Beta; import com.google.common.annotations.GwtIncompatible; +import com.google.common.annotations.J2ktIncompatible; import com.google.common.annotations.VisibleForTesting; import com.google.common.base.Stopwatch; import com.google.common.util.concurrent.SmoothRateLimiter.SmoothBursty; @@ -93,6 +94,7 @@ // TODO(user): switch to nano precision. A natural unit of cost is "bytes", and a micro precision // would mean a maximum rate of "1MB/s", which might be small in some cases. @Beta +@J2ktIncompatible @GwtIncompatible @ElementTypesAreNonnullByDefault public abstract class RateLimiter { diff --git a/guava/src/com/google/common/util/concurrent/SequentialExecutor.java b/guava/src/com/google/common/util/concurrent/SequentialExecutor.java index d0b600be840e..c842d7e07d56 100644 --- a/guava/src/com/google/common/util/concurrent/SequentialExecutor.java +++ b/guava/src/com/google/common/util/concurrent/SequentialExecutor.java @@ -22,6 +22,7 @@ import static java.lang.System.identityHashCode; import com.google.common.annotations.GwtIncompatible; +import com.google.common.annotations.J2ktIncompatible; import com.google.common.base.Preconditions; import com.google.errorprone.annotations.concurrent.GuardedBy; import com.google.j2objc.annotations.RetainedWith; @@ -47,6 +48,7 @@ * If an {@code Error} is thrown, the error will propagate and execution will stop until it is * restarted by a call to {@link #execute}. */ +@J2ktIncompatible @GwtIncompatible @ElementTypesAreNonnullByDefault final class SequentialExecutor implements Executor { diff --git a/guava/src/com/google/common/util/concurrent/Service.java b/guava/src/com/google/common/util/concurrent/Service.java index dd0c7e6d947a..9ca205de6885 100644 --- a/guava/src/com/google/common/util/concurrent/Service.java +++ b/guava/src/com/google/common/util/concurrent/Service.java @@ -17,6 +17,7 @@ import static com.google.common.util.concurrent.Internal.toNanosSaturated; import com.google.common.annotations.GwtIncompatible; +import com.google.common.annotations.J2ktIncompatible; import com.google.errorprone.annotations.CanIgnoreReturnValue; import com.google.errorprone.annotations.DoNotMock; import java.time.Duration; @@ -55,6 +56,7 @@ * @since 9.0 (in 1.0 as {@code com.google.common.base.Service}) */ @DoNotMock("Create an AbstractIdleService") +@J2ktIncompatible @GwtIncompatible @ElementTypesAreNonnullByDefault public interface Service { diff --git a/guava/src/com/google/common/util/concurrent/ServiceManager.java b/guava/src/com/google/common/util/concurrent/ServiceManager.java index 5ab95ffa6b74..42652c96768a 100644 --- a/guava/src/com/google/common/util/concurrent/ServiceManager.java +++ b/guava/src/com/google/common/util/concurrent/ServiceManager.java @@ -32,6 +32,7 @@ import static java.util.concurrent.TimeUnit.MILLISECONDS; import com.google.common.annotations.GwtIncompatible; +import com.google.common.annotations.J2ktIncompatible; import com.google.common.base.Function; import com.google.common.base.MoreObjects; import com.google.common.base.Stopwatch; @@ -120,6 +121,7 @@ * @author Luke Sandberg * @since 14.0 */ +@J2ktIncompatible @GwtIncompatible @ElementTypesAreNonnullByDefault public final class ServiceManager implements ServiceManagerBridge { diff --git a/guava/src/com/google/common/util/concurrent/ServiceManagerBridge.java b/guava/src/com/google/common/util/concurrent/ServiceManagerBridge.java index 7ae430e3d251..71fe01c0bb63 100644 --- a/guava/src/com/google/common/util/concurrent/ServiceManagerBridge.java +++ b/guava/src/com/google/common/util/concurrent/ServiceManagerBridge.java @@ -17,6 +17,7 @@ package com.google.common.util.concurrent; import com.google.common.annotations.GwtIncompatible; +import com.google.common.annotations.J2ktIncompatible; import com.google.common.collect.ImmutableMultimap; import com.google.common.util.concurrent.Service.State; @@ -25,6 +26,7 @@ * servicesByState()}, to ensure binary compatibility with older Guava versions that specified * {@code servicesByState()} to return {@code ImmutableMultimap}. */ +@J2ktIncompatible @GwtIncompatible @ElementTypesAreNonnullByDefault interface ServiceManagerBridge { diff --git a/guava/src/com/google/common/util/concurrent/SimpleTimeLimiter.java b/guava/src/com/google/common/util/concurrent/SimpleTimeLimiter.java index c6ade6a3a0a5..551d598d0357 100644 --- a/guava/src/com/google/common/util/concurrent/SimpleTimeLimiter.java +++ b/guava/src/com/google/common/util/concurrent/SimpleTimeLimiter.java @@ -19,6 +19,7 @@ import com.google.common.annotations.Beta; import com.google.common.annotations.GwtIncompatible; +import com.google.common.annotations.J2ktIncompatible; import com.google.common.collect.ObjectArrays; import com.google.common.collect.Sets; import com.google.errorprone.annotations.CanIgnoreReturnValue; @@ -46,6 +47,7 @@ * @since 1.0 */ @Beta +@J2ktIncompatible @GwtIncompatible @ElementTypesAreNonnullByDefault public final class SimpleTimeLimiter implements TimeLimiter { @@ -111,6 +113,7 @@ private static T newProxy(Class interfaceType, InvocationHandler handler) return interfaceType.cast(object); } + @ParametricNullness private T callWithTimeout( Callable callable, long timeoutDuration, TimeUnit timeoutUnit, boolean amInterruptible) throws Exception { @@ -141,6 +144,7 @@ private static T newProxy(Class interfaceType, InvocationHandler handler) @CanIgnoreReturnValue @Override + @ParametricNullness public T callWithTimeout( Callable callable, long timeoutDuration, TimeUnit timeoutUnit) throws TimeoutException, InterruptedException, ExecutionException { @@ -163,6 +167,7 @@ private static T newProxy(Class interfaceType, InvocationHandler handler) @CanIgnoreReturnValue @Override + @ParametricNullness public T callUninterruptiblyWithTimeout( Callable callable, long timeoutDuration, TimeUnit timeoutUnit) throws TimeoutException, ExecutionException { diff --git a/guava/src/com/google/common/util/concurrent/SmoothRateLimiter.java b/guava/src/com/google/common/util/concurrent/SmoothRateLimiter.java index ca78905908ed..6f21ab6a3364 100644 --- a/guava/src/com/google/common/util/concurrent/SmoothRateLimiter.java +++ b/guava/src/com/google/common/util/concurrent/SmoothRateLimiter.java @@ -18,9 +18,11 @@ import static java.util.concurrent.TimeUnit.SECONDS; import com.google.common.annotations.GwtIncompatible; +import com.google.common.annotations.J2ktIncompatible; import com.google.common.math.LongMath; import java.util.concurrent.TimeUnit; +@J2ktIncompatible @GwtIncompatible @ElementTypesAreNonnullByDefault abstract class SmoothRateLimiter extends RateLimiter { diff --git a/guava/src/com/google/common/util/concurrent/Striped.java b/guava/src/com/google/common/util/concurrent/Striped.java index 2ea61cb3248a..37fa2fd7ef97 100644 --- a/guava/src/com/google/common/util/concurrent/Striped.java +++ b/guava/src/com/google/common/util/concurrent/Striped.java @@ -16,8 +16,8 @@ import static com.google.common.collect.Lists.newArrayList; -import com.google.common.annotations.Beta; import com.google.common.annotations.GwtIncompatible; +import com.google.common.annotations.J2ktIncompatible; import com.google.common.annotations.VisibleForTesting; import com.google.common.base.MoreObjects; import com.google.common.base.Preconditions; @@ -82,7 +82,7 @@ * @author Dimitris Andreou * @since 13.0 */ -@Beta +@J2ktIncompatible @GwtIncompatible @ElementTypesAreNonnullByDefault public abstract class Striped { diff --git a/guava/src/com/google/common/util/concurrent/ThreadFactoryBuilder.java b/guava/src/com/google/common/util/concurrent/ThreadFactoryBuilder.java index 6847b6ba1197..c0116f80b3d1 100644 --- a/guava/src/com/google/common/util/concurrent/ThreadFactoryBuilder.java +++ b/guava/src/com/google/common/util/concurrent/ThreadFactoryBuilder.java @@ -19,6 +19,7 @@ import static java.util.Objects.requireNonNull; import com.google.common.annotations.GwtIncompatible; +import com.google.common.annotations.J2ktIncompatible; import com.google.errorprone.annotations.CanIgnoreReturnValue; import java.lang.Thread.UncaughtExceptionHandler; import java.util.Locale; @@ -44,6 +45,7 @@ * @author Kurt Alfred Kluever * @since 4.0 */ +@J2ktIncompatible @GwtIncompatible @ElementTypesAreNonnullByDefault public final class ThreadFactoryBuilder { diff --git a/guava/src/com/google/common/util/concurrent/TimeLimiter.java b/guava/src/com/google/common/util/concurrent/TimeLimiter.java index 0245fec3ca87..d764d6067caa 100644 --- a/guava/src/com/google/common/util/concurrent/TimeLimiter.java +++ b/guava/src/com/google/common/util/concurrent/TimeLimiter.java @@ -18,6 +18,7 @@ import com.google.common.annotations.Beta; import com.google.common.annotations.GwtIncompatible; +import com.google.common.annotations.J2ktIncompatible; import com.google.errorprone.annotations.CanIgnoreReturnValue; import com.google.errorprone.annotations.DoNotMock; import java.time.Duration; @@ -36,6 +37,7 @@ */ @Beta @DoNotMock("Use FakeTimeLimiter") +@J2ktIncompatible @GwtIncompatible @ElementTypesAreNonnullByDefault public interface TimeLimiter { @@ -146,6 +148,7 @@ default T newProxy(T target, Class interfaceType, Duration timeout) { */ @SuppressWarnings("GoodTime") // should accept a java.time.Duration @CanIgnoreReturnValue + @ParametricNullness T callWithTimeout( Callable callable, long timeoutDuration, TimeUnit timeoutUnit) throws TimeoutException, InterruptedException, ExecutionException; @@ -167,6 +170,7 @@ default T newProxy(T target, Class interfaceType, Duration timeout) { * @since 28.0 */ @CanIgnoreReturnValue + @ParametricNullness default T callWithTimeout(Callable callable, Duration timeout) throws TimeoutException, InterruptedException, ExecutionException { return callWithTimeout(callable, toNanosSaturated(timeout), TimeUnit.NANOSECONDS); @@ -193,6 +197,7 @@ default T newProxy(T target, Class interfaceType, Duration timeout) { */ @SuppressWarnings("GoodTime") // should accept a java.time.Duration @CanIgnoreReturnValue + @ParametricNullness T callUninterruptiblyWithTimeout( Callable callable, long timeoutDuration, TimeUnit timeoutUnit) throws TimeoutException, ExecutionException; @@ -216,6 +221,7 @@ default T newProxy(T target, Class interfaceType, Duration timeout) { * @since 28.0 */ @CanIgnoreReturnValue + @ParametricNullness default T callUninterruptiblyWithTimeout( Callable callable, Duration timeout) throws TimeoutException, ExecutionException { return callUninterruptiblyWithTimeout( diff --git a/guava/src/com/google/common/util/concurrent/TimeoutFuture.java b/guava/src/com/google/common/util/concurrent/TimeoutFuture.java index ed8a7bfdbe70..aca62305463f 100644 --- a/guava/src/com/google/common/util/concurrent/TimeoutFuture.java +++ b/guava/src/com/google/common/util/concurrent/TimeoutFuture.java @@ -17,6 +17,7 @@ import static com.google.common.util.concurrent.MoreExecutors.directExecutor; import com.google.common.annotations.GwtIncompatible; +import com.google.common.annotations.J2ktIncompatible; import com.google.common.base.Preconditions; import java.util.concurrent.ExecutionException; import java.util.concurrent.Future; @@ -34,6 +35,7 @@ * in an {@link ExecutionException}) if the specified duration expires. The delegate future is * interrupted and cancelled if it times out. */ +@J2ktIncompatible @GwtIncompatible @ElementTypesAreNonnullByDefault final class TimeoutFuture extends FluentFuture.TrustedFuture { diff --git a/guava/src/com/google/common/util/concurrent/UncaughtExceptionHandlers.java b/guava/src/com/google/common/util/concurrent/UncaughtExceptionHandlers.java index 58c01c998122..1dc1094d4f94 100644 --- a/guava/src/com/google/common/util/concurrent/UncaughtExceptionHandlers.java +++ b/guava/src/com/google/common/util/concurrent/UncaughtExceptionHandlers.java @@ -17,6 +17,7 @@ import static java.util.logging.Level.SEVERE; import com.google.common.annotations.GwtIncompatible; +import com.google.common.annotations.J2ktIncompatible; import com.google.common.annotations.VisibleForTesting; import java.lang.Thread.UncaughtExceptionHandler; import java.util.Locale; @@ -28,6 +29,7 @@ * @author Gregory Kick * @since 8.0 */ +@J2ktIncompatible @GwtIncompatible @ElementTypesAreNonnullByDefault public final class UncaughtExceptionHandlers { diff --git a/guava/src/com/google/common/util/concurrent/UncheckedTimeoutException.java b/guava/src/com/google/common/util/concurrent/UncheckedTimeoutException.java index 8e30fca37fd1..181de101f3ba 100644 --- a/guava/src/com/google/common/util/concurrent/UncheckedTimeoutException.java +++ b/guava/src/com/google/common/util/concurrent/UncheckedTimeoutException.java @@ -15,6 +15,7 @@ package com.google.common.util.concurrent; import com.google.common.annotations.GwtIncompatible; +import com.google.common.annotations.J2ktIncompatible; import javax.annotation.CheckForNull; /** @@ -23,6 +24,7 @@ * @author Kevin Bourrillion * @since 1.0 */ +@J2ktIncompatible @GwtIncompatible @ElementTypesAreNonnullByDefault public class UncheckedTimeoutException extends RuntimeException { diff --git a/guava/src/com/google/common/util/concurrent/Uninterruptibles.java b/guava/src/com/google/common/util/concurrent/Uninterruptibles.java index 45205e674cc2..f95678baec40 100644 --- a/guava/src/com/google/common/util/concurrent/Uninterruptibles.java +++ b/guava/src/com/google/common/util/concurrent/Uninterruptibles.java @@ -20,6 +20,7 @@ import com.google.common.annotations.GwtCompatible; import com.google.common.annotations.GwtIncompatible; +import com.google.common.annotations.J2ktIncompatible; import com.google.common.base.Preconditions; import com.google.errorprone.annotations.CanIgnoreReturnValue; import java.time.Duration; @@ -52,6 +53,7 @@ public final class Uninterruptibles { // methods is identical, save for method being invoked. /** Invokes {@code latch.}{@link CountDownLatch#await() await()} uninterruptibly. */ + @J2ktIncompatible @GwtIncompatible // concurrency public static void awaitUninterruptibly(CountDownLatch latch) { boolean interrupted = false; @@ -77,6 +79,7 @@ public static void awaitUninterruptibly(CountDownLatch latch) { * * @since 28.0 */ + @J2ktIncompatible @GwtIncompatible // concurrency public static boolean awaitUninterruptibly(CountDownLatch latch, Duration timeout) { return awaitUninterruptibly(latch, toNanosSaturated(timeout), TimeUnit.NANOSECONDS); @@ -86,6 +89,7 @@ public static boolean awaitUninterruptibly(CountDownLatch latch, Duration timeou * Invokes {@code latch.}{@link CountDownLatch#await(long, TimeUnit) await(timeout, unit)} * uninterruptibly. */ + @J2ktIncompatible @GwtIncompatible // concurrency @SuppressWarnings("GoodTime") // should accept a java.time.Duration public static boolean awaitUninterruptibly(CountDownLatch latch, long timeout, TimeUnit unit) { @@ -116,6 +120,7 @@ public static boolean awaitUninterruptibly(CountDownLatch latch, long timeout, T * * @since 28.0 */ + @J2ktIncompatible @GwtIncompatible // concurrency public static boolean awaitUninterruptibly(Condition condition, Duration timeout) { return awaitUninterruptibly(condition, toNanosSaturated(timeout), TimeUnit.NANOSECONDS); @@ -127,6 +132,7 @@ public static boolean awaitUninterruptibly(Condition condition, Duration timeout * * @since 23.6 */ + @J2ktIncompatible @GwtIncompatible // concurrency @SuppressWarnings("GoodTime") // should accept a java.time.Duration public static boolean awaitUninterruptibly(Condition condition, long timeout, TimeUnit unit) { @@ -151,6 +157,7 @@ public static boolean awaitUninterruptibly(Condition condition, long timeout, Ti } /** Invokes {@code toJoin.}{@link Thread#join() join()} uninterruptibly. */ + @J2ktIncompatible @GwtIncompatible // concurrency public static void joinUninterruptibly(Thread toJoin) { boolean interrupted = false; @@ -176,6 +183,7 @@ public static void joinUninterruptibly(Thread toJoin) { * * @since 28.0 */ + @J2ktIncompatible @GwtIncompatible // concurrency public static void joinUninterruptibly(Thread toJoin, Duration timeout) { joinUninterruptibly(toJoin, toNanosSaturated(timeout), TimeUnit.NANOSECONDS); @@ -185,6 +193,7 @@ public static void joinUninterruptibly(Thread toJoin, Duration timeout) { * Invokes {@code unit.}{@link TimeUnit#timedJoin(Thread, long) timedJoin(toJoin, timeout)} * uninterruptibly. */ + @J2ktIncompatible @GwtIncompatible // concurrency @SuppressWarnings("GoodTime") // should accept a java.time.Duration public static void joinUninterruptibly(Thread toJoin, long timeout, TimeUnit unit) { @@ -267,6 +276,7 @@ public static void joinUninterruptibly(Thread toJoin, long timeout, TimeUnit uni * @since 28.0 */ @CanIgnoreReturnValue + @J2ktIncompatible @GwtIncompatible // java.time.Duration @ParametricNullness public static V getUninterruptibly( @@ -293,6 +303,7 @@ public static void joinUninterruptibly(Thread toJoin, long timeout, TimeUnit uni * @throws TimeoutException if the wait timed out */ @CanIgnoreReturnValue + @J2ktIncompatible @GwtIncompatible // TODO @SuppressWarnings("GoodTime") // should accept a java.time.Duration @ParametricNullness @@ -320,6 +331,7 @@ public static void joinUninterruptibly(Thread toJoin, long timeout, TimeUnit uni } /** Invokes {@code queue.}{@link BlockingQueue#take() take()} uninterruptibly. */ + @J2ktIncompatible @GwtIncompatible // concurrency public static E takeUninterruptibly(BlockingQueue queue) { boolean interrupted = false; @@ -346,6 +358,7 @@ public static E takeUninterruptibly(BlockingQueue queue) { * @throws IllegalArgumentException if some property of the specified element prevents it from * being added to the given queue */ + @J2ktIncompatible @GwtIncompatible // concurrency public static void putUninterruptibly(BlockingQueue queue, E element) { boolean interrupted = false; @@ -371,6 +384,7 @@ public static void putUninterruptibly(BlockingQueue queue, E element) { * * @since 28.0 */ + @J2ktIncompatible @GwtIncompatible // concurrency public static void sleepUninterruptibly(Duration sleepFor) { sleepUninterruptibly(toNanosSaturated(sleepFor), TimeUnit.NANOSECONDS); @@ -378,6 +392,7 @@ public static void sleepUninterruptibly(Duration sleepFor) { // TODO(user): Support Sleeper somehow (wrapper or interface method)? /** Invokes {@code unit.}{@link TimeUnit#sleep(long) sleep(sleepFor)} uninterruptibly. */ + @J2ktIncompatible @GwtIncompatible // concurrency @SuppressWarnings("GoodTime") // should accept a java.time.Duration public static void sleepUninterruptibly(long sleepFor, TimeUnit unit) { @@ -408,6 +423,7 @@ public static void sleepUninterruptibly(long sleepFor, TimeUnit unit) { * * @since 28.0 */ + @J2ktIncompatible @GwtIncompatible // concurrency public static boolean tryAcquireUninterruptibly(Semaphore semaphore, Duration timeout) { return tryAcquireUninterruptibly(semaphore, toNanosSaturated(timeout), TimeUnit.NANOSECONDS); @@ -419,6 +435,7 @@ public static boolean tryAcquireUninterruptibly(Semaphore semaphore, Duration ti * * @since 18.0 */ + @J2ktIncompatible @GwtIncompatible // concurrency @SuppressWarnings("GoodTime") // should accept a java.time.Duration public static boolean tryAcquireUninterruptibly( @@ -432,6 +449,7 @@ public static boolean tryAcquireUninterruptibly( * * @since 28.0 */ + @J2ktIncompatible @GwtIncompatible // concurrency public static boolean tryAcquireUninterruptibly( Semaphore semaphore, int permits, Duration timeout) { @@ -445,6 +463,7 @@ public static boolean tryAcquireUninterruptibly( * * @since 18.0 */ + @J2ktIncompatible @GwtIncompatible // concurrency @SuppressWarnings("GoodTime") // should accept a java.time.Duration public static boolean tryAcquireUninterruptibly( @@ -476,6 +495,7 @@ public static boolean tryAcquireUninterruptibly( * * @since 30.0 */ + @J2ktIncompatible @GwtIncompatible // concurrency public static boolean tryLockUninterruptibly(Lock lock, Duration timeout) { return tryLockUninterruptibly(lock, toNanosSaturated(timeout), TimeUnit.NANOSECONDS); @@ -487,6 +507,7 @@ public static boolean tryLockUninterruptibly(Lock lock, Duration timeout) { * * @since 30.0 */ + @J2ktIncompatible @GwtIncompatible // concurrency @SuppressWarnings("GoodTime") // should accept a java.time.Duration public static boolean tryLockUninterruptibly(Lock lock, long timeout, TimeUnit unit) { @@ -516,6 +537,7 @@ public static boolean tryLockUninterruptibly(Lock lock, long timeout, TimeUnit u * * @since 30.0 */ + @J2ktIncompatible @GwtIncompatible // concurrency public static void awaitTerminationUninterruptibly(ExecutorService executor) { // TODO(cpovirk): We could optimize this to avoid calling nanoTime() at all. @@ -528,6 +550,7 @@ public static void awaitTerminationUninterruptibly(ExecutorService executor) { * * @since 30.0 */ + @J2ktIncompatible @GwtIncompatible // concurrency public static boolean awaitTerminationUninterruptibly( ExecutorService executor, Duration timeout) { @@ -540,6 +563,7 @@ public static boolean awaitTerminationUninterruptibly( * * @since 30.0 */ + @J2ktIncompatible @GwtIncompatible // concurrency @SuppressWarnings("GoodTime") public static boolean awaitTerminationUninterruptibly( diff --git a/guava/src/com/google/common/util/concurrent/WrappingExecutorService.java b/guava/src/com/google/common/util/concurrent/WrappingExecutorService.java index e28231d9a2f9..d6684b80980b 100644 --- a/guava/src/com/google/common/util/concurrent/WrappingExecutorService.java +++ b/guava/src/com/google/common/util/concurrent/WrappingExecutorService.java @@ -19,6 +19,7 @@ import static com.google.common.util.concurrent.Platform.restoreInterruptIfIsInterruptedException; import com.google.common.annotations.GwtIncompatible; +import com.google.common.annotations.J2ktIncompatible; import com.google.common.collect.ImmutableList; import com.google.errorprone.annotations.CanIgnoreReturnValue; import java.util.Collection; @@ -42,6 +43,7 @@ * * @author Chris Nokleberg */ +@J2ktIncompatible @GwtIncompatible @ElementTypesAreNonnullByDefault abstract class WrappingExecutorService implements ExecutorService { diff --git a/guava/src/com/google/common/util/concurrent/WrappingScheduledExecutorService.java b/guava/src/com/google/common/util/concurrent/WrappingScheduledExecutorService.java index 6c2e4848146b..d533fc632bd0 100644 --- a/guava/src/com/google/common/util/concurrent/WrappingScheduledExecutorService.java +++ b/guava/src/com/google/common/util/concurrent/WrappingScheduledExecutorService.java @@ -15,6 +15,7 @@ package com.google.common.util.concurrent; import com.google.common.annotations.GwtIncompatible; +import com.google.common.annotations.J2ktIncompatible; import java.util.concurrent.Callable; import java.util.concurrent.ScheduledExecutorService; import java.util.concurrent.ScheduledFuture; @@ -29,6 +30,7 @@ * * @author Luke Sandberg */ +@J2ktIncompatible @GwtIncompatible @ElementTypesAreNonnullByDefault abstract class WrappingScheduledExecutorService extends WrappingExecutorService diff --git a/guava/src/com/google/thirdparty/publicsuffix/PublicSuffixPatterns.java b/guava/src/com/google/thirdparty/publicsuffix/PublicSuffixPatterns.java index a486eca8cb9a..fea7ed48a481 100644 --- a/guava/src/com/google/thirdparty/publicsuffix/PublicSuffixPatterns.java +++ b/guava/src/com/google/thirdparty/publicsuffix/PublicSuffixPatterns.java @@ -42,13 +42,13 @@ private PublicSuffixPatterns() {} /** If a hostname is contained as a key in this map, it is a public suffix. */ public static final ImmutableMap EXACT = TrieParser.parseTrie( - "a&0&0trk9--nx?27qjf--nx?e9ebgn--nx?nbb0c7abgm--nx??1&2oa08--nx?apg6qpcbgm--nx?hbbgm--nx?rdceqa08--nx??2&8ugbgm--nx?eyh3la2ckx--nx?qbd9--nx??3&2wqq1--nx?60a0y8--nx??4x1d77xrck--nx?6&1f4a3abgm--nx?2yqyn--nx?5b06t--nx?axq--nx?ec7q--nx?lbgw--nx??883xnn--nx?9d2c24--nx?a&a?it??b!.&gro?lim?moc?sr,t&en?opsgolb,?ude?vog??abila?c?ihsot?m?n??c!.&b&a?m?n??c&b?g?q??ep?fn?k&s?y??ln?no?oc,p&i-on,ohsdaerpsym,?sn?t&n?opsgolb,?un?ysrab,?i&ma?r&emarp?fa??sroc??naiva?s??d&ats?n&eit?oh??om?sa?tl??eg?f&c?ob??g!emo?naripi?oy??hskihs?i&cnal?dem!.remarf,?hs?k!on??sa!.snduolc,??jnin?k&aso?dov?ede?usto??l!.&c,gro?moc?ofni?r&ep?nb,?t&en?ni??ude?vog??irgnahs?le&nisiuc?rbmuder???m!.&ca?gro?oc?sserp?ten?vog??ahokoy?e00sf7vqn--nx?m??n!.&ac?cc?eman?gro?ibom?loohcs?moc?ni?o&c?fni?rp??r&d?o??s&u?w??vt?xm??av?is?olecrab?tea??p!.&bog?ca?d&em?ls??g&ni?ro??mo&c?n??oba?ten?ude??c?g7hyabgm--nx?ra!.&461e?6pi?iru?nru?rdda-ni?siri???s??q!.&eman?gro?hcs?lim?moc?t&en?opsgolb,?ude?vog???r&az?emac?f4a3abgm--nx?n!d5uhf8le58r4w--nx??u&kas?tan???s!.&bup?dem?gro?hcs?moc?ten?ude?vog??ac!.uban.iu,?iv??t&ad?elhta?led?oyot??u!.&a&cinniv?emirc?i&hzhziropaz?stynniv??s&edo?sedo??tlay?vatlop??bs?cc,d&argovorik?o!roghzu??tl,?e&hzhziropaz?nvir?t??f&i?ni,?g&l?ro??hk?i&stvinrehc?ykstynlemhk??k&c?m?s&nagul?t&enod?ul??v&iknarf-onavi?orteporp&end?ind?????l&iponret?opotsa&bes?ves??p??m&k?oc?s?yrk??n&c?d?i?osrehk?v?ylov??o&c,nvor??p&d?p,z??r&c?imotihz?k?ymotyhz??sk?t&en?l?z??ude?v:c?e&alokin?ik??i&alokym?hinrehc?krahk?vl?yk??k?l?o&g!inrehc??krahk??r?,xc,y&ikstinlemhk?mus?s&akrehc?sakrehc?tvonrehc???z&ib,u????v!aj?bb?et?iv??waniko?x&a?iacal??yogan?z&.&bew?c&a?i&n?rga???gro?l&im?oohcs??m&on?t??o&c!.topsgolb,?gn??radnorg?sin?t&en?la??ude?vog?wal??zip???b&00ave5a9iabgm--nx?1&25qhx--nx?68quv--nx?e2kc1--nx??2xtbgm--nx?3&b2kcc--nx?jca1d--nx??4&6&1rfz--nx?qif--nx??96rzc--nx??7w9u16qlj--nx?88uvor--nx?a&0dc4xbgm--nx?c?her?n?ra?t??b!.&erots?gro?moc?o&c?fni??ten?ude?v&og?t??zib??a??c&j?s??d&hesa08--nx?mi??g?l!.&gro?moc?ten?ude?vog??m??s!.&gro?moc?ten?ude?vog???tc-retarebsnegmrev--nx?u&lc!.&elej,snduolc,y&nop,srab,??smas??p!.ysrab,??wp-gnutarebsnegmrev--nx??c&1&1q54--nx?hbgw--nx??2e9c2czf--nx?4&4ub1km--nx?a1e--nx?byj9q--nx?erd5a9b1kcb--nx??8&4xx2g--nx?c9jrb2h--nx??9jr&b&2h--nx?54--nx?9s--nx??c&eg--nx?h3--nx?s2--nx???a!.&gro?lim?moc?rrd,ten?ude?vog??3a09--nx!.&ca1o--nx?gva1c--nx?h&ca1o--nx?za09--nx??ta1d--nx?ua08--nx???da??b&a?b?ci?f76a0c7ylqbgm--nx?sh??c!.&eugaelysatnaf,gnipparcs,liamwt,nwaps.secnatsni,revres-emag,s&nduolc,otohpym,seccaptf,?xsc,?0atf7b45--nx?a1l--nx??e!.&21k?bog?dem?esab,gro?l&aiciffo,im??moc?nif?o&fni?rp??ten?ude?vog??beuq?n?smoc??fdh?i&l&buperananab?ohtac??n&agro?ilc?osanap??sum?tic??l!.&gro?moc?oc?ten?ude?vog?yo,?l??m!.&mt?ossa??p1akcq--nx??n!.&mon?ossa??i?p??relcel?s!.&gro?moc?ten?ude?vog???t!.&e&m,w,?hc,?s?w??v!.&e0,gro?lim?moc?ten?ude?v&g:.d,,og????wp?yn??d&2urzc--nx?3&1wrpk--nx?c&4b11--nx?9jrcpf--nx???5xq55--nx?697uto--nx?75yrpk--nx?9ctdvkce--nx?a!.mon?d?er?olnwod??b2babgm--nx?c!.vog?g9a2g2b0ae0chclc--nx??e&m!bulc??r!k??sopxe?timil?w??fc?g!.&ude?vog???h&d3tbgm--nx?p?t??i!.&ased?bew?ca?etrof,hcs?lim?o&c!.topsgolb,?g??palf,ro?sepnop?ten?ym?zib??b?ordna?p?rdam??l&iub?og?row??m!.&ed,ot,pj,t&a,opsgolb,???n&a&b?l!.citats:.&setis,ved,?,raas???ob?uf??o&of?rp??r&a&c&tiderc?yalcrab??ugnav??ef506w4b--nx?k!.&oc,ude,?jh3a1habgm--nx??of??s!.&dem?gro?moc?ofni?ten?ude?v&og?t???m!kcrem???t!.topsgolb,excwkcc--nx?l??uolc!.&a&bura-vnej.&1ti,abura.rue.1ti,?tcepsrep,xo:.&ku,nt,?,?b&dnevar,ewilek:.sc,,?citsalej.piv,drayknil,elej,gnitsohdnert.&ed,hc,?letemirp:.ku,,m&edaid,ialcer.&ac,ku,su,??n&evueluk,woru,?r&epolroov,o&pav,tnemele,??tenraxa.1-se,ululetoj,wcs.&gnilebaltrams,koobelacs,latemerab.&1-&rap-rf,sma-ln,?2-rap-rf,?rap-rf.&3s,cnf:.snoitcnuf,,etisbew-3s,mhw,s8k:.sedon,,?s&8k,ecnatsni.&bup,virp,?ma-ln.&3s,etisbew-3s,mhw,s8k:.sedon,,??waw-lp.&3s,etisbew-3s,s8k:.sedon,,??xelpciffart,yawocne.ue,??za5cbgn--nx??e&1&53wlf--nx?7a1hbbgm--nx?ta3kg--nx??2a6a1b6b1i--nx?3ma0e1cvr--nx?418txh--nx?707b0e3--nx?a!.&ca?gro?hcs?lim?oc?t&en?opsgolb,?vog??09--nx??b!.&ca?gnitsohbew,nevueluk.yxorpze,pohsdaerpsym,snoitulostsohretni.duolc,topsgolb,?ortal?ut!uoy???c&0krbd4--nx!.&a2qbd8--nx?b8adbeh--nx?c6ytdgbd4--nx?d8lhbd5--nx???a&lp!.oc,?ps!.&lla4sx,rebu,tsafym,?artxe??sla??i!ffo??n&a&d?iler?nif?rusni!efil?srelevart???eics!.oby,??rofria??d!.&1sndnyd,42pi-nyd,7erauqs,amil4,b&ow-nrefeilgitsng--nx,rb-ni,vz-nelletsebgitsng--nx,?decalpb,e&daregtmueart,luhcsvresi,mohsnd,nihcamyek,?hcierebsnoissuksid,keegnietsi,lsd-ni,m&oc,rofttalpluhcs,?n&-i-g-o-l,aw-ym,e&lletsebgitsnüg,sgnutiel,?i&emtsi,lreb-n&i,yd,??norblieh-sh.ti.segap,oitatsksid-ygolonys,pv&-n&i,yd,?nyd,?refeilgitsnüg,?orp-ytinummoc,p&h21,iog:ol,,ohsdaerpsym,?r&e&ntrapdeeps.remotsuc,su&-lautriv,lautriv,?t&adpusnd,tub-ni,uor-ym,?vres&-e&bucl,mohym,?bew-emoh:.nyd,,luhcs,??ogiv-&niem,ym,??s&d-&onys,ygolonys,?nd&-&dd,nufiat,sehcsimanyd,tenretni,yard,?isoc.nyd,ps,yard,?oper-&nvs,tig,?sndd:.&nyd,sndnyd,?,?topsgolb,vresi-&niem,tset,?xi2,y&awetag-&llawerif,ym,?srab,tic-amil,?zten&mitbel,sadtretteuf,??art!.oby,?i&sdoow?ug??nil?on--nx??e!.&bil?dem?eif?gro?irp?kiir?moc!.topsgolb,?pia?ude?vog??ei?ffoc?gg?r&f?ged???f&a&c?s??il??g!.&gro?lim?moc?t&en?vp??ude?vog??a&f?gtrom?p!.&3xlh,detalsnart,grebedoc,kselp,sndp,tengam,xlh,y&cvrp,kcor,???rots?yov??elloc?na&hcxe?ro!.hcet,??roeg?ug??i!.&pohsdaerpsym,topsgolb,vog??tilop?v&bba?om???j!.&fo,gro?oc?ten???k!.&c&a?s??e&m?n??ibom?o&c!.topsgolb,?fni?g??ro??i&b?l?n???l&a&dmrif?s!.rof,rof???b&a?i&b?dua???c&aro?ric??dnik?g!oog??i&bom?ms??l&asal?erauqa??ppa?uhcs?yts!efil???m!.&4&32i,p&ct,v,??66c,ailisarb,b&dnevar,g-raegelif,?ca?duolcsd,e&d-raegelif,i&-raegelif,lpad:.tsohlacol,,?pcm,?g&ro?s-raegelif,?hctilg,kcatsegde,noitatsksid,o&bmoy,c?t&nigol,poh,??p&i&on,snart.etis,?j-raegelif,ohbew,?r&aegelif,idcm,ofsnd,?s&dym,ndd,ti!bt,?umhol,?t&en?s&acdnuos,ohon,??u&a-raegelif,de??v&irp?og??y&golonys,olpedew,srab,??a&g?n!.&reh.togrof,sih.togrof,???em?i&rp?twohs??orhc?w??n!goloc?i&lno!.&egats-oree,oree,ysrab,??w??o!.&derno:.gnigats,,ecivres,knilemoh,r&ednu,of,??hp?latipac?ts&der?e&gdirb?rif???z!.&66duolc,amil,sh,???ruoblem??om?p!.&bog?gro?lim?mo&c?n??t&en?opsgolb,?ude??irg?yks??r!.&mo&c?n??ossa?topsgolb,?a&c!htlaeh??pmoc?wtfos??bc?eh?if?ots!.&e&rawpohs,saberots,?yflles,??taeht?u&ces?sni?t&inruf?necca??za???s!.&a!bap.us,?b!ibnal?rofmok??c!a??d!b?n&arb?ubroflanummok???e?f!noc,?g!ro??h!f??i!trap??k!shf??l?m!oc,t??n!mygskurbrutan??o?p!ohsdaerpsym,p??r!owebdluocti,?s!serp?yspoi,?t!opsgolb,?u?vhf?w?x!uvmok??y?z??a&c?el?hc??i&er?urc??nesemoh?roh?uoh??t&a&d?ts&e!laer??lla???is!.&e&lej,nilnigol,r&etnim,ocevon,?winmo,?k&rowtenoilof,wnf,?laicosnepo,n&eyb,oyc,?spvtsaf,thrs,xulel,ysrab,?bew!.remarf,??ov?ra?t&ioled?ol??utitsni??u&lb?qi&nilc?tuob???v!.&21e?b&ew?ib?og??ce&r?t??erots?gro?lim?m&o&c?n??rif??o&c?fni??rar?stra?t&en?ni??ude?vog??as?e3gerb2h--nx?i&l!.xlh,?rd?ssergorp??ol??w&kct--nx?r??xul?y!.&gro?lim?moc?ten?ude?vog????f&0f3rkcg--nx?198xim--nx?280xim--nx?7vqn--nx?a!.&gro?moc?ten?ude?vog???b!.vog?wa9bgm--nx??c!.topsgolb,a1p--nx!.&a14--nx,b8lea1j--nx,c&avc0aaa08--nx,ma09--nx,?f&a1a09--nx,ea1j--nx,?gva1c--nx,nha1h--nx,pda1j--nx,zila1h--nx,??ns??ea1j--nx?g?iam?l&a1d--nx?og??n!.&bew?cer?erots?m&oc?rif??ofni?re&hto?p??stra?ten???orp?p!.&gro?moc?ude???rus?t!.hcs,w??vd7ckaabgm--nx?w!.&hcs,zib,???g&2&4wq55--nx?8zrf6--nx??3&44sd3--nx?91w6j--nx!.&a5wqmg--nx?d&22svcw--nx?5xq55--nx??gla0do--nx?m1qtxm--nx?vta0cu--nx????455ses--nx?5mzt5--nx?69vqhr--nx?7&8a4d5a4prebgm--nx?rb2c--nx??a!.&gro?mo&c?n??oc?ten??vd??b!.&0?1?2?3?4?5?6?7?8?9?a?b?c?d?e?f?g?h?i?j?k?l?m?n?o?p?q?r?s?t!opsgolb,?u?v?w?x?y!srab,?z???c!b?za9a0cbgm--nx??e!.&eman?gro?ics?lim?moc!.topsgolb,?nue?ten?ude?vog??a??g!.&ayc,gro?lenap:.nomead,,oc?saak,ten???i&a?v??k!.&g&olb,ro??ku,lim?moc?oi,pj,su,ten?ude?v&og?t,???m!.&drp?gro?lim?m&o&c?n??t??oc?ude?vog??pk??n!.&dtl,eman?gro?hcs?i!bom??l&im?oc,?m&oc!.topsgolb,?rif,?neg,ogn,ten?ude?vog??aw?i!b!mulp??car?d&art?dew??h&sif?tolc??k&iv?oo&b?c???ls?n&aelc?iart??p!pohs??re&enigne?tac??t&ad?ekram!.&htiw,morf,??hgil?lusnoc?neg?ov?soh!.tfarcnepo,??vi&g?l???o!s??u&rehcisrev?smas?tarebsnegömrev???o&d?lb?og!.&duolc,etalsnart,???r&2n084qlj--nx?ebmoolb?o!.&77ndc.c:sr,,a&remacytirucesym,t&neimip,sivretla,?z,?bew-llams,d&ab-yrev-si,e&sufnocsim,vas-si,?nuof-si,oog-yrev-si,uolc&arfniarodef,mw,??e&a,cin-yrev-si,grof&loot,peh,?l&as-4-ffuts,poeparodef,?m&-morf,agevres,ohruoyslles,?n&ozdop,uma.elet,?r&ehwongniogyldlob,iwym,uces-77ndc.nigiro.lss,?t&adidnac-a-si,is&-ybboh,golb,???fehc-a-si,golbymdaer,k&eeg-a&-si,si,?h,nut,?l&i&amwt,ve-yrev-si,?lawerif&-ym,ym,?sd-ni,?m&acssecca,edom-elbac,?n&af&blm,cfu,egelloc,lfn,s&citlec-a-si,niurb-a-si,tap-a-si,?xos-a-si,?ibptth,o&itatsksid,rviop,?pv-ni,?o&jodsnd,tp&az,oh,??p&i&-on,fles,?o&hbew,tksedeerf,?tf&e&moh,vres,?ym,??r&e&gatop,ppepteews,su-xunil-a-si,?gmtrec,vdmac,?s&a&ila&nyd,snd,?nymsd,?b&alfmw,bevres,?d&ikcet.3s,ylimaf,?eirfotatophcuoc,j,koob-daer,ltbup,nd&-won,deerf,emoh,golb,kcud,mood,nyd:.&emoh,og,?,ps,rvd,tog,uolc,?s&a-skcik,ndd,?tnemhcattaomb,u,?t&ce&jorparodef.&duolc,gts.so.ppa,so.ppa,?riderbew,?e&ews-yrev-si,nretni&ehtfodne,fodne,??hgink-a-si,oi-allizom,s&ixetn&od,seod,?o&h-emag,l-si,?rifyam,??ue:.&a&-q,c,?cm,dc,e&b,d,e,i,m,s,?g&b,n,?hc,i&f,s,?k&d,m,s,u,?l&a,i,n,p,?n&c,i,?o&n,r,ssa,?pj,r&f,g,h,k,t,?s&e,i:rap,,u,?t&a,en,i,l,m,ni,p,?u&a,de,h,l,r,?vl,y&c,m,?z&c,n,??,vresnyd,x&inuemoh,unilemoh,?y&limafxut,srab,???ub&mah?oj???s!.&delacsne,gro?moc?rep?t&en?opsgolb,?ude?vog??gb639j43us5--nx??t?u!.&c&a?s??en?gro?moc?o&c?g??ro?topsgolb,??v!.ta,a1c--nx??wsa08--nx??h&0ee5a3ld2ckx--nx?4wc3o--nx!.&a&2xyc3o--nx?3j0hc3m--nx?ve4b3c0oc21--nx??id1kzuc3h--nx?l8bxi8ifc21--nx?rb0ef1c21--nx???8&8yvfe--nx?a7maabgm--nx??b!.&gro?moc?ten?ude?vog??mg??c!.&7erauqs,amil4,duolc-drayknil,gniksnd,p&h21,ohsdaerpsym,?sndtog,topsgolb,wolf.e&a.1pla,nigneppa,?xi2,ytic-amil,?aoc?et?ir!euz??r&aes?uhc??sob?taw!s???d0sbgp--nx?f&2lpbgm--nx?k??g!.&gro?lim?moc?ude?vog???m!a1j--nx??ocir?p!.&gro?i?lim?moc?ogn?ten?ude?vog???s!.&g&nabhsah,ro??l&im?xv,?m&oc?roftalp.&cb,su,tne,ue,??pib,ten", - "?vog?won,yolpedew,?a&c?nom??i&d?f?ri???t!.&ca?enilno,im?ni?o&c?g??pohs,ro?ten??iaf!.oby,?laeh!.arh,?orxer?ra&ba?e???vo!.lopdren,?zb??i&3tupk--nx?7a0oi--nx?a!.&ffo?gro?moc?ten?uwu,?1p--nx?bud?dnuyh?tnihc??b!.&gro?moc?oc?ro?ude??ahduba?o!m!.&duolcsd,ysrab,???s??c!.&ayb-tropora--nx?ca?d&e?m??esserp?gro?ln,moc?nif,o&c?g?ssa??ro?t&en?ni?roporéa??ude?vuog??cug?t??d&dk?ua??e&bhf--nx?piat??f!.&aw5-nenikkh--nx,dnala?i&ki,spak,?mroftalpduolc.if,nenikkäh,pohsdaerpsym,retnecatad.&omed,saap,?topsgolb,yd,?onas??g!.&d&om?tl??gro?moc?ude?vog???h&c&atih?ra??s&abodoy?ibustim???juohs?k!.&gro?moc?ofni?ten?ude?vog?zib??b4gc--nx?iw!.remarf,?nisleh?s?uzus??l!.&aac,topsgolb,?drahcir?iamsi??maim?n!.&b&ew?og??ca?gro?lim?mo&c?n??ni?o&c?fni??pp?t&en?ni??ude?zib??airpic?i&hgrobmal?m??re??om?rarref?s!.&egaptig,ppatig,topsgolb,?ed??t&aresam?i&c?nifni??rahb?tagub??ut?v!.&21k?gro?moc?oc?ten???wik?xa&rp?t??yf??j&6pqgza9iabgm--nx?8da1tabbgl--nx?b!.&ossa?topsgolb,uaerrab?vuog???d?f!.&ca?eman?gro?lim?moc?o&fni?rp??ten?vog?zib???nj?s?t!.&bew?c&a?in??eman?gro?lim?moc?o&c?g??t&en?ni?set??ude?vog?zib???yqx94qit--nx??k&8uxp3--nx?924tcf--nx?arfel?c&a&bdeef?lb??ebdnul?ilc?reme??d!.&erots,ger,mrif,oc,pohsdaerpsym,topsgolb,zib,?t??e&es?samet??h!.&a&4ya0cu--nx?5wqmg--nx??b3qa0do--nx?cni,d&2&2svcw--nx?3rvcl--nx??5xq55--nx?tl,?g&a0nt--nx?la0do--nx?ro??i&050qmg--nx?7a0oi--nx?xa0km--nx??m&1qtxm--nx?oc??npqic--nx?saaces,t&en?opsgolb,?ude?v&di?og?ta0cu--nx??xva0fz--nx?人&个?個?箇??司公?府政?絡&網?网??織&組?组??织&組?组??络&網?网??育&敎?教???n??i&tsob?vdnas??l!.&bew?c&a?os??dtl?gro?hcs?letoh?moc?nssa?ogn?prg?t&en?ni??ude?vog??at?cd?is??m!.&eman?fni?gro?moc?t&en?opsgolb,?ude?vog???n&ab!cfdh?etats?mmoc?t&en?fos??u??i!l!.&noyc,pepym,??p???oob?p!.&b&ew?og??gro?kog?m&af?oc??nog?ofni?pog?sog?ten?ude?vog?zib???row!.&morf,ot,?ten!.&htumiza,nolt,o&c,vra,??doof???s!.topsgolb,?t?u!.&c&a?lp??dtl?e&cilop?m??gro!.&gul:g,,sgul,yr&ettoly&lkeew,tiniffa,?tneelffar,???lenap-tnednepedni,n&noc,oissimmoc-&layor,tnednepedni,??o&c!.&bunsorter.tsuc,e&lddiwg,n&ilnoysrab,ozgniebllew,??krametyb.&hd,mv,?omida,p&i-on,ohsdaerpsym,?t&fihsreyal.j,opsgolb,?vres-hn,ysrab,??rpoc,?psoh,shn?t&en?nmyp,seuqni-tnednepedni,?vog!.&eci&ffoemoh,vres,?ipa,ngiapmac,??weiver-tnednepedni,y&riuqni-&cilbup,tnednepedni,?srab,????l&04sr4w--nx?a!.&gro?lim?moc?t&en?opsgolb,?ude?vog??bolg?c?ed?g!el??i&c&nanif!.oc,lpl??os??romem?tnedurp??n&if?oitanretni??t&i&gid!.sppaduolc:.nodnol,,?p&ac?soh???ned?ot??utum!nretsewhtron???c!.&bog?lim?oc?topsgolb,vog???dil?e&datic?n&ahc?nahc!gnikooc?levart?rehtaew???t!ria?tam??vart??f&8f&pbgo--nx?tbgm--nx??a?n??g!.&gro?moc?oc?ten?ude?xx,zib,??h&d?op??i!.&21k?ca?fdi?gro?inum?oc!.&egapvar,redrotibat,topsgolb,??ten?vog??a&f?m&e?g?toh???m?r??l&a&b&esab?t&eksab!.&sua,zn,??oof???c?mt??e&d?hs??ihmailliw?j??m!.&esserp?gro?moc?ten?ude?v&og?uog????n!.&no&med,rtsic,?oc,pohsdaerpsym,retsulc-gnitsoh,topsgolb,vog,yalphk,?o??o&a?btuf?l!.gmo,?o&c!.&ed,rotnemele,??hcs??rit?u??p!.&a&cin&diws?gel??d&g,ortso?urawon??i&dem?mraw?nydg,?k&elo&guld?rtso??slopolam?tsu?ytsyrut??l&ip?o&kzs?w&-awolats?oksnok????n&erapohs,img?zcel,?rog&-ai&bab?nelej??j?z??syn?tsaim?w&a&l&eib?i?o??zsraw??o&namil?tainop,??z&eiwolaib?mol???c&e&iw&alselob?o&nsos?rtso???le&im?zrogz???orw,p??d&em,ia?ragrats?uolc&inu,sds,??e&c&i&lrog?w&ilg,o&hc&arats?orp??klop?tak????yzreibok??i&csjuoniws?ksromop?saldop??l&ahdop?opo??napokaz,tatselaer?z&romop?swozam???g&alble?ezrbo&lok?nrat??ro??hcyzrblaw?i&csomohcurein?grat?klawus??k&e&rut?walcolw??in&byr?diws,sark,?le?o&nas?tsylaib??rob&el?lam??s&als?jazel?nadg,puls?rowezrp???l&colw?e&r?vart??i&am?m???m&o&c?dar?n?tyb??s&g?iruot??t!a???n&a&gaz?nzop,?i&bul?cezczs?lbul,molow?nok?zd&eb?obeiws???uleiw?y&tzslo?z&rtek?seic????o&c,fni?k&celo?zdolk??lkan?n&leim?pek?t&uk?yzczs??z&copo?eing?rowaj???rga?tua?w&ejarg?ogarm???p&e&eb,lks!emoh,??klwwortso?ohs!-ecremmoce,daerpsym,??romophcaz?sos?t&aiwop?en?opos,ra,sezc??ude?v&irp?og!.&a&p?s!w???bni&p?w??ci?dtiw?essp?fiw?g&imu?u??hiiw?m&igu?rio?u!o???nds?o&ks?p!pu??s?wtsorats??p&a?sp!mk?pk?wk??u&m?p??wk?z??r&ksw?s??s&i?oiw?u?zu??talusnok?w&gzr?i&p?rg?w??m?opu?u!imzw???zouw????w&a&l&corw?sizdow??w??o&golg?k&ark,ul?zsurp??r&az?gew??t&rabul,sugua??z&coks?sezr????xes?y&buzsak?d&azczseib?ikseb??hcyt?n&jes?lod-zreimizak??pal?r&ogt?uzam??walup?zutrak??z&am-awar?c&aprak?iwol?zsogdyb??dalezc?ib?s&i&lak?p??uklo????l??r&as?f?s??s!.&gro?moc?ten?ude?vog???t!.vog??ubnatsi?x3b689qq6--nx?yc5rb54--nx??m&00tsb3--nx?1qtxm--nx?981rvj--nx?a!.&aayn,enummoc?gro?moc?o&c?idar,ken,?t&en?opsgolb,??c!bew??dretsma?e&rts?t!.&citsalej,esruocsid,???fma?xq--nx??b!.&gro?moc?ten?ude?vog??i??c!.&moc?oc?ten?vog???d!.&gro?moc?ten?ude?vog???f!.&gro?moc?oidar,ten?ude??i??g!vu96d8syzf--nx??h?i!.&ca?gro?moc?o&c!.&clp?dtl???r,?t&en?t??vt??k?rbg4--nx??k!.&drp?e&rianiretev?sserp??gro?lim?m&o&c?n??t??nicedem?ossa?pooc?s&eriaton?neicamrahp?sa??ude?v&og?uog????l&if?ohkcots??o!.&dem?gro?m&oc?uesum??o&c?rp??ten?ude?vog??b?c!.&2aq,3pmevres,5sndd,a&c&-morf,ir&bafno,fa,??g&-morf,oy-sehcaet,?i-morf,m&-morf,all&-a-si,amai,??p&-morf,c-a-si,?r&emacytirucesym,odih,?s,tadtsudgniht,v-morf,w-morf,z,?b&dnevarym,ew&-sndnyd,draiw.segap,ottad,?ildts.ipa,?c&amytirucesemoh,d-morf,esyrcs,itsalej.omed,n&-morf,vym,?p&kroweht,ytirucesemoh,?q,rievres,s-morf,?d&aerotffuts,e&calpb,ifitrec-&si,ton-si,?llortnocduolc,rewopenignepw:.sj,,tsohecapsppa,?i&-morf,rgevissam.saap,?m-morf,n&-morf,abeht-htiw-si,?s-morf,uolc&-noitatsyalp,hr,iafaw.&d&ej,yr,?nol,?meaeboda,nevia,panqym:-&ahpla,ved,?,smetsystuo,tekcilc,ved&j,pw,??vreser,wetomer,?e&butuoyhtiw,ciffo-sndnyd,d:-morf,o&celgoog,n&il.srebmem,neve.&1-&su,ue,?2-&su,ue,?3-&su,ue,?4-&su,ue,????,erf&-sndnyd,sndd,?filflahevres,gnahcxeevres,i&hcet-a-si,p-sekil,?k&auqevres,irtsretnuocevres,?l&bitpa-no,googhtiw,?m&agevres,ina-otni-si,oh-&sndnyd,ta-sndnyd,??n&-morf,ilno&-evreser,ysrab,?og-si,?r&alfduolcyrt,ehwynanohtyp:.ue,,ihcec,?srun-a-si,t&i&nuarepo,s&-ybboh,aloy,tipohs,xiw,??omer-sndnyd,upmocsma,ysgolb,?v&als-elcibuc-a-si,i&lsndd,tavresnoc-a-si,??z&amkcar,eelg,iig,??fehc-a-si,g&ni&gats-&raeghtua,swennwot,?ksndd,robsikrow,tsoh-bt.etis,?o&fgp,lb&-sndnyd,sihtsetirw,???h&n-morf,o-morf,?i&fiwehtno,h-morf,kiw-sndnyd,m-morf,p&aerocne,detsoh,?r-morf,w-morf,z&ihcppa,nilppa,??jn-morf,k&a&-morf,erfocsic,?cils-si,eeg&-a&-si,si,?sndd,?h,latsnaebcitsale:.&1-&htuos-pa,lartnec-&ac,ue,?ts&ae&-&as,su,?ht&ron-pa,uos-pa,??ew-&su,ue,vog-su,???2-ts&ae&-su,ht&ron-pa,uos-pa,??ew-&su,ue,??3-ts&aehtron-pa,ew-ue,??,o-morf,r&adhtiwtliub,ow&-&sndnyd,ta-sndnyd,?ten-orehkcats,??u,?l&a&-morf,colottad,rebil-a-si,?f-morf,i&-morf,am&-sndnyd,detsohpw,??l&ecelffaw,uf-ytnuob:.a&hpla,teb,?,?ppmswa,ru-&elpmis,taen,?ssukoreh,xegap,?m&n-morf,pml.ppa,rofe&pyt.orp,rerac-htlaeh,?sacrasevres,uirarret-yltsaf,?n&a&cilbuper-a-si,f&-sllub-a-si,racsan-a-si,?i&cisum-a-si,ratrebil-a-si,??c,dc&hsums,umpw,xirtrepmi,?eerg-a-si,i-morf,m-morf,o&ehtnaptog,isam-al-a-tse,r&italik,tap-el-tse,?s&iam-al-a-tse,replausunu,??pj,t-morf,?o&bordym,c,hce-namtsop,jodsnd,m&-morf,ed-baltlow,?n:iloxip,,ttadym,?p&2pevres,aelutym,i&-sndnyd,fles,ogol,ruoy&esol,hctid,?ym&eerf,teg,??ohsdaerpsym,pa&-rettalp,anis:piv,,esaberif,k1,lortnocduolc,oifilauq,r&aegyks,oetem:.ue,,?t&ilmaerts,norfegap,?ukoreh,?t&fevres,thevres,??r&a:-morf,tskcor-a-si,,b,e&d&iv&erp-yb-detsoh.saap,orpnwo,?ner&.ppa,no,??e&bevres,nigne-na-si,?ggolb-a-si,h&caet-a-si,pargotohp-a-si,?krow-drah-a-si,n&gised-a-si,ia&rtlanosrep-a-si,tretne-na-si,??p&acsdnal-a-si,eekkoob-a-si,?retac-a-si,subq,tn&ecysrab,iap-a-si,uh-a-si,?vres&-&ki.&cpj-rev-duolcj,duolcj,?s&ndnyd,pvtsaf,??inim,nmad,sak,?y&alp-a-si,wal-a-si,?zilibomdeepsegap,?g,ituob,k,mgrp.nex,o&-morf,sivdalaicnanif-a-si,t&areleccalabolgswa,c&a-na-si,od-a-si,?susaym,??p-morf,u&as-o-nyd,e&tsoh.&duolc-gar,hc-duolc-gar,?ugolb-nom-tse,?omuhevres,??s&a&apod,ila&nyd,snd,?nymsd,vnacremarf,?bbevres,ci&p&-sndnyd,evres,?tcatytiruces,?dylimaf,e&cived-anelab,itilitu3,lahw-eht-sevas,mag-otni-si,t&i&iis,sro,?yskciuq,??i&ht2tniop,pa&elgoog,tneltneg,??jfac,k&-morf,aerf-ten,colb&egrof,pohsym,??m&-morf,cxolb,?n&d&-pmet,dyard,golb,htiwssem,mood,tog,?kselp,nyd,ootrac-otni-si,?o&-xobeerf,xobeerf,?ppa&raeghtua,t&ikria,neg,??r&ac-otni-si,e&ntrap-paelut,tsohmaerd,??s&e&l-rof-slles,rtca-na-si,?ibodym,?tsaeb-cihtym.&a&llicno,zno,?ilay,lacarac,re&gitnef,motsuc,?sv,toleco,x:n&ihps,yl,?,?u,wanozama.&1-&ht&ron-ue.9duolc.s&fv,tessa-weivbew,?uos-&em.9duolc.s&fv,tessa-weivbew,?fa.9duolc.s&fv,tessa-weivbew,?pa&-3s,.&3s,9duolc.s&fv,tessa-weivbew,?etisbew-3s,kcatslaud.3s,??ue.9duolc.s&fv,tessa-weivbew,???la&nretxe-3s,rtnec-&ac&-3s,.&3s,9duolc.s&fv,tessa-weivbew,?etisbew-3s,kcatslaud.3s,??ue&-3s,.&3s,9duolc.s&fv,tessa-weivbew,?etisbew-3s,kcatslaud.3s,????ts&ae&-&as&-&3s,etisbew-3s,?.&9duolc.s&fv,tessa-weivbew,?kcatslaud.3s,??pa.9duolc.s&fv,tessa-weivbew,?su:-etisbew-3s,.&9duolc.s&fv,tessa-weivbew,?kcatslaud.3s,?,?ht&ron-pa&-&3s,etisbew-3s,?.&9duolc.s&fv,tessa-weivbew,?kcatslaud.3s,??uos-pa&-&3s,etisbew-3s,?.&9duolc.s&fv,tessa-weivbew,?kcatslaud.3s,????ew-&su&-&3s,etisbew-3s,?.9duolc.s&fv,tessa-weivbew,??ue&-&3s,etisbew-3s,?.&9duolc.s&fv,tessa-weivbew,?kcatslaud.3s,??vog-su-&3s,spif-3s,????2-ts&ae&-su&-3s,.&3s,9duolc.s&fv,tessa-weivbew,?etisbew-3s,kcatslaud.3s,??ht&ron-pa&-3s,.&3s,9duolc.s&fv,tessa-weivbew,?etisbew-3s,kcatslaud.3s,??uos-pa&-&3s,etisbew-3s,?.&9duolc.s&fv,tessa-weivbew,?kcatslaud.3s,????ew-&su&-&3s,etisbew-3s,?.9duolc.s&fv,tessa-weivbew,??ue&-3s,.&3s,9duolc.s&fv,tessa-weivbew,?etisbew-3s,kcatslaud.3s,????3&-ts&aehtron-pa.9duolc.s&fv,tessa-weivbew,?ew-ue&-3s,.&3s,9duolc.s&fv,tessa-weivbew,?etisbew-3s,kcatslaud.3s,???s,??yasdrocsid,?t&arcomed-a-si,c&-morf,etedatad.&ecnatsni,omed,??eel&-si,rebu-si,?hgilfhtiwletoh,m-morf,n&atnuocca-na-si,e&duts-a-si,r-ot-ecaps,tnocresu&buhtig,e&capsppa,donil.pi,lbavresbo.citats,?pl,???ops&edoc,golb,ppa,?s&i&hcrana-&a-si,na-si,?laicos-a-si,pareht-a-si,tra-na-si,xetn&od,seod,??oh&piym,sfn,??u&-morf,nyekcoh-asi,?v-morf,?u&-rof-slles,4,a-sppatikria,e,h,oynahtretramssi,r:ug-a-si,,?v&n-morf,rdlf,w-morf,?w&o&lpwons-yrt,zok,?ww100,?x&bsbf.sppa,em,i&nuemoh,rtrepmi,?obaniateb,t-morf,unilemoh,?y&a&bnx:.&", - "2u,lacol-2u,?,l&erottad,pezam,?wetag-llawerif,?dnacsekil,fipohsym,k&-morf,niksisnd,?rot&ceridevitcaym,sitk,?u:goo,,w-morf,x&alagkeeg,orp&hsilbup,mapson.duolc,???zesdrocsid,?inu??m!.&dna,rof,??or?tsla??p!.&eman,nwo,??raf!.jrots,etats??s?t!.&gro?lim?mo&c?n??oc?ten?ude?vog???u&esum!.&a&92chg-seacinumocelet-e-soierroc--nx?atnav?c&i&aduj?rfatsae??rollam??d&anac?enomaledasac?irolf??e&raaihpledalihp?srednu??g&hannavas?oonattahc??hamo?i&auhsu?bmuloc!hsitirb??dem?groeg?hpledalihp?l&artsua?etalif??n&igriv?rofilac??ssur?tsonod??ksa&la?rben??l&lojal?q-snl--nx?uossim!trof???m&a&bala?nap??enic?o&m?r???n&a&cirema?idni??edasap?ilorachtuos?olecrab??r&abrabatnas?ezzivs??su?t&nalta?osennim??zalp??c&dnotgnihsaw?ebeuq?i&depolcycne?ficap?hpargonaeco?lbup?sum?t&carporihc?lec?naltadim??vu??yn??d&a&dhgab?etsmraf?m?orliar??i&rdam?ulegnedleeb??leif?n&a!l&gne?nif?ragyduj?t&ocs?rop??yram???u&brofsdgybmeh?osdnaegami???r&augria?ofxo???e&c&a&l&ap?phtrib??ps??n&a&lubma?tsiser??e&fedlatsaoc?gilletni?ics!foyrotsih????pein?rof??d&nukneklov?revasem??e&rt?tsurt??f&atnas?ildliw??g&a&lliv?tireh!lanoitan???dirbmac?rog??i&cnum?nollaw??koorbrehs?l&ab?bib?cycrotom?i&ssim?txet??oks?tsac??m&affollah?it!iram??utsoc??n&golos?ilno?recul??r&a&uqs?waled!foetats???i&hs&acnal?kroy?pmahwen??otsih??omitlab?ut&an?cetihcra?inruf?luc!irga?su???vuol??s&abatad?iacnarf?sius?uoh!lum???t&a&locohc?rak?ts!e!yrtnuoc!su?????imesoy?tevroc??u&qihpargonaeco?velleb??vit&caretni?omotua???f&iuj?ohgrub??g&n&i&dliub?ginerevmuesum?kiv?lahw?nim?peekemit?vil??ulmmastsnuk??orf?r&ebnrats?u&b&ierf?le?m&ah?uan??ram?s&mailliw!lainoloc??naitsirhc?retepts??zlas??ob&irf?mexul?????h&atu?c&raeser?sirotsih?uot??g&ea1h--nx?rubsttip??si&tirb?wej??t&laeh?ro&n?wtrof??uo&mnom?y????i&d6glbhbd9--nx?iawah?k&nisleh?s??lad!rodavlas??sissa?tannicnic??k&c&nivleeg?olc!-dna-hctaw?dnahctaw???fj?inebis?l&is?ofron??na&rfenna?t??oorbnarc?r&am&ned?reiets??oy!wen????l&a&ci&dem?golo&eahcra?meg?oz??natob?rotsih??ertnom?iromem?noita&cude?n??oc?rutluc?trop?utriv?van??e&nurb?s&ab?surb??utriv??i&artnogero?sarb??l&a&besab?hsnoegrus??e&hs?rdnevle??i&b?m!dniw????o&bup?ohcs?tsirb???m&a&dretsma?ets?h&netlehc?rud???ct?elas!urej??l&if?ohkcots?u??raf?silanruoj?u&esumyrotsihlarutan?ira&tenalp?uqa??terobra???n&a&c!irema!evitan???gihcim?i&dni?tpyge??mfoelsi?wehctaksas??e&d&alokohcs?ews?rag!cinatob?lacinatob?s&nerdlihc?u????gahnepoc?hcneum?laftsew?ppahcsnetewruutan?r&dlihc?ednaalv?hu!dnutamieh???sseig??gised!dn&atra?utsnuk???h&ab!nesie??ojts??i&lreb?tsua??l&eok?ocnil??n&ob?urbneohcs??o&dnol?gero?i&s&iv&dnadnuos?elet??nam??t&a&c&inummoc?ude!tra???dnuof?erc?i&cossa?va??kinummokelet?nissassa?r&belectsevrah?oproc?tsulli??silivic?t&nalp?s??vres&erp?noclatnemnorivne??zilivic??c&elloc?if-ecneics??ibihxe???ri?s&dnah?imaj?reffej?sral??t&erbepac?nilc?sob???r&e&b?dom?tsew?uab?zul??obredap??vahnebeok?wot??o&2a6v-seacinumoc--nx?ablib?c&edtra?ixemwen?sicnarfnas??elap?g&a&cihc?to??eidnas??i&cadnuf?diserp?ratno??llecitnom?mitiram?nirot?r&htna?ienajedoir???pohskrow?qari?r&aw!dloc?livic??dd?e&b&ma?yc??irrac?llimsiwel?naksiznarf?papswen?t&aeht?exe?nec!ecneics?larutluc?muesum?tra??s&ehc&nam?or??neum??upmoc???ia!nepo??obal?u&asonid?obal?takirak???s&a&l&g?l&ad?eh???xet??di&k?pardnarg??e&cneics!larutan??dnal?hcsi&deuj?rotsih!nizidem?rutan??selhcs??itinamuh?l&aw?egnasol?l&e&rutansecneics?xurb??iasrev???r&e&em?ugif??tsac??suohcirotsih?u&en?q&adac?itna!nacirema?su????õçacinumoc!elet-e-soierroc???gnirpsmlap?htab?i&lopanaidni?rap?uoltnias?xa??l&essurb?lod??mraeriflanoitan?n&a&blats?l??erdlihc?oi&snam?tacinummoc!elet-dna-stsop???äl??re&dnalf?lttes?mraf?nim?tnececneics??s&alg?erp??t&farc!dnastra??nalp?olip?ra!e&nif?vitaroced!su???su?xuaeb???u&b!muloc??cric???t&agilltrop?cejorp?dats?e&esum?kramnaidni??iorted?ne&m&elttes?norivne?piuqemraf??vnoc??oped?r&a!drib?enif?gttuts?hsiwej?kcor?n&acirema?ootrac??tamsa?yraropmetnoc??op&aes?snart?wen??ufknarf??s&a&cdaorb?octsae??ewhtuos?ilayol?nuk?r&ohnemled?uhlyram??urt???u&a&bgreb?etalpodaroloc??rmyc??w&ocsom?rn??x&esse?ineohp?nam?tas??y&a&bekaepasehc?w&etag?liar???camrahp?doc?e&hsub?l&ekreb?l&av!eniwydnarb??ort???n&dys?om??rrus?s&nreug?rejwen???golo&e&ahcra?g??motne?nh&cet?te??oz?po&rhtna?t??roh??hpargotohp?l&etalihp?imaf??m&edaca?onortsa??n&atob?yn??ps?r&a&ropmetnoc?tilim??e&diorbme?llag!tra??vocsid??lewej?nosameerf?otsih!dnaecneics?ecneics?gnivil!su??la&col?rutan??retupmoc?su??tsudnidnaecneics??spelipe?t&eicos!lacirotsih??i&nummoc?srevinu??nuoc???z&arg?iewhcs?nil?ojadab?urcatnas??моки?םילשורי???rof??z!.&ca?gro?hcs?lim?moc?o&c?fni??ten?ude?vog?zib????n&315rmi--nx?a&brud?cilbuper?f?grompj?hkaga?idraug?m?ol?ssin?u&hix?qna??varac?yalo??b!.&gro?moc?oc,ten?ude?vog??c??c!.&ah?bh?c&a?s??d&5xq55--nx?g?s?uolctnatsni,?eh?g&la0do--nx?ro??h&a?q?s??i&7a0oi--nx?h??j&b?f?t?x?z??kh?l&h?im?j??m&n?oc!.swanozama.&1-htron-nc.3s,be.1-&htron-nc,tsewhtron-nc,????n&h?l?s?y??om?qc?s&g?j??t&cennockciuq.tcerid,en??ude?vog?wt?x&g?j?n?s??z&g?x??司公?絡網?络网??b??d&g!.ypnc,?ka??e&drag?erg?fuak?gawsklov?hctik?i&libommi?w??m!.r&iaper,of,??po?r!ednaalv??sier?ves??g!.&ca?gro?moc?ten?ude?vog??is&ed!.ssb,?irev???h!.&bog?cc,gro?lim?moc?ten?ude???i!.&ac?bew,c&a?in??dni?e&m?sabapus,?g&5?6?p?ro??i&a?hled??ku?l&evart?im??m&a?oc?rif??n&c?eg??o&c?fni?i?rp??p&ooc?u??r&ahib?d?e??s&c?er?nduolc,senisub?u??t&arajug?en!retni??ni?opsgolb,sop??ude?v&og?t??ysrab,zib??elknivlac?griv?ks?lreb?p?v?w!.taht,?x??k!.&gro?ten?ude?vog???l&eok?ocnil??m!.&cyn,gro?ude?vog???o&dnol!.&fo,ni,??i&hsaf!.fo,?n&o?utiderc??siv!orue??t&a&cude!.oc,?dnuof?tsyalp??c&etorp?u&a?rtsnoc?????kin?las?mrom?nac?p&q?uoc??s&iam?pe?scire??t&ron?sob??zama??p!.&gro?oc?ten?ude?vog??k??r&e&c?yab??op!.eidni,??s!.&gro?moc?osrep?t&opsgolb,ra??ude?v&inu?uog????t!.&d&ni?uolcegnaro,?gro?ltni?m&oc!nim??siruot??nif?o&fni?srep??sne?t&an?en??vog??m??u&f?r!.&bdnevar,lper,retropno,s&h,revres,?tnempoleved,??stad?xamay?y??v!.&ca?eman?gro?htlaeh?moc?o&fni?rp??t&en?ni?opsgolb,?ude?vog?zib???wo&rc?t!epac????o&76i4orfy--nx?a!.&bp?de?go?oc?ti?vg??boat??b!.&a&ci&sum?tilop??i&c&arcomed?neic??golo&ce?ncet??m&edaca?onoce??rt&ap?sudni??vilob??n&egidni?icidem??serpme?tsiver?vitarepooc??b&ew?og??dulas?e&rbmon?tr&a?op&ed?snart????g&olb?ro??ikiw?l&a&noi&canirulp?seforp??rutan??im??moc?o&fni?lbeup?rga?tneimivom??saiciton?t&askt?en?ni??ude?vt??h?iew?olg??c!.&bew?cer?dr&c,rac,?esabapus,gro?ipym,l&im?per:.di,,?m&o&c!.topsgolb,?n??rif??ofni?s&egap&dael,l,?tra??t&4n,en?ilperdellawerif:.di,,ni??ude?vog??a?e?in?mara?s&edarb?ic???d!.&b&ew?og??dls?gro?lim?moc?t&en?ra??ude?vog??agoba?if?zd7acbgm--nx??e&c?d&iv?or??morafla??f!ni!.&e&g&delwonk-fo-l&errab,lerrab,?ellocevoli,?ht-skorg,rom-rof-ereh,tadpusn:d,,?llatiswonk,macrvd,ofni-v,p&i&-on,fles,?ohbew,?ruo-rof,s&iht-skorg,nd&-cimanyd,nyd,uolc,??tsrifyam,ysrab,zmurof,???g&el?n!am?ib???hwsohw?i!.&35nyd,8302,a&minifed,tad-b,?b&altig,uhtig,?czh,d&in,raobelgaeb,u&olc&iaznab.ppa,ropav,?rd,??e&c&apsinu.1rf-duolc,ivedniser,?donppad.sndnyd,egipa,lej,nilnigol,sufxob,t&i&beulb,snoehtnap,?newtu,ybeeb.saap,??gni&gatsniser.secived,tsohytsoh,?ilpu,k&coregrof.di,orgn,ramytefasresworb,?moc?n&aicisum,mtsp:.kcom,,yded,?ot&oq,pyrctfihs,?p&opilol,pa&-arusah,e&nalpkcab,tybeeb.1dkes,???r&e&tsneum-hf,vres&cisab,lautriv,??ial.sppa,?s&codehtdaer,gnihtbew,nemeis-om,pparevelc,t&acdnas,ekcit,??t&e&kcubtib,notorp,?i&belet,detfihs,gude,kecaps,?raedon.egats,s&ohg,udgniht.&cersid.&dvreser,tsuc,?dorp.tsuc,gnitset.&dvreser,tsuc,?ved.&dvreser,tsuc,????vgib.0ku,whs,x&bslprbv.g,cq,rotide,?y&olpedew,srab,??b?d&ar?u&a?ts???j?r?syhp??j!.&eman?gro?hcs?lim?moc?ten?ude?vog???ll&ag?o??m!.&gro?moc?ten?ude?vog??g?il?mi?orp??n!.&a&0&b-ekhgnark--nx?c-iehsrgev--nx?g-lksedlig--nx?k-negnanvk--nx??1&p-nedragy--nx?q-&asierrs--nx?grebsnt--nx?lado-rs--nx?n&egnidl--nx?orf-rs--nx??regnayh--nx?ssofenh--nx??r-datsgrt--nx?s-ladrjts--nx?v-y&senner--nx?vrejks--nx???3g-datsobegh--nx?4&5-&dnaleprj--nx?goksnerl--nx?tednalyh--nx??6-neladnjm--nx?s-&antouvachb--nx?impouvtalm--nx??y-&agrjnevvad--nx?ikhvlaraeb--nx???7k-antouvacchb--nx?8&k-rekie-erv--nx?l-ladrua-rs--nx?m-darehsdrk--nx??a!.sg??bct-eimeuvejsemn--nx?d&do?iisevvad?lov?narts?uas??f&1-&l--nx?s--nx??2-h--nx??g&10aq0-ineve--nx?av?ev?lot?r&ajn&evvad?u??ájn&evvad?u????h?iz-lf--nx?j&ddadab?sel??k&el?hoj&sarak?šárák??iiv&ag&na&el?g??ŋ&ael?ág???ran???l&f?lahrevo?o&ms?s??sennev?t-&ilm--nx?tom--nx??u&-edr--nx?s??øms??muar?n&0-tsr--nx?2-dob--nx?5-&asir--nx?tals--nx??a&r!-i-om?f?t??t??douvsatvid?kiv?m&os?øs??n&od?ød??ra?sen?t&aouvatheig?ouv&a&c&ch&ab?áb??h&ab?áb???n??i&ag?ág??sa&mo?ttvid??án???z-rey--nx?ær&f?t???o&p-&ladr--nx?sens--nx??q-nagv--nx?r-asns--nx?s-kjks--nx?v-murb--nx?w-&anr&f--nx?t--nx??ublk--nx???ppol?q&0-t&baol--nx?soum--nx?veib--nx??x-&ipphl--nx?r&embh--nx?imph--nx???y-tinks--nx??r&f-atsr--nx?g-&an&ms--nx?nd--nx??e&drf--nx?ngs--nx??murs--nx?netl--nx?olmb--nx?sorr--nx??h-&a&lms--nx?yrf--nx??emjt--nx??i&-&lboh--nx?rsir--nx?y&d&ar--nx?na--nx??ksa--nx?lem--nx?r&ul--nx?yd--nx????stu??j-&drav--nx?rolf--nx?sdav--nx??kua?l-&drojf--nx?lares--nx??m-tlohr--nx?n-esans--nx?olf?p-sdnil--nx?s-ladrl--nx?tih?v-rvsyt--nx??s&a&ns?ons??i&ar?er&dron?r&os?øs???ár??la&g?h??mor!t??sir?uf?åns??t&koulo&nka?ŋká??la?p-raddjb--nx?r-agrjnu--nx?s&aefr&ammah?ámmáh??orf?r&o?ø???u-vreiks--nx??u&h-dnusel--nx?i-&drojfk--nx?vleslm--nx??j-ekerom--nx?k-rekrem--nx?u-&dnalr--nx?goksr--nx?sensk--nx??v-nekyr--nx?w-&k&abrd--nx?ivjg--nx??oryso--nx??y-y&dnas--nx?mrak--nx?n&art--nx?nif--nx??reva--nx??z-smort--nx??v!.sg?ledatskork?reiks??wh-antouvn--nx?x&9-dlofts--nx.aoq-relv--nx?d-nmaherk--nx?f-dnalnks--nx?h-neltloh--nx?i-drgeppo--nx?j-gve&gnal--nx?lreb--nx??m-negnilr--nx?n-drojfvk--nx??y&7-ujdaehal--nx?8-antouvig--nx?b-&dlofrs--nx?goksmr--nx?kivryr--nx?retslj--nx??e-nejsom--nx?f-y&krajb--nx?re&dni--nx?tso--nx??stivk--nx??g-regark--nx?orf?ørf??z9-drojfstb--nx??b&25-akiivagael--nx?53ay7-olousech--nx?a&iy-gv--nx?le-tl&b--nx?s--nx??n0-ydr--nx??c&0-dnal-erdns--nx?z-netot-erts--nx??g&g-regnarav-rs--nx?o-nejssendnas--nx??ju-erdils-ertsy--nx?nj-dnalh-goksrua--nx?q&q-ladsmor-go-erm--nx.&ari-yreh--nx?ednas??s-neslahsladrjts--nx???ca&4s-atsaefrmmh--nx?8m-dnusynnrb--nx?il-t", - "l--nx?le-slg--nx?n5-rdib--nx?op-drgl--nx?uw-ynnrb--nx??d&a&qx-tggrv--nx?reh!nnivk?sd&ork?ørk??uas??ts&e&bi?kkar?llyh?nnan??g&ort?ørt??k&alf?irderf??levev?mirg?obeg&ah?æh??r&ah?ejg????barm-jdddb--nx?ie!rah?s&etivk?ladman???lof&r&os?øs??ts&ev.ednas?o.relav?ø.relåv???n&a&l&-erd&n&os?øs??ron??adroh.so?dron.&a&g5-b--nx?ri-yreh--nx??ob?y&oreh?øreh??øb??e&m!lejh??pr&oj?øj??vi??gyb?n&aks?åks??o&h-goksrua?rf??r&o?ua?ø??tros?øh-goksrua??rts!e&devt?lab?mloh???s&ellil?naitsirk?rof???u&l!os??s!d&im?lejt??e&guah?l&a?å???kkoh?lavk?naitsirk?r&af?eg&e?ie???tef?y&onnorb?ønnørb?????r&a&blavs!.sg??g&eppo?la???o&j&f&a!dniv?k?vk??die?e&dnas?kkelf??llins?r&iel?ots??s&lab?t&ab?åb??yt??å!k??ævk??les??ts??åg&eppo?lå???ureksub.sen??e&ayb-yrettn--nx?d&ar?lom?r&of?øf??år??g&gyr?nats??i&meuv&ejsem&aan?åån??sekaal??rjea??j&d&ef?oks??les??k&er&aom?åom??hgna&ark?årk??iregnir?kot!s??s&ig?uaf???l&bmab?kyb?l&av?ehtats??oh??m&it?ojt?øjt??n&arg?g&os?øs??meh?reil?te?ummok?yrb??r&dils-erts&ev?y&o?ø???ua?vod??sa&ans?åns??t&robraa?spaav??urg??f&62ats-ugsrop--nx?a&10-ujvrekkhr--nx?7k-tajjrv-attm--nx??o!.sg?h??s!.sg??v!.sg???g&5aly-yr&n--nx?v--nx??a&llor?ve&gnal?lreb???n&av!snellu??org??oks&die?m&or?ør??ner&ol?øl??r&o?ø???r&eb!adnar?edyps?s&die?elf?gnok?n&ot?øt????obspras??uahatsla?åve&gnal?lreb???h&0alu-ysm--nx?7&4ay8-akiivagg--nx?5ay7-atkoulok--nx??a!.sg???i&e&hsr&agev?ågev??rf??k&h&avlaraeb?ávlaraeb??s??lm&a?å??mpouvtal&am?ám??pph&al?ál??rrounaddleid?ssaneve?ššáneve??j&0aoq-ysgv--nx?94bawh-akhojrk--nx??k&a&b&ord?ørd??jks?lleis??iv!aklejps?l&am?evs?u??mag?nel?ojg?r&a&l?n??epok?iel?y&or?ør???s&ah?kel?om??øjg??kabene?ojsarak?ram&deh.&aoq-relv--nx?rel&av?åv??so??e&let.&ag5-b--nx?ob?øb??ra???åjks??l&a!d&anrus?d&numurb?ron??e&gnard?nte?s&meh?sin??ttin??g&is?nyl??kro?l&em?l&ejfttah?of??u&ag-ertdim?s???n&am?era?gos?i&b?nroh?r??kos?nus?oj??o-&dron?r&os?øs???ppo?r&a!l?nram??e&gne?l?v??is?o&jts?ts??u&a-&dron?r&os?øs???h??å?æl?øjts??s&e&jg?nivk?ryf??kav?mor-go-er&om.&ednas?yoreh??øm.&ednas?yøreh???uag??t&las?rajh?suan??v&l&a?e-rots??u-go-eron??yt??ksedlig?res&a?å???bib&eklof?seklyf??es!dah??h!.sg??i&m?syrt??l&ejf?ov&etsua?gnit?ksa?sdie???n!.sg??o!.sg?boh?g?h??r!.sg??å!ksedlig??øboh??m&a&rah?vk??f!.sg??h!.sg??i&e&h&dnort?rtsua?ssej??rkrejb??ksa??ol?t!.sg??u&dom?esum?r&ab?drejg?evle?os?uh?æb?øs??ttals???n&a&g&av?okssman?åv??jlis?or?r&g?rev???e&d&do&sen?ton??lah?r&agy&o?ø??ojfsam???g&iets?n&a&l&as?lab??n&avk?ævk??t&arg?ddosen??v&al?essov???i&d&ol?øl??l&ar?ær???yl??reb??iks?k&srot?y&or?ør???l&a&d&gnos?n&er?ojm?øjm??om??tloh??ug?åtloh??mmard?ojs&om?sendnas??ppolg?s&lahsladr&ojts?øjts??o??t&o&l?t-erts&ev?o?ø???roh?øl??vly&kkys?nav??yam-naj!.sg??øjs&om?sendnas???g&orf?ujb??i&dnaort?vnarg??kob?ladendua?maherk&a?å??n&it?urgsrop??orf-&dron?r&os?øs???r&aieb?evats??sfev?uaks?yrts??o&6axi-ygvtsev--nx?c,d&ob?rav??ievs?kssouf?l&m&ob?øb??ous&adna?ech&ac?áč???so!.sg???msdeks?niekotuak?r&egark?olf?y&oso?øso???s&dav?mort???p&ed?ohsdaerpsym,p&akdron?elk???r&a&d&dj&ab?áb??iab??jtif?luag?mah?vsyt??e&gn&a&k&iel?ro??merb?n&at?mas??rav-r&os?øs??srop?talf?v&ats?el??y&oh?øh???ivsgnok??il?jkniets?k&a&nvej?rem?s&gnir?nellu???ie-er&den?v&o?ø???ram?sa?årem??la&jf?vh??m&b&ah?áh??mahellil??nnul?ts&l&oj?øj??ul??y&o?ø???imp&ah?áh??m!.sg??osir?t!.sg??ádiáb?ævsyt?øsir??s&adnil?en&dnas?e&dga?k&ri&b?k??som??ve??me&h?jg??nroh-go-ejve?s&a?ednil?k&o?ø??of?yt?å??tsev??gv?hf?igaval?o&r&or?ør??sman??so&fen&oh?øh??m?v??uh&lem?sreka.sen??å!dnil???t&a&baol?g&aov?grav??jjr&av-attam?áv-attám??l&a&b?s??ás??soum?ts?v&eib?our???e&dnaly&oh?øh??f?s&nyt?rokomsdeks?sen??vtpiks??in&aks?áks??loh&ar?år??n!.sg??o&m&a?å??psgolb,?s!.sg?efremmah?or?ør??terdi?á&baol?ggráv?lá&b?s??soum?veib???u&b!.sg?alk?e&dna?gnir?nner??les?ælk??dra&b?eb??g&nasrop?vi?ŋásrop??j&daehal&a?á??jedub?v&arekkhar?árekkhár???ksiouf?n&diaegadvoug?taed???v&irp?lesl&am?åm???y&b&essen?nart?sebel?tsev??o&d&ar?na!s??or??gavtsev?k&rajb?sa??lem?mrak?n&art?n&if?orb???r&a&mah?n?v??e&dni?t&so?ton??va??ul?yd??s&am?enner?gav?lrak?tivk??vrejks??ø&d&ar?na!s??ør??gåvtsev?k&rajb?sa??lem?mrak?n&art?n&if?ørb???r&e&dni?t&so?tøn??va??ul?yd?æ&n?v???s&enner?gåv?tivk?åm??vrejks???á&slág?tlá?vreiks??å&gåv?h?jddådåb?lf??ø&d&ob?rav??r&egark?olf??s&dav?mort????aki?i&sac?tal??u??o&b?f?g?hay?o?ttat??r!.&cer?erots?gro?m&o&c?n??rif?t??o&c,fni??pohs,stra?t&n?opsgolb,?www?ysrab,?e&a!.&a&ac?cgd?idem??bulc!orea??ci&ffartria?taborea??e&cn&a&l&lievrus-ria?ubma??netniam?rusni??erefnoc??gnahcxe?mordorea?ni&gne?lria?zagam??rawtfos??gni&d&art?ilg!arap?gnah???l&dnahdnuorg?ledom??noollab?retac?sael?t&lusnoc?uhcarap??vidyks??hcraeser?l&anruoj?euf?icnuoc?ortnoc!-ciffart-ria???n&gised?oi&nu?t&a&cifitrec?ercer?gi&tsevni-tnedicca?van??i&cossa!-regnessap??valivic??redef??cudorp?neverp-tnedicca????ograc?p&ihsnoipmahc?uorg!gnikrow???r&e&dart?enigne?korb?niart?trahc??o&htua?tacude???s&citsigol?e&civres?r??krow?serp!xe??tnega??t&farcr&ia?otor??hgil&f?orcim??liubemoh?n&atlusnoc?e&duts?m&esuma?n&iatretne?revog??piuqe????olip?ropria?si&lanruoj?tneics???w&erc?ohs??y&cnegreme?dobper?tefas????rref?z??p!.&a&aa?ca?pc??dem?ecartsnd.icb,gne?r&ab?uj??snduolc,t&acova?cca?hcer??wal?ysrab,???s!.&em?gro?hcs,moc?ten?ude?vog???t!.&116,ayo,gro?lim?moc?nayn,sulpnpv,t&cennockciuq.tcerid,en??ude?v&dr,og???o&hp?m?v?yk??tol?ua??v&iv?lov??xas?ykot??p&a&ehc?g?m?s??eej?g!.&gro?ibom?moc?ossa?ppa,ten?ude???i&r!.nalc,?v?z??j!.&a&3&5xq6f--nx?xqi0ostn--nx??5wtb6--nx?85uwuu--nx?9xtlk--nx?ad,b&ats,ihc!.&a&bihciakoy?don?ma&him?ye&ragan?tat???r&a&bom?gan?hihci??u&agedos?kas?ustak???s&os?ufomihs??t&amihcay?iran??w&a&g&im&anah?o??omak??kihci?zustum??ihsak??y&agamak?imonihci???e&akas?nagot??i&azni?esohc?h&asa?s&abanuf?ohc???ka&to?zok??musi?orihs?r&akihabihsokoy?o&dim?tak??ukujuk??usihs??nano&hc?yk??o&d&iakustoy?ustam??hsonhot?k&a&rihs?t??iba??nihsaran?sobimanim?tas&arihsimao?imot??uhc?yihcay??u&kujno?s&ayaru?t&imik?tuf???zarasik?????c&cah,ed,?g&as!.&a&gas?m&a&tamah?yik??ihsak??rat?t&a&gatik?hatik??ira!ihsin????e&kaira?nimimak??i&akneg?g&aruyk?o??h&c&amo?uo??siorihs??kaznak?modukuf?ra&gonihsoy?mi???nezih?u&k&at?ohuok??s&ot?tarak?????ihs!.&a&kok?m&a&hagan?yirom??ihsakat??rabiam?wagoton??e&miharot?nokih??houyr?i&azaihsin?esok?kustakat?moihsagih??na&mihcahimo?nok??o&hsia?mag?t&asoyot?ok?tir???us&ay?t&asuk?o??????k&aso!.&a&d&awihsik?eki??k&a&noyot?s&akaayahihc?oihsagih???oadat?uziak??m&ayas!akaso??odak??r&a&bustam?wihsak??ediijuf??t&akarih?i&k?us???wag&ayen?odoyihsagih???e&son?tawanojihs??honim?i&akas?h&cugirom?s&ayabadnot?i&a&kat?t??n??oyimusihsagih???k&a&rabi?sim??ustakat??muzi?r&ijat?otamuk???nan&ak?n&ah?es???o&ay?n&a&ganihcawak?simuzi?tak??eba?ikibah?oyot??t&anim?iad?omamihs??uhc??ust&oimuzi?tes????ou&kuf!.&a&d&amay?eos??g&no?ok?usak??hiku?k&awayim?uzii??ma&kan?y&asih?im???rawak?t&a&gon?ka&h?num?t???umo??wa&g&a&kan?nay?t??ias??ko!rih???y&ihsa?usak???e&m&ay?uruk??taruk?us??i&a&nohs?raihcat??goruk?h&cukuf?s&a&gih?hukuy??in???k&a&gako?muzim??iust?o?ustani??m&anim?otihsoynihs?u??r&ogo?ugasas??usu??ne&siek?zu&b?kihc???o&gukihc?h&ak?ot?ukihc??j&ono?ukihc??kayim?nihsukihc?to?uhc??u&fiazad?gnihs?stoyot????zihs!.&a&bmetog?d&amihs?eijuf?ihsoy?omihs??kouzihs?mihsim?ra&biah?honikam??tawi?wa&g&ekak?ukik??kijuf??yimonijuf??i&a&ra?sok??hcamirom?juf?kaz&eamo?ustam??ma&nnak?ta??nukonuzi?orukuf??nohenawak?o&nosus?ti??u&stamamah?z&a&mun?wak??i!ay?i&hs&agih?in??manim??mihs????????m&a&tias!.&a&d&ihsoy?ot?usah??k&a&dih?sa??o&arihs?s???m&a&tias?y&as?o&rom?tah??ustamihsagih???i&hsagurust?jawak??uri??ni?wa&g&e&ko?man??ikot?o??k&ara?i&hsoy?mak???ru?zorokot??y&a&g&amuk?ihsok?otah??kuf??imo??ziin??e&bakusak?ogawak?sogo?ttas?zokoy??i&baraw?h&cugawak?s&oyim?ubustam???iroy?k&ato?ihs?u&k?stawi???m&akoyr?i&hsoy?juf??uziimak???naznar?o&dakas?ihsay?jnoh?n&a&go?nim??imijuf?nah?oy??r&ihsayim?otagan??t&asim!ak??igus?omatik??zak??u&bihcihc!ihsagih??sonuok?ynah????y&ak&aw!.&a&d&ira?notimak??kadih?ma&h&arihs?im??y&a&kaw?tik??oduk???ru&ustakihcan?y??sauy?wa&g&a&dira?zok??orih??konik??yok?zok??e&banat?dawi??i&garustak?jiat?mani??naniak?o&bog?nimik?t&asim?omihs&ah?uk????ugnihs???o!.&a&jos?koasak?m&ay&ako?ust??ihsayah??r&abi?ukawaihsin??wi&aka?nam???e&gakay?kaw??i&gan?h&cu&kasa?otes??sahakat??k&asim?ihsaruk??miin??n&anemuk?ezib??o&hsotas?jnihs?n&amat?imagak??ohs?uhcibik?????ot!.&a&damay?got?koakat?may&etat?ot??nahoj?riat?waki&inakan?reman???eb&ayo?oruk??i&h&asa?ciimak?sahanuf??kuzanu?m&an&i?ot??ih???nezuyn?otnan?u&hcuf?stimukuf?z&imi?ou???????ihs&o&gak!.&a&m&ayuok?ihsogak??si?yonak??e&banawak?n&at&akan?imanim??uka??tomoonihsin??i&adnesamustas?k&azarukam?oih??m&ama?uzi??usuy??nesi?o&knik?os?tomustam??uzimurat???rih!.&a&ka&n?s??m&ayukuf?i&hsorihihsagih?j&ate?imakikaso????r&a&bohs?h&ekat?im???es??tiak?wiad??e&kato?ruk??i&h&ci&akustah?mono?nihs??s&inares?oyim???manimasa?uk??negokikesnij?o&gnoh?namuk??uhcuf????uk&ot!.&a&bihci?mi&hsu&kot?stamok??m??wagakan??egihsustam?i&gum?h&coganas?soyim??kijaw?m&anim?uzia??ukihsihs??nan&a?iak??o&nati?turan????uf!.&a&batuf?m&a&to?y&enak?irok???ihs&im?ukuf??os?uko??r&aboihsatik?uganat??ta&katik?mawak?rih??w&a&g&akus?emas?uy??k&a&mat?rihs?sa??ihsi??nah??ohs???e&gnabuzia?iman?ta&d?tii???i&adnab?enet?hs&agih?iimagak??k&a&wi?zimuzi??ubay??minuk?r&ook?ustamay???nihsiat?o&g&etomo?ihsin?nan?omihs??no!duruf?rih??rihsawani?ta&may?simuzia???u&rahim?stamakawuzia?zia&ihsin?nay???????nug!.&a&bawak?doyihc?k&anna?oi&hsoy?juf?mot???m&ayakat?ustagaihsagih??n&ihsatak?nak??r&ahonagan?nak?o?u&kati?mamat???t&amun?inomihs?o??w&akubihs?iem?ohs???i&hsa&beam?yabetat??kas&akat?esi??m&akanim?uzio??ogamust?rodim??o&jonakan?n&eu?oyikust??tnihs??u&komnan?stasuk?yrik????rep,?n&ibmab,nog,?ppacihc,ra&n!.&a&bihsak?d&akatotamay?u!o???guraki?m&ay&atik&imak?omihs??irokotamay??oki??ra&hihsak?n??wa&geson?knet???e&kayim?ozamay?sog?ustim??i&a&rukas?wak??garustak?h&ciomihs?sinawak??jo?ka&mnak?toruk??makawak?nos?r&net?otakat?ugeh???o&d&na?oyo??gnas?jnihs?nihsoy!ihsagih??tomarawat?yrok????rikik,?t&ag&amay!.&a&dihsio?k&atarihs?ourust??may&a&kan?rum??enak?onimak??rukho?ta&ga&may?nuf??hakat?kas??wa&g&ekas?orumam??ki&hsin?m??z&anabo?enoy?ot???zuy??e&agas?bonamay?dii?nihsagih?o??i&a&gan?nohs??h&asa?sinawa", - "k??nugo??o&dnet?jnihs?ynan??ukohak???iin!.&a&ga?k&ium?oagan??munou!imanim??t&a&bihs?giin??ioy??w&a&gioti?kikes?zuy??irak??yijo??e&kustim?mabust??i&aniat?hcamakot?kaz&awihsak?omuzi??m&a&gat?karum??o???n&anust?esog??o&das?ihcot?jnas?k&ihay?oym??mak?naga?ries??u&ories?steoj?????i&k&a!.&a&go?k&asok?oimak??t&ago!rihcah??ika!atik???w&aki?oyk???e&mojog?natim?suranihsagih?t&ado?okoy???i&hsoyirom?magatak?naokimak??nesiad?o&hakin?jnoh!iruy??nuzak?rihson?tasi&juf?m??yjnoh??u&kobmes?oppah????in,?o!.&a&dakatognub?m&asah?ihsemih??su?t&ekat?i&h?o????e&onokok?ustimak??i&jih?k&asinuk?ias?usu??mukust??onoognub?u&fuy?juk?ppeb?suk??????wa&ga&k!.&a&mihsoan?rihotok?waga&kihsagih?ya???emaguram?i&j&nonak?ustnez??kunas?monihcu??o&hsonot?nnam?yotim??u&st&amakat?odat??zatu????nak!.&a&dustam?kus&okoy?tarih??maz?nibe?r&a&gihsaimanim?h&esi?imagas??wa&do?guy???u&im?kamak???tikamay?wa&k&ia?oyik?umas??sijuf??yimonin??e&nokah?saya??i&akan?esiak?gusta?hsuz?kasagihc?o?ukust??o&nadah?sio?tamay?????kihsi!.&a&danihcu?gak?kihs?mijaw?t&abust?ikawak??wazanak??i&gurust?hcionon?mon?ukah??nasukah?o&anan?ton!akan???u&kohak?stamok?z&imana?us?????niko!.&a&han?m&arat?ijemuk?uru??n&e&dak?zi??no??ra&hihsin?rih??wa&kihsi?niko??yehi?zonig??e&osaru?seay??i&hsagih?jomihs?k&a&gihsi?not??ihsakot??m&a&ginuk?kihsug?maz??igo?otekat??nuga!noy???n&a&moti?timoy?wonig??i&jikan?k???o&gan?jnan?tiad&atik?imanim???u&botom?kusug&akan!atik??imot??rab&anoy?eah??????yp,?bus,c&204ugv--nx?462a0t7--nx?678z7vq5d--nx?94ptr5--nx?a?mpopilol,?d&17sql1--nx?3thr--nx?5&20xbz--nx?40sj5--nx??7&87tlk--nx?ptlk--nx??861ti4--nx?a?e!tfarcdnah,?n&eirf&lrig,yob,?om,?ooftac,?e&16thr--nx?5&1a4m2--nx?9ny7k--nx??damydaer,eweep,i&bmoz,m!.&a&bot?k&asustam?uzus??m&a&him?y&emak?im???ihs??nawuk?wi&em?k???e&bani?ogawak?si!imanim???i&arataw?gusim?h&asa?ciakkoy??k&a&mat?sosik?t??iat??raban??o&dat?hik?n&amuk?ihseru?o&du?mok????ust????kilbew,lasrepus,mihe!.&a&m&a&h&ataway?iin??yustam??ij&awu?imak???taki!man???ebot?i&anoh?kasam?rabami??n&ania?egokamuk?oot??o&jias?kihcu?nustam?uhcukokihs?yi!es???u&kohik?zo????n!.&nriheg,teniesa.resu,?amihs!.&a&d&amah?ho?usam??kustay?m&a?ihsoni&hsin?ko???wakih??e&namihs?ustam??i&g&aka?usay??konikak?mikih??nannu?o&mu&kay?zi!ihsagih?uko???nawust?tasim??u&stog?yamat????nep,?rotsnoihsaf,srev,t&awi!.&a&bahay?d&amay?on??koirom?t&a&honat?katnezukir??imus??w&as&ijuf?uzim??ihs???e&hon&i&hci?n??uk??tawi??i&a&duf?murak?wak??h&custo?si&amak?ukuzihs???j&oboj?uk??k&a&m&anah?uzuk??sagenak??esonihci??m&akatik?uzia&rih?wi????o&kayim?no&rih?t??tanufo??uhso???isarap,saman,tococ,?ulbybab,?g&3zsiu--nx?71qstn--nx?l?olblooc,?h&03pv23--nx?13ynr--nx?22tsiu--nx?61qqle--nx?sulb,?i&54urkm--nx?ced,g&ayim!.&a&dukak?m&a&goihs?kihs??ihsustam!ihsagih??unawi??r&awago?iho??ta&bihs?rum??w&a&gano?kuruf??iat??y&imot?ukaw???e&mot?nimes??i&hsiorihs?ka&monihsi?s&awak?o???mak?r&ataw?o&muram?tan????o&az?jagat?t&asim?omamay???u&fir?k&irnasimanim?uhsakihcihs?????ihcot!.&a&g&a&h?kihsa??ust??kom?m&ay&o?usarak??unak??r&a&boihsusan?watho??iho?ukas??t&akihsin?iay??wa&konimak?zenakat??y&imonustu?oihs???e&iiju?kustomihs?nufawi??i&akihci?g&etom?ihcot?on???o&k&ihsam?kin??nas?sioruk?tab??u&bim?san?????h&c&ia!.&a&dnah?m&a!h&akat?im??yuni??ihs&ibot?ust???r&a&hat?tihs??ik?u&ihsagih?kawi???t&ihc?o&k?yot???wa&koyot?zani??yi&monihci?rak???e&inak?k&aoyot?usa??manokot?noyot??i&a&gusak?kot?sia??eot?h&asairawo?cugo?s&ahoyot?oyim???k&a&mok?zako??ihssi??motay?rogamag??n&an&ikeh?ok??ihssin??o&got?ihsin?jna?rihsnihs?suf?tes??u&bo?raho?s&oyik?takihs??yrihc?zah????ok!.&a&dusay?kadih?mayotom?r&ah&im?usuy??umakan??sot!ihsin??wa&g&atik?odoyin??k&as?o????i&esieg?hco!k??jamu?k&a!sus??usto??ma&gak?k??rahan??o&mukus?n&i?ust!ihsagih???torum?yot!o???u&koknan?zimihsasot????ugamay!.&a&m&ayukot?ihso??toyot??e&bu?subat??i&gah?kesonomihs?nukawi?rakih??nanuhs?otagan?u&ba?foh?otim?stamaduk?uy?????s&anamay!.&a&dihsoyijuf?mayabat?r&ahoneu?ustakihsin??w&a&k&ayah?ijuf??suran??ohs???egusok?i&ak?h&cimakan?s&anamay?od???k&asarin?u&feuf?sto????o&k&akanamay?ihcugawakijuf??nihso?t&asimawakihci?ukoh??uhc??spla-imanim?u&b&nan?onim??fok?hsok?rust????ubon,??ka&rabi!.&a&bukust?gok?kan!ihcatih??m&a&sak?timo?wi??ihsak?ustomihs??ni?r&a&hihcu?way??u&agimusak?ihcust???t&ag&amay?eman??oihcatih??w&ag&arukas?o??os??yi&moihcatih?rom???e&bomot?dirot?not?tadomihs??i&a&k&as?ot??rao??esukihc?gahakat?h&asa?catih??k&a&rabi?saguyr??ihsani?uy??ma?rukustamat??o&dnab?giad?him?kati?rihsijuf?soj?t&asorihs?im??yihcay??u&fius?kihsu?simak????sagan!.&a&m&abo?ihsust??natawak?r&abamihs?u&mo?ustam???wijihc?yahasi??i&akias?hies?k&asagan?i??masah??neznu?o&besas?darih?t&eso?og!imaknihs????ust&igot?onihcuk?uf????zayim!.&a&biihs?guyh?k&oebon?ustorom??mihsuk?r&emihsin?uatik??ta&katik?mim??wag&atik?odak??ya??e&banakat?sakog??i&hsayabok?kaza&kat?yim??m&animawak?ot&inuk?nihs????nanihcin?o&j&ik?onokayim??n&ibe?ust??tias??urahakat????ro&cep,moa!.&a&dawot?turust?wasim??e&hon&ihc&ah?ihs??nas?og?ukor??sario??i&anarih?ganayati?hsioruk?jehon?kasorih?makihsah?nawo?r&amodakan?omoa???o&gnihs?kkat??u&ragust?stum????ttot!.&a&r&ahawak?uotok??sa&kaw?sim???egok?irottot?nanihcin?o&ganoy?nih?tanimiakas??u&bnan?z&ay?ihc??????ukuf!.&a&deki?gurust?ma&bo?h&akat?im??yustak??sakaw??eabas?i&akas?ho?jiehie?ukuf??nezihce!imanim??ono????k&26rtl8--nx?4&3qtr5--nx?ytjd--nx??522tin--nx?797ti4--nx?ci&gid,ht,sevol,?limybab,nupatilol,?l&33ussp--nx?ellarap,lik,oof,rigetuc,?m&11tqqq--nx?41s3c--nx?ef,sioge,?n&30sql1--nx?65zqhe--nx?a&ebyllej,i&lognom,viv,??iam,n7p7qrt0--nx?o&ruk,staw,??o&131rot--nx?7qrbk--nx?aic,c?diakkoh!.&a&deki?gakihset?hcebihs?k&adih?u&fib?narihs???m&ayiruk?hot?ihs&orihatik?ukuf??oras?usta??r&ib&a!ka??o?uruf??ozo?u&gakihsagih?oyot???sakim?ta&gikust?mun??w&a&ga&k&an?uf??nus!imak???k&aru?i&h&asa?sagih??kat?mak??omihs?um??zimawi??ine?oyk??yot??e&a&mustam?nan??b&a&kihs?yak??o&noroh?to???ian?k&ihsam?ufoto??nakami?ppoko!ihsin??sotihc?tad!okah??uonikat??i&a&bib?mokamot?n&a&k&kaw?oroh??wi??eomak?ihsatu?okik?usta&moruk?sakan????eib?h&c&ioy?u&bmek?irihs???s&ase?ekka?oknar?uesom???jufirihsir?k&amamihs?i&at?n???m&atik?otoyot??oa&kihs?rihs??r&a&hs?kihsi?mot??ihs&aba?ir??otarib???n&a&hctuk?rorum?se?tokahs??uber??o&kayot?m&ire?ukay??naruf!ima&k?nim???orih?r&ih&ibo?suk??o&bah?h&i&b?hsimak??sa??pnan?yan??umen??t&asoyik?eko?ukoh???u&bassa?kotnihs?m&assaw?uo??pp&akiin?en&ioto?nuk??ip??rato?s&akat?t&eb&e?i&a?hs!a??robon??m&e?o&m?takan???no&h?tamah??o&mik?s?t??u&kir?ppihc?st???onihsnihs?ufuras??uaru??yru!koh??zimihs!ok?????g!iti,oyh!.&a&bmat?dnas?gusak?k&at?o&oyot?y??uzarakat??m&ayasas?irah??wa&g&ani?okak??k&i&hci?mak??oy???yi&hsa?monihsin???i&asak?hs&aka?i&at?nawak???j&awa!imanim??emih??k&a&goa?s&agama?ukuf??wihsin??i&hsog?m???mati?oia?rogimak??n&annas?esnonihs??o&gasa!kat??ka?n&ikat?o?ustat??rihsay?sihs?tomus?yas??u&bay?gnihs?????hih,konip,lik,mol,nagan!.&a&bukah?d&a&w?yim??e&ki?u??ii??k&a&s&ay?uki??zus??ihsoo?ousay??m&ay&akat?ii??i&hsukufosik?jii??ukihc??n&i!hsetat??uzii??r&ah?ugot??saim?t&agamay?oyim??w&a&g&a&kan?n??o??kustam?ziurak??onim!imanim??u&koo?s!omihs????ya&ko?rih???e&akas?nagamok?subo??i&gakat?h&asa?c&a!mo!nanihs???uonamay??sukagot??k&a&kas?mimanim?to??ia&atik?imanim??oa?uzihcom??m&akawak?ijuf?o!t???r&ato?ijoihs?omakat???n&ana?esnoawazon??o&hukas?n&a&gan?kan??i&hc?muza??ustat??romok?si&gan?k??tomustam??u&k&as?ohukihc??stamega????o&b,m,pac,?to&mamuk!.&a&gamay?rahihsin?sukama!imak??tamanim??enufim?i&hcukik?k&ihsam?u??nugo!imanim??romakat??o&ara?rihsustay?sa?t&amay?om&amuk?us??u!koyg???yohc??u&sagan?zo????yk!.&a&bmatoyk?k&ies?oemak?uzaw??mayi&h&cukuf?sagih??muk??nihsamay?rawatiju?t&away?ik???e&ba&nat!oyk??ya??di?ni??i&ju?kazamayo?manim??natnan?o&gnatoyk?kum?mak?rihsamayimanim?y&gakan?ka&koagan?s??oj???u&ruziam?z&ayim?ik??????wtc1--nx?ykot!.&a&d&i&hcam?mus??oyihc??k&atim?ihsustak??m&a&t!uko??yarumihsa&gih?sum???i&hs&agoa?ika?o!t??uzuok??ren???r&a&honih?wasago??iadok?umah??ssuf?t&ik?o??wa&g&anihs?ode??k&ara?ihcat???y&agates?ubihs???e&amok?donih?m&o?urukihsagih??soyik??i&enagok?gani?h&ca&da?tinuk??sabati??j&nubukok?oihcah??manigus??o&huzim?jihcah?n&akan?ih!sasum??urika??rugem?t&a&mayihsagih?nim??iat?ok??uhc?yknub??u&fohc?hcuf?kujnihs?????p&aehc,o&hs&eht,iiawak,yub,?p&evol,ydnac,?rd&kcab,niar,???r&2xro6--nx?atselttil,e&d&nu,wohc,?h,ilf,pp&ep,irts,u,?t&aerg,tib,??g?o!on,?ufekaf,?s&9nvfe--nx?dom,p&ihc,oo,?sikhcnerf,u&bloohcs,ruci,srev,?xvp4--nx??t&a&cyssup,obgip,?e&rces,vlev,?netnocresu,opsgolb,sidas,u&b,ollihc,??u&4rvp8--nx?fig!.&a&d&eki?ih??kimot?m&ayakat?ihsah??ne?raha&gi&kes?makak??sak??taga&may?tik??wa&g&ibi?ustakan??karihs!ihsagih????e&katim?uawak??i&gohakas?hc&apna?uonaw??k&ago?es?ot??m&anuzim?ijat??nak?urat??nanig?o&dog?jug?makonim?nim?roy?sihcih??u&fig?s&otom?t&amasak?oay??????hc,pup,stoknot,ynup,?wonsetihw,x5ytlk--nx?y&adynnus,knarc,l&oh,rig,?moolg,ob,pp&ih,olf,?rgn&a,uh,?u6d27srjd--nx?vaeh,?z72thr--nx?井福?京東?分大?取鳥?口山?城&宮?茨??媛愛?山&富?岡?歌和??岡&福?静??島&児鹿?広?徳?福??崎&宮?長??川&奈神?石?香??庫兵?形山?手岩?木栃?本熊?根島?梨山?森青?潟新?玉埼?田秋?知&愛?高??縄沖?良奈?葉千?賀&佐?滋??道海北?都京?重三?野長?阜岐?阪大?馬群???k!.&art?gro?moc?per?ude?vog???l&eh?l??m!.uj,ac?j??nd?o&g?h&pih?s!.&esab,xilpoh,ysrab,???lnud?oc?t!.&lldtn,snd-won,???pa!.&0mroftalp,a&rusah,ted,?bew:erif,,e&gatskrelc,niln&igol,okoob,?tupmocegde,virdhsalfno,?ilressem,krelc,le&crev,napysae,?maerdepyt,n&aecolatigidno,ur:.a,,?poon,r&cne,emarf,?t&ibelet,xenw,?yfilten,??ra&a?hs??u&ekam?llag?org!.esruocsid,cts?kouk?nayalo???vsr?xece4ibgm--nx??q&a!3a9y--nx??g?i!.&gro?lim?moc?ten?ude?vog???m?se??r&a!.&a&cisum?sanes??bog?gro?l&autum?im??moc!.topsgolb,?pooc?rut?t&e&b?n??ni??ude?vog??4d5a4prebgm--nx?b?c?eydoog?los?t&at?s!uen???ugaj??b!.&21g?a&b&a&coros?iuc??itiruc??cnogoas?dicerapa?gniram?i&naiog?ramatnas??n&erom?irdnol??op?p&acam?irolf?ma&j?s???rief?tsivaob??b!aj?ib?mi?sb??c&ba?e&r?t??js?sp?t!e???d&em?mb?n&f?i??rt??e&dnarganipmac?ficer?ht?llivnioj?rdnaotnas??f&dj?ed?gg?n&e?i???g&e&l!.&a&b,m,p,?bp,c&a,s,?e&c,p,s,?fd,gm,ip,jr,la,ma,nr,o&g,r,t,?p&a,s,?r&p,r,?s&e,m,r,?tm,??s??l&s?z??n&c?e?o??ol!b?f?v??pp?ro??hvp?i&du?kiw?nana?oretin?r&c?eurab??sp?te?xat??l&at&an?rof??el?im?sq??m&a?da?e&gatnoc?leb??f?ic?oc!.&duolclautriv.elacs.sresu,topsgolb,???nce?o&ariebir?c", - "&e?narboir?saso??d&o?ranreboas??e&g?t??i&b?dar?ecam?r??rp?t&a?erpoir???p&er?m!e?t??ooc?pa?se??qra?r&af?ga?o&davlas?j??tn?ut??s&a&ixac?mlap?nipmac??ed?u&anam?j?m???t&am?e&d?n?v??nc?o&f?n??ra?sf??u&caug9?de?ja?rg??v&da?ed?og!.&a&b?m?p??bp?c&a?s??e&c?p?s??fd?gm?ip?jr?la?ma?nr?o&g?r?t??p&a?s??r&p?r??s&e?m?r??tm???rs?t??xiv?z&hb?ls?o&c?f?????c!.&as?ca?de?if?o&c?g??ro???e&bew?ccos?dnik?e&b?n&igne?oip??rac??gni&arg?rheob??h&cor?sok?t&aew?orb???itnorf?k&col?o&p?rb???l&aed?ffeahcs??mal?nes?pinuj?t&a&eht?rebsnegömrev??law?nec?s&acnal?nom?ubkcolb??upmoc??v&o&csid?rdnal??resbo??wulksretlow?ywal?zifp??f!.&aterg?bew-no,drp?e&c&itsuj-reissiuh?narf-ne-setsitned-sneigrurihc,?lipuog,rianiretev??hny,i&cc?rgabmahc??m&o&c?n??t??n&eicamrahp?icedem??ossa?pohsdaerpsym,s&e&lbatpmoc-strepxe?riaton?tsitned-sneigrurihc?uova??o&-x&bf,obeerf,?x&bf,obeerf,???t&acova?o&or-ne,psgolb,?r&epxe-ertemoeg?op!orea????vuog?xobided,?avc7ylqbgm--nx?s??g!.&gro?moc?t&en?opsgolb,?ude?vog???h!.&e&erf,man??mo&c?rf??topsgolb,zi??ur??i!.&a&61f4a3abgm--nx?rf4a3abgm--nx??ca?di?gro?hcs?oc?ten?vog?نار&يا?یا???a&h?per??ew?lf??k!.&c&a?s??e&n?p?r??gk?iggnoeyg?kub&gn&oeyg?uhc??noej??l&im?uoes??man&gn&oeyg?uhc??noej??n&as&lu?ub??o&e&hcni?jead??wgnag???o&c?g??ro?s&e?h?m??topsgolb,u&gead?j&ej?gnawg????cilf??l!.&gro?moc?ten?ude?vog???m!.&topsgolb,vog???n!.&gro?moc?ofni?ten?ude?vog?zib???o&htua?odtnorf?t&c&a?od??laer???p!.&alsi?ca?eman?forp?gro?moc?o&fni?rp??t&en?se??ude?vog?zib???s?t!.&21k?bew?cn!.vog??eman?gro?kst?l&e&b?t??im?op??moc!.topsgolb,?neg?ofni?pek?rd?sbb?ten?ude?v&a?og?t??zib??f?m??ubad?vd??s&8sqif--nx?9zqif--nx?a!.vog?birappnb?gev?lliv?mtsirhc?s??b!.&ew,gro?moc?ten?ude?vog??c?oj?s?u??c&i&hparg?p?t&sigolyrrek?ylana???od??d&a?d?ik?l?n&iwriaf?omaid??oogemoh?rac??e!.&bog?gro?mo&c!.topsgolb,?n??pohsdaerpsym,ude??civres!.enilnigol,?d&d2bgm--nx?oc??h&ctaw?guh??i&lppus?rtsudni?treporp!yrrek???jaiv?l&aw?cycrotom?etoh?gnis?pats??m&ag?oh?reh??nut?ohs?picer?r&it?ut&cip!.7331,?nev???s!i&rpretne?urc??ruoc??taicossa?vig??g!nidloh??h5c822qif--nx?i!.&ekacpuc,gro?moc?t&en?ni?opsgolb,?ude?vog??a09--nx?nnet?rap?targ??k&c&or!.&ecapsbew,snddym,ytic-amil,??us??hxda08--nx?row??l!.&c&a?s??ed,gro?o&c?fni??ten?ude?vog?zib??a&ed?tner??e&ssurb?toh!yrrek???lahsram?m?oot??m!.&bal,etisinim,gro?moc?ten?ude?vog??b?etsys!.tniopthgink,?ialc??n&a&f?gorf?ol??egassap?i&a&grab?mod??giro??o&it&acav?cudorp?ulos??puoc???o&dnoc?geuj?leuv?ppaz?t&ohp!.remarf,?ua???p!.&ces?gro?moc?olp?ten?ude?vog??i&hsralohcs?lihp?t??u??r!.&au,ca?gro?ni?oc?topsgolb,ude?vog?xo,yldnerb.pohs,?a&c?p?tiug??c?e&dliub!.etisduolc,?erac?gor?levart?mraf?n&niw?trap??wolf??ot&cartnoc?omatat??pj?uot??s!.&em?gro?hcs?moc?ten?ude?vog?zib??alg?e&n&isub!.oc,?tif??rp!xe!nacirema???xnal??iws??t&a&e&b?ytic??ob??ek&cit?ram??fig?h&cay?gilf??n&atnuocca?e&mt&rapa?sevni??ve!.&nibook,oc,????rap??u!.&a&c!.&21k?bil?cc???g!.&21k?bil?cc???i!.&21k?bil?cc???l!.&21k?bil?cc???m!.&21k!.&hcorap?rthc?tvp???bil?cc???p!.&21k?bil?cc???si?v!.&21k?bil?cc???w!.&21k?bil?cc????c&d!.&21k?bil?cc???n!.&21k?bil?cc???s!.&21k?bil?cc????d&e&f?lacsne.xhp,?i!.&21k?bil?cc???m!.&21k?bil?cc???n!.&bil?cc???s!.&bil?cc???u&olcrim,rd,??e&d!.&21k?bil,cc???las-4-&dnal,ffuts,?m!.&21k?bil?cc???n!.&21k?bil?cc????h&n!.&21k?bil?cc???o!.&21k?bil?cc????i&h!.&bil?cc???m!.&21k?bil?c&c?et??goc?n&eg?otae??robra-nna?sum?tsd?wanethsaw???nd?r!.&bil?cc???v!.&21k?bil?cc???w!.&21k?bil?cc????jn!.&21k?bil?cc???k&a!.&21k?bil?cc???o!.&21k?bil?cc????l&a!.&21k?bil?cc???f!.&21k?bil?cc???i!.&21k?bil?cc????mn!.&21k?bil?cc???n&afflog,i!.&21k?bil?cc???m!.&21k?bil?cc???sn?t!.&21k?bil?cc????o&c!.&21k?bil?cc???m!.&21k?bil?cc???ttniop,?p&ion,rettalp,?r&a!.&21k?bil?cc???o!.&21k?bil?cc???p!.&21k?bil?cc????s&a!.&21k?bil?cc???dik?k!.&21k?bil?cc???m!.&21k?bil?cc???nd&deerf,uolc,??t&c!.&21k?bil?cc???m!.&21k?bil?cc???u!.&21k?bil?cc???v!.&21k?bil?cc????ug!.&21k?bil?cc???v&n!.&21k?bil?cc???w!.cc???x&ohparg,t!.&21k?bil?cc????y&b-si,k!.&21k?bil?cc???n!.&21k?bil?cc???w!.&21k?bil?cc????za!.&21k?bil?cc????ah!uab??bria?col?e!.ytrap.resu,?ineserf?lp?xe&l?n???vt?w!.&66duolc,gro?moc?s&ndnyd,tepym,?ten?ude?vog??a?e&iver?n!.elbaeciton,??odniw??y&alcrab?cam?ot???t&0srzc--nx?a!.&amil4,ca!.hts??gni&liamerutuf,tsoherutuf,?o&c!.topsgolb,?fni,?p&h21,ohsdaerpsym,?r&euefknuf.neiw,o??v&g?irp,?xi2,ytic-amil,zib,?c?e!s??hc?if?l!asite??mami?rcomed??b!.&gro?moc?ten?ude?vog??b?gl??c&atnoc?e&les?rid!txen????dimhcs?e!.&eman?gro?moc?ofni?ten?ude?vog?zib??b?em?grat?id?k&circ?ram??n!.&0rab,1rab,2rab,5inu,6vnyd,7&7ndc.r,erauqs,?a&l&-morf,moob,?minifed,remacytirucesym,tadsyawla,z,?b&boi,g,lyltsaf:.pam,,?c&inagro-gnitae,paidemym,?d&ecalpb,irgevissam.saap.&1-&gs,nol,rf,yn,?2-&nol,yn,??nab-eht-ni,uolc&meaeboda,nievas.c&di-etsedron,itsalej,?xednay:.e&garots,tisbew,?,??e&c&narusnihtlaehezitavirp,rofelacs.j,?gdirbtib,ht-no-eciffo,l&acs&liat.ateb,noom,?ibom-eruza,?m&ecnuob,ohtanyd,tcerider,?n&ilno-evreser,ozdop,?rehurht,s:abapus,,tis-repparcs,zamkcar,?f&aeletis,crs.&cos,resu,?ehc-a-si,?g&ni&reesnes,sirkcilc,tsohnnylf,?olbevres,?k&catsvano,eeg-a&-si,si,?u,?l&acolottad,iamwt,meteh,s&d-ni,s-77ndc,??m&ac&asac,ih,?urofniem,?n&a&f&agp,lhn,?i&bed,llerk,??dcduabkcalb,i,pv-ni,?o&c-morf,duppa,jodsnd,rp-ytinummoc,ttadym,?p&i&-&etsef,on,?emoh,fles,nwo,?j,mac-dnab-ta,o&-oidar-mah,h&bew,sdaerpsym,??pa&duolc,egde,?tfe&moh,vres,?usnd,?r&e&tsulcyduolc,vres-xnk,?vdslennahc:.u,,?s&a&ila&nyd,snd,?nymsd,?bbevres,dylimaf,e&gde-ndc,suohsyub,t&isbeweruza,ys,??k&catstsaf,ekokohcs,?n&d&-won,d,golb,npv,?oitcnufduolc,?ppacitatseruza:.&1,2:suts&ae,ew,?,aisatsae,eporuetsew,sulartnec,?,s&a-skcik,ecca&-citats,duolc,??t,?t&adies,ce&ffeym,jorprot:.segap,,lespohs,?e&nretnifodne,smem,?farcenimevres,i-&ekorb,s&eod,lles,teg,??n&essidym,orfduolc,?r0p3l3t,s&ixetnod,oh&-spv:.citsalej.&cir,lta,sjn,?,gnik,???u&h,nyd,r:eakust.citsalej,,?ved-naissalta.dorp.ndc,x&inuemoh,spym,tsale.&1ots-slj,2ots-slj,3ots-slj,?unilemoh,?y&awetag-llawerif,ffijduolc:.&ed-1arf,su-1tsew,?,ltsaf.&dorp.&a,labolg,?lss.&a,b,labolg,?pam,slteerf,?n&-morf,ofipi,?srab,?z&a-morf,tirfym,???p?tcip?v??f&ig?o&l?sorcim???g!.&bog?dni?ed,g&olb,ro??lim?moc?ot,ten?ude???h!.&dem?gro?l&er?op??m&oc?rif??o&fni?rp?s&rep?sa???po&hs?oc??t&en?luda?ra??ude?vuog???i!.&a&2n-loritds--nx?7e-etsoaellav--nx?8&c-aneseclrof--nx?i-lrofanesec--nx??at?b?c!cul??dv?i&blo&-oipmet?oipmet??cserb?drabmol?g&gof?urep??l&gup?i&cis?me&-oigger?oigger???uig&-&aizenev&-iluirf?iluirf??ev&-iluirf?iluirf??v&-iluirf?iluirf???aizenev&-iluirf?iluirf??ev&-iluirf?iluirf??v&-iluirf?iluirf????n&a&brev?cul?pmac?tac??idras?obrac&-saiselgi?saiselgi??resi??otsip?r&b&alac!-oigger?oigger??mu??dna&-&attelrab-inart?inart-attelrab??attelrabinart?inartattelrab?ssela??epmi?ugil??tnelav&-obiv?obiv??vap?z&e&nev?ps&-al?al???irog???l&iuqa!l??leib??m&or?rap??n!acsot?e&dom?is?sec&-&ilrof?ìlrof??ilrof?ìlrof???g&amor&-ailime?ailime??edras?olob??i&ssem?tal??ne!var??o&cna?merc?rev?vas???oneg?p?r!a&csep?rr&ac&-assam?assam??ef??von??etam?tsailgo!-lled?lled???s!ip?sam&-ararrac?ararrac??u&caris?gar???t!a&cilisab?recam??resac?soa!-&d&-&ellav?lav??ellav?lav??ellav??d&-&ellav?lav??ellav?lav??ellav??te&lrab&-&airdna-inart?inart-airdna??airdnainart?inartairdna??ssinatlac???udap?v!o&dap?neg?tnam???zn&airb&-a&lled-e-aznom?znom??a&lledeaznom?znom??eaznom??e&c&aip?iv??soc?top??om???b&-&23,46,61,?3c-lorit-ds-onitnert--nx?be-etsoa&-ellav--nx?dellav--nx??c!f-anesec-lrof--nx?m-lrof-anesec--nx??he-etsoa-d-ellav--nx?m!u??o2-loritds-nezob--nx?sn-loritds&-nasl&ab--nx?ub--nx??nitnert--nx??v!6-lorit-dsnitnert--nx?7-loritds&-nitnert--nx?onitnert--nx???z&r-lorit-ds&-nitnert--nx?onitnert--nx??s-loritds-onitnert--nx???c&f?is?l?m?p?r?v??d&p?u!olcnys,??e&c!cel?inev?nerolf??f?g!ida&-&a&-onitnert?onitnert??otla!-onitnert?onitnert???a&-onitnert?onitnert??otla!-on&azlob?itnert??onitnert????hcram?l?m!or??n&idu?o&n&edrop?isorf??torc???p?r?s&erav?ilom??t!nomeip?s&eirt?oa!-&d-e&ellav?éllav??e&ellav?éllav???de&ellav?éllav??e&ellav?éllav?????v?znerif??g&a?b?f?il?o?p?r?up?vf??hc?i&b?c?dol?f?l!lecrev?opan?rof&-anesec?anesec???m?n&a&part?rt&-attelrab-airdna?attelrabairdna???imir?ret??p?r!a&b?ilgac?ssas???s!idnirb??t&ei&hc?r??sa??v??l&a!c??b?c?o&m?rit&-&d&eus&-&nitnert?onitnert??nitnert?onitnert??us&-&nitnert?onitnert??nitnert?onitnert??üs&-&nitnert?onitnert??nitnert?onitnert???s&-onitnert?onitnert???d&eus!-&n&asl&ab?ub??ezob?itnert??onitnert??nitnert?onitnert??us&-&n&asl&ab?ub??ezob?itnert??onitnert??nitnert?onitnert??üs!-&n&asl&ab?ub??ezob?itnert??onitnert??nitnert?onitnert???s&-onitnert?onitnert?????m&ac?f?i!t.nepo.citsalej.duolc,?ol?r??n&a!lim?sl&ab?ub???b?c?e!en.cj,v?zob??irut?m!p??p?r?t??o&a!v??b!retiv??c!cel??enuc?g!ivor??i&dem&-onadipmac?onadipmac??pmet&-aiblo?aiblo??rdnos?zal??l?m!a&greb?ret??oc?re&f?lap???n!a&dipmac&-oidem?oidem??lim?tsiro?zlob??ecip&-ilocsa?ilocsa??i&bru&-orasep?orasep??lleva?rot?tnert??r&elas?ovil??ulleb??p?r!a&sep&-onibru?onibru??znatac??oun??s!ivert?sabopmac??t!arp?e&nev?ssorg??n&arat?e&girga?rt?veneb????zz&era?urba???p&a?ohsdaerpsym,s?t??qa?r&a!m?s??b!a??c?f?g?k?me?o?p?s?t?v??s&a&b?iselgi&-ainobrac?ainobrac???b?c?elpan?i?m?o&t?x&bi,obdaili,??s?t?v??t&a?b?c?l?m?nomdeip?o!psgolb,?p?v??u&de?l?n?p??v&a?og?p?s?t?v??y&drabmol?ellav&-atsoa?atsoa??licis?nacsut??z&al?b?c?p??ìlrof&-anesec?anesec???derc?er?f?m?utni??je3a3abgm--nx?kh?l!.&topsgolb,vog??uda??m!.&gro?moc!.topsgolb,?ten?ude???n&a&morockivdnas?ruatser?tnuocca??e&g?m&eganam!.retuor,?piuqe??r??i!.ue?m?opdlog??opud?uocsid??o&b?cs!.&ude,vog:.ecivres,,??d?g?h?j?oferab?p&edemoh?s???p!.&emon?gro?lbup?moc?t&en?ni?opsgolb,?ude?vog???r&a!m&law?s???epxe?op&er?pus!.ysrab,?s???s!.&adaxiabme?e&motoas?picnirp?rots??gro?lim?moc?o&c?dalusnoc?hon,?ten?ude??a&cmoc?f??e&b?r?uq??i!rolf?tned??o&h!.&duolc&p,rim,?e&lej,tiseerf,?flah,l&enapysae,rupmet,?s&pvtsaf,seccaduolc,?tsafym,vedumpw,??p!sua???urt??t!.&eman?gro?ibom?levart?m&oc?uesum??o&c?fni?r&ea?p???pooc?sboj?t&en?ni??ude?vog?zib??ayh?n?o!bba?irram???uognah?xen?y!.gro,?ztej??u&2&5te9--nx?yssp--nx??a!.&a&s?w??civ?d&i?lq??fnoc?gro?moc!.&pohsdaerpsym,stelduolc.lem,topsgolb,??nsa?ofni?sat?t&ca?en?n??ude!.&a&s?w??ci&lohtac?v??dlq?sat?t&ca?n??", - "wsn!.sloohcs????vog!.&a&s?w??civ?dlq?sat???wsn?zo??ti??c!.&fni?gro?moc?ten?ude?vog??i??d&e!.tir.segap-tig,?iab??e!.&dcym,enozgniebllew,noitatsksid,odagod.citsalej,s&nd&ps,uolc,?ppatikria,?ysrab,??g!.&bew?gro?m&aug?oc??ofni?ten?ude?vog???h!.&0002?a&citore?idem?kitore??edszot?gro?ilus?letoh?m&alker?lif?t?urof??naltagni?o&c?ediv?fni?levynok?nisac??pohs?rarga?s&a&kal?zatu??emag?wen??t&lob?opsgolb,rops??virp?xe&s?zs??ytic?zsagoj??os?sut??l!.topsgolb,?m!.&ca?gro?moc?oc?ro?ten?vog???n!.&duolcesirpretne,eni&esrem,m,?tenkcahs,?em!.ysrab,??o&ggnaw?y!c???r!.&3kl,a&i&kymlak,rikhsab,vodrom,?yegyda,?bps,ca,duolcrim,e&niram,rpcm,?g&bc,nitsohurger.citsalej,ro,?ianatsuk,k&ihclan,s&m,rogitayp,??li&amdlc.bh,m,?moc,natsegad,onijym,pp,ri&b,d&cm:.spv,,orue,?midalv,?s&ar,itym,?t&en,ni,opsgolb,set,?u&4an,de,?vo&g,n,?ynzorg,zakvakidalv,?myc?p?ug??s!.&a&d&golov,nagarak,?gulak,i&groeg,kymlak,lerak,nemra,rikhsab,ssakahk,vodrom,zahkba,?lut,rahkub,vut,yegyda,znep,?bps,da&baghsa,rgonilest,?gunel,i&anatsuk,hcos,ovan,ttailgot,?k&alhsygnam,ihclan,s&legnahkra,m,n&a&mrum,yrb,?i&buytka,nbo,??tiort,vorkop,??l&ocarak,ybmaj,?na&gruk,jiabreza,ts&egad,hkazak-&htron,tsae,???ovonavi,r&adonsark,imidalv,?t&enxe,nek&hsat,mihc,??vo&hsalab,n,?ynzorg,z&akvakidalv,emret,??t&amok?i&juf?masih????v!.&em,g&olb,ro??moc?nc,ten?ude?ved,??ykuyr??v&b?c!.&emon?gro?moc?t&ni?opsgolb,?ude???ed!.&ated,enilnigol,gnigats-oned,hcetaidem,lecrev,o&ned,tpyrctfihs,?ppa-rettalp,s&egap,rekrow,?vr&esi,uc,?weiverpbuhtig,ylf,??ih?l!.&di?fnoc?gro?lim?moc?nsa?ten?ude?vog???m!.&eman?gro?lim?m&oc?uesum??o&fni?r&ea?p???pooc?t&en?ni??ude?vog?zib???o&g?m??rt?s!.&bog?der?gro?moc?ude???t!.&bew-eht-no,naht-&esrow,retteb,?sndnyd,?d?gh?i?won??uqhv--nx??w&a!.moc?hs?l??b!.&gro?oc???c!.&gro?moc?ten?ude??cp??e&iver!.oby,?n?s??g?k!.&bme?dni?gro?moc?ten?ude?vog???m!.&ca?gro?m&oc?uesum??oc?pooc?t&en?ni??ude?vog?zib??b??o&csom?h!s??n?w??p!.&344x,de?en?o&c?g??ro?snduolc,ualeb???r!.&ca?gro?lim?oc?pooc?ten?vog??n??t!.&a46oa0fz--nx?b&82wrzc--nx?ulc??emag?gro?l&im?ru,?moc!.reliamym,?t&en?opsgolb,?ude?v&di?og?ta0cu--nx??zibe?業商?織組?路網???z!.&ca?gro?lim?oc?vog????x&a!.&cm,eb,gg,s&e,u,?tac,ue,yx,?t??c!.&hta,ofni,vog???e&d&ef?nay??ma!nab??rof?s??ilften?jt?m!.&bog?gro?moc?t&en?opsgolb,?ude??g?ma2ibgy--nx??o&b!x??f?rex??rbgn--nx?s!.vog??x&am&jt?kt??x???y&4punu--nx?7rr03--nx?a&d!i&loh?rfkcalb??ot!.emyfilauqerp,??g?lp?p!ila??rot?ssin?wdaorb??b!.&duolcym,fo?hcetaidem,lim?moc!.topsgolb,?vog??ab?gur??c!.&ca?dtl?gro?lim?m&oc!.&ecrofelacs.j,topsgolb,??t??orp?s&egolke?serp??ten?vog?zib??amrahp?nega??d&dadog?uts??e&kcoh?ltneb?n&dys?om?rotta??snikcm??g!.&eb,gro?moc?oc?ten?ude?vog??olonhcet!.oc,?rene??hpargotohp?id?k!.&gro?moc?ten?ude??s??l!.&clp?d&em?i??gro?hcs?moc?ten?ude?vog??f?imaf!nacirema??l&a?il??ppus??m!.&eman?gro?lim?moc?t&en?opsgolb,?ude?vog?zib??edaca!.laiciffo,?ra??n&a&ffit?pmoc??os??o&j?s??p!.&gro?lim?moc?pooc?ten?ude?vog???r&e&corg?grus?llag?viled??lewej?otcerid?tnuoc?uxul??s!.&gro?lim?moc?ten?ude?vog??pil??t&efas?i&c?ledif?n&ifx?ummoc!.&bdnevar,gon,murofym,???r&ahc?uces??srevinu??laer?r&ap!.oby,?eporp??uaeb??u!.&bug?gro?lim?moc!.topsgolb,?ten?ude??b!tseb???van!dlo??xes??z&a!.&eman?gro?lim?moc?o&fni?rp??pp?t&en?ni??ude?vog?zib???b!.&az,gro?jsg,moc?ten?ude?vog???c!.&4e,inum.duolc.&rsu,tlf,?m&laer,urtnecatem.motsuc,?oc,topsgolb,??d!.&cos?gro?lop?m&oc?t??ossa?t&en?ra??ude?vog???ib!.&duolcsd,e&ht-rof,mos-rof,rom-rof,?izoj,nafamm,p&i&-on,fles,?ohbew,tfym,?retteb-rof,snd&nyd,uolc,?xro,?g??k!.&duolcj,gro?lim?moc?t&en?ropeletzak.saapu,?ude?vog???m!.&ca?gro?lim?oc?ten?ude?v&da?og????n!.&asq-irom--nx?ca?gro?htlaeh?i&r&c?o&am?ām???wi!k???keeg?l&im?oohcs??neg?oc!.topsgolb,?t&en?nemailrap?vog???a!niflla???rawhcs?s!.&ca?gro?oc???t!.&c&a?s??e&m?n??ibom?l&etoh?im??o&c?fni?g??ro?vt???u!.&gro?moc?oc?ten??rwon??yx!.&e&nozlacol,tisgolb,?gnitfarc,otpaz,??zub??λε?υε?авксом?брс!.&гро?до?ка?р&бо?п!у?????г&б?ро??дкм?зақ?итед?килотак?леб?мок?н&йално?ом??рку?сур!.&арамас,бпс,гро,зиб,ичос,ксм,м&ок,ырк,?рим,я,??тйас?фр?юе?յահ?לארשי!.&בושי?הימדקא?ל&הצ?שממ????םוק?اي&روس?سيلم?ناتيروم??بر&ع?غملا??ة&كبش?ي&دوعسلا?روس??یدوعسلا??ت&ا&راما?لاصتا??را&ب?ڀ?ھب???ر&ئازجلا?ازاب?صم?طق??سنوت?عقوم?قارع?ك&تيب?يلوثاك??موك?ن&ا&تس&كاپ?کاپ??دوس?ر&يا?یا??مع?يلعلا??درالا?ميلا?ي&رحبلا?طسلف???ه&ارمه?يدوعسلا??وكمارا?يبظوبا?ۃیدوعسلا?टेन?त&राभ?ोराभ??नठगंस?मॉक?्मतराभ?ত&রাভ?ৰাভ??ালংাব?ਤਰਾਭ?તરાભ?ତରାଭ?ாயித்நஇ?ைக்ஙலஇ?்ரூப்பக்ஙிச?్తరాభ?ತರಾಭ?ംതരാഭ?ාකංල?มอค?ยทไ!.&จิกรุธ?ต็นเ?ร&ก์คงอ?าหท??ลาบฐัร?าษกึศ???ວາລ?ეგ?なんみ?アトス?トンイポ?ドウラク?ムコ?ル&グーグ?ーセ??ン&ゾマア?ョシッァフ??业企?东广?乐娱?亚基诺?你爱我?信中?务政?动移?博微?卦八?厅餐?司公?品食?善慈?团集?国中?國中?址网?坡加新?城商?尚时?山佛?店&商?网?酒大里嘉??府政?康健?息信?戏游?拉里格香?拿大?教主天?机手?构机!织组??标商?歌谷?浦利飞?港香!.&人個?司公?府政?絡網?織組?育教???湾台?灣&台?臺??物购?界世?益公?看点?科盈訊電?站网?籍書?线在?络网?网文中?聘招?販通?逊马亚?通联?里嘉?锡马淡?門澳?门澳?闻新?電家?국한?넷닷?성삼?컴닷??"); + "a&0&0trk9--nx?27qjf--nx?e9ebgn--nx?nbb0c7abgm--nx??1&2oa08--nx?apg6qpcbgm--nx?hbbgm--nx?rdceqa08--nx??2&8ugbgm--nx?eyh3la2ckx--nx?qbd9--nx??3&2wqq1--nx?60a0y8--nx??4x1d77xrck--nx?6&1f4a3abgm--nx?2yqyn--nx?5b06t--nx?axq--nx?ec7q--nx?lbgw--nx??883xnn--nx?9d2c24--nx?a&a?it??b!.&gro?lim?moc?sr,t&en?opsgolb,?ude?vog??abila?c?ihsot?m?n??c!.&b&a?m?n??c&b?g?q??ep?fn?k&s?y??ln?no?oc,p&i-on,ohsdaerpsym,?sn?t&n?opsgolb,?un?ysrab,?i&ma?r&emarp?fa??sroc??naiva?s??d&ats?n&eit?oh??om?sa?tl??eg?f&c?ob??g!emo?naripi?oy??hskihs?i&cnal?dem!.remarf,?hs?k!on??sa!.snduolc,??jnin?k&aso?dov?ede?usto??l!.&c,gro?moc?ofni?r&ep?nb,?t&en?ni??ude?vog??irgnahs?le&nisiuc?rbmuder???m!.&ca?gro?oc?sserp?ten?vog??ahokoy?e00sf7vqn--nx?m??n!.&ac?cc?eman?gro?ibom?loohcs?moc?ni?o&c?fni?rp??r&d?o??s&u?w??vt?xm??av?is?olecrab?tea??p!.&bog?ca?d&em?ls??g&ni?ro??mo&c?n??oba?ten?ude??c?g7hyabgm--nx?ra!.&461e?6pi?iru?nru?rdda-ni?siri???s??q!.&eman?gro?hcs?lim?moc?t&en?opsgolb,?ude?vog???r&az?emac?f4a3abgm--nx?n!d5uhf8le58r4w--nx??u&kas?tan???s!.&bup?dem?gro?hcs?moc?ten?ude?vog??ac!.uban.iu,?iv??t&ad?elhta?led?oyot??u!.&a&cinniv?emirc?i&hzhziropaz?stynniv??s&edo?sedo??tlay?vatlop??bs?cc,d&argovorik?o!roghzu??tl,?e&hzhziropaz?i,nvir?t??f&i?ni,?g&l?ro??hk?i&stvinrehc?ykstynlemhk??k&c?m?s&nagul?t&enod?ul??v&iknarf-onavi?orteporp&end?ind?????l&iponret?opotsa&bes?ves??p??m&k?oc?s?yrk??n&c?d?i?osrehk?v?ylov??o&c,nvor??p&d?p,z??r&c?imotihz?k?ymotyhz??sk?t&en?l?z??ude?v:c?e&alokin?ik??i&alokym?hinrehc?krahk?vl?yk??k?l?o&g!inrehc??krahk??r?,xc,y&ikstinlemhk?mus?s&akrehc?sakrehc?tvonrehc???z&ib,u????v!aj?bb?et?iv??waniko?x&a?iacal??yogan?z&.&bew?c&a?i&n?rga???gro?l&im?oohcs??m&on?t??o&c!.topsgolb,?gn??radnorg?sin?t&en?la??ude?vog?wal??zip!.korgn,???b&00ave5a9iabgm--nx?1&25qhx--nx?68quv--nx?e2kc1--nx??2xtbgm--nx?3&b2kcc--nx?jca1d--nx??4&6&1rfz--nx?qif--nx??96rzc--nx??88uvor--nx?a&0dc4xbgm--nx?c?her?n?ra?t??b!.&erots?gro?moc?o&c?fni??ten?ude?v&og?t??zib??a??c&j?s??d&hesa08--nx?mi??g?l!.&gro?moc?ten?ude?vog??m??s!.&gro?moc?ten?ude?vog???tc-retarebsnegmrev--nx?u&lc!.&elej,snduolc,ysrab,?smas??p!.ysrab,??wp-gnutarebsnegmrev--nx??c&1&1q54--nx?hbgw--nx??2e9c2czf--nx?4&4ub1km--nx?a1e--nx?byj9q--nx?erd5a9b1kcb--nx??8&4xx2g--nx?c9jrb2h--nx??9jr&b&2h--nx?54--nx?9s--nx??c&eg--nx?h3--nx?s2--nx???a!.&gro?lim?moc?rrd,ten?ude?vog??3a09--nx!.&ca1o--nx?gva1c--nx?h&ca1o--nx?za09--nx??ta1d--nx?ua08--nx????b&a?b?ci?f76a0c7ylqbgm--nx?sh??c!.&eugaelysatnaf,gnipparcs,liamwt,nwaps.secnatsni,revres-emag,s&nduolc,otohpym,seccaptf,?xsc,?0atf7b45--nx?a1l--nx??e!.&21k?bog?dem?esab,gro?l&aiciffo,im??moc?nif?o&fni?rp??ten?ude?vog??beuq?n?smoc??fdh?i&l&buperananab?ohtac??n&agro?ilc?osanap??sum?tic??l!.&gro?moc?oc?ten?ude?vog?yo,?l??m!.&mt?ossa??p1akcq--nx??n!.&mon?ossa??i?p??relcel?s!.&gro?moc?ten?ude?vog???t!.&e&m,w,?hc,?s?w??v!.&e0,gro?lim?moc?ten?ude?v&g:.d,,og????wp?yn??d&2urzc--nx?3&1wrpk--nx?c&4b11--nx?9jrcpf--nx???5xq55--nx?697uto--nx?75yrpk--nx?9ctdvkce--nx?a!.mon?d?er?olnwod??b2babgm--nx?c!.vog?g9a2g2b0ae0chclc--nx??e&m!bulc??r!k??sopxe?timil?w??fc?g!.&ude?vog???h&d3tbgm--nx?p?t??i!.&ased?bew?ca?etrof,hcs?lim?o&c!.topsgolb,?g??palf,ro?sepnop?ten?ym?zib??b?ordna?p?rdam??l&iub?og?row??m!.&ed,ot,pj,t&a,opsgolb,???n&a&b?l!.citats:.&setis,ved,?,raas???ob?uf??o&of?rp??r&a&c&tiderc?yalcrab??ugnav??ef506w4b--nx?k!.&oc,ude,?jh3a1habgm--nx??of??s!.&dem?gro?moc?ofni?ten?ude?v&og?t???m!kcrem???t!.topsgolb,excwkcc--nx?l??uolc!.&a&bura-vnej.&1ti,abura.rue.1ti,?tcepsrep,xo:.&ku,nt,?,?b&dnevar,ewilek:.sc,,?citsalej.piv,drayknil,elej,gnitsohdnert.&ed,hc,?letemirp:.ku,,m&edaid,ialcer.&ac,ku,su,??n&evueluk,woru,?r&epolroov,o&pav,tnemele,??tenraxa.1-se,ululetoj,wcs.&gnilebaltrams,koobelacs,latemerab.&1-&rap-rf,sma-ln,?2-rap-rf,?rap-rf.&3s,cnf:.snoitcnuf,,etisbew-3s,mhw,s8k:.sedon,,?s&8k,ecnatsni.&bup,virp,?ma-ln.&3s,etisbew-3s,mhw,s8k:.sedon,,??waw-lp.&3s,etisbew-3s,s8k:.sedon,,??xelpciffart,yawocne.ue,??za5cbgn--nx??e&1&53wlf--nx?7a1hbbgm--nx?ta3kg--nx??2a6a1b6b1i--nx?3ma0e1cvr--nx?418txh--nx?707b0e3--nx?a!.&ca?gro?hcs?lim?oc?t&en?opsgolb,?vog??09--nx??b!.&ca?etisbew321,gnitsohbew,nevueluk.yxorpze,pohsdaerpsym,snoitulostsohretni.duolc,topsgolb,?ortal?ut!uoy???c&0krbd4--nx!.&a2qbd8--nx?b8adbeh--nx?c6ytdgbd4--nx?d8lhbd5--nx???a&lp!.oc,?ps!.&lla4sx,rebu,tsafym,?artxe??sla??i!ffo??n&a&d?iler?nif?rusni!efil?srelevart???eics!.oby,??rofria??d!.&1sndnyd,42pi-nyd,7erauqs,amil4,b&ow-nrefeilgitsng--nx,rb-ni,vz-nelletsebgitsng--nx,?decalpb,e&daregtmueart,luhcsvresi,mohsnd,nihcamyek,tiesbew321,?hcierebsnoissuksid,keegnietsi,lsd-ni,m&oc,rofttalpluhcs,?n&-i-g-o-l,aw-ym,e&lletsebgitsnüg,sgnutiel,?i&emtsi,lreb-n&i,yd,??norblieh-sh.ti.segap,oitatsksid-ygolonys,pv&-n&i,yd,?nyd,?refeilgitsnüg,?orp-ytinummoc,p&h21,iog:ol,,ohsdaerpsym,?r&e&ntrapdeeps.remotsuc,su&-lautriv,lautriv,?t&adpusnd,tub-ni,uor-ym,?vres&-e&bucl,mohym,?bew-emoh:.nyd,,luhcs,??ogiv-&niem,ym,??s&d-&onys,ygolonys,?nd&-&dd,nufiat,sehcsimanyd,tenretni,yard,?isoc.nyd,ps,yard,?oper-&nvs,tig,?sndd:.&nyd,sndnyd,?,?topsgolb,vresi-&niem,tset,?xi2,y&awetag-&llawerif,ym,?srab,tic-amil,?zten&mitbel,sadtretteuf,??art!.oby,?i&sdoow?ug??on--nx??e!.&bil?dem?eif?gro?irp?kiir?moc!.topsgolb,?pia?ude?vog??ei?ffoc?gg?r&f?ged???f&a&c?s??il??g!.&gro?lim?moc?t&en?vp??ude?vog??a&f?gtrom?p!.&3xlh,detalsnart,grebedoc,kselp,sndp,tengam,xlh,y&cvrp,kcor,???rots?yov??elloc?na&hcxe?ro!.hcet,??roeg?ug??i!.&pohsdaerpsym,topsgolb,vog??tilop?v&bba?om???j!.&fo,gro?oc?ten???k!.&c&a?s??e&m?n??ibom?o&c!.topsgolb,?fni?g??ro??i&b?l?n???l&a&dmrif?s!rof???b&a?i&b?dua???c&aro?ric??dnik?g!oog??i&bom?ms??l&asal?erauqa??ppa?uhcs?yts!efil???m!.&4&32i,p&ct,v,??66c,ailisarb,b&dnevar,g-raegelif,?ca?duolcsd,e&d-raegelif,i&-raegelif,lpad:.tsohlacol,,?pcm,?g&ro?s-raegelif,?hctilg,kcatsegde,noitatsksid,o&bmoy,c?t&nigol,poh,??p&i&on,snart.etis,?j-raegelif,ohbew,?r&aegelif,idcm,ofsnd,?s&dym,ndd,ti?umhol,?t&en?s&acdnuos,ohon,??u&a-raegelif,de??v&irp?og??y&golonys,olpedew,srab,??a&g?n!.&reh.togrof,sih.togrof,???em?i&rp?twohs??orhc?w??n!goloc?i&lno!.&egats-oree,oree,ysrab,??w??o!.&derno:.gnigats,,ecivres,knilemoh,?hp?latipac?ts&der?e&gdirb?rif???z!.&66duolc,amil,sh,???ruoblem??om?p!.&bog?gro?lim?mo&c?n??t&en?opsgolb,?ude??irg?yks??r!.&mo&c?n??ossa?topsgolb,?a&c!htlaeh??pmoc?wtfos??bc?eh?if?ots!.&e&rawpohs,saberots,?yflles,??taeht?u&ces?sni?t&inruf?necca??za???s!.&a!bap.us,disnim321,?b!ibnal?rofmok??c!a??d!b?n&arb?ubroflanummok???e?f!noc,?g!ro??h!f??i!trap??k!shf??l?m!oc,t??n!mygskurbrutan??o?p!ohsdaerpsym,p??r!owebdluocti,?s!serp?yspoi,?t!opsgolb,?u?vhf?w?x!uvmok??y?z??a&c?el?hc??i&er?urc??nesemoh?roh?uoh??t&a&d?ts&e!laer??lla???is!.&e&lej,nilnigol,r&etnim,ocevon,?winmo,?k&rowtenoilof,wnf,?laicosnepo,n&eyb,oyc,?spvtsaf,thrs,xulel,ysrab,?bew!.remarf,??ov?ra?t&ioled?ol??utitsni??u&lb?qi&nilc?tuob???v!.&21e?b&ew?ib?og??ce&r?t??erots?gro?lim?m&o&c?n??rif??o&c?fni??rar?stra?t&en?ni??ude?vog??as?e3gerb2h--nx?i&l!.xlh,?rd?ssergorp??ol??w&kct--nx?r??xul?y!.&gro?lim?moc?ten?ude?vog????f&0f3rkcg--nx?198xim--nx?280xim--nx?7vqn--nx?a!.&gro?moc?ten?ude?vog???b!.vog?wa9bgm--nx??c!.topsgolb,a1p--nx!.&a14--nx,b8lea1j--nx,c&avc0aaa08--nx,ma09--nx,?f&a1a09--nx,ea1j--nx,?gva1c--nx,nha1h--nx,pda1j--nx,zila1h--nx,??ns??ea1j--nx?g?iam?l&a1d--nx?og??n!.&bew?cer?erots?m&oc?rif??ofni?re&hto?p??stra?ten???orp?p!.&gro?moc?ude???rus?t!.hcs,w??vd7ckaabgm--nx?w!.&hcs,zib,???g&2&4wq55--nx?8zrf6--nx??3&44sd3--nx?91w6j--nx!.&a5wqmg--nx?d&22svcw--nx?5xq55--nx??gla0do--nx?m1qtxm--nx?vta0cu--nx????455ses--nx?5mzt5--nx?69vqhr--nx?7&8a4d5a4prebgm--nx?rb2c--nx??a!.&gro?mo&c?n??oc?ten??vd??b!.&0?1?2?3?4?5?6?7?8?9?a?b?c?d?e?f?g?h?i?j?k?l?m?n?o?p?q?r?s?t!opsgolb,?u?v?w?x?y!srab,?z???c!b?za9a0cbgm--nx??e!.&eman?gro?ics?lim?moc!.topsgolb,?nue?ten?ude?vog??a??g!.&ayc,gro?lenap:.nomead,,oc?saak,ten???i&a?v??k!.&g&olb,ro??ku,lim?moc?oi,pj,su,ten?ude?v&og?t,???m!.&drp?gro?lim?m&o&c?n??t??oc?ude?vog??pk??n!.&dtl,eman?gro?hcs?i!bom??l&im?oc,?m&oc!.topsgolb,?rif,?neg,ogn,ten?ude?vog??aw?i!b!mulp??car?d&art?dew??h&sif?tolc??k&iv?oo&b?c???ls?n&aelc?iart??p!pohs??re&enigne?tac??t&ad?ekram?hgil?lusnoc?neg?ov?soh!.tfarcnepo,??vi&g?l???o!s??u&rehcisrev?smas?tarebsnegömrev???o&d?lb?og!.&duolc,etalsnart,???r&2n084qlj--nx?ebmoolb?o!.&77ndc.c:sr,,a&remacytirucesym,t&neimip,sivretla,?z,?bew-llams,d&ab-yrev-si,e&sufnocsim,vas-si,?nuof-si,oog-yrev-si,uolc&arfniarodef,mw,??e&a,cin-yrev-si,grof&loot,peh,?l&as-4-ffuts,poeparodef,?m&-morf,agevres,ohruoyslles,?n&ozdop,uma.elet,?r&ehwongniogyldlob,iwym,uces-77ndc.nigiro.lss,?t&adidnac-a-si,is&-ybboh,golb,???fehc-a-si,golbymdaer,k&eeg-a&-si,si,?h,nut,?l&i&amwt,ve-yrev-si,?lawerif&-ym,ym,?sd-ni,?m&acssecca,edom-elbac,?n&af&blm,cfu,egelloc,lfn,s&citlec-a-si,niurb-a-si,tap-a-si,?xos-a-si,?ibptth,o&itatsksid,rviop,?p&j,v-ni,??o&jodsnd,tp&az,oh,??p&i&-on,fles,?o&hbew,tksedeerf,?tf&e&moh,vres,?ym,??r&e&gatop,ppepteews,su-xunil-a-si,?gmtrec,vdmac,?s&a&ila&nyd,snd,?nymsd,?b&alfmw,bevres,?d&ikcet.3s,ylimaf,?eirfotatophcuoc,j,koob-daer,ltbup,nd&-won,deerf,emoh,golb,kcud,mood,nyd:.&emoh,og,?,ps,rvd,tog,uolc,?s&a-skcik,ndd,?tnemhcattaomb,u,?t&ce&jorparodef.&duolc,gts.so.ppa,so.ppa,?riderbew,?e&ews-yrev-si,nretni&ehtfodne,fodne,??hgink-a-si,oi-allizom,s&ixetn&od,seod,?o&h-emag,l-si,?rifyam,??ue:.&a&-q,c,?cm,dc,e&b,d,e,i,m,s,?g&b,n,?hc,i&f,s,?k&d,m,s,u,?l&a,i,n,p,?n&c,i,?o&n,r,ssa,?pj,r&f,g,h,k,t,?s&e,i:rap,,u,?t&a,en,i,l,m,ni,p,?u&a,de,h,l,r,?vl,y&c,m,?z&c,n,??,vresnyd,x&inuemoh,unilemoh,?y&limafxut,srab,???ub&mah?oj???s!.&delacsne,gro?moc?rep?t&en?opsgolb,?ude?vog??gb639j43us5--nx??t?u!.&c&a?s??en?gro?moc?o&c?g??ro?topsgolb,??v!.ta,a1c--nx??wsa08--nx??h&0ee5a3ld2ckx--nx?4wc3o--nx!.&a&2xyc3o--nx?3j0hc3m--nx?ve4b3c0oc21--nx??id1kzuc3h--nx?l8bxi8ifc21--nx?rb0ef1c21--nx???8&8yvfe--nx?a7maabgm--nx??b!.&gro?moc?ten?ude?vog??mg??c!.&7erauqs,amil4,duolc-drayknil,etisbew321,gniksnd,p&h21,ohsdaerpsym,?sndtog,topsgolb,wolf.e&a.1pla,nigneppa,?xi2,ytic-amil,?aoc?et?ir!euz??r&aes?uhc??sob?taw!s???d0sbgp--nx?f&2lpbgm--nx?k??g!.&gro?lim?moc?ude?vog???m!a1j--nx??ocir?p!.&gro?i?lim?moc?ogn?ten?ude?vog???s!.&g&nabhsah,ro??l&im?xv,?m&oc?roftalp.&cb,su,tne,ue,??pib,ten?vog", + "?won,yolpedew,?a&c?nom??i&d?f?ri???t!.&ca?enilno,im?ni?o&c?g??pohs,ro?ten??iaf!.oby,?laeh!.arh,?orxer?ra&ba?e???vo!.lopdren,?zb??i&3tupk--nx?7a0oi--nx?a!.&ffo?gro?moc?ten?uwu,?1p--nx?bud?dnuyh?tnihc??b!.&gro?moc?oc?ro?ude??ahduba?o!m!.&duolcsd,ysrab,???s??c!.&ayb-tropora--nx?ca?d&e?m??esserp?gro?ln,moc?nif,o&c?g?ssa??ro?t&en?ni?roporéa??ude?vuog??cug?t??d&dk?ua??e&bhf--nx?piat??f!.&aw5-nenikkh--nx,dnala?i&ki,spak,?mroftalpduolc.if,nenikkäh,pohsdaerpsym,retnecatad.&omed,saap,?topsgolb,uvisitok321,yd,?onas??g!.&d&om?tl??gro?moc?ude?vog???h&c&atih?ra??s&abodoy?ibustim???juohs?k!.&gro?moc?ofni?ten?ude?vog?zib??b4gc--nx?iw!.remarf,?nisleh?s?uzus??l!.&aac,topsgolb,?drahcir?iamsi??maim?n!.&b&ew?og??ca?gro?lim?mo&c?n??ni?o&c?fni??pp?t&en?ni??ude?zib??airpic?i&hgrobmal?m??re??om?rarref?s!.&egaptig,ppatig,topsgolb,?ed??t&aresam?i&c?nifni??rahb??ut?v!.&21k?gro?moc?oc?ten???wik?xa&rp?t??yf??j&6pqgza9iabgm--nx?8da1tabbgl--nx?b!.&acirfa?eto?gro?m&oc?siruot??o&c!e??fni?noce?rga?tser??russa?s&etcetihcra?risiol?tacova??t&en?naruatser?opsgolb,?ude?vinu?yenom???d?f!.&ca?eman?gro?lim?moc?o&fni?rp??ten?vog?zib???nj?s?t!.&bew?c&a?in??eman?gro?lim?moc?o&c?g??t&en?ni?set??ude?vog?zib???yqx94qit--nx??k&8uxp3--nx?924tcf--nx?arfel?c&a&bdeef?lb??ebdnul?ilc?reme??d!.&e&disemmejh321,rots,?ger,mrif,oc,pohsdaerpsym,topsgolb,zib,?t??e&es?samet??h!.&a&4ya0cu--nx?5wqmg--nx??b3qa0do--nx?cni,d&2&2svcw--nx?3rvcl--nx??5xq55--nx?tl,?g&a0nt--nx?la0do--nx?ro??i&050qmg--nx?7a0oi--nx?xa0km--nx??m&1qtxm--nx?oc??npqic--nx?saaces,t&en?opsgolb,?ude?v&di?og?ta0cu--nx??xva0fz--nx?人&个?個?箇??司公?府政?絡&網?网??織&組?组??织&組?组??络&網?网??育&敎?教???n??i&tsob?vdnas??l!.&bew?c&a?os??dtl?gro?hcs?letoh?moc?nssa?ogn?prg?t&en?ni??ude?vog??at?cd?is??m!.&eman?fni?gro?moc?t&en?opsgolb,?ude?vog???n&ab!cfdh?etats?mmoc?t&en?fos??u??i!l!.&noyc,pepym,??p???oob?p!.&b&ew?og??gro?kog?m&af?oc??nog?ofni?pog?sog?ten?ude?vog?zib???row!ten!.&htumiza,nolt,o&c,vra,??doof???s!.topsgolb,?t?u!.&c&a?lp??dtl?e&cilop?m??gro!.&gul:g,,sgul,yr&ettoly&lkeew,tiniffa,?tneelffar,???lenap-tnednepedni,n&noc,oissimmoc-&layor,tnednepedni,??o&c!.&bunsorter.tsuc,en&ilnoysrab,ozgniebllew,?krametyb.&hd,mv,?omida,p&i-on,ohsdaerpsym,?t&fihsreyal.j,opsgolb,?vres-hn,ysrab,??rpoc,?psoh,shn?t&en?nmyp,seuqni-tnednepedni,?vog!.&eci&ffoemoh,vres,?ipa,ngiapmac,??weiver-tnednepedni,y&riuqni-&cilbup,tnednepedni,?srab,????l&04sr4w--nx?a!.&gro?lim?moc?t&en?opsgolb,?ude?vog??bolg?c?ed?g!el??i&c&nanif!.oc,lpl??os??romem?tnedurp??n&if?oitanretni??t&i&gid!.sppaduolc:.nodnol,,?p&ac?soh???ned?ot??utum!nretsewhtron???c!.&bog?lim?oc?topsgolb,vog???dil?e&datic?n&ahc?nahc!gnikooc?levart?rehtaew???t!ria?tam??vart??f&8f&pbgo--nx?tbgm--nx??a?n??g!.&gro?moc?oc?ten?ude?xx,zib,??h&d?op??i!.&21k?ca?fdi?gro?inum?oc!.&egapvar,redrotibat,t&ibatym,opsgolb,???ten?vog??a&f?m&e?g?toh???m?r??l&a&b&esab?t&eksab!.&sua,zn,??oof???c?mt??e&d?hs??ihmailliw?j??m!.&esserp?gro?moc?ten?ude?v&og?uog????n!.&etisbew321,no&med,rtsic,?oc,pohsdaerpsym,retsulc-gnitsoh,topsgolb,vog,yalphk,?o??o&a?btuf?l!.gmo,?o&c!.&ed,rotnemele,??hcs??rit?u??p!.&a&cin&diws?gel??d&g,ortso?urawon??i&dem?mraw?nydg,?k&elo&guld?rtso??slopolam?tsu?ytsyrut??l&ip?o&kzs?w&-awolats?oksnok????n&erapohs,img?zcel,?rog&-ai&bab?nelej??j?z??syn?tsaim?w&a&l&eib?i?o??zsraw??o&namil?tainop,??z&eiwolaib?mol???c&e&iw&alselob?o&nsos?rtso???le&im?zrogz???orw,p??d&em,ia?ragrats?uolc&inu,sds,??e&c&i&lrog?w&ilg,o&hc&arats?orp??klop?tak????yzreibok??i&csjuoniws?ksromop?saldop??l&ahdop?opo??napokaz,t&atselaer?iselpmis,?z&romop?swozam???g&alble?ezrbo&lok?nrat??ro??hcyzrblaw?i&csomohcurein?grat?klawus??k&e&rut?walcolw??in&byr?diws,sark,?le?o&nas?tsylaib??rob&el?lam??s&als?jazel?nadg,puls?rowezrp???l&colw?e&r?vart??i&am?m???m&o&c?dar?n?tyb??s&g?iruot??t!a???n&a&gaz?nzop,?i&bul?cezczs?lbul,molow?nok?zd&eb?obeiws???uleiw?y&tzslo?z&rtek?seic????o&c,fni?k&celo?zdolk??lkan?n&leim?pek?t&uk?yzczs??z&copo?eing?rowaj???rga?tua?w&ejarg?ogarm???p&e&eb,lks!emoh,??klwwortso?ohs!-ecremmoce,daerpsym,??romophcaz?sos?t&aiwop?en?opos,ra,sezc??ude?v&irp?og!.&a&p?s!w???bni&p?w??ci?dtiw?essp?fiw?g&imu?u??hiiw?m&igu?rio?u!o???nds?o&ks?p!pu??s?wtsorats??p&a?sp!mk?pk?wk??u&m?p??wk?z??r&ksw?s??s&i?oiw?u?zu??talusnok?w&gzr?i&p?rg?w??m?opu?u!imzw???zouw????w&a&l&corw?sizdow??w??o&golg?k&ark,ul?zsurp??r&az?gew??t&rabul,sugua??z&coks?sezr????xes?y&buzsak?d&azczseib?ikseb??hcyt?n&jes?lod-zreimizak??pal?r&ogt?uzam??walup?zutrak??z&am-awar?c&aprak?iwol?zsogdyb??dalezc?ib?s&i&lak?p??uklo????l??r&as?f?s??s!.&gro?moc?ten?ude?vog???t!.vog??ubnatsi?x3b689qq6--nx?yc5rb54--nx??m&00tsb3--nx?1qtxm--nx?981rvj--nx?a!.&aayn,enummoc?gro?moc?o&c?idar,ken,?t&en?opsgolb,??c!bew??dretsma?e&rts?t!.&citsalej,esruocsid,???fma?xq--nx??b!.&gro?moc?ten?ude?vog??i??c!.&moc?oc?ten?vog???d!.&gro?moc?ten?ude?vog???f!.&gro?moc?oidar,ten?ude??i??g!vu96d8syzf--nx??h?i!.&ca?gro?moc?o&c!.&clp?dtl???r,?t&en?t??vt??k?rbg4--nx??k!.&drp?e&rianiretev?sserp??gro?lim?m&o&c?n??t??nicedem?ossa?pooc?s&eriaton?neicamrahp?sa??ude?v&og?uog????l&if?ohkcots??o!.&dem?gro?m&oc?uesum??o&c?rp??ten?ude?vog??b?c!.&0x,2aq,3pmevres,5sndd,a&c&-morf,ir&bafno,fa,??g&-morf,oy-sehcaet,?i-morf,m&-morf,all&-a-si,amai,??p&-morf,c-a-si,?r&emacytirucesym,odih,?s,tadtsudgniht,v-morf,w-morf,z,?b&ew&-sndnyd,arukas,draiw.segap,ottad,?ildts.ipa,?c&amytirucesemoh,d-morf,esyrcs,itsalej.omed,n&-morf,vym,?p&kroweht,ytirucesemoh,?q,rievres,s-morf,?d&aerotffuts,e&calpb,ifitrec-&si,ton-si,?llortnocduolc,rewopenignepw:.sj,,tsohecapsppa,?i&-morf,rgevissam.saap,?m-morf,n&-morf,abeht-htiw-si,?s-morf,uolc&-noitatsyalp,hr,iafaw.&d&ej,yr,?nol,?meaeboda,nevia,panqym:-&ahpla,ved,?,smetsystuo,tekcilc,ved&j,pw,??vreser,wetomer,?e&butuoyhtiw,ciffo-sndnyd,d:-morf,o&celgoog,n&il.srebmem,neve.&1-&su,ue,?2-&su,ue,?3-&su,ue,?4-&su,ue,????,erf&-sndnyd,sndd,?filflahevres,g&de-yltsaf,nahcxeevres,?i&hcet-a-si,p-sekil,?k&auqevres,irtsretnuocevres,?l&bitpa-no,googhtiw,?m&agevres,ina-otni-si,oh-&sndnyd,ta-sndnyd,??n&-morf,ilno&-evreser,ysrab,?og-si,?r&alfduolcyrt,ehwynanohtyp:.ue,,ihcec,?srun-a-si,t&i&nuarepo,s&-ybboh,aloy,elpmis,tipohs,xiw,??omer-sndnyd,upmocsma,ysgolb,?v&als-elcibuc-a-si,i&lsndd,tavresnoc-a-si,??z&amkcar,eelg,iig,??fehc-a-si,g&ni&gats-&raeghtua,swennwot,?ksndd,robsikrow,tsoh-bt.etis,?o&fgp,lb&-sndnyd,sihtsetirw,???h&n-morf,o-morf,?i&fiwehtno,h-morf,kiw-sndnyd,m-morf,p&aerocne,detsoh,?r-morf,w-morf,z&ihcppa,nilppa,??jn-morf,k&a&-morf,erfocsic,?cils-si,eeg&-a&-si,si,?sndd,?h,latsnaebcitsale:.&1-&htuos-pa,lartnec-&ac,ue,?ts&ae&-&as,su,?ht&ron-pa,uos-pa,??ew-&su,ue,vog-su,???2-ts&ae&-su,ht&ron-pa,uos-pa,??ew-&su,ue,??3-ts&aehtron-pa,ew-ue,??,o-morf,r&adhtiwtliub,ow&-&sndnyd,ta-sndnyd,?ten-orehkcats,??sedal,u,?l&a&-morf,colottad,rebil-a-si,?f-morf,i&-morf,am&-sndnyd,detsohpw,??l&ecelffaw,uf-ytnuob:.a&hpla,teb,?,?ppmswa,ru-&elpmis,taen,?ssukoreh,xegap,?m&n-morf,pml.ppa,rofe&pyt.orp,rerac-htlaeh,?sacrasevres,uirarret-yltsaf,?n&a&cilbuper-a-si,f&-sllub-a-si,racsan-a-si,?i&cisum-a-si,ratrebil-a-si,?tarukas,?c,dc&hsums,umpw,xirtrepmi,?eerg-a-si,i&-morf,jod,?m-morf,o&ehtnaptog,isam-al-a-tse,r&italik,tap-el-tse,?s&iam-al-a-tse,replausunu,??pj,t-morf,?o&bordym,c,hce-namtsop,jodsnd,m&-morf,ed-baltlow,?n:iloxip,,ttadym,?p&2pevres,aelutym,i&-sndnyd,fles,ogol,ruoy&esol,hctid,?ym&eerf,teg,??ohsdaerpsym,pa&-rettalp,anis:piv,,esaberif,k1,lortnocduolc,oifilauq,r&aegyks,oetem:.ue,,?t&ilmaerts,norfegap,?ukoreh,?t&fevres,thevres,??r&081,a:-morf,tskcor-a-si,,b,e&d&iv&erp-yb-detsoh.saap,orpnwo,?ner&.ppa,no,??e&bevres,nigne-na-si,?ggolb-a-si,h&caet-a-si,pargotohp-a-si,?krow-drah-a-si,n&gised-a-si,ia&rtlanosrep-a-si,tretne-na-si,??p&acsdnal-a-si,eekkoob-a-si,?retac-a-si,subq,tn&ecysrab,iap-a-si,uh-a-si,?vres&-&ki.&cpj-rev-duolcj,duolcj,?s&ndnyd,pvtsaf,??inim,nmad,sak,?y&alp-a-si,wal-a-si,?zilibomdeepsegap,?g,ituob,k,mgrp.nex,o&-morf,sivdalaicnanif-a-si,t&areleccalabolgswa,c&a-na-si,od-a-si,?susaym,??p-morf,u&as-o-nyd,e&tsoh.&duolc-gar,hc-duolc-gar,?ugolb-nom-tse,?omuhevres,??s&a&apod,ila&nyd,snd,?nymsd,vnacremarf,?bbevres,ci&p&-sndnyd,evres,?tcatytiruces,?dylimaf,e&cived-anelab,itilitu3,lahw-eht-sevas,mag-otni-si,t&i&iis,sro,?yskciuq,??fpi-&eralfduolc,fc,?i&ht2tniop,pa&elgoog,tneltneg,??jfac,k&-morf,aerf-ten,colb&egrof,pohsym,??m&-morf,cxolb,?n&d&-pmet,dyard,golb,htiwssem,mood,tog,?kselp,nyd,ootrac-otni-si,?o&-xobeerf,xobeerf,?ppa&-avnac,raeghtua,t&ikria,neg,??r&ac-otni-si,e&ntrap-paelut,tsohmaerd,??s&e&l-rof-slles,rtca-na-si,?ibodym,?tsaeb-cihtym.&a&llicno,zno,?ilay,lacarac,re&gitnef,motsuc,?sv,toleco,x:n&ihps,yl,?,?u,wanozama.&1-&ht&ron-ue.9duolc.s&fv,tessa-weivbew,?uos-&em.9duolc.s&fv,tessa-weivbew,?fa.9duolc.s&fv,tessa-weivbew,?pa&-3s,.&3s,9duolc.s&fv,tessa-weivbew,?etisbew-3s,kcatslaud.3s,??ue.9duolc.s&fv,tessa-weivbew,???la&nretxe-3s,rtnec-&ac&-3s,.&3s,9duolc.s&fv,tessa-weivbew,?etisbew-3s,kcatslaud.3s,??ue&-3s,.&3s,9duolc.s&fv,tessa-weivbew,?etisbew-3s,kcatslaud.3s,????ts&ae&-&as&-&3s,etisbew-3s,?.&9duolc.s&fv,tessa-weivbew,?kcatslaud.3s,??pa.9duolc.s&fv,tessa-weivbew,?su:-etisbew-3s,.&9duolc.s&fv,tessa-weivbew,?kcatslaud.3s,?,?ht&ron-pa&-&3s,etisbew-3s,?.&9duolc.s&fv,tessa-weivbew,?kcatslaud.3s,??uos-pa&-&3s,etisbew-3s,?.&9duolc.s&fv,tessa-weivbew,?kcatslaud.3s,????ew-&su&-&3s,etisbew-3s,?.9duolc.s&fv,tessa-weivbew,??ue&-&3s,etisbew-3s,?.&9duolc.s&fv,tessa-weivbew,?kcatslaud.3s,??vog-su-&3s,spif-3s,????2-ts&ae&-su&-3s,.&3s,9duolc.s&fv,tessa-weivbew,?etisbew-3s,kcatslaud.3s,??ht&ron-pa&-3s,.&3s,9duolc.s&fv,tessa-weivbew,?etisbew-3s,kcatslaud.3s,??uos-pa&-&3s,etisbew-3s,?.&9duolc.s&fv,tessa-weivbew,?kcatslaud.3s,????ew-&su&-&3s,etisbew-3s,?.9duolc.s&fv,tessa-weivbew,??ue&-3s,.&3s,9duolc.s&fv,tessa-weivbew,?etisbew-3s,kcatslaud.3s,????3&-ts&aehtron-pa.9duolc.s&fv,tessa-weivbew,?ew-ue&-3s,.&3s,9duolc.s&fv,tessa-weivbew,?etisbew-3s,kcatslaud.3s,???s,??yasdrocsid,?t&arcomed-a-si,c&-morf,etedatad.&ecnatsni,omed,??eel&-si,rebu-si,?hgilfhtiwletoh,i:batym,,m-morf,n&atnuocca-na-si,e&duts-a-si,r-ot-ecaps,tnocresu&buhtig,e&capsppa,donil.pi,lbavresbo.citats,?pl,???ops&edoc,golb,ppa,?s&i&hcrana-&a-si,na-si,?laicos-a-si,pareht-a-si,tra-na-si,xetn&od,seod,??oh&piym,sfn,??", + "u&-morf,nyekcoh-asi,?v-morf,?u&-rof-slles,4,a-sppatikria,e,h,oynahtretramssi,r:ug-a-si,,?v&n-morf,rdlf,w-morf,?w&o&lpwons-yrt,zok,?ww100,?x&bsbf.sppa,em,i&nuemoh,rtrepmi,?obaniateb,t-morf,unilemoh,?y&a&bnx:.&2u,lacol-2u,?,l&erottad,pezam,?wetag-llawerif,?dnacsekil,fipohsym,k&-morf,niksisnd,?rot&ceridevitcaym,sitk,?u:goo,,w-morf,x&alagkeeg,orp&hsilbup,mapson.duolc,???zesdrocsid,?inu??m?or?tsla??p!.&eman,nwo,??raf!.jrots,etats??s?t!.&gro?lim?mo&c?n??oc?ten?ude?vog???u&esum?rof??z!.&ca?gro?hcs?lim?moc?o&c?fni??ten?ude?vog?zib????n&315rmi--nx?a&brud?cilbuper?f?grompj?hkaga?idraug?m?ol?ssin?u&hix?qna??varac?yalo??b!.&gro?moc?oc,ten?ude?vog??c??c!.&ah?bh?c&a?s??d&5xq55--nx?g?s?uolctnatsni,?eh?g&la0do--nx?ro??h&a?q?s??i&7a0oi--nx?h??j&b?f?t?x?z??kh?l&h?im?j??m&n?oc!.swanozama.&1-htron-nc.3s,be.1-&htron-nc,tsewhtron-nc,????n&h?l?s?y??om?qc?s&g?j?ppa-avnac,?t&cennockciuq.tcerid,en??ude?vog?wt?x&g?j?n?s??z&g?x??司公?絡網?络网??b??d&g!.ypnc,?ka??e&drag?erg?fuak?gawsklov?hctik?i&libommi?w??m?po?r!ednaalv??sier?ves??g!.&ca?gro?moc?ten?ude?vog??is&ed!.ssb,?irev???h!.&bog?cc,gro?lim?moc?ten?ude???i!.&ac?bew,c&a?in??dni?e&m?sabapus,?g&5?6?p?ro??i&a?hled??ku?l&evart?im??m&a?oc?rif??n&c?eg??o&c?fni?i?rp??p&ooc?u??r&ahib?d?e??s&c?er?nduolc,senisub?u??t&arajug?en!retni??ni?opsgolb,sop??ude?v&og?t??ysrab,zib??elknivlac?griv?ks?lreb?p?v?w?x??k!.&gro?ten?ude?vog???l&eok?ocnil??m!.&cyn,gro?ude?vog???o&dnol?i&hsaf?n&o?utiderc??siv!orue??t&a&cude!.oc,?dnuof?tsyalp??c&etorp?u&a?rtsnoc?????kin?las?mrom?nac?p&q?uoc??s&iam?pe?scire??t&ron?sob??zama??p!.&gro?oc?ten?ude?vog??k??r&e&c?yab??op!.eidni,??s!.&gro?moc?osrep?t&opsgolb,ra??ude?v&inu?uog????t!.&d&ni?uolcegnaro,?gro?ltni?m&oc!nim??siruot??nif?o&fni?srep??sne?t&an?en??vog??m??u&f?r!.&bdnevar,lper,retropno,s&h,revres,?tnempoleved,??stad?xamay?y??v!.&ca?eman?gro?htlaeh?moc?o&fni?rp??t&en?ni?opsgolb,?ude?vog?zib???wo&rc?t!epac????o&76i4orfy--nx?a!.&bp?de?go?oc?ti?vg??boat??b!.&a&ci&sum?tilop??i&c&arcomed?neic??golo&ce?ncet??m&edaca?onoce??rt&ap?sudni??vilob??n&egidni?icidem??serpme?tsiver?vitarepooc??b&ew?og??dulas?e&rbmon?tr&a?op&ed?snart????g&olb?ro??ikiw?l&a&noi&canirulp?seforp??rutan??im??moc?o&fni?lbeup?rga?tneimivom??saiciton?t&askt?en?ni??ude?vt??h?iew?olg??c!.&bew?cer?dr&c,rac,?esabapus,gro?ipym,l&im?per:.di,,?m&o&c!.topsgolb,?n??rif??ofni?s&egap&dael,l,?tra??t&4n,en?ilperdellawerif:.di,,ni??ude?vog??a?e?in?mara?s&edarb?ic???d!.&b&ew?og??dls?gro?lim?moc?t&en?ra??ude?vog??agoba?if?zd7acbgm--nx??e&c?d&iv?or??morafla??f!ni!.&e&g&delwonk-fo-l&errab,lerrab,?ellocevoli,?ht-skorg,rom-rof-ereh,tadpusn:d,,?llatiswonk,macrvd,ofni-v,p&i&-on,fles,?ohbew,?ruo-rof,s&iht-skorg,nd&-cimanyd,nyd,uolc,??tsrifyam,ysrab,zmurof,???g&el?n!am?ib???hwsohw?i!.&35nyd,8302,a&minifed,tad-b,?b&altig,uhtig,?czh,d&in,raobelgaeb,u&olc&iaznab.ppa,ropav,?rd,??e&c&apsinu.1rf-duolc,ivedniser,?donppad.sndnyd,egipa,lej,nilnigol,sufxob,t&i&beulb,snoehtnap,?newtu,ybeeb.saap,??gni&gatsniser.secived,tsohytsoh,?ilpu,k&coregrof.di,orgn:.&as,ni,p&a,j,?su,u&a,e,??,ramytefasresworb,?moc?n&aicisum,mtsp:.kcom,,yded,?ot&oq,pyrctfihs,?p&opilol,pa&-arusah,e&nalpkcab,tybeeb.1dkes,???r&e&tsneum-hf,vres&cisab,lautriv,??ial.sppa,?s&codehtdaer,gnihtbew,nemeis-om,pparevelc,t&acdnas,ekcit,??t&e&kcubtib,notorp,?i&belet,detfihs,gude,kecaps,?raedon.egats,s&ohg,udgniht.&cersid.&dvreser,tsuc,?dorp.tsuc,gnitset.&dvreser,tsuc,?ved.&dvreser,tsuc,????vgib.0ku,whs,x&bslprbv.g,cq,rotide,?y&olpedew,srab,??b?d&ar?u&a?ts???j?r?syhp??j!.&eman?gro?hcs?lim?moc?ten?ude?vog???ll&ag?o??m!.&gro?moc?ten?ude?vog??g?il?mi?orp??n!.&a&0&b-ekhgnark--nx?c-iehsrgev--nx?g-lksedlig--nx?k-negnanvk--nx??1&p-nedragy--nx?q-&asierrs--nx?grebsnt--nx?lado-rs--nx?n&egnidl--nx?orf-rs--nx??regnayh--nx?ssofenh--nx??r-datsgrt--nx?s-ladrjts--nx?v-y&senner--nx?vrejks--nx???3g-datsobegh--nx?4&5-&dnaleprj--nx?goksnerl--nx?tednalyh--nx??6-neladnjm--nx?s-&antouvachb--nx?impouvtalm--nx??y-&agrjnevvad--nx?ikhvlaraeb--nx???7k-antouvacchb--nx?8&k-rekie-erv--nx?l-ladrua-rs--nx?m-darehsdrk--nx??a!.sg??bct-eimeuvejsemn--nx?d&do?iisevvad?lov?narts?uas??f&1-&l--nx?s--nx??2-h--nx??g&10aq0-ineve--nx?av?ev?lot?r&ajn&evvad?u??ájn&evvad?u????h?iz-lf--nx?j&ddadab?sel??k&el?hoj&sarak?šárák??iiv&ag&na&el?g??ŋ&ael?ág???ran???l&f?lahrevo?o&ms?s??sennev?t-&ilm--nx?tom--nx??u&-edr--nx?s??øms??muar?n&0-tsr--nx?2-dob--nx?5-&asir--nx?tals--nx??a&r!-i-om?f?t??t??douvsatvid?kiv?m&os?øs??n&od?ød??ra?sen?t&aouvatheig?ouv&a&c&ch&ab?áb??h&ab?áb???n??i&ag?ág??sa&mo?ttvid??án???z-rey--nx?ær&f?t???o&p-&ladr--nx?sens--nx??q-nagv--nx?r-asns--nx?s-kjks--nx?v-murb--nx?w-&anr&f--nx?t--nx??ublk--nx???ppol?q&0-t&baol--nx?soum--nx?veib--nx??x-&ipphl--nx?r&embh--nx?imph--nx???y-tinks--nx??r&f-atsr--nx?g-&an&ms--nx?nd--nx??e&drf--nx?ngs--nx??murs--nx?netl--nx?olmb--nx?sorr--nx??h-&a&lms--nx?yrf--nx??emjt--nx??i&-&lboh--nx?rsir--nx?y&d&ar--nx?na--nx??ksa--nx?lem--nx?r&ul--nx?yd--nx????stu??j-&drav--nx?rolf--nx?sdav--nx??kua?l-&drojf--nx?lares--nx??m-tlohr--nx?n-esans--nx?olf?p-sdnil--nx?s-ladrl--nx?tih?v-rvsyt--nx??s&a&ns?ons??i&ar?er&dron?r&os?øs???ár??la&g?h??mor!t??sir?uf?åns??t&koulo&nka?ŋká??la?p-raddjb--nx?r-agrjnu--nx?s&aefr&ammah?ámmáh??orf?r&o?ø???u-vreiks--nx??u&h-dnusel--nx?i-&drojfk--nx?vleslm--nx??j-ekerom--nx?k-rekrem--nx?u-&dnalr--nx?goksr--nx?sensk--nx??v-nekyr--nx?w-&k&abrd--nx?ivjg--nx??oryso--nx??y-y&dnas--nx?mrak--nx?n&art--nx?nif--nx??reva--nx??z-smort--nx??v!.sg?ledatskork?reiks??wh-antouvn--nx?x&9-dlofts--nx.aoq-relv--nx?d-nmaherk--nx?f-dnalnks--nx?h-neltloh--nx?i-drgeppo--nx?j-gve&gnal--nx?lreb--nx??m-negnilr--nx?n-drojfvk--nx??y&7-ujdaehal--nx?8-antouvig--nx?b-&dlofrs--nx?goksmr--nx?kivryr--nx?retslj--nx??e-nejsom--nx?f-y&krajb--nx?re&dni--nx?tso--nx??stivk--nx??g-regark--nx?orf?ørf??z9-drojfstb--nx??b&25-akiivagael--nx?53ay7-olousech--nx?a&iy-gv--nx?le-tl&b--nx?s--nx??n0-ydr--nx??c&0-dnal-erdns--nx?z-netot-erts--nx??g&g-regnarav-rs--nx?o-nejssendnas--nx??ju-erdils-ertsy--nx?nj-dnalh-goksrua--nx?q&q-ladsmor-go-erm--nx.&ari-yreh--nx?ednas??s-neslahsladrjts--nx???ca&4s-atsaefrmmh--nx?8m-dnusynnrb--nx?il-tl--nx?le-slg--nx?n5-rdib--nx?op-drgl--nx?uw-ynnrb--nx??d&a&qx-tggrv--nx?reh!nnivk?sd&ork?ørk??uas??ts&e&bi?kkar?llyh?nnan??g&ort?ørt??k&alf?irderf??levev?mirg?obeg&ah?æh??r&ah?ejg????barm-jdddb--nx?ie!rah?s&etivk?ladman???lof&r&os?øs??ts&ev.ednas?o.relav?ø.relåv???n&a&l&-erd&n&os?øs??ron??adroh.so?dron.&a&g5-b--nx?ri-yreh--nx??ob?y&oreh?øreh??øb??e&m!lejh??pr&oj?øj??vi??gyb?n&aks?åks??o&h-goksrua?rf??r&o?ua?ø??tros?øh-goksrua??rts!e&devt?lab?mloh???s&ellil?naitsirk?rof???u&l!os??s!d&im?lejt??e&guah?l&a?å???kkoh?lavk?naitsirk?r&af?eg&e?ie???tef?y&onnorb?ønnørb?????r&a&blavs!.sg??g&eppo?la???o&j&f&a!dniv?k?vk??die?e&dnas?kkelf??llins?r&iel?ots??s&lab?t&ab?åb??yt??å!k??ævk??les??ts??åg&eppo?lå???ureksub.sen??e&ayb-yrettn--nx?d&ar?isemmejh321,lom?r&of?øf??år??g&gyr?nats??i&meuv&ejsem&aan?åån??sekaal??rjea??j&d&ef?oks??les??k&er&aom?åom??hgna&ark?årk??iregnir?kot!s??s&ig?uaf???l&bmab?kyb?l&av?ehtats??oh??m&it?ojt?øjt??n&arg?g&os?øs??meh?reil?te?ummok?yrb??r&dils-erts&ev?y&o?ø???ua?vod??sa&ans?åns??t&robraa?spaav??urg??f&62ats-ugsrop--nx?a&10-ujvrekkhr--nx?7k-tajjrv-attm--nx??o!.sg?h??s!.sg??v!.sg???g&5aly-yr&n--nx?v--nx??a&llor?ve&gnal?lreb???n&av!snellu??org??oks&die?m&or?ør??ner&ol?øl??r&o?ø???r&eb!adnar?edyps?s&die?elf?gnok?n&ot?øt????obspras??uahatsla?åve&gnal?lreb???h&0alu-ysm--nx?7&4ay8-akiivagg--nx?5ay7-atkoulok--nx??a!.sg???i&e&hsr&agev?ågev??rf??k&h&avlaraeb?ávlaraeb??s??lm&a?å??mpouvtal&am?ám??pph&al?ál??rrounaddleid?ssaneve?ššáneve??j&0aoq-ysgv--nx?94bawh-akhojrk--nx??k&a&b&ord?ørd??jks?lleis??iv!aklejps?l&am?evs?u??mag?nel?ojg?r&a&l?n??epok?iel?y&or?ør???s&ah?kel?om??øjg??kabene?ojsarak?ram&deh.&aoq-relv--nx?rel&av?åv??so??e&let.&ag5-b--nx?ob?øb??ra???åjks??l&a!d&anrus?d&numurb?ron??e&gnard?nte?s&meh?sin??ttin??g&is?nyl??kro?l&em?l&ejfttah?of??u&ag-ertdim?s???n&am?era?gos?i&b?nroh?r??kos?nus?oj??o-&dron?r&os?øs???ppo?r&a!l?nram??e&gne?l?v??is?o&jts?ts??u&a-&dron?r&os?øs???h??å?æl?øjts??s&e&jg?nivk?ryf??kav?mor-go-er&om.&ednas?yoreh??øm.&ednas?yøreh???uag??t&las?rajh?suan??v&l&a?e-rots??u-go-eron??yt??ksedlig?res&a?å???bib&eklof?seklyf??es!dah??h!.sg??i&m?syrt??l&ejf?ov&etsua?gnit?ksa?sdie???n!.sg??o!.sg?boh?g?h??r!.sg??å!ksedlig??øboh??m&a&rah?vk??f!.sg??h!.sg??i&e&h&dnort?rtsua?ssej??rkrejb??ksa??ol?t!.sg??u&dom?esum?r&ab?drejg?evle?os?uh?æb?øs??ttals???n&a&g&av?okssman?åv??jlis?or?r&g?rev???e&d&do&sen?ton??lah?r&agy&o?ø??ojfsam???g&iets?n&a&l&as?lab??n&avk?ævk??t&arg?ddosen??v&al?essov???i&d&ol?øl??l&ar?ær???yl??reb??iks?k&srot?y&or?ør???l&a&d&gnos?n&er?ojm?øjm??om??tloh??ug?åtloh??mmard?ojs&om?sendnas??ppolg?s&lahsladr&ojts?øjts??o??t&o&l?t-erts&ev?o?ø???roh?øl??vly&kkys?nav??yam-naj!.sg??øjs&om?sendnas???g&orf?ujb??i&dnaort?vnarg??kob?ladendua?maherk&a?å??n&it?urgsrop??orf-&dron?r&os?øs???r&aieb?evats??sfev?uaks?yrts??o&6axi-ygvtsev--nx?c,d&ob?rav??ievs?kssouf?l&m&ob?øb??ous&adna?ech&ac?áč???so!.sg???msdeks?niekotuak?r&egark?olf?y&oso?øso???s&dav?mort???p&ed?ohsdaerpsym,p&akdron?elk???r&a&d&dj&ab?áb??iab??jtif?luag?mah?vsyt??e&gn&a&k&iel?ro??merb?n&at?mas??rav-r&os?øs??srop?talf?v&ats?el??y&oh?øh???ivsgnok??il?jkniets?k&a&nvej?rem?s&gnir?nellu???ie-er&den?v&o?ø???ram?sa?årem??la&jf?vh??m&b&ah?áh??mahellil??nnul?ts&l&oj?øj??ul??y&o?ø???imp&ah?áh??m!.sg??osir?t!.sg??ádiáb?ævsyt?øsir??s&adnil?en&dnas?e&dga?k&ri&b?k??som??ve??me&h?jg??nroh-go-ejve?s&a?ednil?k&o?ø??of?yt?å??tsev??gv?hf?igaval?o&r&or?ør??sman??so&fen&oh?øh??m?v??uh&lem?sreka.sen??å!dnil???t&a&baol?g&aov?grav??jjr&av-attam?áv-attám??l&a&b?s??ás??soum?ts?v&eib?our???e&dnaly&oh?øh??f?s&nyt?rokomsdeks?sen??vtpiks??in&aks?áks??loh&ar?år??n!.sg??o&m&a?å??psgolb,?s!.sg?efremmah?or?ør??terdi?á&baol?ggráv?lá&b?s??soum?veib???u&b!.sg?alk?e&dna?gnir?nner??les?ælk??dra&b?eb??g&nasrop?vi?ŋásrop??j&daehal&a?á??jedub?v&arekkhar?árekkhár???ksiouf?n&diaegadvoug?taed???v&irp?lesl&am?åm???y&b&essen?nart?sebel?tsev??o&d&ar?na!s??or??gavtsev?k&rajb?sa??lem?mrak?n&art?n&if?orb???r&a&mah?n?v??e&dni?t&so?ton??va??ul?yd??s&am?enner?gav?lrak?tivk??vrejks??ø&d&ar?na!s", + "??ør??gåvtsev?k&rajb?sa??lem?mrak?n&art?n&if?ørb???r&e&dni?t&so?tøn??va??ul?yd?æ&n?v???s&enner?gåv?tivk?åm??vrejks???á&slág?tlá?vreiks??å&gåv?h?jddådåb?lf??ø&d&ob?rav??r&egark?olf??s&dav?mort????aki?i&sac?tal??u??o&b?f?g?hay?o?ttat??r!.&cer?erots?gro?m&o&c?n??rif?t??o&c,fni??pohs,stra?t&n?opsgolb,?www?ysrab,?e&a!.&a&ac?cgd?idem??bulc!orea??ci&ffartria?taborea??e&cn&a&l&lievrus-ria?ubma??netniam?rusni??erefnoc??gnahcxe?mordorea?ni&gne?lria?zagam??rawtfos??gni&d&art?ilg!arap?gnah???l&dnahdnuorg?ledom??noollab?retac?sael?t&lusnoc?uhcarap??vidyks??hcraeser?l&anruoj?euf?icnuoc?ortnoc!-ciffart-ria???n&gised?oi&nu?t&a&cifitrec?ercer?gi&tsevni-tnedicca?van??i&cossa!-regnessap??valivic??redef??cudorp?neverp-tnedicca????ograc?p&ihsnoipmahc?uorg!gnikrow???r&e&dart?enigne?korb?niart?trahc??o&htua?tacude???s&citsigol?e&civres?r??krow?serp!xe??tnega??t&farcr&ia?otor??hgil&f?orcim??liubemoh?n&atlusnoc?e&duts?m&esuma?n&iatretne?revog??piuqe????olip?ropria?si&lanruoj?tneics???w&erc?ohs??y&cnegreme?dobper?tefas????rref?z??p!.&a&aa?ca?pc??dem?ecartsnd.icb,gne?r&ab?uj??snduolc,t&acova?cca?hcer??wal?ysrab,???s!.&em?gro?hcs,moc?ten?ude?vog???t!.&0x,116,ayo,gro?lim?moc?nayn,sulpnpv,t&cennockciuq.tcerid,en??ude?v&dr,og???o&hp?m?v?yk??tol?ua??v&iv?lov??xas?ykot??p&a&ehc?g?m?s??eej?g!.&gro?ibom?moc?ossa?ppa,ten?ude???i&r!.nalc,?v?z??j!.&0o0o,a&3&5xq6f--nx?xqi0ostn--nx??5wtb6--nx?85uwuu--nx?9xtlk--nx?ad,b&ats,ihc!.&a&bihciakoy?don?ma&him?ye&ragan?tat???r&a&bom?gan?hihci??u&agedos?kas?ustak???s&os?ufomihs??t&amihcay?iran??w&a&g&im&anah?o??omak??kihci?zustum??ihsak??y&agamak?imonihci???e&akas?nagot??i&azni?esohc?h&asa?s&abanuf?ohc???ka&to?zok??musi?orihs?r&akihabihsokoy?o&dim?tak??ukujuk??usihs??nano&hc?yk??o&d&iakustoy?ustam??hsonhot?k&a&rihs?t??iba??nihsaran?sobimanim?tas&arihsimao?imot??uhc?yihcay??u&kujno?s&ayaru?t&imik?tuf???zarasik?????c&cah,ed,?g&as!.&a&gas?m&a&tamah?yik??ihsak??rat?t&a&gatik?hatik??ira!ihsin????e&kaira?nimimak??i&akneg?g&aruyk?o??h&c&amo?uo??siorihs??kaznak?modukuf?ra&gonihsoy?mi???nezih?u&k&at?ohuok??s&ot?tarak?????ihs!.&a&kok?m&a&hagan?yirom??ihsakat??rabiam?wagoton??e&miharot?nokih??houyr?i&azaihsin?esok?kustakat?moihsagih??na&mihcahimo?nok??o&hsia?mag?t&asoyot?ok?tir???us&ay?t&asuk?o??????k&aso!.&a&d&awihsik?eki??k&a&noyot?s&akaayahihc?oihsagih???oadat?uziak??m&ayas!akaso??odak??r&a&bustam?wihsak??ediijuf??t&akarih?i&k?us???wag&ayen?odoyihsagih???e&son?tawanojihs??honim?i&akas?h&cugirom?s&ayabadnot?i&a&kat?t??n??oyimusihsagih???k&a&rabi?sim??ustakat??muzi?r&ijat?otamuk???nan&ak?n&ah?es???o&ay?n&a&ganihcawak?simuzi?tak??eba?ikibah?oyot??t&anim?iad?omamihs??uhc??ust&oimuzi?tes????ou&kuf!.&a&d&amay?eos??g&no?ok?usak??hiku?k&awayim?uzii??ma&kan?y&asih?im???rawak?t&a&gon?ka&h?num?t???umo??wa&g&a&kan?nay?t??ias??ko!rih???y&ihsa?usak???e&m&ay?uruk??taruk?us??i&a&nohs?raihcat??goruk?h&cukuf?s&a&gih?hukuy??in???k&a&gako?muzim??iust?o?ustani??m&anim?otihsoynihs?u??r&ogo?ugasas??usu??ne&siek?zu&b?kihc???o&gukihc?h&ak?ot?ukihc??j&ono?ukihc??kayim?nihsukihc?to?uhc??u&fiazad?gnihs?stoyot????zihs!.&a&bmetog?d&amihs?eijuf?ihsoy?omihs??kouzihs?mihsim?ra&biah?honikam??tawi?wa&g&ekak?ukik??kijuf??yimonijuf??i&a&ra?sok??hcamirom?juf?kaz&eamo?ustam??ma&nnak?ta??nukonuzi?orukuf??nohenawak?o&nosus?ti??u&stamamah?z&a&mun?wak??i!ay?i&hs&agih?in??manim??mihs????????m&a&tias!.&a&d&ihsoy?ot?usah??k&a&dih?sa??o&arihs?s???m&a&tias?y&as?o&rom?tah??ustamihsagih???i&hsagurust?jawak??uri??ni?wa&g&e&ko?man??ikot?o??k&ara?i&hsoy?mak???ru?zorokot??y&a&g&amuk?ihsok?otah??kuf??imo??ziin??e&bakusak?ogawak?sogo?ttas?zokoy??i&baraw?h&cugawak?s&oyim?ubustam???iroy?k&ato?ihs?u&k?stawi???m&akoyr?i&hsoy?juf??uziimak???naznar?o&dakas?ihsay?jnoh?n&a&go?nim??imijuf?nah?oy??r&ihsayim?otagan??t&asim!ak??igus?omatik??zak??u&bihcihc!ihsagih??sonuok?ynah????y&ak&aw!.&a&d&ira?notimak??kadih?ma&h&arihs?im??y&a&kaw?tik??oduk???ru&ustakihcan?y??sauy?wa&g&a&dira?zok??orih??konik??yok?zok??e&banat?dawi??i&garustak?jiat?mani??naniak?o&bog?nimik?t&asim?omihs&ah?uk????ugnihs???o!.&a&jos?koasak?m&ay&ako?ust??ihsayah??r&abi?ukawaihsin??wi&aka?nam???e&gakay?kaw??i&gan?h&cu&kasa?otes??sahakat??k&asim?ihsaruk??miin??n&anemuk?ezib??o&hsotas?jnihs?n&amat?imagak??ohs?uhcibik?????ot!.&a&damay?got?koakat?may&etat?ot??nahoj?riat?waki&inakan?reman???eb&ayo?oruk??i&h&asa?ciimak?sahanuf??kuzanu?m&an&i?ot??ih???nezuyn?otnan?u&hcuf?stimukuf?z&imi?ou???????ihs&o&gak!.&a&m&ayuok?ihsogak??si?yonak??e&banawak?n&at&akan?imanim??uka??tomoonihsin??i&adnesamustas?k&azarukam?oih??m&ama?uzi??usuy??nesi?o&knik?os?tomustam??uzimurat???rih!.&a&ka&n?s??m&ayukuf?i&hsorihihsagih?j&ate?imakikaso????r&a&bohs?h&ekat?im???es??tiak?wiad??e&kato?ruk??i&h&ci&akustah?mono?nihs??s&inares?oyim???manimasa?uk??negokikesnij?o&gnoh?namuk??uhcuf????uk&ot!.&a&bihci?mi&hsu&kot?stamok??m??wagakan??egihsustam?i&gum?h&coganas?soyim??kijaw?m&anim?uzia??ukihsihs??nan&a?iak??o&nati?turan????uf!.&a&batuf?m&a&to?y&enak?irok???ihs&im?ukuf??os?uko??r&aboihsatik?uganat??ta&katik?mawak?rih??w&a&g&akus?emas?uy??k&a&mat?rihs?sa??ihsi??nah??ohs???e&gnabuzia?iman?ta&d?tii???i&adnab?enet?hs&agih?iimagak??k&a&wi?zimuzi??ubay??minuk?r&ook?ustamay???nihsiat?o&g&etomo?ihsin?nan?omihs??no!duruf?rih??rihsawani?ta&may?simuzia???u&rahim?stamakawuzia?zia&ihsin?nay???????nug!.&a&bawak?doyihc?k&anna?oi&hsoy?juf?mot???m&ayakat?ustagaihsagih??n&ihsatak?nak??r&ahonagan?nak?o?u&kati?mamat???t&amun?inomihs?o??w&akubihs?iem?ohs???i&hsa&beam?yabetat??kas&akat?esi??m&akanim?uzio??ogamust?rodim??o&jonakan?n&eu?oyikust??tnihs??u&komnan?stasuk?yrik????rep,?n&ibmab,nog,ob,?ppacihc,ra&n!.&a&bihsak?d&akatotamay?u!o???guraki?m&ay&atik&imak?omihs??irokotamay??oki??ra&hihsak?n??wa&geson?knet???e&kayim?ozamay?sog?ustim??i&a&rukas?wak??garustak?h&ciomihs?sinawak??jo?ka&mnak?toruk??makawak?nos?r&net?otakat?ugeh???o&d&na?oyo??gnas?jnihs?nihsoy!ihsagih??tomarawat?yrok????rikik,?t&ag&amay!.&a&dihsio?k&atarihs?ourust??may&a&kan?rum??enak?onimak??rukho?ta&ga&may?nuf??hakat?kas??wa&g&ekas?orumam??ki&hsin?m??z&anabo?enoy?ot???zuy??e&agas?bonamay?dii?nihsagih?o??i&a&gan?nohs??h&asa?sinawak??nugo??o&dnet?jnihs?ynan??ukohak???iin!.&a&ga?k&ium?oagan??munou!imanim??t&a&bihs?giin??ioy??w&a&gioti?kikes?zuy??irak??yijo??e&kustim?mabust??i&aniat?hcamakot?kaz&awihsak?omuzi??m&a&gat?karum??o???n&anust?esog??o&das?ihcot?jnas?k&ihay?oym??mak?naga?ries??u&ories?steoj?????i&k&a!.&a&go?k&asok?oimak??t&ago!rihcah??ika!atik???w&aki?oyk???e&mojog?natim?suranihsagih?t&ado?okoy???i&hsoyirom?magatak?naokimak??nesiad?o&hakin?jnoh!iruy??nuzak?rihson?tasi&juf?m??yjnoh??u&kobmes?oppah????in,?o!.&a&dakatognub?m&asah?ihsemih??su?t&ekat?i&h?o????e&onokok?ustimak??i&jih?k&asinuk?ias?usu??mukust??onoognub?u&fuy?juk?ppeb?suk?????nayn,?wa&ga&k!.&a&mihsoan?rihotok?waga&kihsagih?ya???emaguram?i&j&nonak?ustnez??kunas?monihcu??o&hsonot?nnam?yotim??u&st&amakat?odat??zatu????nak!.&a&dustam?kus&okoy?tarih??maz?nibe?r&a&gihsaimanim?h&esi?imagas??wa&do?guy???u&im?kamak???tikamay?wa&k&ia?oyik?umas??sijuf??yimonin??e&nokah?saya??i&akan?esiak?gusta?hsuz?kasagihc?o?ukust??o&nadah?sio?tamay?????kihsi!.&a&danihcu?gak?kihs?mijaw?t&abust?ikawak??wazanak??i&gurust?hcionon?mon?ukah??nasukah?o&anan?ton!akan???u&kohak?stamok?z&imana?us?????niko!.&a&han?m&arat?ijemuk?uru??n&e&dak?zi??no??ra&hihsin?rih??wa&kihsi?niko??yehi?zonig??e&osaru?seay??i&hsagih?jomihs?k&a&gihsi?not??ihsakot??m&a&ginuk?kihsug?maz??igo?otekat??nuga!noy???n&a&moti?timoy?wonig??i&jikan?k???o&gan?jnan?tiad&atik?imanim???u&botom?kusug&akan!atik??imot??rab&anoy?eah??????yp,zomim,?bus,c&204ugv--nx?462a0t7--nx?678z7vq5d--nx?94ptr5--nx?a?mpopilol,?d&-2,17sql1--nx?3thr--nx?5&20xbz--nx?40sj5--nx??7&87tlk--nx?ptlk--nx??861ti4--nx?a?e!tfarcdnah,?n&eirf&lrig,yob,?om,?ooftac,?e&16thr--nx?5&1a4m2--nx?9ny7k--nx??damydaer,eweep,garotsarukas.&10ksi.3s,20ksi.3s,?i&bmoz,m!.&a&bot?k&asustam?uzus??m&a&him?y&emak?im???ihs??nawuk?wi&em?k???e&bani?ogawak?si!imanim???i&arataw?gusim?h&asa?ciakkoy??k&a&mat?sosik?t??iat??raban??o&dat?hik?n&amuk?ihseru?o&du?mok????ust????kilbew,lasrepus,mihe!.&a&m&a&h&ataway?iin??yustam??ij&awu?imak???taki!man???ebot?i&anoh?kasam?rabami??n&ania?egokamuk?oot??o&jias?kihcu?nustam?uhcukokihs?yi!es???u&kohik?zo????n!.&arukas,lapo,n&erukom,riheg,?omomus,stnim,teniesa.resu,xob-liam,yrovi,zapot,?amihs!.&a&d&amah?ho?usam??kustay?m&a?ihsoni&hsin?ko???wakih??e&namihs?ustam??i&g&aka?usay??konikak?mikih??nannu?o&mu&kay?zi!ihsagih?uko???nawust?tasim??u&stog?yamat????nep,?rotsnoihsaf,srev,t&awi!.&a&bahay?d&amay?on??koirom?t&a&honat?katnezukir??imus??w&as&ijuf?uzim??ihs???e&hon&i&hci?n??uk??tawi??i&a&duf?murak?wak??h&custo?si&amak?ukuzihs???j&oboj?uk??k&a&m&anah?uzuk??sagenak??esonihci??m&akatik?uzia&rih?wi????o&kayim?no&rih?t??tanufo??uhso???isarap,saman,tococ,?ulbybab,?g&3zsiu--nx?71qstn--nx?l?olblooc,?h&03pv23--nx?13ynr--nx?22tsiu--nx?61qqle--nx?o-hu,sulb,?i&54urkm--nx?azosbew,ced,g&ayim!.&a&dukak?m&a&goihs?kihs??ihsustam!ihsagih??unawi??r&awago?iho??ta&bihs?rum??w&a&gano?kuruf??iat??y&imot?ukaw???e&mot?nimes??i&hsiorihs?ka&monihsi?s&awak?o???mak?r&ataw?o&muram?tan????o&az?jagat?t&asim?omamay???u&fir?k&irnasimanim?uhsakihcihs?????ihcot!.&a&g&a&h?kihsa??ust??kom?m&ay&o?usarak??unak??r&a&boihsusan?watho??iho?ukas??t&akihsin?iay??wa&konimak?zenakat??y&imonustu?oihs???e&iiju?kustomihs?nufawi??i&akihci?g&etom?ihcot?on???o&k&ihsam?kin??nas?sioruk?tab??u&bim?san?????h&c&ia!.&a&dnah?m&a!h&akat?im??yuni??ihs&ibot?ust???r&a&hat?tihs??ik?u&ihsagih?kawi???t&ihc?o&k?yot???wa&koyot?zani??yi&monihci?rak???e&inak?k&aoyot?usa??manokot?noyot??i&a&gusak?kot?sia??eot?h&asairawo?cugo?s&ahoyot?oyim???k&a&mok?zako??ihssi??motay?rogamag??n&an&ikeh?ok??ihssin??o&got?ihsin?jna?rihsnihs?suf?tes??u&bo?raho?s&oyik?takihs??yrihc?zah????ok!.&a&dusay?kadih?mayotom?r&ah&im?usuy??umakan??sot!ihsin??wa&g&atik?odoyin??k&as?o????i&esieg?hco!k??jamu?k&a!sus??usto??ma&gak?k??rahan??o&mukus?n&i?ust!ihsagih???torum?yot!o???u&koknan?zimihsasot????ugamay!.&a&m&ayukot?ihso??toyot??e&bu?subat??i&gah?kesonomihs?nukawi?rakih??nanuhs?otagan?u&ba?foh?otim?stamaduk?uy?????s&anamay!.&a&dihsoyijuf?mayabat?r&ahoneu", + "?ustakihsin??w&a&k&ayah?ijuf??suran??ohs???egusok?i&ak?h&cimakan?s&anamay?od???k&asarin?u&feuf?sto????o&k&akanamay?ihcugawakijuf??nihso?t&asimawakihci?ukoh??uhc??spla-imanim?u&b&nan?onim??fok?hsok?rust????ubon,??ix,ka&rabi!.&a&bukust?gok?kan!ihcatih??m&a&sak?timo?wi??ihsak?ustomihs??ni?r&a&hihcu?way??u&agimusak?ihcust???t&ag&amay?eman??oihcatih??w&ag&arukas?o??os??yi&moihcatih?rom???e&bomot?dirot?not?tadomihs??i&a&k&as?ot??rao??esukihc?gahakat?h&asa?catih??k&a&rabi?saguyr??ihsani?uy??ma?rukustamat??o&dnab?giad?him?kati?rihsijuf?soj?t&asorihs?im??yihcay??u&fius?kihsu?simak????sagan!.&a&m&abo?ihsust??natawak?r&abamihs?u&mo?ustam???wijihc?yahasi??i&akias?hies?k&asagan?i??masah??neznu?o&besas?darih?t&eso?og!imaknihs????ust&igot?onihcuk?uf????zayim!.&a&biihs?guyh?k&oebon?ustorom??mihsuk?r&emihsin?uatik??ta&katik?mim??wag&atik?odak??ya??e&banakat?sakog??i&hsayabok?kaza&kat?yim??m&animawak?ot&inuk?nihs????nanihcin?o&j&ik?onokayim??n&ibe?ust??tias??urahakat????ro&cep,moa!.&a&dawot?turust?wasim??e&hon&ihc&ah?ihs??nas?og?ukor??sario??i&anarih?ganayati?hsioruk?jehon?kasorih?makihsah?nawo?r&amodakan?omoa???o&gnihs?kkat??u&ragust?stum????ttot!.&a&r&ahawak?uotok??sa&kaw?sim???egok?irottot?nanihcin?o&ganoy?nih?tanimiakas??u&bnan?z&ay?ihc??????ukuf!.&a&deki?gurust?ma&bo?h&akat?im??yustak??sakaw??eabas?i&akas?ho?jiehie?ukuf??nezihce!imanim??ono????k&26rtl8--nx?4&3qtr5--nx?ytjd--nx??522tin--nx?797ti4--nx?ci&gid,ht,sevol,?ee,limybab,n&at,upatilol,??l&33ussp--nx?e&ccabew.&resu,sr,?llarap,?lik,oof,rigetuc,?m&11tqqq--nx?41s3c--nx?ef,sioge,?n&30sql1--nx?65zqhe--nx?a&ebyllej,i&lognom,viv,??iam,n7p7qrt0--nx?o&o&las,mflah,?ruk,staw,??o&131rot--nx?7qrbk--nx?aic,c?d&iakkoh!.&a&deki?gakihset?hcebihs?k&adih?u&fib?narihs???m&ayiruk?hot?ihs&orihatik?ukuf??oras?usta??r&ib&a!ka??o?uruf??ozo?u&gakihsagih?oyot???sakim?ta&gikust?mun??w&a&ga&k&an?uf??nus!imak???k&aru?i&h&asa?sagih??kat?mak??omihs?um??zimawi??ine?oyk??yot??e&a&mustam?nan??b&a&kihs?yak??o&noroh?to???ian?k&ihsam?ufoto??nakami?ppoko!ihsin??sotihc?tad!okah??uonikat??i&a&bib?mokamot?n&a&k&kaw?oroh??wi??eomak?ihsatu?okik?usta&moruk?sakan????eib?h&c&ioy?u&bmek?irihs???s&ase?ekka?oknar?uesom???jufirihsir?k&amamihs?i&at?n???m&atik?otoyot??oa&kihs?rihs??r&a&hs?kihsi?mot??ihs&aba?ir??otarib???n&a&hctuk?rorum?se?tokahs??uber??o&kayot?m&ire?ukay??naruf!ima&k?nim???orih?r&ih&ibo?suk??o&bah?h&i&b?hsimak??sa??pnan?yan??umen??t&asoyik?eko?ukoh???u&bassa?kotnihs?m&assaw?uo??pp&akiin?en&ioto?nuk??ip??rato?s&akat?t&eb&e?i&a?hs!a??robon??m&e?o&m?takan???no&h?tamah??o&mik?s?t??u&kir?ppihc?st???onihsnihs?ufuras??uaru??yru!koh??zimihs!ok?????nu,?g!iti,oyh!.&a&bmat?dnas?gusak?k&at?o&oyot?y??uzarakat??m&ayasas?irah??wa&g&ani?okak??k&i&hci?mak??oy???yi&hsa?monihsin???i&asak?hs&aka?i&at?nawak???j&awa!imanim??emih??k&a&goa?s&agama?ukuf??wihsin??i&hsog?m???mati?oia?rogimak??n&annas?esnonihs??o&gasa!kat??ka?n&ikat?o?ustat??rihsay?sihs?tomus?yas??u&bay?gnihs?????hih,konip,l&bs,ik,?mol,nagan!.&a&bukah?d&a&w?yim??e&ki?u??ii??k&a&s&ay?uki??zus??ihsoo?ousay??m&ay&akat?ii??i&hsukufosik?jii??ukihc??n&i!hsetat??uzii??r&ah?ugot??saim?t&agamay?oyim??w&a&g&a&kan?n??o??kustam?ziurak??onim!imanim??u&koo?s!omihs????ya&ko?rih???e&akas?nagamok?subo??i&gakat?h&asa?c&a!mo!nanihs???uonamay??sukagot??k&a&kas?mimanim?to??ia&atik?imanim??oa?uzihcom??m&akawak?ijuf?o!t???r&ato?ijoihs?omakat???n&ana?esnoawazon??o&hukas?n&a&gan?kan??i&hc?muza??ustat??romok?si&gan?k??tomustam??u&k&as?ohukihc??stamega????o&b,m,pac,?to&mamuk!.&a&gamay?rahihsin?sukama!imak??tamanim??enufim?i&hcukik?k&ihsam?u??nugo!imanim??romakat??o&ara?rihsustay?sa?t&amay?om&amuk?us??u!koyg???yohc??u&sagan?zo????yk!.&a&bmatoyk?k&ies?oemak?uzaw??mayi&h&cukuf?sagih??muk??nihsamay?rawatiju?t&away?ik???e&ba&nat!oyk??ya??di?ni??i&ju?kazamayo?manim??natnan?o&gnatoyk?kum?mak?rihsamayimanim?y&gakan?ka&koagan?s??oj???u&ruziam?z&ayim?ik??????wtc1--nx?ykot!.&a&d&i&hcam?mus??oyihc??k&atim?ihsustak??m&a&t!uko??yarumihsa&gih?sum???i&hs&agoa?ika?o!t??uzuok??ren???r&a&honih?wasago??iadok?umah??ssuf?t&ik?o??wa&g&anihs?ode??k&ara?ihcat???y&agates?ubihs???e&amok?donih?m&o?urukihsagih??soyik??i&enagok?gani?h&ca&da?tinuk??sabati??j&nubukok?oihcah??manigus??o&huzim?jihcah?n&akan?ih!sasum??urika??rugem?t&a&mayihsagih?nim??iat?ok??uhc?yknub??u&fohc?hcuf?kujnihs?????p&a&ehc,rc,?o&hs&eht,iiawak,yub,?lf,p&evol,ydnac,?rd&kcab,niar,???r&2xro6--nx?atselttil,e&d&nu,wohc,?h,ilf,pp&ep,irts,u,?t&aerg,tib,??g!r,?ks,o!on,?ufekaf,?s&9nvfe--nx?dom,p&ihc,oo,?remagten,sikhcnerf,u&bloohcs,ruci,srev,?xvp4--nx??t&a&cyssup,obgip,?e&rces,vlev,?hginyad,netnocresu,opsgolb,sidas,u&b,ollihc,??u&4rvp8--nx?fig!.&a&d&eki?ih??kimot?m&ayakat?ihsah??ne?raha&gi&kes?makak??sak??taga&may?tik??wa&g&ibi?ustakan??karihs!ihsagih????e&katim?uawak??i&gohakas?hc&apna?uonaw??k&ago?es?ot??m&anuzim?ijat??nak?urat??nanig?o&dog?jug?makonim?nim?roy?sihcih??u&fig?s&otom?t&amasak?oay??????hc,pup,stoknot,ynup,?wonsetihw,x&5ytlk--nx?irtam,?y&adynnus,dr,knarc,l&oh,rig,?moolg,ob,pp&ih,olf,?rgn&a,uh,?u6d27srjd--nx?vaeh,?z&72thr--nx?e&ej,lur,??井福?京東?分大?取鳥?口山?城&宮?茨??媛愛?山&富?岡?歌和??岡&福?静??島&児鹿?広?徳?福??崎&宮?長??川&奈神?石?香??庫兵?形山?手岩?木栃?本熊?根島?梨山?森青?潟新?玉埼?田秋?知&愛?高??縄沖?良奈?葉千?賀&佐?滋??道海北?都京?重三?野長?阜岐?阪大?馬群???k!.&art?gro?moc?per?ude?vog???l&eh?l??m!.uj,ac?j??nd?o&g?h&pih?s!.&esab,xilpoh,ysrab,???lnud?oc?t!.&lldtn,snd-won,???pa!.&0mroftalp,a&rusah,ted,?bew:erif,,e&erf-korgn,gatskrelc,kalfwons:.kniletavirp,,niln&igol,okoob,?tupmocegde,virdhsalfno,?ilressem,k&orgn,relc,?le&crev,napysae,?maerdepyt,n&aecolatigidno,ur:.a,,?poon,r&cne,emarf,?t&i&belet,lmaerts,?xenw,?yfilten,??ra&a?hs??u&ekam?llag?org!.esruocsid,cts?kouk?nayalo???vsr?xece4ibgm--nx??q&a!3a9y--nx??g?i!.&gro?lim?moc?ten?ude?vog???m?se??r&a!.&a&cisum?sanes??bog?gro?l&autum?im??moc!.topsgolb,?pooc?rut?t&e&b?n??ni??ude?vog??4d5a4prebgm--nx?b?c?eydoog?los?t&at?s!uen???ugaj??b!.&21g?a&b&a&coros?iuc??itiruc??cnogoas?dicerapa?gniram?i&naiog?ramatnas??n&erom?irdnol??op?p&acam?irolf?ma&j?s???rief?tsivaob??b!aj?ib?mi?sb??c&ba?e&r?t??js?sp?t!e???d&em?mb?n&f?i??rt??e&dnarganipmac?ficer?ht?llivnioj?rdnaotnas??f&dj?ed?gg?n&e?i???g&e&l!.&a&b,m,p,?bp,c&a,s,?e&c,p,s,?fd,gm,ip,jr,la,ma,nr,o&g,r,t,?p&a,s,?r&p,r,?s&e,m,r,?tm,??s??l&s?z??n&c?e?o??ol!b?f?v??pp?ro??hvp?i&du?kiw?nana?oretin?r&c?eurab??sp?te?xat??l&at&an?rof??el?im?sq??m&a?da?e&gatnoc?leb??f?ic?oc!.&duolclautriv.elacs.sresu,etiselpmis,topsgolb,???nce?o&ariebir?c&e?narboir?saso??d&o?ranreboas??e&g?t??i&b?dar?ecam?r??rp?t&a?erpoir???p&er?m!e?t??ooc?pa?se??qra?r&af?ga?o&davlas?j??tn?ut??s&a&ixac?mlap?nipmac??ed?u&anam?j?m???t&am?e&d?n?v??nc?o&f?n??ra?sf??u&caug9?de?ja?rg??v&da?ed?og!.&a&b?m?p??bp?c&a?s??e&c?p?s??fd?gm?ip?jr?la?ma?nr?o&g?r?t??p&a?s??r&p?r??s&e?m?r??tm???rs?t??xiv?z&hb?ls?o&c?f?????c!.&as?ca?de?if?o&c?g??ro???e&bew?ccos?dnik?e&b?n&igne?oip??rac??gni&arg?rheob??h&cor?sok?t&aew?orb???itnorf?k&col?o&p?rb???l&aed?ffeahcs??mal?nes?pinuj?t&a&eht?rebsnegömrev??law?nec?s&acnal?nom?ubkcolb??upmoc??v&o&csid?rdnal??resbo??wulksretlow?ywal?zifp??f!.&aterg?bew&-no,etis321,?drp?e&c&itsuj-reissiuh?narf-ne-setsitned-sneigrurihc,?lipuog,rianiretev??hny,i&cc?rgabmahc??m&o&c?n??t??n&eicamrahp?icedem??ossa?pohsdaerpsym,s&e&lbatpmoc-strepxe?riaton?tsitned-sneigrurihc?uova??o&-x&bf,obeerf,?x&bf,obeerf,???t&acova?o&or-ne,psgolb,?r&epxe-ertemoeg?op!orea????vuog?xobided,?avc7ylqbgm--nx?s??g!.&etiselpmis,gro?moc?t&en?opsgolb,?ude?vog???h!.&e&erf,man??mo&c?rf??topsgolb,zi??ur??i!.&a&61f4a3abgm--nx?rf4a3abgm--nx??ca?di?gro?hcs?oc?ten?vog?نار&يا?یا???a&h?per??ew?lf??k!.&c&a?s??e&n?p?r??gk?iggnoeyg?kub&gn&oeyg?uhc??noej??l&im?uoes??man&gn&oeyg?uhc??noej??n&as&lu?ub??o&e&hcni?jead??wgnag???o&c?g??ro?s&e?h?m??topsgolb,u&gead?j&ej?gnawg????cilf??l!.&gro?moc?ten?ude?vog???m!.&topsgolb,vog???n!.&gro?moc?ofni?ten?ude?vog?zib???o&htua?odtnorf?t&c&a?od??laer???p!.&alsi?ca?eman?forp?gro?moc?o&fni?rp??t&en?se??ude?vog?zib???s?t!.&21k?bew?cn!.vog??eman?gro?kst?l&e&b?t??im?op??moc!.topsgolb,?neg?ofni?pek?rd?sbb?ten?ude?v&a?og?t??zib??f?m??ubad?vd??s&8sqif--nx?9zqif--nx?a!.vog?birappnb?gev?lliv?mtsirhc?s??b!.&ew,gro?moc?ten?ude?vog??c?oj?s?u??c&i&hparg?p?t&sigolyrrek?ylana???od??d&a?d?ik?l?n&iwriaf?omaid??oogemoh?rac??e!.&b&ewim321,og??gro?mo&c!.topsgolb,?n??pohsdaerpsym,ude??civres!.enilnigol,?d&d2bgm--nx?oc??h&ctaw?guh??i&lppus?rtsudni?treporp!yrrek???jaiv?l&aw?cycrotom?etoh?gnis?pats??m&ag?oh?reh??nut?ohs?picer?r&it?ut&cip!.7331,?nev???s&i&rpretne?urc??ruoc??taicossa?vig??g!nidloh??h5c822qif--nx?i!.&ekacpuc,gro?moc?t&en?ni?opsgolb,?ude?vog??a09--nx?nnet?rap?targ??k&c&or!.&ecapsbew,snddym,ytic-amil,??us??hxda08--nx?row??l!.&c&a?s??ed,gro?o&c?fni??ten?ude?vog?zib??a&ed?tner??e&ssurb?toh!yrrek???lahsram?m?oot??m!.&bal,etisinim,gro?moc?ten?ude?vog??b?etsys!.tniopthgink,?ialc??n&a&f?gorf?ol??egassap?i&a&grab?mod??giro??o&it&acav?cudorp?ulos??puoc???o&dnoc?geuj?leuv?ppaz?t&ohp!.remarf,?ua???p!.&ces?gro?moc?olp?ten?ude?vog??i&hsralohcs?lihp?t??u??r!.&au,ca?gro?ni?oc?topsgolb,ude?vog?xo,yldnerb.pohs,?a&c?p?tiug??c?e&dliub!.etisduolc,?erac?gor?levart?mraf?n&niw?trap??wolf??ot&cartnoc?omatat??pj?uot??s!.&em?gro?hcs?moc?ten?ude?vog?zib??alg?e&n&isub!.oc,?tif??rp!xe!nacirema???xnal??iws??t&a&e&b?ytic??ob??ek&cit?ram??fig?h&cay?gilf??n&atnuocca?e&mt&rapa?sevni??ve!.&nibook,oc,????rap??u!.&a&c!.&21k?bil?cc???g!.&21k?bil?cc???i!.&21k?bil?cc???l!.&21k?bil?cc???m!.&21k!.&hcorap?rthc?tvp???bil?cc???p!.&21k?bil?cc???si?v!.&21k?bil?cc???w!.&21k?bil?cc????c&d!.&21k?bil?cc???n!.&21k?bil?cc???s!.&21k?bil?cc????d&e&f?lacsne.xhp,?i!.&21k?bil?cc???m!.&21k?bil?cc???n!.&bil?cc???s!.&bil?cc???u&olcrim,rd,??e&d!.&21k?bil,cc???las-4-&dnal,ffuts,?m!.&21k?bil?cc???n!.&21k?bil?cc????h&n!.&21k?bil?cc???o!.&21k?bil?cc????i&h!.&bil?cc???m!.&21k?bil?c&c?et??goc?n&eg?otae??robra-nna?sum?tsd?wanethsaw???nd?r!.&bil?cc???v!.&21k?bil?cc???w!.&21k?bil?cc????jn!.&21k?bil?cc???k&a!.&21k?bil?cc???o!.&21k?bil?cc????l&a!.&21k?bil?cc???f!.&21k?bil?cc???i!.&21k?bil?cc????mn!.&21k?bil?cc???n&afflog,i!.&21k?bil?cc???m!.&21k?bil?cc???sn?t!.&21k?bil?cc????o&c!.&21k?bil?cc???m!.&21k?bil?cc???ttniop,?p&ion,rettalp,?r&a!.&21k?bil?cc???o!.&21k?bil?cc???p!", + ".&21k?bil?cc????s&a!.&21k?bil?cc???dik?k!.&21k?bil?cc???m!.&21k?bil?cc???nd&deerf,uolc,??t&c!.&21k?bil?cc???m!.&21k?bil?cc???u!.&21k?bil?cc???v!.&21k?bil?cc????ug!.&21k?bil?cc???v&n!.&21k?bil?cc???w!.cc???x&ohparg,t!.&21k?bil?cc????y&b-si,k!.&21k?bil?cc???n!.&21k?bil?cc???w!.&21k?bil?cc????za!.&21k?bil?cc????ah!uab??bria?col?e!.ytrap.resu,?ineserf?lp?xe&l?n???vt?w!.&66duolc,gro?moc?s&ndnyd,tepym,?ten?ude?vog??a?e&iver?n!.elbaeciton,??odniw??y&alcrab?ot???t&0srzc--nx?a!.&amil4,ca!.hts??etiesbew321,gni&liamerutuf,tsoherutuf,?o&c!.topsgolb,?fni,?p&h21,ohsdaerpsym,?r&euefknuf.neiw,o??v&g?irp,?xi2,ytic-amil,zib,?c?e!s??hc?if?l!asite??mami?rcomed??b!.&gro?moc?ten?ude?vog??b?gl??c&atnoc?e&les?rid!txen????dimhcs?e!.&eman?gro?moc?ofni?ten?ude?vog?zib??b?em?grat?id?k&circ?ram??n!.&0rab,1rab,2rab,5inu,6vnyd,7&7ndc.r,erauqs,?a&l&-morf,moob,?minifed,remacytirucesym,tadsyawla,z,?b&boi,g,lyltsaf:.pam,,?c&i&nagro-gnitae,tats-oieboda,?paidemym,?d&e&calpb,ziamaka,?hiamaka,irgevissam.saap.&1-&gs,nol,rf,yn,?2-&nol,yn,??nab-eht-ni,uolc&meaeboda,nievas.c&di-etsedron,itsalej,?xednay:.e&garots,tisbew,?,??e&c&narusnihtlaehezitavirp,rofelacs.j,?gd&eiamaka,irbtib,?ht-no-eciffo,l&acs&liat.ateb,noom,?ibom-eruza,?m&ecnuob,itnuroieboda,ohtanyd,tcerider,?n&ilno-evreser,ozdop,?rehurht,s:abapus,,ti&s-repparcs,usegde,?zam&aym,kcar,??f&aeletis,crs.&cos,resu,?ehc-a-si,?g&ni&gats-&d&eziamaka,hiamaka,?e&gdeiamaka,tiusegde,?iamaka,nigiroiamaka,yekegde,?reesnes,sirkcilc,tsohnnylf,?olbevres,?iamaka,k&catsvano,eeg-a&-si,si,?u,?l&acolottad,iamwt,meteh,s&d-ni,s-77ndc,??m&ac&asac,ih,?urofniem,?n&a&f&agp,lhn,?i&bed,llerk,??dcduabkcalb,i:giroiamaka,,pv-ni,?o&c-morf,duppa,jodsnd,rp-ytinummoc,ttadym,?p&i&-&etsef,on,?emoh,fles,nwo,?j,mac-dnab-ta,o&-oidar-mah,h&bew,sdaerpsym,??pa&duolc,egde,?tfe&moh,vres,?usnd,?r&e&tsulcyduolc,vres-xnk,?vdslennahc:.u,,?s&a&ila&nyd,snd,?nymsd,?bbevres,dylimaf,e&gde-ndc,rauqs,suohsyub,t&isbeweruza,ys,??k&catstsaf,ekokohcs,?n&d&-won,aka,d,golb,npv,?oitcnufduolc,?ppacitatseruza:.&1,2:suts&ae,ew,?,3,aisatsae,eporuetsew,sulartnec,?,s&a-skcik,ecca&-citats,duolc,??t,?t&adies,ce&ffeym,jorprot:.segap,,lespohs,?e&nretnifodne,smem,?farcenimevres,i-&ekorb,s&eod,lles,teg,??n&essidym,orfduolc,?r0p3l3t,s&ixetnod,oh&-spv:.citsalej.&cir,lta,sjn,?,gnik,???u&h,nyd,r:eakust.citsalej,,?ved-naissalta.dorp.ndc,x&inuemoh,spym,tsale.&1ots-slj,2ots-slj,3ots-slj,?unilemoh,?y&awetag-llawerif,ekegde,ffijduolc:.&ed-1arf,su-1tsew,?,ltsaf.&dorp.&a,labolg,?lss.&a,b,labolg,?pam,slteerf,?n&-morf,ofipi,?srab,?z&a-morf,tirfym,???p?tcip?v??f&ig?osorcim??g!.&bog?dni?ed,g&olb,ro??lim?moc?ot,ten?ude???h!.&dem?gro?l&er?op??m&oc?rif??o&fni?rp?s&rep?sa???po&hs?oc??t&en?luda?ra??ude?vuog???i!.&a&2n-loritds--nx?7e-etsoaellav--nx?8&c-aneseclrof--nx?i-lrofanesec--nx??at?b?c!cul??dv?i&blo&-oipmet?oipmet??cserb?drabmol?g&gof?urep??l&gup?i&cis?me&-oigger?oigger???uig&-&aizenev&-iluirf?iluirf??ev&-iluirf?iluirf??v&-iluirf?iluirf???aizenev&-iluirf?iluirf??ev&-iluirf?iluirf??v&-iluirf?iluirf????n&a&brev?cul?pmac?tac??idras?obrac&-saiselgi?saiselgi??resi??otsip?r&b&alac!-oigger?oigger??mu??dna&-&attelrab-inart?inart-attelrab??attelrabinart?inartattelrab?ssela??epmi?ugil??tnelav&-obiv?obiv??vap?z&e&nev?ps&-al?al???irog???l&iuqa!l??leib??m&or?rap??n!acsot?e&dom?is?sec&-&ilrof?ìlrof??ilrof?ìlrof???g&amor&-ailime?ailime??edras?olob??i&ssem?tal??ne!var??o&cna?merc?rev?vas???oneg?p?r!a&csep?rr&ac&-assam?assam??ef??von??etam?tsailgo!-lled?lled???s!ip?sam&-ararrac?ararrac??u&caris?gar???t!a&cilisab?recam??resac?soa!-&d&-&ellav?lav??ellav?lav??ellav??d&-&ellav?lav??ellav?lav??ellav??te&lrab&-&airdna-inart?inart-airdna??airdnainart?inartairdna??ssinatlac???udap?v!o&dap?neg?tnam???zn&airb&-a&lled-e-aznom?znom??a&lledeaznom?znom??eaznom??e&c&aip?iv??soc?top??om???b&-&23,46,61,?3c-lorit-ds-onitnert--nx?be-etsoa&-ellav--nx?dellav--nx??c!f-anesec-lrof--nx?m-lrof-anesec--nx??he-etsoa-d-ellav--nx?m!u??o2-loritds-nezob--nx?sn-loritds&-nasl&ab--nx?ub--nx??nitnert--nx??v!6-lorit-dsnitnert--nx?7-loritds&-nitnert--nx?onitnert--nx???z&r-lorit-ds&-nitnert--nx?onitnert--nx??s-loritds-onitnert--nx???c&f?is?l?m?p?r?v??d&p?u!olcnys,??e&c!cel?inev?nerolf??f?g!apemoh321,ida&-&a&-onitnert?onitnert??otla!-onitnert?onitnert???a&-onitnert?onitnert??otla!-on&azlob?itnert??onitnert????hcram?l?m!or??n&idu?o&n&edrop?isorf??torc???p?r?s&erav?ilom??t!nomeip?s&eirt?oa!-&d-e&ellav?éllav??e&ellav?éllav???de&ellav?éllav??e&ellav?éllav?????v?znerif??g&a?b?f?il?o?p?r?up?vf??hc?i&b?c?dol?f?l!lecrev?opan?rof&-anesec?anesec???m?n&a&part?rt&-attelrab-airdna?attelrabairdna???imir?ret??p?r!a&b?ilgac?ssas???s!idnirb??t&ei&hc?r??sa??v??l&a!c??b?c?o&m?rit&-&d&eus&-&nitnert?onitnert??nitnert?onitnert??us&-&nitnert?onitnert??nitnert?onitnert??üs&-&nitnert?onitnert??nitnert?onitnert???s&-onitnert?onitnert???d&eus!-&n&asl&ab?ub??ezob?itnert??onitnert??nitnert?onitnert??us&-&n&asl&ab?ub??ezob?itnert??onitnert??nitnert?onitnert??üs!-&n&asl&ab?ub??ezob?itnert??onitnert??nitnert?onitnert???s&-onitnert?onitnert?????m&ac?f?i!t.nepo.citsalej.duolc,?ol?r??n&a!lim?sl&ab?ub???b?c?e!en.cj,v?zob??irut?m!p??p?r?t??o&a!v??b!retiv??c!cel??enuc?g!ivor??i&dem&-onadipmac?onadipmac??pmet&-aiblo?aiblo??rdnos?zal??l?m!a&greb?ret??oc?re&f?lap???n!a&dipmac&-oidem?oidem??lim?tsiro?zlob??ecip&-ilocsa?ilocsa??i&bru&-orasep?orasep??lleva?rot?tnert??r&elas?ovil??ulleb??p?r!a&sep&-onibru?onibru??znatac??oun??s!ivert?sabopmac??t!arp?e&nev?ssorg??n&arat?e&girga?rt?veneb????zz&era?urba???p&a?ohsdaerpsym,s?t??qa?r&a!m?s??b!a??c?f?g?k?me?o?p?s?t?v??s&a&b?iselgi&-ainobrac?ainobrac???b?c?elpan?i?m?o&t?x&bi,obdaili,??s?t?v??t&a?b?c?l?m?nomdeip?o!psgolb,?p?v??u&de?l?n?p??v&a?og?p?s?t?v??y&drabmol?ellav&-atsoa?atsoa??licis?nacsut??z&al?b?c?p??ìlrof&-anesec?anesec???derc?er?f?m?utni??je3a3abgm--nx?kh?l!.&topsgolb,vog??uda??m!.&gro?moc!.topsgolb,?ten?ude???n&a&morockivdnas?ruatser?tnuocca??e&g?m&eganam!.retuor,?piuqe??r??i!.ue?m?opdlog??opud?uocsid??o&b?cs!.&ude,vog:.ecivres,,??d?g?h?j?oferab?p&edemoh?s???p!.&bewanigap321,emon?gro?lbup?moc?t&en?ni?opsgolb,?ude?vog???r&a!m&law?s???epxe?op&er?pus!.ysrab,?s???s!.&a&daxiabme?rarik,?e&motoas?picnirp?rots??gro?lim?moc?o&c?dalusnoc?hon,?ten?ude??a&cmoc?f??e&b?r?uq??i!rolf?tned??o&h!.&duolc&p,rim,?e&lej,tiseerf,?flah,l&enapysae,rupmet,?s&pvtsaf,seccaduolc,?tsafym,vedumpw,??p!sua???urt??t!.&eman?gro?ibom?levart?m&oc?uesum??o&c?fni?r&ea?p???pooc?sboj?t&en?ni??ude?vog?zib??ayh?n?o!bba?irram???uognah?xen?y!.gro,?ztej??u&2&5te9--nx?yssp--nx??a!.&a&s?w??civ?d&i?lq??fnoc?gro?moc!.&pohsdaerpsym,stelduolc.lem,topsgolb,??nsa?ofni?sat?t&ca?en?n??ude!.&a&s?w??ci&lohtac?v??dlq?sat?t&ca?n??wsn!.sloohcs????vog!.&a&s?w??civ?dlq?sat???wsn?zo??ti??c!.&fni?gro?moc?ten?ude?vog??i??d&e!.tir.segap-tig,?iab??e!.&dcym,enozgniebllew,noitatsksid,odagod.citsalej,s&nd&ps,uolc,?ppatikria,?ysrab,??g!.&bew?gro?m&aug?oc??ofni?ten?ude?vog???h!.&0002?a&citore?idem?kitore??edszot?gro?ilus?letoh?m&alker?lif?t?urof??naltagni?o&c?ediv?fni?levynok?nisac??pohs?rarga?s&a&kal?zatu??emag?wen??t&lob?opsgolb,rops??virp?xe&s?zs??ytic?zsagoj??os?sut??l!.&etisbew321,topsgolb,??m!.&ca?gro?moc?oc?ro?ten?vog???n!.&duolcesirpretne,eni&esrem,m,?tenkcahs,?em!.ysrab,??o&ggnaw?y!c???r!.&3kl,a&i&kymlak,rikhsab,vodrom,?yegyda,?bps,ca,duolcrim,e&niram,rpcm,?g&bc,nitsohurger.citsalej,ro,?ianatsuk,k&ihclan,s&m,rogitayp,??li&amdlc.bh,m,?moc,natsegad,onijym,pp,ri&b,d&cm:.spv,,orue,?midalv,?s&ar,itym,?t&en,ias321,ni,opsgolb,set,?u&4an,de,?vo&g,n,?ynzorg,zakvakidalv,?myc?p?ug??s!.&a&d&golov,nagarak,?gulak,i&groeg,kymlak,lerak,nemra,rikhsab,ssakahk,vodrom,zahkba,?lut,rahkub,vut,yegyda,znep,?bps,da&baghsa,rgonilest,?gunel,i&anatsuk,hcos,ovan,ttailgot,?k&alhsygnam,ihclan,s&legnahkra,m,n&a&mrum,yrb,?i&buytka,nbo,??tiort,vorkop,??l&ocarak,ybmaj,?na&gruk,jiabreza,ts&egad,hkazak-&htron,tsae,???ovonavi,r&adonsark,imidalv,?t&enxe,nek&hsat,mihc,??vo&hsalab,n,?ynzorg,z&akvakidalv,emret,??t&amok?i&juf?masih????v!.&em,g&olb,ro??moc?nc,ten?ude?ved,??ykuyr??v&b?c!.&emon?gro?moc?t&ni?opsgolb,?ude???ed!.&2r,ated,e&docotua,erf-korgn,nilnigol,?gnigats-oned,hcetaidem,korgn,lecrev,o&ned,tpyrctfihs,?ppa-rettalp,s&egap,rekrow,?vr&esi,uc,?weiverpbuhtig,ylf,??ih?l!.&di?fnoc?gro?lim?moc?nsa?ten?ude?vog???m!.&eman?gro?lim?m&oc?uesum??o&fni?r&ea?p???pooc?t&en?ni??ude?vog?zib???o&g?m??rt?s!.&bog?der?gro?moc?ude???t!.&arukas,bew-eht-no,morf,naht-&esrow,retteb,?sndnyd,?d?gh?i?won??uqhv--nx??w&a!.moc?hs?l??b!.&gro?oc???c!.&gro?moc?ten?ude??cp??e&iver!.oby,?n?s??g?k!.&bme?dni?gro?moc?ten?ude?vog???m!.&ca?gro?m&oc?uesum??oc?pooc?t&en?ni??ude?vog?zib??b??o&csom?h!s??n?w??p!.&344x,de?en?o&c?g??ro?snduolc,ualeb???r!.&ca?gro?lim?oc?pooc?ten?vog??n??t!.&a46oa0fz--nx?b&82wrzc--nx?ulc??emag?gro?l&im?ru,?moc!.reliamym,?t&en?opsgolb,?ude?v&di?og?ta0cu--nx??zibe?業商?織組?路網???z!.&ca?gro?lim?oc?vog????x&a!.&cm,eb,gg,s&e,u,?tac,ue,yx,?t??c!.&hta,ofni,vog???e&d&ef?nay??ma!nab??rof?s??ilften?jt?m!.&bog?gro?moc?t&en?opsgolb,?ude??g?ma2ibgy--nx??o&b!x??f?rex??rbgn--nx?s!.vog??x&am&jt?kt??x???y&4punu--nx?7rr03--nx?a&d!i&loh?rfkcalb??ot!.emyfilauqerp,??g?lp?p!ila??rot?ssin?wdaorb??b!.&duolcym,fo?hcetaidem,lim?moc!.topsgolb,?vog??ab?gur??c!.&ca?dtl?gro?lim?m&oc!.&ecrofelacs.j,topsgolb,??t??orp?s&egolke?serp??ten?vog?zib??amrahp?nega??d&dadog?uts??e&kcoh?ltneb?n&dys?om?rotta??snikcm??g!.&eb,gro?moc?oc?ten?ude?vog??olonhcet!.oc,?rene??hpargotohp?id?k!.&gro?moc?ten?ude??s??l!.&clp?d&em?i??gro?hcs?moc?ten?ude?vog??f?imaf!nacirema??l&a?il??ppus??m!.&eman?gro?lim?moc?t&en?opsgolb,?ude?vog?zib??edaca!.laiciffo,?ra??n&a&ffit?pmoc??os??o&j?s??p!.&gro?lim?moc?pooc?ten?ude?vog???r&e&corg?grus?llag?viled??lewej?otcerid?tnuoc?uxul??s!.&gro?lim?moc?ten?ude?vog??pil??t&efas?i&c?ledif?n&ifx?ummoc!.&bdnevar,gon,murofym,???r&ahc?uces??srevinu??laer?r&ap!.oby,?eporp??uaeb??u!.&bug?gro?lim?moc!.topsgolb,?ten?ude??b!tseb???van!dlo??xes??z&a!.&eman?gro?lim?moc?o&fni?rp??pp?t&en?ni??ude?vog?zib???b!.&az,gro?jsg,moc?ten?ude?vog???c!.&4e,inum.duolc.&rsu,tlf,?m&laer,urtnecatem.motsuc,?oc,topsgolb,??d!.&cos?gro?lop?m&oc?t??ossa?t&en?ra??ude?vog???ib!.&duolcsd,e&ht-rof,mos-rof,rom-ro", + "f,?izoj,liartevitca,nafamm,p&i&-on,fles,?ohbew,tfym,?retteb-rof,snd&nyd,uolc,?xro,?g??k!.&duolcj,gro?lim?moc?t&en?ropeletzak.saapu,?ude?vog???m!.&ca?gro?lim?oc?ten?ude?v&da?og????n!.&asq-irom--nx?ca?gro?htlaeh?i&r&c?o&am?ām???wi!k???keeg?l&im?oohcs??neg?oc!.topsgolb,?t&en?nemailrap?vog???a!niflla???rawhcs?s!.&ca?gro?oc???t!.&c&a?s??e&m?n??ibom?l&etoh?im??o&c?fni?g??ro?vt???u!.&gro?moc?oc?ten??rwon??yx!.&e&nozlacol,tisgolb,?gnitfarc,otpaz,??zub??λε?υε?авксом?брс!.&гро?до?ка?р&бо?п!у?????г&б?ро??дкм?зақ?итед?килотак?леб?мок?н&йално?ом??рку?сур!.&арамас,бпс,гро,зиб,ичос,ксм,м&ок,ырк,?рим,я,??тйас?фр?юе?յահ?לארשי!.&בושי?הימדקא?ל&הצ?שממ????םוק?اي&روس?سيلم?ناتيروم??بر&ع?غملا??ة&كبش?ي&دوعسلا?روس??یدوعسلا??ت&ا&راما?لاصتا??را&ب?ڀ?ھب???ر&ئازجلا?ازاب?صم?طق??سنوت?عقوم?قارع?ك&تيب?يلوثاك??موك?ن&ا&تس&كاپ?کاپ??دوس?ر&يا?یا??مع?يلعلا??درالا?ميلا?ي&رحبلا?طسلف???ه&ارمه?يدوعسلا??وكمارا?يبظوبا?ۃیدوعسلا?टेन?त&राभ?ोराभ??नठगंस?मॉक?्मतराभ?ত&রাভ?ৰাভ??ালংাব?ਤਰਾਭ?તરાભ?ତରାଭ?ாயித்நஇ?ைக்ஙலஇ?்ரூப்பக்ஙிச?్తరాభ?ತರಾಭ?ംതരാഭ?ාකංල?มอค?ยทไ!.&จิกรุธ?ต็นเ?ร&ก์คงอ?าหท??ลาบฐัร?าษกึศ???ວາລ?ეგ?なんみ?アトス?トンイポ?ドウラク?ムコ?ル&グーグ?ーセ??ン&ゾマア?ョシッァフ??业企?东广?乐娱?你爱我?信中?务政?动移?博微?卦八?厅餐?司公?品食?善慈?团集?国中?國中?址网?坡加新?城商?尚时?山佛?店&商?网?酒大里嘉??府政?康健?息信?戏游?拉里格香?拿大?教主天?机手?构机!织组??标商?歌谷?浦利飞?港香!.&人個?司公?府政?絡網?織組?育教???湾台?灣&台?臺??物购?界世?益公?看点?科盈訊電?站网?籍書?线在?络网?网文中?聘招?販通?逊马亚?通联?里嘉?锡马淡?門澳?门澳?闻新?電家?국한?넷닷?성삼?컴닷??"); /** * If a hostname is not a key in the EXCLUDE map, and if removing its leftmost component results @@ -56,7 +56,7 @@ private PublicSuffixPatterns() {} */ public static final ImmutableMap UNDER = TrieParser.parseTrie( - "ac.vedwa,d&b?i.ym.ssr,uolc.&etiso&isnes,tnegam,?iaznab,rehcnar-no,scitats,??e&b.lrusnart,d.&ecapsrebu,yksurf,?noz.notirt,t&atse.etupmoc,is.&areduolc,hsmroftalp,tst,???g&oog.tnetnocresu,p??h&c.tenerif:.cvs,,k?trae.sppad:.zzb,,?k&c?f?nil.bewd,rowten.secla,u.hcs??ln.lrusnart,m&j?m?oc.&duolcmeaeboda.ved,edo&c.redliub:->s,ved,?,nil.recnalabedon,?ico-remotsuc:.&ico,pco,sco,?,lrihwyap,mme0,osseccandcved,s&ecapsnaecolatigid,t&cejbo&edonil,rtluv,?nemelepiuq,?wanozama.&1-etupmoc,ble,etupmoc,??t&neyoj.snc,opsppa.r,???n&c.moc.swanozama.&ble,etupmoc,?ur.&dliub,e&doc,sabatad,?noitargim,??o&c.pato,i.&duolciaznab.sdraykcab,elacsnoom,nroca-no,oir-no,reniatnoceruza,s&3k-no,olots,?xcq.sys,y5s,??p&j.&a&mahokoy?yogan??ebok?i&adnes?kasawak??oroppas?uhsuykatik??n?pa.&knalfhtron,repoleved,tegeb,??r&b.mon?e??s&edoc.owo,noitulos.rehid,w.rosivda,?t&a.&ofnistro.&nednuk,xe,?smcerutuf:.&ni,xe,?,?en.&cimonotpyrc,hvo.&gnitsoh,saapbew,???u&e.lrusnart,r.onijym.&gni&dnal,tsoh,?murtceps,spv,??ved.&e&gats>s,lcl,?rahbew,?gts,lcl,treclacol.resu,yawetag,?z&c.murtnecatem.duolc,yx.tibelet,??"); + "ac.vedwa,d&b?i.ym.ssr,uolc.&etiso&isnes,tnegam,?iaznab,rehcnar-no,scitats,??e&b.lrusnart,d.&ecapsrebu,yksurf,?noz.notirt,t&atse.etupmoc,is.&areduolc,hsmroftalp,tst,???g&oog.tnetnocresu,p??h&c.tenerif:.cvs,,k?trae.sppad:.zzb,,?k&c?f?nil.bewd,rowten.secla,u.hcs??ln.lrusnart,m&f.resu,j?m?oc.&duolcmeaeboda.ved,edo&c.redliub:->s,ved,?,nil.recnalabedon,?ico-remotsuc:.&ico,pco,sco,?,lrihwyap,mme0,osseccandcved,s&ecapsnaecolatigid,t&cejbo&edonil,rtluv,?nemelepiuq,?wanozama.&1-etupmoc,ble,etupmoc,??t&neyoj.snc,opsppa.r,???n&c.moc.swanozama.&ble,etupmoc,?ur.&dliub,e&doc,sabatad,?noitargim,??o&c.pato,i.&duolciaznab.sdraykcab,elacsnoom,nroca-no,oir-no,reniatnoceruza,s&3k-no,olots,?xcq.sys,y5s,??p&j.&a&mahokoy?yogan??ebok?i&adnes?kasawak??oroppas?uhsuykatik??n?pa.&knalfhtron,repoleved,tegeb,??r&b.mon?e??s&edoc.owo,noitulos.rehid,w.rosivda,?t&a.&ofnistro.&nednuk,xe,?smcerutuf:.&ni,xe,?,?en.&cimonotpyrc,hvo.&gnitsoh,saapbew,???u&e.lrusnart,r.onijym.&gni&dnal,tsoh,?murtceps,spv,??ved.&e&gats>s,lcl,?rahbew,?gts,lcl,treclacol.resu,yawetag,?z&c.murtnecatem.duolc,yx.tibelet,??"); /** * The elements in this map would pass the UNDER test, but are known not to be public suffixes and diff --git a/pom.xml b/pom.xml index 79f27b2bbd7a..eb77b8d2ccbd 100644 --- a/pom.xml +++ b/pom.xml @@ -15,13 +15,12 @@ %regex[.*.class] 1.1.3 - 3.26.0 - 1.22 3.4.1 9+181-r4173-1 3.2.1 + 1980-02-01T00:00:00Z UTF-8 @@ -128,6 +127,7 @@ 1.8 1.8 UTF-8 + true @@ -519,7 +508,7 @@ be passed as part of the same as -Xplugin:ErrorProne, and I gave up trying to figure out how to do that for test compilation only. --> - -Xplugin:ErrorProne -Xep:NullArgumentForNonNullParameter:OFF + -Xplugin:ErrorProne -Xep:NullArgumentForNonNullParameter:OFF -Xep:Java8ApiChecker:ERROR