Skip to content

Commit

Permalink
Remove @Beta from various io APIs.
Browse files Browse the repository at this point in the history
RELNOTES=`io`: Remove `@Beta` from various `io` APIs.
PiperOrigin-RevId: 532782558
  • Loading branch information
kluever authored and Google Java Core Libraries committed May 17, 2023
1 parent a3571b4 commit a589256
Show file tree
Hide file tree
Showing 32 changed files with 2 additions and 81 deletions.
2 changes: 0 additions & 2 deletions android/guava/src/com/google/common/io/ByteProcessor.java
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@

package com.google.common.io;

import com.google.common.annotations.Beta;
import com.google.common.annotations.GwtIncompatible;
import com.google.common.annotations.J2ktIncompatible;
import com.google.errorprone.annotations.CanIgnoreReturnValue;
Expand All @@ -31,7 +30,6 @@
* @author Chris Nokleberg
* @since 1.0
*/
@Beta
@DoNotMock("Implement it normally")
@J2ktIncompatible
@GwtIncompatible
Expand Down
3 changes: 0 additions & 3 deletions android/guava/src/com/google/common/io/ByteSource.java
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
import static com.google.common.io.ByteStreams.createBuffer;
import static com.google.common.io.ByteStreams.skipUpTo;

import com.google.common.annotations.Beta;
import com.google.common.annotations.GwtIncompatible;
import com.google.common.annotations.J2ktIncompatible;
import com.google.common.base.Ascii;
Expand Down Expand Up @@ -180,7 +179,6 @@ public boolean isEmpty() throws IOException {
*
* @since 19.0
*/
@Beta
public Optional<Long> sizeIfKnown() {
return Optional.absent();
}
Expand Down Expand Up @@ -316,7 +314,6 @@ public byte[] read() throws IOException {
* processor} throws an {@code IOException}
* @since 16.0
*/
@Beta
@CanIgnoreReturnValue // some processors won't return a useful result
@ParametricNullness
public <T extends @Nullable Object> T read(ByteProcessor<T> processor) throws IOException {
Expand Down
5 changes: 0 additions & 5 deletions android/guava/src/com/google/common/io/CharSource.java
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@

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.base.Ascii;
Expand Down Expand Up @@ -96,7 +95,6 @@ protected CharSource() {}
*
* @since 20.0
*/
@Beta
public ByteSource asByteSource(Charset charset) {
return new AsByteSource(charset);
}
Expand Down Expand Up @@ -140,7 +138,6 @@ public BufferedReader openBufferedStream() throws IOException {
*
* @since 19.0
*/
@Beta
public Optional<Long> lengthIfKnown() {
return Optional.absent();
}
Expand All @@ -164,7 +161,6 @@ public Optional<Long> lengthIfKnown() {
* @throws IOException if an I/O error occurs while reading the length of this source
* @since 19.0
*/
@Beta
public long length() throws IOException {
Optional<Long> lengthIfKnown = lengthIfKnown();
if (lengthIfKnown.isPresent()) {
Expand Down Expand Up @@ -319,7 +315,6 @@ public ImmutableList<String> readLines() throws IOException {
* processor} throws an {@code IOException}
* @since 16.0
*/
@Beta
@CanIgnoreReturnValue // some processors won't return a useful result
@ParametricNullness
public <T extends @Nullable Object> T readLines(LineProcessor<T> processor) throws IOException {
Expand Down
7 changes: 0 additions & 7 deletions android/guava/src/com/google/common/io/CharStreams.java
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,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.GwtIncompatible;
import com.google.common.annotations.J2ktIncompatible;
import com.google.errorprone.annotations.CanIgnoreReturnValue;
Expand Down Expand Up @@ -195,7 +194,6 @@ 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<String> readLines(Readable r) throws IOException {
List<String> result = new ArrayList<>();
LineReader lineReader = new LineReader(r);
Expand All @@ -215,7 +213,6 @@ public static List<String> 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
@ParametricNullness
public static <T extends @Nullable Object> T readLines(
Expand All @@ -239,7 +236,6 @@ public static List<String> readLines(Readable r) throws IOException {
*
* @since 20.0
*/
@Beta
@CanIgnoreReturnValue
public static long exhaust(Readable readable) throws IOException {
long total = 0;
Expand All @@ -261,7 +257,6 @@ 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) {
Expand All @@ -278,7 +273,6 @@ public static void skipFully(Reader reader, long n) throws IOException {
*
* @since 15.0
*/
@Beta
public static Writer nullWriter() {
return NullWriter.INSTANCE;
}
Expand Down Expand Up @@ -346,7 +340,6 @@ 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;
Expand Down
2 changes: 0 additions & 2 deletions android/guava/src/com/google/common/io/Closeables.java
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@

package com.google.common.io;

import com.google.common.annotations.Beta;
import com.google.common.annotations.GwtIncompatible;
import com.google.common.annotations.J2ktIncompatible;
import com.google.common.annotations.VisibleForTesting;
Expand All @@ -32,7 +31,6 @@
* @author Michael Lancaster
* @since 1.0
*/
@Beta
@J2ktIncompatible
@GwtIncompatible
@ElementTypesAreNonnullByDefault
Expand Down
2 changes: 0 additions & 2 deletions android/guava/src/com/google/common/io/Closer.java
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@

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.annotations.VisibleForTesting;
Expand Down Expand Up @@ -88,7 +87,6 @@
* @since 14.0
*/
// Coffee's for {@link Closer closers} only.
@Beta
@J2ktIncompatible
@GwtIncompatible
@ElementTypesAreNonnullByDefault
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@

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 java.io.FilterInputStream;
Expand All @@ -29,7 +28,6 @@
* @author Chris Nokleberg
* @since 1.0
*/
@Beta
@J2ktIncompatible
@GwtIncompatible
@ElementTypesAreNonnullByDefault
Expand Down
1 change: 0 additions & 1 deletion android/guava/src/com/google/common/io/Files.java
Original file line number Diff line number Diff line change
Expand Up @@ -851,7 +851,6 @@ public static String getNameWithoutExtension(String file) {
*
* @since 23.5
*/
@Beta
public static Traverser<File> fileTraverser() {
return Traverser.forTree(FILE_TREE);
}
Expand Down
2 changes: 1 addition & 1 deletion android/guava/src/com/google/common/io/Flushables.java
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@
* @author Michael Lancaster
* @since 1.0
*/
@Beta
@J2ktIncompatible
@GwtIncompatible
@ElementTypesAreNonnullByDefault
Expand Down Expand Up @@ -68,6 +67,7 @@ public static void flush(Flushable flushable, boolean swallowIOException) throws
*
* @param flushable the {@code Flushable} object to be flushed.
*/
@Beta
public static void flushQuietly(Flushable flushable) {
try {
flush(flushable, true);
Expand Down
2 changes: 0 additions & 2 deletions android/guava/src/com/google/common/io/LineProcessor.java
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@

package com.google.common.io;

import com.google.common.annotations.Beta;
import com.google.common.annotations.GwtIncompatible;
import com.google.common.annotations.J2ktIncompatible;
import com.google.errorprone.annotations.CanIgnoreReturnValue;
Expand All @@ -30,7 +29,6 @@
* @author Miles Barr
* @since 1.0
*/
@Beta
@J2ktIncompatible
@GwtIncompatible
@ElementTypesAreNonnullByDefault
Expand Down
2 changes: 0 additions & 2 deletions android/guava/src/com/google/common/io/LineReader.java
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
import static com.google.common.base.Preconditions.checkNotNull;
import static com.google.common.io.CharStreams.createBuffer;

import com.google.common.annotations.Beta;
import com.google.common.annotations.GwtIncompatible;
import com.google.common.annotations.J2ktIncompatible;
import com.google.errorprone.annotations.CanIgnoreReturnValue;
Expand All @@ -36,7 +35,6 @@
* @author Chris Nokleberg
* @since 1.0
*/
@Beta
@J2ktIncompatible
@GwtIncompatible
@ElementTypesAreNonnullByDefault
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@

package com.google.common.io;

import com.google.common.annotations.Beta;
import com.google.common.annotations.GwtIncompatible;
import com.google.common.annotations.J2ktIncompatible;
import com.google.common.base.Preconditions;
Expand All @@ -40,7 +39,6 @@
* @author Keith Bottner
* @since 8.0
*/
@Beta
@J2ktIncompatible
@GwtIncompatible
@ElementTypesAreNonnullByDefault
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@

package com.google.common.io;

import com.google.common.annotations.Beta;
import com.google.common.annotations.GwtIncompatible;
import com.google.common.annotations.J2ktIncompatible;
import com.google.common.base.Preconditions;
Expand All @@ -36,7 +35,6 @@
* @author Keith Bottner
* @since 8.0
*/
@Beta
@J2ktIncompatible
@GwtIncompatible
@ElementTypesAreNonnullByDefault
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@

package com.google.common.io;

import com.google.common.annotations.Beta;
import com.google.common.annotations.GwtIncompatible;
import com.google.common.annotations.J2ktIncompatible;
import com.google.common.base.Preconditions;
Expand All @@ -30,7 +29,6 @@
* @author Apple Chow
* @since 1.0
*/
@Beta
@J2ktIncompatible
@GwtIncompatible
@ElementTypesAreNonnullByDefault
Expand Down
2 changes: 0 additions & 2 deletions guava/src/com/google/common/io/ByteProcessor.java
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@

package com.google.common.io;

import com.google.common.annotations.Beta;
import com.google.common.annotations.GwtIncompatible;
import com.google.common.annotations.J2ktIncompatible;
import com.google.errorprone.annotations.CanIgnoreReturnValue;
Expand All @@ -31,7 +30,6 @@
* @author Chris Nokleberg
* @since 1.0
*/
@Beta
@DoNotMock("Implement it normally")
@J2ktIncompatible
@GwtIncompatible
Expand Down
3 changes: 0 additions & 3 deletions guava/src/com/google/common/io/ByteSource.java
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
import static com.google.common.io.ByteStreams.createBuffer;
import static com.google.common.io.ByteStreams.skipUpTo;

import com.google.common.annotations.Beta;
import com.google.common.annotations.GwtIncompatible;
import com.google.common.annotations.J2ktIncompatible;
import com.google.common.base.Ascii;
Expand Down Expand Up @@ -180,7 +179,6 @@ public boolean isEmpty() throws IOException {
*
* @since 19.0
*/
@Beta
public Optional<Long> sizeIfKnown() {
return Optional.absent();
}
Expand Down Expand Up @@ -316,7 +314,6 @@ public byte[] read() throws IOException {
* processor} throws an {@code IOException}
* @since 16.0
*/
@Beta
@CanIgnoreReturnValue // some processors won't return a useful result
@ParametricNullness
public <T extends @Nullable Object> T read(ByteProcessor<T> processor) throws IOException {
Expand Down
3 changes: 0 additions & 3 deletions guava/src/com/google/common/io/CharSink.java
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@

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.errorprone.annotations.CanIgnoreReturnValue;
Expand Down Expand Up @@ -137,7 +136,6 @@ public void writeLines(Iterable<? extends CharSequence> lines, String lineSepara
* @throws IOException if an I/O error occurs while writing to this sink
* @since 22.0
*/
@Beta
public void writeLines(Stream<? extends CharSequence> lines) throws IOException {
writeLines(lines, System.getProperty("line.separator"));
}
Expand All @@ -149,7 +147,6 @@ public void writeLines(Stream<? extends CharSequence> lines) throws IOException
* @throws IOException if an I/O error occurs while writing to this sink
* @since 22.0
*/
@Beta
public void writeLines(Stream<? extends CharSequence> lines, String lineSeparator)
throws IOException {
writeLines(lines.iterator(), lineSeparator);
Expand Down
Loading

0 comments on commit a589256

Please sign in to comment.