From 91c249dd28e52f1cbc735f36a23ccac47d0c81f3 Mon Sep 17 00:00:00 2001 From: cpovirk Date: Wed, 6 Feb 2019 08:40:26 -0800 Subject: [PATCH] Remove @Beta from APIs: collect - most Collectors (aside from BloomFilter and ImmutableRange*, as those whole classes are @Beta (though I did remove the redundant @Beta annotation from the Collector-returning methods for clarity)) - Maps: asConverter, immutableEnumMap - MultimapBuilder - Streams: stream(Iterable), concat io - ByteStreams: copy, toByteArray - CharStreams: copy, toString - Files: as(Char|Byte)(Source|Sink) util.concurrent - Futures: addCallback, getDone, getUnchecked, immediateCancelledFuture, immediateFailedFuture, immediateFuture - ListeningScheduledExecutorService - Uninterruptibles other - HtmlEscapers - Splitter.splitToList - Ticker Fixes https://github.com/google/guava/pull/3287 Fixes https://github.com/google/guava/issues/3251 (aside from ImmutableRange*, but those whole classes are @Beta, anyway) Addresses the main concerns of https://github.com/google/guava/issues/3285 but doesn't cover the broader request Fixes https://github.com/google/guava/issues/3340 Partially addresses https://github.com/google/guava/issues/3239 RELNOTES=Removed `@Beta` from a number of frequently used APIs. ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=232681253 --- .../src/com/google/common/base/Splitter.java | 1 - .../src/com/google/common/base/Ticker.java | 2 -- .../src/com/google/common/collect/Maps.java | 2 -- .../common/collect/MultimapBuilder.java | 2 -- .../com/google/common/html/HtmlEscapers.java | 2 -- .../src/com/google/common/io/ByteStreams.java | 15 +++++++++- .../src/com/google/common/io/CharStreams.java | 7 ++++- .../guava/src/com/google/common/io/Files.java | 30 ++++++++++++++++++- .../common/util/concurrent/Futures.java | 19 +++++++++++- .../ListeningScheduledExecutorService.java | 2 -- .../util/concurrent/Uninterruptibles.java | 2 -- .../src/com/google/common/base/Splitter.java | 1 - guava/src/com/google/common/base/Ticker.java | 2 -- .../google/common/collect/Comparators.java | 4 ++- .../google/common/collect/ImmutableBiMap.java | 1 - .../google/common/collect/ImmutableList.java | 1 - .../common/collect/ImmutableListMultimap.java | 2 -- .../google/common/collect/ImmutableMap.java | 2 -- .../common/collect/ImmutableMultiset.java | 2 -- .../common/collect/ImmutableRangeMap.java | 1 - .../common/collect/ImmutableRangeSet.java | 1 - .../google/common/collect/ImmutableSet.java | 1 - .../common/collect/ImmutableSetMultimap.java | 2 -- .../common/collect/ImmutableSortedMap.java | 2 -- .../collect/ImmutableSortedMultiset.java | 2 -- .../common/collect/ImmutableSortedSet.java | 2 -- .../google/common/collect/ImmutableTable.java | 2 -- guava/src/com/google/common/collect/Maps.java | 4 --- .../google/common/collect/MoreCollectors.java | 2 -- .../common/collect/MultimapBuilder.java | 2 -- guava/src/com/google/common/collect/Sets.java | 1 - .../com/google/common/collect/Streams.java | 18 ++++++++++- .../com/google/common/html/HtmlEscapers.java | 2 -- .../src/com/google/common/io/ByteStreams.java | 15 +++++++++- .../src/com/google/common/io/CharStreams.java | 7 ++++- guava/src/com/google/common/io/Files.java | 30 ++++++++++++++++++- .../common/util/concurrent/Futures.java | 19 +++++++++++- .../ListeningScheduledExecutorService.java | 2 -- .../util/concurrent/Uninterruptibles.java | 2 -- 39 files changed, 154 insertions(+), 62 deletions(-) diff --git a/android/guava/src/com/google/common/base/Splitter.java b/android/guava/src/com/google/common/base/Splitter.java index d82b1de82ba0..1da372e371ff 100644 --- a/android/guava/src/com/google/common/base/Splitter.java +++ b/android/guava/src/com/google/common/base/Splitter.java @@ -408,7 +408,6 @@ private Iterator splittingIterator(CharSequence sequence) { * @return an immutable list of the segments split from the parameter * @since 15.0 */ - @Beta public List splitToList(CharSequence sequence) { checkNotNull(sequence); diff --git a/android/guava/src/com/google/common/base/Ticker.java b/android/guava/src/com/google/common/base/Ticker.java index 7b97b1533f72..a53883b46ed7 100644 --- a/android/guava/src/com/google/common/base/Ticker.java +++ b/android/guava/src/com/google/common/base/Ticker.java @@ -14,7 +14,6 @@ package com.google.common.base; -import com.google.common.annotations.Beta; import com.google.common.annotations.GwtCompatible; /** @@ -28,7 +27,6 @@ * @since 10.0 (mostly * source-compatible since 9.0) */ -@Beta @GwtCompatible public abstract class Ticker { /** Constructor for use by subclasses. */ diff --git a/android/guava/src/com/google/common/collect/Maps.java b/android/guava/src/com/google/common/collect/Maps.java index 8af18a6eb6cd..15fee5266163 100644 --- a/android/guava/src/com/google/common/collect/Maps.java +++ b/android/guava/src/com/google/common/collect/Maps.java @@ -139,7 +139,6 @@ V transform(Entry entry) { * @since 14.0 */ @GwtCompatible(serializable = true) - @Beta public static , V> ImmutableMap immutableEnumMap( Map map) { if (map instanceof ImmutableEnumMap) { @@ -1363,7 +1362,6 @@ public int hashCode() { * * @since 16.0 */ - @Beta public static Converter asConverter(final BiMap bimap) { return new BiMapConverter<>(bimap); } diff --git a/android/guava/src/com/google/common/collect/MultimapBuilder.java b/android/guava/src/com/google/common/collect/MultimapBuilder.java index 482385e50a25..161c29d170ee 100644 --- a/android/guava/src/com/google/common/collect/MultimapBuilder.java +++ b/android/guava/src/com/google/common/collect/MultimapBuilder.java @@ -19,7 +19,6 @@ import static com.google.common.base.Preconditions.checkNotNull; import static com.google.common.collect.CollectPreconditions.checkNonnegative; -import com.google.common.annotations.Beta; import com.google.common.annotations.GwtCompatible; import com.google.common.base.Supplier; import java.io.Serializable; @@ -61,7 +60,6 @@ * @param An upper bound on the value type of the generated multimap. * @since 16.0 */ -@Beta @GwtCompatible public abstract class MultimapBuilder { /* diff --git a/android/guava/src/com/google/common/html/HtmlEscapers.java b/android/guava/src/com/google/common/html/HtmlEscapers.java index 29f5e1339c2b..29eebe8aaa46 100755 --- a/android/guava/src/com/google/common/html/HtmlEscapers.java +++ b/android/guava/src/com/google/common/html/HtmlEscapers.java @@ -14,7 +14,6 @@ package com.google.common.html; -import com.google.common.annotations.Beta; import com.google.common.annotations.GwtCompatible; import com.google.common.escape.Escaper; import com.google.common.escape.Escapers; @@ -35,7 +34,6 @@ * @author David Beaumont * @since 15.0 */ -@Beta @GwtCompatible public final class HtmlEscapers { /** diff --git a/android/guava/src/com/google/common/io/ByteStreams.java b/android/guava/src/com/google/common/io/ByteStreams.java index 510947ef0e17..e6601be5c35b 100644 --- a/android/guava/src/com/google/common/io/ByteStreams.java +++ b/android/guava/src/com/google/common/io/ByteStreams.java @@ -48,7 +48,6 @@ * @author Colin Decker * @since 1.0 */ -@Beta @GwtIncompatible public final class ByteStreams { @@ -266,6 +265,7 @@ 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; @@ -280,6 +280,7 @@ 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)); } @@ -291,6 +292,7 @@ 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)); @@ -303,6 +305,7 @@ public static ByteArrayDataInput newDataInput(byte[] bytes, int start) { * * @since 17.0 */ + @Beta public static ByteArrayDataInput newDataInput(ByteArrayInputStream byteArrayInputStream) { return new ByteArrayDataInputStream(checkNotNull(byteArrayInputStream)); } @@ -453,6 +456,7 @@ public String readUTF() { } /** Returns a new {@link ByteArrayDataOutput} instance with a default size. */ + @Beta public static ByteArrayDataOutput newDataOutput() { return newDataOutput(new ByteArrayOutputStream()); } @@ -463,6 +467,7 @@ 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. @@ -484,6 +489,7 @@ public static ByteArrayDataOutput newDataOutput(int size) { * * @since 17.0 */ + @Beta public static ByteArrayDataOutput newDataOutput(ByteArrayOutputStream byteArrayOutputSteam) { return new ByteArrayDataOutputStream(checkNotNull(byteArrayOutputSteam)); } @@ -659,6 +665,7 @@ public String toString() { * * @since 14.0 (since 1.0 as com.google.common.io.NullOutputStream) */ + @Beta public static OutputStream nullOutputStream() { return NULL_OUTPUT_STREAM; } @@ -671,6 +678,7 @@ 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); } @@ -757,6 +765,7 @@ 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); } @@ -773,6 +782,7 @@ 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) { @@ -790,6 +800,7 @@ 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) { @@ -848,6 +859,7 @@ 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 public static T readBytes(InputStream input, ByteProcessor processor) throws IOException { checkNotNull(input); @@ -883,6 +895,7 @@ public static T readBytes(InputStream input, ByteProcessor processor) thr * @return the number of bytes read * @throws IOException if an I/O error occurs */ + @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/CharStreams.java b/android/guava/src/com/google/common/io/CharStreams.java index bed3388a2cb7..bc4dd510245c 100644 --- a/android/guava/src/com/google/common/io/CharStreams.java +++ b/android/guava/src/com/google/common/io/CharStreams.java @@ -43,7 +43,6 @@ * @author Colin Decker * @since 1.0 */ -@Beta @GwtIncompatible public final class CharStreams { @@ -193,6 +192,7 @@ private static StringBuilder toStringBuilder(Readable r) throws IOException { * @return a mutable {@link List} containing all the lines * @throws IOException if an I/O error occurs */ + @Beta public static List readLines(Readable r) throws IOException { List result = new ArrayList<>(); LineReader lineReader = new LineReader(r); @@ -212,6 +212,7 @@ public static List readLines(Readable r) throws IOException { * @throws IOException if an I/O error occurs * @since 14.0 */ + @Beta @CanIgnoreReturnValue // some processors won't return a useful result public static T readLines(Readable readable, LineProcessor processor) throws IOException { checkNotNull(readable); @@ -233,6 +234,7 @@ public static T readLines(Readable readable, LineProcessor processor) thr * * @since 20.0 */ + @Beta @CanIgnoreReturnValue public static long exhaust(Readable readable) throws IOException { long total = 0; @@ -254,6 +256,7 @@ public static long exhaust(Readable readable) throws IOException { * @throws EOFException if this stream reaches the end before skipping all the characters * @throws IOException if an I/O error occurs */ + @Beta public static void skipFully(Reader reader, long n) throws IOException { checkNotNull(reader); while (n > 0) { @@ -270,6 +273,7 @@ public static void skipFully(Reader reader, long n) throws IOException { * * @since 15.0 */ + @Beta public static Writer nullWriter() { return NullWriter.INSTANCE; } @@ -338,6 +342,7 @@ public String toString() { * @param target the object to which output will be sent * @return a new Writer object, unless target is a Writer, in which case the target is returned */ + @Beta public static Writer asWriter(Appendable target) { if (target instanceof Writer) { return (Writer) target; diff --git a/android/guava/src/com/google/common/io/Files.java b/android/guava/src/com/google/common/io/Files.java index 74858d735f1d..34e03f65d6b2 100644 --- a/android/guava/src/com/google/common/io/Files.java +++ b/android/guava/src/com/google/common/io/Files.java @@ -63,7 +63,6 @@ * @author Colin Decker * @since 1.0 */ -@Beta @GwtIncompatible public final class Files { @@ -83,6 +82,7 @@ private Files() {} * helpful predefined constants * @return the buffered reader */ + @Beta public static BufferedReader newReader(File file, Charset charset) throws FileNotFoundException { checkNotNull(file); checkNotNull(charset); @@ -101,6 +101,7 @@ public static BufferedReader newReader(File file, Charset charset) throws FileNo * helpful predefined constants * @return the buffered writer */ + @Beta public static BufferedWriter newWriter(File file, Charset charset) throws FileNotFoundException { checkNotNull(file); checkNotNull(charset); @@ -231,6 +232,7 @@ public static CharSink asCharSink(File file, Charset charset, FileWriteMode... m * (2^31 - 1) * @throws IOException if an I/O error occurs */ + @Beta public static byte[] toByteArray(File file) throws IOException { return asByteSource(file).read(); } @@ -246,6 +248,7 @@ public static byte[] toByteArray(File file) throws IOException { * @deprecated Prefer {@code asCharSource(file, charset).read()}. This method is scheduled to be * removed in January 2019. */ + @Beta @Deprecated public static String toString(File file, Charset charset) throws IOException { return asCharSource(file, charset).read(); @@ -261,6 +264,7 @@ public static String toString(File file, Charset charset) throws IOException { * @param to the destination file * @throws IOException if an I/O error occurs */ + @Beta public static void write(byte[] from, File to) throws IOException { asByteSink(to).write(from); } @@ -276,6 +280,7 @@ public static void write(byte[] from, File to) throws IOException { * @deprecated Prefer {@code asCharSink(to, charset).write(from)}. This method is scheduled to be * removed in January 2019. */ + @Beta @Deprecated public static void write(CharSequence from, File to, Charset charset) throws IOException { asCharSink(to, charset).write(from); @@ -291,6 +296,7 @@ public static void write(CharSequence from, File to, Charset charset) throws IOE * @param to the output stream * @throws IOException if an I/O error occurs */ + @Beta public static void copy(File from, OutputStream to) throws IOException { asByteSource(from).copyTo(to); } @@ -314,6 +320,7 @@ public static void copy(File from, OutputStream to) throws IOException { * @throws IOException if an I/O error occurs * @throws IllegalArgumentException if {@code from.equals(to)} */ + @Beta public static void copy(File from, File to) throws IOException { checkArgument(!from.equals(to), "Source %s and destination %s must be different", from, to); asByteSource(from).copyTo(asByteSink(to)); @@ -330,6 +337,7 @@ public static void copy(File from, File to) throws IOException { * @deprecated Prefer {@code asCharSource(from, charset).copyTo(to)}. This method is scheduled to * be removed in January 2019. */ + @Beta @Deprecated public static void copy(File from, Charset charset, Appendable to) throws IOException { @@ -347,6 +355,7 @@ static void copy(File from, Charset charset, Appendable to) throws IOException { * @deprecated Prefer {@code asCharSink(to, charset, FileWriteMode.APPEND).write(from)}. This * method is scheduled to be removed in January 2019. */ + @Beta @Deprecated public static void append(CharSequence from, File to, Charset charset) throws IOException { @@ -358,6 +367,7 @@ static void append(CharSequence from, File to, Charset charset) throws IOExcepti * * @throws IOException if an I/O error occurs */ + @Beta public static boolean equal(File file1, File file2) throws IOException { checkNotNull(file1); checkNotNull(file2); @@ -397,6 +407,7 @@ public static boolean equal(File file1, File file2) throws IOException { * @return the newly-created directory * @throws IllegalStateException if the directory could not be created */ + @Beta public static File createTempDir() { File baseDir = new File(System.getProperty("java.io.tmpdir")); @SuppressWarnings("GoodTime") // reading system time without TimeSource @@ -426,6 +437,7 @@ public static File createTempDir() { * @param file the file to create or update * @throws IOException if an I/O error occurs */ + @Beta @SuppressWarnings("GoodTime") // reading system time without TimeSource public static void touch(File file) throws IOException { checkNotNull(file); @@ -443,6 +455,7 @@ public static void touch(File file) throws IOException { * directories of the specified file could not be created. * @since 4.0 */ + @Beta public static void createParentDirs(File file) throws IOException { checkNotNull(file); File parent = file.getCanonicalFile().getParentFile(); @@ -473,6 +486,7 @@ public static void createParentDirs(File file) throws IOException { * @throws IOException if an I/O error occurs * @throws IllegalArgumentException if {@code from.equals(to)} */ + @Beta public static void move(File from, File to) throws IOException { checkNotNull(from); checkNotNull(to); @@ -501,6 +515,7 @@ public static void move(File from, File to) throws IOException { * @deprecated Prefer {@code asCharSource(file, charset).readFirstLine()}. This method is * scheduled to be removed in January 2019. */ + @Beta @Deprecated public static String readFirstLine(File file, Charset charset) throws IOException { @@ -523,6 +538,7 @@ static String readFirstLine(File file, Charset charset) throws IOException { * @return a mutable {@link List} containing all the lines * @throws IOException if an I/O error occurs */ + @Beta public static List readLines(File file, Charset charset) throws IOException { // don't use asCharSource(file, charset).readLines() because that returns // an immutable list, which would change the behavior of this method @@ -557,6 +573,7 @@ public List getResult() { * @deprecated Prefer {@code asCharSource(file, charset).readLines(callback)}. This method is * scheduled to be removed in January 2019. */ + @Beta @Deprecated @CanIgnoreReturnValue // some processors won't return a useful result public @@ -576,6 +593,7 @@ static T readLines(File file, Charset charset, LineProcessor callback) th * @deprecated Prefer {@code asByteSource(file).read(processor)}. This method is scheduled to be * removed in January 2019. */ + @Beta @Deprecated @CanIgnoreReturnValue // some processors won't return a useful result public @@ -594,6 +612,7 @@ static T readBytes(File file, ByteProcessor processor) throws IOException * @deprecated Prefer {@code asByteSource(file).hash(hashFunction)}. This method is scheduled to * be removed in January 2019. */ + @Beta @Deprecated public static HashCode hash(File file, HashFunction hashFunction) throws IOException { @@ -615,6 +634,7 @@ static HashCode hash(File file, HashFunction hashFunction) throws IOException { * @see FileChannel#map(MapMode, long, long) * @since 2.0 */ + @Beta public static MappedByteBuffer map(File file) throws IOException { checkNotNull(file); return map(file, MapMode.READ_ONLY); @@ -637,6 +657,7 @@ public static MappedByteBuffer map(File file) throws IOException { * @see FileChannel#map(MapMode, long, long) * @since 2.0 */ + @Beta public static MappedByteBuffer map(File file, MapMode mode) throws IOException { return mapInternal(file, mode, -1); } @@ -660,6 +681,7 @@ public static MappedByteBuffer map(File file, MapMode mode) throws IOException { * @see FileChannel#map(MapMode, long, long) * @since 2.0 */ + @Beta public static MappedByteBuffer map(File file, MapMode mode, long size) throws IOException { checkArgument(size >= 0, "size (%s) may not be negative", size); return mapInternal(file, mode, size); @@ -703,6 +725,7 @@ private static MappedByteBuffer mapInternal(File file, MapMode mode, long size) * * @since 11.0 */ + @Beta public static String simplifyPath(String pathname) { checkNotNull(pathname); if (pathname.length() == 0) { @@ -763,6 +786,7 @@ public static String simplifyPath(String pathname) { * * @since 11.0 */ + @Beta public static String getFileExtension(String fullName) { checkNotNull(fullName); String fileName = new File(fullName).getName(); @@ -780,6 +804,7 @@ public static String getFileExtension(String fullName) { * @return The file name without its path or extension. * @since 14.0 */ + @Beta public static String getNameWithoutExtension(String file) { checkNotNull(file); String fileName = new File(file).getName(); @@ -839,6 +864,7 @@ public String toString() { * * @since 23.5 */ + @Beta public static Traverser fileTraverser() { return Traverser.forTree(FILE_TREE); } @@ -868,6 +894,7 @@ private static Iterable fileTreeChildren(File file) { * * @since 15.0 */ + @Beta public static Predicate isDirectory() { return FilePredicate.IS_DIRECTORY; } @@ -877,6 +904,7 @@ public static Predicate isDirectory() { * * @since 15.0 */ + @Beta public static Predicate isFile() { return FilePredicate.IS_FILE; } 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 0ac1ca02b0a7..f050098cc5ba 100644 --- a/android/guava/src/com/google/common/util/concurrent/Futures.java +++ b/android/guava/src/com/google/common/util/concurrent/Futures.java @@ -70,7 +70,6 @@ * @author Sven Mawson * @since 1.0 */ -@Beta @GwtCompatible(emulated = true) public final class Futures extends GwtFuturesCatchingSpecialization { @@ -147,6 +146,7 @@ private Futures() {} * themselves. This method is scheduled for removal from Guava in January 2019. */ // TODO(b/72241575): Remove by 2019-01 + @Beta @Deprecated @GwtIncompatible // TODO public static CheckedFuture makeChecked( @@ -186,6 +186,7 @@ public static ListenableFuture immediateFuture(@NullableDecl V value) { * themselves. This method is scheduled for removal from Guava in January 2019. */ // TODO(b/72241893): Remove by 2019-01 + @Beta @Deprecated @GwtIncompatible // TODO public static CheckedFuture immediateCheckedFuture( @@ -233,6 +234,7 @@ public static ListenableFuture immediateCancelledFuture() { * themselves. This method is scheduled for removal from Guava in January 2019. */ // TODO(b/72241500): Remove by 2019-01 + @Beta @Deprecated @GwtIncompatible // TODO public static CheckedFuture immediateFailedCheckedFuture( @@ -247,6 +249,7 @@ public static CheckedFuture immediateFailedChecke * @throws RejectedExecutionException if the task cannot be scheduled for execution * @since 23.0 */ + @Beta public static ListenableFuture submitAsync(AsyncCallable callable, Executor executor) { TrustedListenableFutureTask task = TrustedListenableFutureTask.create(callable); executor.execute(task); @@ -259,6 +262,7 @@ public static ListenableFuture submitAsync(AsyncCallable callable, Exe * @throws RejectedExecutionException if the task cannot be scheduled for execution * @since 23.0 */ + @Beta @GwtIncompatible // java.util.concurrent.ScheduledExecutorService @SuppressWarnings("GoodTime") // should accept a java.time.Duration public static ListenableFuture scheduleAsync( @@ -318,6 +322,7 @@ public void run() { * @param executor the executor that runs {@code fallback} if {@code input} fails * @since 19.0 */ + @Beta @Partially.GwtIncompatible("AVAILABLE but requires exceptionType to be Throwable.class") public static ListenableFuture catching( ListenableFuture input, @@ -386,6 +391,7 @@ public static ListenableFuture catching( * @param executor the executor that runs {@code fallback} if {@code input} fails * @since 19.0 (similar functionality in 14.0 as {@code withFallback}) */ + @Beta @Partially.GwtIncompatible("AVAILABLE but requires exceptionType to be Throwable.class") public static ListenableFuture catchingAsync( ListenableFuture input, @@ -407,6 +413,7 @@ public static ListenableFuture catchingAsync( * @param scheduledExecutor The executor service to enforce the timeout. * @since 19.0 */ + @Beta @GwtIncompatible // java.util.concurrent.ScheduledExecutorService @SuppressWarnings("GoodTime") // should accept a java.time.Duration public static ListenableFuture withTimeout( @@ -456,6 +463,7 @@ public static ListenableFuture withTimeout( * input's failure (if not) * @since 19.0 (in 11.0 as {@code transform}) */ + @Beta public static ListenableFuture transformAsync( ListenableFuture input, AsyncFunction function, @@ -494,6 +502,7 @@ public static 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) { return AbstractTransformFuture.create(input, function, executor); @@ -519,6 +528,7 @@ public static ListenableFuture transform( * @return A future that returns the result of the transformation. * @since 10.0 */ + @Beta @GwtIncompatible // TODO public static Future lazyTransform( final Future input, final Function function) { @@ -606,6 +616,7 @@ public static ListenableFuture> allAsList( * * @since 20.0 */ + @Beta @SafeVarargs public static FutureCombiner whenAllComplete(ListenableFuture... futures) { return new FutureCombiner(false, ImmutableList.copyOf(futures)); @@ -617,6 +628,7 @@ public static FutureCombiner whenAllComplete(ListenableFuture FutureCombiner whenAllComplete( Iterable> futures) { return new FutureCombiner(false, ImmutableList.copyOf(futures)); @@ -629,6 +641,7 @@ public static FutureCombiner whenAllComplete( * * @since 20.0 */ + @Beta @SafeVarargs public static FutureCombiner whenAllSucceed(ListenableFuture... futures) { return new FutureCombiner(true, ImmutableList.copyOf(futures)); @@ -641,6 +654,7 @@ public static FutureCombiner whenAllSucceed(ListenableFuture * * @since 20.0 */ + @Beta public static FutureCombiner whenAllSucceed( Iterable> futures) { return new FutureCombiner(true, ImmutableList.copyOf(futures)); @@ -753,6 +767,7 @@ public Void call() throws Exception { * * @since 15.0 */ + @Beta public static ListenableFuture nonCancellationPropagating(ListenableFuture future) { if (future.isDone()) { return future; @@ -1146,6 +1161,7 @@ public static V getDone(Future future) throws ExecutionException { * does not have a suitable constructor * @since 19.0 (in 10.0 as {@code get}) */ + @Beta @CanIgnoreReturnValue @GwtIncompatible // reflection public static V getChecked(Future future, Class exceptionClass) @@ -1196,6 +1212,7 @@ public static V getChecked(Future future, Class e * does not have a suitable constructor * @since 19.0 (in 10.0 as {@code get} and with different parameter order) */ + @Beta @CanIgnoreReturnValue @GwtIncompatible // reflection @SuppressWarnings("GoodTime") // should accept a java.time.Duration 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 fbdb28632828..959a2fc28723 100644 --- a/android/guava/src/com/google/common/util/concurrent/ListeningScheduledExecutorService.java +++ b/android/guava/src/com/google/common/util/concurrent/ListeningScheduledExecutorService.java @@ -14,7 +14,6 @@ package com.google.common.util.concurrent; -import com.google.common.annotations.Beta; import com.google.common.annotations.GwtIncompatible; import java.util.concurrent.Callable; import java.util.concurrent.ScheduledExecutorService; @@ -29,7 +28,6 @@ * @author Chris Povirk * @since 10.0 */ -@Beta @GwtIncompatible public interface ListeningScheduledExecutorService extends ScheduledExecutorService, ListeningExecutorService { 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 be4a2ad2cf05..de14c1b750b4 100644 --- a/android/guava/src/com/google/common/util/concurrent/Uninterruptibles.java +++ b/android/guava/src/com/google/common/util/concurrent/Uninterruptibles.java @@ -16,7 +16,6 @@ import static java.util.concurrent.TimeUnit.NANOSECONDS; -import com.google.common.annotations.Beta; import com.google.common.annotations.GwtCompatible; import com.google.common.annotations.GwtIncompatible; import com.google.common.base.Preconditions; @@ -39,7 +38,6 @@ * @author Anthony Zana * @since 10.0 */ -@Beta @GwtCompatible(emulated = true) public final class Uninterruptibles { diff --git a/guava/src/com/google/common/base/Splitter.java b/guava/src/com/google/common/base/Splitter.java index d82b1de82ba0..1da372e371ff 100644 --- a/guava/src/com/google/common/base/Splitter.java +++ b/guava/src/com/google/common/base/Splitter.java @@ -408,7 +408,6 @@ private Iterator splittingIterator(CharSequence sequence) { * @return an immutable list of the segments split from the parameter * @since 15.0 */ - @Beta public List splitToList(CharSequence sequence) { checkNotNull(sequence); diff --git a/guava/src/com/google/common/base/Ticker.java b/guava/src/com/google/common/base/Ticker.java index 7b97b1533f72..a53883b46ed7 100644 --- a/guava/src/com/google/common/base/Ticker.java +++ b/guava/src/com/google/common/base/Ticker.java @@ -14,7 +14,6 @@ package com.google.common.base; -import com.google.common.annotations.Beta; import com.google.common.annotations.GwtCompatible; /** @@ -28,7 +27,6 @@ * @since 10.0 (mostly * source-compatible since 9.0) */ -@Beta @GwtCompatible public abstract class Ticker { /** Constructor for use by subclasses. */ diff --git a/guava/src/com/google/common/collect/Comparators.java b/guava/src/com/google/common/collect/Comparators.java index d2743589a93b..06b398f3ce1e 100644 --- a/guava/src/com/google/common/collect/Comparators.java +++ b/guava/src/com/google/common/collect/Comparators.java @@ -42,7 +42,6 @@ * @since 21.0 * @author Louis Wasserman */ -@Beta @GwtCompatible public final class Comparators { private Comparators() {} @@ -61,6 +60,7 @@ private Comparators() {} // Note: 90% of the time we don't add type parameters or wildcards that serve only to "tweak" the // desired return type. However, *nested* generics introduce a special class of problems that we // think tip it over into being worthwhile. + @Beta public static Comparator> lexicographical(Comparator comparator) { return new LexicographicalOrdering(checkNotNull(comparator)); } @@ -70,6 +70,7 @@ public static Comparator> lexicographical(Comparato * equal to the element that preceded it, according to the specified comparator. Note that this is * always true when the iterable has fewer than two elements. */ + @Beta public static boolean isInOrder(Iterable iterable, Comparator comparator) { checkNotNull(comparator); Iterator it = iterable.iterator(); @@ -91,6 +92,7 @@ public static boolean isInOrder(Iterable iterable, Comparator boolean isInStrictOrder( Iterable iterable, Comparator comparator) { checkNotNull(comparator); diff --git a/guava/src/com/google/common/collect/ImmutableBiMap.java b/guava/src/com/google/common/collect/ImmutableBiMap.java index 70f4e240cda5..d26a32c671bd 100644 --- a/guava/src/com/google/common/collect/ImmutableBiMap.java +++ b/guava/src/com/google/common/collect/ImmutableBiMap.java @@ -53,7 +53,6 @@ public abstract class ImmutableBiMap extends ImmutableBiMapFauxverideShim< * * @since 21.0 */ - @Beta public static Collector> toImmutableBiMap( Function keyFunction, Function valueFunction) { diff --git a/guava/src/com/google/common/collect/ImmutableList.java b/guava/src/com/google/common/collect/ImmutableList.java index a2843538d973..8dd49de2016b 100644 --- a/guava/src/com/google/common/collect/ImmutableList.java +++ b/guava/src/com/google/common/collect/ImmutableList.java @@ -67,7 +67,6 @@ public abstract class ImmutableList extends ImmutableCollection * * @since 21.0 */ - @Beta public static Collector> toImmutableList() { return CollectCollectors.toImmutableList(); } diff --git a/guava/src/com/google/common/collect/ImmutableListMultimap.java b/guava/src/com/google/common/collect/ImmutableListMultimap.java index decbcf63cbae..43becc62861d 100644 --- a/guava/src/com/google/common/collect/ImmutableListMultimap.java +++ b/guava/src/com/google/common/collect/ImmutableListMultimap.java @@ -79,7 +79,6 @@ public class ImmutableListMultimap extends ImmutableMultimap * * @since 21.0 */ - @Beta public static Collector> toImmutableListMultimap( Function keyFunction, Function valueFunction) { @@ -123,7 +122,6 @@ public class ImmutableListMultimap extends ImmutableMultimap * * @since 21.0 */ - @Beta public static Collector> flatteningToImmutableListMultimap( Function keyFunction, diff --git a/guava/src/com/google/common/collect/ImmutableMap.java b/guava/src/com/google/common/collect/ImmutableMap.java index dfea7dbffd61..00a789219a16 100644 --- a/guava/src/com/google/common/collect/ImmutableMap.java +++ b/guava/src/com/google/common/collect/ImmutableMap.java @@ -75,7 +75,6 @@ public abstract class ImmutableMap implements Map, Serializable { * * @since 21.0 */ - @Beta public static Collector> toImmutableMap( Function keyFunction, Function valueFunction) { @@ -92,7 +91,6 @@ public abstract class ImmutableMap implements Map, Serializable { * * @since 21.0 */ - @Beta public static Collector> toImmutableMap( Function keyFunction, Function valueFunction, diff --git a/guava/src/com/google/common/collect/ImmutableMultiset.java b/guava/src/com/google/common/collect/ImmutableMultiset.java index f1f46fcfb894..5320e3978971 100644 --- a/guava/src/com/google/common/collect/ImmutableMultiset.java +++ b/guava/src/com/google/common/collect/ImmutableMultiset.java @@ -18,7 +18,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.annotations.VisibleForTesting; @@ -64,7 +63,6 @@ public abstract class ImmutableMultiset extends ImmutableMultisetGwtSerializa * * @since 21.0 */ - @Beta public static Collector> toImmutableMultiset() { return toImmutableMultiset(Function.identity(), e -> 1); } diff --git a/guava/src/com/google/common/collect/ImmutableRangeMap.java b/guava/src/com/google/common/collect/ImmutableRangeMap.java index 5ebf0f4e4e5d..56f36f3f1b06 100644 --- a/guava/src/com/google/common/collect/ImmutableRangeMap.java +++ b/guava/src/com/google/common/collect/ImmutableRangeMap.java @@ -53,7 +53,6 @@ public class ImmutableRangeMap, V> implements RangeMap, V> Collector> toImmutableRangeMap( Function> keyFunction, diff --git a/guava/src/com/google/common/collect/ImmutableRangeSet.java b/guava/src/com/google/common/collect/ImmutableRangeSet.java index a9b40dcd13ab..70eb8595aeb2 100644 --- a/guava/src/com/google/common/collect/ImmutableRangeSet.java +++ b/guava/src/com/google/common/collect/ImmutableRangeSet.java @@ -63,7 +63,6 @@ public final class ImmutableRangeSet extends AbstractRange * * @since 23.1 */ - @Beta public static > Collector, ?, ImmutableRangeSet> toImmutableRangeSet() { return CollectCollectors.toImmutableRangeSet(); diff --git a/guava/src/com/google/common/collect/ImmutableSet.java b/guava/src/com/google/common/collect/ImmutableSet.java index 63cb0b2e3edc..6e870c3e63c4 100644 --- a/guava/src/com/google/common/collect/ImmutableSet.java +++ b/guava/src/com/google/common/collect/ImmutableSet.java @@ -62,7 +62,6 @@ public abstract class ImmutableSet extends ImmutableCollection implements * * @since 21.0 */ - @Beta public static Collector> toImmutableSet() { return CollectCollectors.toImmutableSet(); } diff --git a/guava/src/com/google/common/collect/ImmutableSetMultimap.java b/guava/src/com/google/common/collect/ImmutableSetMultimap.java index 7f59097b4379..5abe6803ab7d 100644 --- a/guava/src/com/google/common/collect/ImmutableSetMultimap.java +++ b/guava/src/com/google/common/collect/ImmutableSetMultimap.java @@ -83,7 +83,6 @@ public class ImmutableSetMultimap extends ImmutableMultimap * * @since 21.0 */ - @Beta public static Collector> toImmutableSetMultimap( Function keyFunction, Function valueFunction) { @@ -136,7 +135,6 @@ public class ImmutableSetMultimap extends ImmutableMultimap * * @since 21.0 */ - @Beta public static Collector> flatteningToImmutableSetMultimap( Function keyFunction, diff --git a/guava/src/com/google/common/collect/ImmutableSortedMap.java b/guava/src/com/google/common/collect/ImmutableSortedMap.java index a3d55e20bfe4..2cfba0d05611 100644 --- a/guava/src/com/google/common/collect/ImmutableSortedMap.java +++ b/guava/src/com/google/common/collect/ImmutableSortedMap.java @@ -73,7 +73,6 @@ public final class ImmutableSortedMap extends ImmutableSortedMapFauxveride * * @since 21.0 */ - @Beta public static Collector> toImmutableSortedMap( Comparator comparator, Function keyFunction, @@ -92,7 +91,6 @@ public final class ImmutableSortedMap extends ImmutableSortedMapFauxveride * * @since 21.0 */ - @Beta public static Collector> toImmutableSortedMap( Comparator comparator, Function keyFunction, diff --git a/guava/src/com/google/common/collect/ImmutableSortedMultiset.java b/guava/src/com/google/common/collect/ImmutableSortedMultiset.java index 59bdd9b526f7..ec0206314f57 100644 --- a/guava/src/com/google/common/collect/ImmutableSortedMultiset.java +++ b/guava/src/com/google/common/collect/ImmutableSortedMultiset.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.errorprone.annotations.CanIgnoreReturnValue; import com.google.errorprone.annotations.concurrent.LazyInit; @@ -62,7 +61,6 @@ public abstract class ImmutableSortedMultiset extends ImmutableSortedMultiset * * @since 21.0 */ - @Beta public static Collector> toImmutableSortedMultiset( Comparator comparator) { return toImmutableSortedMultiset(comparator, Function.identity(), e -> 1); diff --git a/guava/src/com/google/common/collect/ImmutableSortedSet.java b/guava/src/com/google/common/collect/ImmutableSortedSet.java index ea8bc744f9e1..c025c5f111a8 100644 --- a/guava/src/com/google/common/collect/ImmutableSortedSet.java +++ b/guava/src/com/google/common/collect/ImmutableSortedSet.java @@ -20,7 +20,6 @@ import static com.google.common.base.Preconditions.checkNotNull; import static com.google.common.collect.ObjectArrays.checkElementsNotNull; -import com.google.common.annotations.Beta; import com.google.common.annotations.GwtCompatible; import com.google.common.annotations.GwtIncompatible; import com.google.errorprone.annotations.CanIgnoreReturnValue; @@ -75,7 +74,6 @@ public abstract class ImmutableSortedSet extends ImmutableSortedSetFauxveride * * @since 21.0 */ - @Beta public static Collector> toImmutableSortedSet( Comparator comparator) { return CollectCollectors.toImmutableSortedSet(comparator); diff --git a/guava/src/com/google/common/collect/ImmutableTable.java b/guava/src/com/google/common/collect/ImmutableTable.java index b7b7f95d3998..04acb8b13976 100644 --- a/guava/src/com/google/common/collect/ImmutableTable.java +++ b/guava/src/com/google/common/collect/ImmutableTable.java @@ -18,7 +18,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.base.MoreObjects; import com.google.common.collect.Tables.AbstractCell; @@ -60,7 +59,6 @@ public abstract class ImmutableTable extends AbstractTable * * @since 21.0 */ - @Beta public static Collector> toImmutableTable( Function rowFunction, Function columnFunction, diff --git a/guava/src/com/google/common/collect/Maps.java b/guava/src/com/google/common/collect/Maps.java index e3fadc9d87ec..62dc34f2d8c9 100644 --- a/guava/src/com/google/common/collect/Maps.java +++ b/guava/src/com/google/common/collect/Maps.java @@ -144,7 +144,6 @@ V transform(Entry entry) { * @since 14.0 */ @GwtCompatible(serializable = true) - @Beta public static , V> ImmutableMap immutableEnumMap( Map map) { if (map instanceof ImmutableEnumMap) { @@ -218,7 +217,6 @@ ImmutableMap toImmutableMap() { * * @since 21.0 */ - @Beta public static , V> Collector> toImmutableEnumMap( java.util.function.Function keyFunction, java.util.function.Function valueFunction) { @@ -251,7 +249,6 @@ ImmutableMap toImmutableMap() { * * @since 21.0 */ - @Beta public static , V> Collector> toImmutableEnumMap( java.util.function.Function keyFunction, java.util.function.Function valueFunction, @@ -1491,7 +1488,6 @@ public int hashCode() { * * @since 16.0 */ - @Beta public static Converter asConverter(final BiMap bimap) { return new BiMapConverter<>(bimap); } diff --git a/guava/src/com/google/common/collect/MoreCollectors.java b/guava/src/com/google/common/collect/MoreCollectors.java index 3e6cdcad2d82..f447ebeb3b54 100644 --- a/guava/src/com/google/common/collect/MoreCollectors.java +++ b/guava/src/com/google/common/collect/MoreCollectors.java @@ -18,7 +18,6 @@ import static com.google.common.base.Preconditions.checkNotNull; -import com.google.common.annotations.Beta; import com.google.common.annotations.GwtCompatible; import java.util.ArrayList; import java.util.List; @@ -34,7 +33,6 @@ * @author Louis Wasserman * @since 21.0 */ -@Beta @GwtCompatible public final class MoreCollectors { diff --git a/guava/src/com/google/common/collect/MultimapBuilder.java b/guava/src/com/google/common/collect/MultimapBuilder.java index 482385e50a25..161c29d170ee 100644 --- a/guava/src/com/google/common/collect/MultimapBuilder.java +++ b/guava/src/com/google/common/collect/MultimapBuilder.java @@ -19,7 +19,6 @@ import static com.google.common.base.Preconditions.checkNotNull; import static com.google.common.collect.CollectPreconditions.checkNonnegative; -import com.google.common.annotations.Beta; import com.google.common.annotations.GwtCompatible; import com.google.common.base.Supplier; import java.io.Serializable; @@ -61,7 +60,6 @@ * @param An upper bound on the value type of the generated multimap. * @since 16.0 */ -@Beta @GwtCompatible public abstract class MultimapBuilder { /* diff --git a/guava/src/com/google/common/collect/Sets.java b/guava/src/com/google/common/collect/Sets.java index a36b6be24542..a83f1b33ff94 100644 --- a/guava/src/com/google/common/collect/Sets.java +++ b/guava/src/com/google/common/collect/Sets.java @@ -181,7 +181,6 @@ ImmutableSet toImmutableSet() { * * @since 21.0 */ - @Beta public static > Collector> toImmutableEnumSet() { return (Collector) Accumulator.TO_IMMUTABLE_ENUM_SET; } diff --git a/guava/src/com/google/common/collect/Streams.java b/guava/src/com/google/common/collect/Streams.java index d4b292999143..974c18db9f9e 100644 --- a/guava/src/com/google/common/collect/Streams.java +++ b/guava/src/com/google/common/collect/Streams.java @@ -51,7 +51,6 @@ * * @since 21.0 */ -@Beta @GwtCompatible public final class Streams { /** @@ -69,6 +68,7 @@ public static Stream stream(Iterable iterable) { * * @deprecated There is no reason to use this; just invoke {@code collection.stream()} directly. */ + @Beta @Deprecated public static Stream stream(Collection collection) { return collection.stream(); @@ -78,6 +78,7 @@ public static Stream stream(Collection collection) { * Returns a sequential {@link Stream} of the remaining contents of {@code iterator}. Do not use * {@code iterator} directly after passing it to this method. */ + @Beta public static Stream stream(Iterator iterator) { return StreamSupport.stream(Spliterators.spliteratorUnknownSize(iterator, 0), false); } @@ -86,6 +87,7 @@ public static Stream stream(Iterator iterator) { * If a value is present in {@code optional}, returns a stream containing only that element, * otherwise returns an empty stream. */ + @Beta public static Stream stream(com.google.common.base.Optional optional) { return optional.isPresent() ? Stream.of(optional.get()) : Stream.of(); } @@ -96,6 +98,7 @@ public static Stream stream(com.google.common.base.Optional optional) * *

Java 9 users: use {@code optional.stream()} instead. */ + @Beta public static Stream stream(java.util.Optional optional) { return optional.isPresent() ? Stream.of(optional.get()) : Stream.of(); } @@ -106,6 +109,7 @@ public static Stream stream(java.util.Optional optional) { * *

Java 9 users: use {@code optional.stream()} instead. */ + @Beta public static IntStream stream(OptionalInt optional) { return optional.isPresent() ? IntStream.of(optional.getAsInt()) : IntStream.empty(); } @@ -116,6 +120,7 @@ public static IntStream stream(OptionalInt optional) { * *

Java 9 users: use {@code optional.stream()} instead. */ + @Beta public static LongStream stream(OptionalLong optional) { return optional.isPresent() ? LongStream.of(optional.getAsLong()) : LongStream.empty(); } @@ -126,6 +131,7 @@ public static LongStream stream(OptionalLong optional) { * *

Java 9 users: use {@code optional.stream()} instead. */ + @Beta public static DoubleStream stream(OptionalDouble optional) { return optional.isPresent() ? DoubleStream.of(optional.getAsDouble()) : DoubleStream.empty(); } @@ -236,6 +242,7 @@ public static DoubleStream concat(DoubleStream... streams) { * href="http://gee.cs.oswego.edu/dl/html/StreamParallelGuidance.html">efficiently splittable. * This may harm parallel performance. */ + @Beta public static Stream zip( Stream streamA, Stream streamB, BiFunction function) { checkNotNull(streamA); @@ -297,6 +304,7 @@ public boolean tryAdvance(Consumer action) { * * @since 22.0 */ + @Beta public static void forEachPair( Stream streamA, Stream streamB, BiConsumer consumer) { checkNotNull(consumer); @@ -345,6 +353,7 @@ private static class TemporaryPair { *

The order of the resulting stream is defined if and only if the order of the original stream * was defined. */ + @Beta public static Stream mapWithIndex( Stream stream, FunctionWithIndex function) { checkNotNull(stream); @@ -427,6 +436,7 @@ Splitr createSplit(Spliterator from, long i) { *

The order of the resulting stream is defined if and only if the order of the original stream * was defined. */ + @Beta public static Stream mapWithIndex(IntStream stream, IntFunctionWithIndex function) { checkNotNull(stream); checkNotNull(function); @@ -505,6 +515,7 @@ Splitr createSplit(Spliterator.OfInt from, long i) { *

The order of the resulting stream is defined if and only if the order of the original stream * was defined. */ + @Beta public static Stream mapWithIndex(LongStream stream, LongFunctionWithIndex function) { checkNotNull(stream); checkNotNull(function); @@ -583,6 +594,7 @@ Splitr createSplit(Spliterator.OfLong from, long i) { *

The order of the resulting stream is defined if and only if the order of the original stream * was defined. */ + @Beta public static Stream mapWithIndex( DoubleStream stream, DoubleFunctionWithIndex function) { checkNotNull(stream); @@ -748,6 +760,7 @@ public interface DoubleFunctionWithIndex { * @see Stream#findFirst() * @throws NullPointerException if the last element of the stream is null */ + @Beta public static java.util.Optional findLast(Stream stream) { class OptionalState { boolean set = false; @@ -822,6 +835,7 @@ T get() { * @see IntStream#findFirst() * @throws NullPointerException if the last element of the stream is null */ + @Beta public static OptionalInt findLast(IntStream stream) { // findLast(Stream) does some allocation, so we might as well box some more java.util.Optional boxedLast = findLast(stream.boxed()); @@ -840,6 +854,7 @@ public static OptionalInt findLast(IntStream stream) { * @see LongStream#findFirst() * @throws NullPointerException if the last element of the stream is null */ + @Beta public static OptionalLong findLast(LongStream stream) { // findLast(Stream) does some allocation, so we might as well box some more java.util.Optional boxedLast = findLast(stream.boxed()); @@ -858,6 +873,7 @@ public static OptionalLong findLast(LongStream stream) { * @see DoubleStream#findFirst() * @throws NullPointerException if the last element of the stream is null */ + @Beta public static OptionalDouble findLast(DoubleStream stream) { // findLast(Stream) does some allocation, so we might as well box some more java.util.Optional boxedLast = findLast(stream.boxed()); diff --git a/guava/src/com/google/common/html/HtmlEscapers.java b/guava/src/com/google/common/html/HtmlEscapers.java index 29f5e1339c2b..29eebe8aaa46 100644 --- a/guava/src/com/google/common/html/HtmlEscapers.java +++ b/guava/src/com/google/common/html/HtmlEscapers.java @@ -14,7 +14,6 @@ package com.google.common.html; -import com.google.common.annotations.Beta; import com.google.common.annotations.GwtCompatible; import com.google.common.escape.Escaper; import com.google.common.escape.Escapers; @@ -35,7 +34,6 @@ * @author David Beaumont * @since 15.0 */ -@Beta @GwtCompatible public final class HtmlEscapers { /** diff --git a/guava/src/com/google/common/io/ByteStreams.java b/guava/src/com/google/common/io/ByteStreams.java index 510947ef0e17..e6601be5c35b 100644 --- a/guava/src/com/google/common/io/ByteStreams.java +++ b/guava/src/com/google/common/io/ByteStreams.java @@ -48,7 +48,6 @@ * @author Colin Decker * @since 1.0 */ -@Beta @GwtIncompatible public final class ByteStreams { @@ -266,6 +265,7 @@ 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; @@ -280,6 +280,7 @@ 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)); } @@ -291,6 +292,7 @@ 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)); @@ -303,6 +305,7 @@ public static ByteArrayDataInput newDataInput(byte[] bytes, int start) { * * @since 17.0 */ + @Beta public static ByteArrayDataInput newDataInput(ByteArrayInputStream byteArrayInputStream) { return new ByteArrayDataInputStream(checkNotNull(byteArrayInputStream)); } @@ -453,6 +456,7 @@ public String readUTF() { } /** Returns a new {@link ByteArrayDataOutput} instance with a default size. */ + @Beta public static ByteArrayDataOutput newDataOutput() { return newDataOutput(new ByteArrayOutputStream()); } @@ -463,6 +467,7 @@ 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. @@ -484,6 +489,7 @@ public static ByteArrayDataOutput newDataOutput(int size) { * * @since 17.0 */ + @Beta public static ByteArrayDataOutput newDataOutput(ByteArrayOutputStream byteArrayOutputSteam) { return new ByteArrayDataOutputStream(checkNotNull(byteArrayOutputSteam)); } @@ -659,6 +665,7 @@ public String toString() { * * @since 14.0 (since 1.0 as com.google.common.io.NullOutputStream) */ + @Beta public static OutputStream nullOutputStream() { return NULL_OUTPUT_STREAM; } @@ -671,6 +678,7 @@ 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); } @@ -757,6 +765,7 @@ 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); } @@ -773,6 +782,7 @@ 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) { @@ -790,6 +800,7 @@ 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) { @@ -848,6 +859,7 @@ 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 public static T readBytes(InputStream input, ByteProcessor processor) throws IOException { checkNotNull(input); @@ -883,6 +895,7 @@ public static T readBytes(InputStream input, ByteProcessor processor) thr * @return the number of bytes read * @throws IOException if an I/O error occurs */ + @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/CharStreams.java b/guava/src/com/google/common/io/CharStreams.java index bed3388a2cb7..bc4dd510245c 100644 --- a/guava/src/com/google/common/io/CharStreams.java +++ b/guava/src/com/google/common/io/CharStreams.java @@ -43,7 +43,6 @@ * @author Colin Decker * @since 1.0 */ -@Beta @GwtIncompatible public final class CharStreams { @@ -193,6 +192,7 @@ private static StringBuilder toStringBuilder(Readable r) throws IOException { * @return a mutable {@link List} containing all the lines * @throws IOException if an I/O error occurs */ + @Beta public static List readLines(Readable r) throws IOException { List result = new ArrayList<>(); LineReader lineReader = new LineReader(r); @@ -212,6 +212,7 @@ public static List readLines(Readable r) throws IOException { * @throws IOException if an I/O error occurs * @since 14.0 */ + @Beta @CanIgnoreReturnValue // some processors won't return a useful result public static T readLines(Readable readable, LineProcessor processor) throws IOException { checkNotNull(readable); @@ -233,6 +234,7 @@ public static T readLines(Readable readable, LineProcessor processor) thr * * @since 20.0 */ + @Beta @CanIgnoreReturnValue public static long exhaust(Readable readable) throws IOException { long total = 0; @@ -254,6 +256,7 @@ public static long exhaust(Readable readable) throws IOException { * @throws EOFException if this stream reaches the end before skipping all the characters * @throws IOException if an I/O error occurs */ + @Beta public static void skipFully(Reader reader, long n) throws IOException { checkNotNull(reader); while (n > 0) { @@ -270,6 +273,7 @@ public static void skipFully(Reader reader, long n) throws IOException { * * @since 15.0 */ + @Beta public static Writer nullWriter() { return NullWriter.INSTANCE; } @@ -338,6 +342,7 @@ public String toString() { * @param target the object to which output will be sent * @return a new Writer object, unless target is a Writer, in which case the target is returned */ + @Beta public static Writer asWriter(Appendable target) { if (target instanceof Writer) { return (Writer) target; diff --git a/guava/src/com/google/common/io/Files.java b/guava/src/com/google/common/io/Files.java index 74858d735f1d..34e03f65d6b2 100644 --- a/guava/src/com/google/common/io/Files.java +++ b/guava/src/com/google/common/io/Files.java @@ -63,7 +63,6 @@ * @author Colin Decker * @since 1.0 */ -@Beta @GwtIncompatible public final class Files { @@ -83,6 +82,7 @@ private Files() {} * helpful predefined constants * @return the buffered reader */ + @Beta public static BufferedReader newReader(File file, Charset charset) throws FileNotFoundException { checkNotNull(file); checkNotNull(charset); @@ -101,6 +101,7 @@ public static BufferedReader newReader(File file, Charset charset) throws FileNo * helpful predefined constants * @return the buffered writer */ + @Beta public static BufferedWriter newWriter(File file, Charset charset) throws FileNotFoundException { checkNotNull(file); checkNotNull(charset); @@ -231,6 +232,7 @@ public static CharSink asCharSink(File file, Charset charset, FileWriteMode... m * (2^31 - 1) * @throws IOException if an I/O error occurs */ + @Beta public static byte[] toByteArray(File file) throws IOException { return asByteSource(file).read(); } @@ -246,6 +248,7 @@ public static byte[] toByteArray(File file) throws IOException { * @deprecated Prefer {@code asCharSource(file, charset).read()}. This method is scheduled to be * removed in January 2019. */ + @Beta @Deprecated public static String toString(File file, Charset charset) throws IOException { return asCharSource(file, charset).read(); @@ -261,6 +264,7 @@ public static String toString(File file, Charset charset) throws IOException { * @param to the destination file * @throws IOException if an I/O error occurs */ + @Beta public static void write(byte[] from, File to) throws IOException { asByteSink(to).write(from); } @@ -276,6 +280,7 @@ public static void write(byte[] from, File to) throws IOException { * @deprecated Prefer {@code asCharSink(to, charset).write(from)}. This method is scheduled to be * removed in January 2019. */ + @Beta @Deprecated public static void write(CharSequence from, File to, Charset charset) throws IOException { asCharSink(to, charset).write(from); @@ -291,6 +296,7 @@ public static void write(CharSequence from, File to, Charset charset) throws IOE * @param to the output stream * @throws IOException if an I/O error occurs */ + @Beta public static void copy(File from, OutputStream to) throws IOException { asByteSource(from).copyTo(to); } @@ -314,6 +320,7 @@ public static void copy(File from, OutputStream to) throws IOException { * @throws IOException if an I/O error occurs * @throws IllegalArgumentException if {@code from.equals(to)} */ + @Beta public static void copy(File from, File to) throws IOException { checkArgument(!from.equals(to), "Source %s and destination %s must be different", from, to); asByteSource(from).copyTo(asByteSink(to)); @@ -330,6 +337,7 @@ public static void copy(File from, File to) throws IOException { * @deprecated Prefer {@code asCharSource(from, charset).copyTo(to)}. This method is scheduled to * be removed in January 2019. */ + @Beta @Deprecated public static void copy(File from, Charset charset, Appendable to) throws IOException { @@ -347,6 +355,7 @@ static void copy(File from, Charset charset, Appendable to) throws IOException { * @deprecated Prefer {@code asCharSink(to, charset, FileWriteMode.APPEND).write(from)}. This * method is scheduled to be removed in January 2019. */ + @Beta @Deprecated public static void append(CharSequence from, File to, Charset charset) throws IOException { @@ -358,6 +367,7 @@ static void append(CharSequence from, File to, Charset charset) throws IOExcepti * * @throws IOException if an I/O error occurs */ + @Beta public static boolean equal(File file1, File file2) throws IOException { checkNotNull(file1); checkNotNull(file2); @@ -397,6 +407,7 @@ public static boolean equal(File file1, File file2) throws IOException { * @return the newly-created directory * @throws IllegalStateException if the directory could not be created */ + @Beta public static File createTempDir() { File baseDir = new File(System.getProperty("java.io.tmpdir")); @SuppressWarnings("GoodTime") // reading system time without TimeSource @@ -426,6 +437,7 @@ public static File createTempDir() { * @param file the file to create or update * @throws IOException if an I/O error occurs */ + @Beta @SuppressWarnings("GoodTime") // reading system time without TimeSource public static void touch(File file) throws IOException { checkNotNull(file); @@ -443,6 +455,7 @@ public static void touch(File file) throws IOException { * directories of the specified file could not be created. * @since 4.0 */ + @Beta public static void createParentDirs(File file) throws IOException { checkNotNull(file); File parent = file.getCanonicalFile().getParentFile(); @@ -473,6 +486,7 @@ public static void createParentDirs(File file) throws IOException { * @throws IOException if an I/O error occurs * @throws IllegalArgumentException if {@code from.equals(to)} */ + @Beta public static void move(File from, File to) throws IOException { checkNotNull(from); checkNotNull(to); @@ -501,6 +515,7 @@ public static void move(File from, File to) throws IOException { * @deprecated Prefer {@code asCharSource(file, charset).readFirstLine()}. This method is * scheduled to be removed in January 2019. */ + @Beta @Deprecated public static String readFirstLine(File file, Charset charset) throws IOException { @@ -523,6 +538,7 @@ static String readFirstLine(File file, Charset charset) throws IOException { * @return a mutable {@link List} containing all the lines * @throws IOException if an I/O error occurs */ + @Beta public static List readLines(File file, Charset charset) throws IOException { // don't use asCharSource(file, charset).readLines() because that returns // an immutable list, which would change the behavior of this method @@ -557,6 +573,7 @@ public List getResult() { * @deprecated Prefer {@code asCharSource(file, charset).readLines(callback)}. This method is * scheduled to be removed in January 2019. */ + @Beta @Deprecated @CanIgnoreReturnValue // some processors won't return a useful result public @@ -576,6 +593,7 @@ static T readLines(File file, Charset charset, LineProcessor callback) th * @deprecated Prefer {@code asByteSource(file).read(processor)}. This method is scheduled to be * removed in January 2019. */ + @Beta @Deprecated @CanIgnoreReturnValue // some processors won't return a useful result public @@ -594,6 +612,7 @@ static T readBytes(File file, ByteProcessor processor) throws IOException * @deprecated Prefer {@code asByteSource(file).hash(hashFunction)}. This method is scheduled to * be removed in January 2019. */ + @Beta @Deprecated public static HashCode hash(File file, HashFunction hashFunction) throws IOException { @@ -615,6 +634,7 @@ static HashCode hash(File file, HashFunction hashFunction) throws IOException { * @see FileChannel#map(MapMode, long, long) * @since 2.0 */ + @Beta public static MappedByteBuffer map(File file) throws IOException { checkNotNull(file); return map(file, MapMode.READ_ONLY); @@ -637,6 +657,7 @@ public static MappedByteBuffer map(File file) throws IOException { * @see FileChannel#map(MapMode, long, long) * @since 2.0 */ + @Beta public static MappedByteBuffer map(File file, MapMode mode) throws IOException { return mapInternal(file, mode, -1); } @@ -660,6 +681,7 @@ public static MappedByteBuffer map(File file, MapMode mode) throws IOException { * @see FileChannel#map(MapMode, long, long) * @since 2.0 */ + @Beta public static MappedByteBuffer map(File file, MapMode mode, long size) throws IOException { checkArgument(size >= 0, "size (%s) may not be negative", size); return mapInternal(file, mode, size); @@ -703,6 +725,7 @@ private static MappedByteBuffer mapInternal(File file, MapMode mode, long size) * * @since 11.0 */ + @Beta public static String simplifyPath(String pathname) { checkNotNull(pathname); if (pathname.length() == 0) { @@ -763,6 +786,7 @@ public static String simplifyPath(String pathname) { * * @since 11.0 */ + @Beta public static String getFileExtension(String fullName) { checkNotNull(fullName); String fileName = new File(fullName).getName(); @@ -780,6 +804,7 @@ public static String getFileExtension(String fullName) { * @return The file name without its path or extension. * @since 14.0 */ + @Beta public static String getNameWithoutExtension(String file) { checkNotNull(file); String fileName = new File(file).getName(); @@ -839,6 +864,7 @@ public String toString() { * * @since 23.5 */ + @Beta public static Traverser fileTraverser() { return Traverser.forTree(FILE_TREE); } @@ -868,6 +894,7 @@ private static Iterable fileTreeChildren(File file) { * * @since 15.0 */ + @Beta public static Predicate isDirectory() { return FilePredicate.IS_DIRECTORY; } @@ -877,6 +904,7 @@ public static Predicate isDirectory() { * * @since 15.0 */ + @Beta public static Predicate isFile() { return FilePredicate.IS_FILE; } diff --git a/guava/src/com/google/common/util/concurrent/Futures.java b/guava/src/com/google/common/util/concurrent/Futures.java index c5ebd710885c..dc2f104500b5 100644 --- a/guava/src/com/google/common/util/concurrent/Futures.java +++ b/guava/src/com/google/common/util/concurrent/Futures.java @@ -70,7 +70,6 @@ * @author Sven Mawson * @since 1.0 */ -@Beta @GwtCompatible(emulated = true) public final class Futures extends GwtFuturesCatchingSpecialization { @@ -147,6 +146,7 @@ private Futures() {} * themselves. This method is scheduled for removal from Guava in January 2019. */ // TODO(b/72241575): Remove by 2019-01 + @Beta @Deprecated @GwtIncompatible // TODO public static CheckedFuture makeChecked( @@ -186,6 +186,7 @@ public static ListenableFuture immediateFuture(@Nullable V value) { * themselves. This method is scheduled for removal from Guava in January 2019. */ // TODO(b/72241893): Remove by 2019-01 + @Beta @Deprecated @GwtIncompatible // TODO public static CheckedFuture immediateCheckedFuture( @@ -233,6 +234,7 @@ public static ListenableFuture immediateCancelledFuture() { * themselves. This method is scheduled for removal from Guava in January 2019. */ // TODO(b/72241500): Remove by 2019-01 + @Beta @Deprecated @GwtIncompatible // TODO public static CheckedFuture immediateFailedCheckedFuture( @@ -247,6 +249,7 @@ public static CheckedFuture immediateFailedChecke * @throws RejectedExecutionException if the task cannot be scheduled for execution * @since 23.0 */ + @Beta public static ListenableFuture submitAsync(AsyncCallable callable, Executor executor) { TrustedListenableFutureTask task = TrustedListenableFutureTask.create(callable); executor.execute(task); @@ -259,6 +262,7 @@ public static ListenableFuture submitAsync(AsyncCallable callable, Exe * @throws RejectedExecutionException if the task cannot be scheduled for execution * @since 23.0 */ + @Beta @GwtIncompatible // java.util.concurrent.ScheduledExecutorService @SuppressWarnings("GoodTime") // should accept a java.time.Duration public static ListenableFuture scheduleAsync( @@ -318,6 +322,7 @@ public void run() { * @param executor the executor that runs {@code fallback} if {@code input} fails * @since 19.0 */ + @Beta @Partially.GwtIncompatible("AVAILABLE but requires exceptionType to be Throwable.class") public static ListenableFuture catching( ListenableFuture input, @@ -386,6 +391,7 @@ public static ListenableFuture catching( * @param executor the executor that runs {@code fallback} if {@code input} fails * @since 19.0 (similar functionality in 14.0 as {@code withFallback}) */ + @Beta @Partially.GwtIncompatible("AVAILABLE but requires exceptionType to be Throwable.class") public static ListenableFuture catchingAsync( ListenableFuture input, @@ -407,6 +413,7 @@ public static ListenableFuture catchingAsync( * @param scheduledExecutor The executor service to enforce the timeout. * @since 19.0 */ + @Beta @GwtIncompatible // java.util.concurrent.ScheduledExecutorService @SuppressWarnings("GoodTime") // should accept a java.time.Duration public static ListenableFuture withTimeout( @@ -456,6 +463,7 @@ public static ListenableFuture withTimeout( * input's failure (if not) * @since 19.0 (in 11.0 as {@code transform}) */ + @Beta public static ListenableFuture transformAsync( ListenableFuture input, AsyncFunction function, @@ -494,6 +502,7 @@ public static 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) { return AbstractTransformFuture.create(input, function, executor); @@ -519,6 +528,7 @@ public static ListenableFuture transform( * @return A future that returns the result of the transformation. * @since 10.0 */ + @Beta @GwtIncompatible // TODO public static Future lazyTransform( final Future input, final Function function) { @@ -606,6 +616,7 @@ public static ListenableFuture> allAsList( * * @since 20.0 */ + @Beta @SafeVarargs public static FutureCombiner whenAllComplete(ListenableFuture... futures) { return new FutureCombiner(false, ImmutableList.copyOf(futures)); @@ -617,6 +628,7 @@ public static FutureCombiner whenAllComplete(ListenableFuture FutureCombiner whenAllComplete( Iterable> futures) { return new FutureCombiner(false, ImmutableList.copyOf(futures)); @@ -629,6 +641,7 @@ public static FutureCombiner whenAllComplete( * * @since 20.0 */ + @Beta @SafeVarargs public static FutureCombiner whenAllSucceed(ListenableFuture... futures) { return new FutureCombiner(true, ImmutableList.copyOf(futures)); @@ -641,6 +654,7 @@ public static FutureCombiner whenAllSucceed(ListenableFuture * * @since 20.0 */ + @Beta public static FutureCombiner whenAllSucceed( Iterable> futures) { return new FutureCombiner(true, ImmutableList.copyOf(futures)); @@ -753,6 +767,7 @@ public Void call() throws Exception { * * @since 15.0 */ + @Beta public static ListenableFuture nonCancellationPropagating(ListenableFuture future) { if (future.isDone()) { return future; @@ -1146,6 +1161,7 @@ public static V getDone(Future future) throws ExecutionException { * does not have a suitable constructor * @since 19.0 (in 10.0 as {@code get}) */ + @Beta @CanIgnoreReturnValue @GwtIncompatible // reflection public static V getChecked(Future future, Class exceptionClass) @@ -1196,6 +1212,7 @@ public static V getChecked(Future future, Class e * does not have a suitable constructor * @since 19.0 (in 10.0 as {@code get} and with different parameter order) */ + @Beta @CanIgnoreReturnValue @GwtIncompatible // reflection @SuppressWarnings("GoodTime") // should accept a java.time.Duration diff --git a/guava/src/com/google/common/util/concurrent/ListeningScheduledExecutorService.java b/guava/src/com/google/common/util/concurrent/ListeningScheduledExecutorService.java index fbdb28632828..959a2fc28723 100644 --- a/guava/src/com/google/common/util/concurrent/ListeningScheduledExecutorService.java +++ b/guava/src/com/google/common/util/concurrent/ListeningScheduledExecutorService.java @@ -14,7 +14,6 @@ package com.google.common.util.concurrent; -import com.google.common.annotations.Beta; import com.google.common.annotations.GwtIncompatible; import java.util.concurrent.Callable; import java.util.concurrent.ScheduledExecutorService; @@ -29,7 +28,6 @@ * @author Chris Povirk * @since 10.0 */ -@Beta @GwtIncompatible public interface ListeningScheduledExecutorService extends ScheduledExecutorService, ListeningExecutorService { diff --git a/guava/src/com/google/common/util/concurrent/Uninterruptibles.java b/guava/src/com/google/common/util/concurrent/Uninterruptibles.java index be4a2ad2cf05..de14c1b750b4 100644 --- a/guava/src/com/google/common/util/concurrent/Uninterruptibles.java +++ b/guava/src/com/google/common/util/concurrent/Uninterruptibles.java @@ -16,7 +16,6 @@ import static java.util.concurrent.TimeUnit.NANOSECONDS; -import com.google.common.annotations.Beta; import com.google.common.annotations.GwtCompatible; import com.google.common.annotations.GwtIncompatible; import com.google.common.base.Preconditions; @@ -39,7 +38,6 @@ * @author Anthony Zana * @since 10.0 */ -@Beta @GwtCompatible(emulated = true) public final class Uninterruptibles {