Skip to content

Commit a589256

Browse files
klueverGoogle Java Core Libraries
authored and
Google Java Core Libraries
committedMay 17, 2023
Remove @Beta from various io APIs.
RELNOTES=`io`: Remove `@Beta` from various `io` APIs. PiperOrigin-RevId: 532782558
1 parent a3571b4 commit a589256

32 files changed

+2
-81
lines changed
 

‎android/guava/src/com/google/common/io/ByteProcessor.java

-2
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@
1414

1515
package com.google.common.io;
1616

17-
import com.google.common.annotations.Beta;
1817
import com.google.common.annotations.GwtIncompatible;
1918
import com.google.common.annotations.J2ktIncompatible;
2019
import com.google.errorprone.annotations.CanIgnoreReturnValue;
@@ -31,7 +30,6 @@
3130
* @author Chris Nokleberg
3231
* @since 1.0
3332
*/
34-
@Beta
3533
@DoNotMock("Implement it normally")
3634
@J2ktIncompatible
3735
@GwtIncompatible

‎android/guava/src/com/google/common/io/ByteSource.java

-3
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@
1919
import static com.google.common.io.ByteStreams.createBuffer;
2020
import static com.google.common.io.ByteStreams.skipUpTo;
2121

22-
import com.google.common.annotations.Beta;
2322
import com.google.common.annotations.GwtIncompatible;
2423
import com.google.common.annotations.J2ktIncompatible;
2524
import com.google.common.base.Ascii;
@@ -180,7 +179,6 @@ public boolean isEmpty() throws IOException {
180179
*
181180
* @since 19.0
182181
*/
183-
@Beta
184182
public Optional<Long> sizeIfKnown() {
185183
return Optional.absent();
186184
}
@@ -316,7 +314,6 @@ public byte[] read() throws IOException {
316314
* processor} throws an {@code IOException}
317315
* @since 16.0
318316
*/
319-
@Beta
320317
@CanIgnoreReturnValue // some processors won't return a useful result
321318
@ParametricNullness
322319
public <T extends @Nullable Object> T read(ByteProcessor<T> processor) throws IOException {

‎android/guava/src/com/google/common/io/CharSource.java

-5
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@
1616

1717
import static com.google.common.base.Preconditions.checkNotNull;
1818

19-
import com.google.common.annotations.Beta;
2019
import com.google.common.annotations.GwtIncompatible;
2120
import com.google.common.annotations.J2ktIncompatible;
2221
import com.google.common.base.Ascii;
@@ -96,7 +95,6 @@ protected CharSource() {}
9695
*
9796
* @since 20.0
9897
*/
99-
@Beta
10098
public ByteSource asByteSource(Charset charset) {
10199
return new AsByteSource(charset);
102100
}
@@ -140,7 +138,6 @@ public BufferedReader openBufferedStream() throws IOException {
140138
*
141139
* @since 19.0
142140
*/
143-
@Beta
144141
public Optional<Long> lengthIfKnown() {
145142
return Optional.absent();
146143
}
@@ -164,7 +161,6 @@ public Optional<Long> lengthIfKnown() {
164161
* @throws IOException if an I/O error occurs while reading the length of this source
165162
* @since 19.0
166163
*/
167-
@Beta
168164
public long length() throws IOException {
169165
Optional<Long> lengthIfKnown = lengthIfKnown();
170166
if (lengthIfKnown.isPresent()) {
@@ -319,7 +315,6 @@ public ImmutableList<String> readLines() throws IOException {
319315
* processor} throws an {@code IOException}
320316
* @since 16.0
321317
*/
322-
@Beta
323318
@CanIgnoreReturnValue // some processors won't return a useful result
324319
@ParametricNullness
325320
public <T extends @Nullable Object> T readLines(LineProcessor<T> processor) throws IOException {

‎android/guava/src/com/google/common/io/CharStreams.java

-7
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@
1717
import static com.google.common.base.Preconditions.checkNotNull;
1818
import static com.google.common.base.Preconditions.checkPositionIndexes;
1919

20-
import com.google.common.annotations.Beta;
2120
import com.google.common.annotations.GwtIncompatible;
2221
import com.google.common.annotations.J2ktIncompatible;
2322
import com.google.errorprone.annotations.CanIgnoreReturnValue;
@@ -195,7 +194,6 @@ private static StringBuilder toStringBuilder(Readable r) throws IOException {
195194
* @return a mutable {@link List} containing all the lines
196195
* @throws IOException if an I/O error occurs
197196
*/
198-
@Beta
199197
public static List<String> readLines(Readable r) throws IOException {
200198
List<String> result = new ArrayList<>();
201199
LineReader lineReader = new LineReader(r);
@@ -215,7 +213,6 @@ public static List<String> readLines(Readable r) throws IOException {
215213
* @throws IOException if an I/O error occurs
216214
* @since 14.0
217215
*/
218-
@Beta
219216
@CanIgnoreReturnValue // some processors won't return a useful result
220217
@ParametricNullness
221218
public static <T extends @Nullable Object> T readLines(
@@ -239,7 +236,6 @@ public static List<String> readLines(Readable r) throws IOException {
239236
*
240237
* @since 20.0
241238
*/
242-
@Beta
243239
@CanIgnoreReturnValue
244240
public static long exhaust(Readable readable) throws IOException {
245241
long total = 0;
@@ -261,7 +257,6 @@ public static long exhaust(Readable readable) throws IOException {
261257
* @throws EOFException if this stream reaches the end before skipping all the characters
262258
* @throws IOException if an I/O error occurs
263259
*/
264-
@Beta
265260
public static void skipFully(Reader reader, long n) throws IOException {
266261
checkNotNull(reader);
267262
while (n > 0) {
@@ -278,7 +273,6 @@ public static void skipFully(Reader reader, long n) throws IOException {
278273
*
279274
* @since 15.0
280275
*/
281-
@Beta
282276
public static Writer nullWriter() {
283277
return NullWriter.INSTANCE;
284278
}
@@ -346,7 +340,6 @@ public String toString() {
346340
* @param target the object to which output will be sent
347341
* @return a new Writer object, unless target is a Writer, in which case the target is returned
348342
*/
349-
@Beta
350343
public static Writer asWriter(Appendable target) {
351344
if (target instanceof Writer) {
352345
return (Writer) target;

‎android/guava/src/com/google/common/io/Closeables.java

-2
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@
1414

1515
package com.google.common.io;
1616

17-
import com.google.common.annotations.Beta;
1817
import com.google.common.annotations.GwtIncompatible;
1918
import com.google.common.annotations.J2ktIncompatible;
2019
import com.google.common.annotations.VisibleForTesting;
@@ -32,7 +31,6 @@
3231
* @author Michael Lancaster
3332
* @since 1.0
3433
*/
35-
@Beta
3634
@J2ktIncompatible
3735
@GwtIncompatible
3836
@ElementTypesAreNonnullByDefault

‎android/guava/src/com/google/common/io/Closer.java

-2
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@
1616

1717
import static com.google.common.base.Preconditions.checkNotNull;
1818

19-
import com.google.common.annotations.Beta;
2019
import com.google.common.annotations.GwtIncompatible;
2120
import com.google.common.annotations.J2ktIncompatible;
2221
import com.google.common.annotations.VisibleForTesting;
@@ -88,7 +87,6 @@
8887
* @since 14.0
8988
*/
9089
// Coffee's for {@link Closer closers} only.
91-
@Beta
9290
@J2ktIncompatible
9391
@GwtIncompatible
9492
@ElementTypesAreNonnullByDefault

‎android/guava/src/com/google/common/io/CountingInputStream.java

-2
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@
1616

1717
import static com.google.common.base.Preconditions.checkNotNull;
1818

19-
import com.google.common.annotations.Beta;
2019
import com.google.common.annotations.GwtIncompatible;
2120
import com.google.common.annotations.J2ktIncompatible;
2221
import java.io.FilterInputStream;
@@ -29,7 +28,6 @@
2928
* @author Chris Nokleberg
3029
* @since 1.0
3130
*/
32-
@Beta
3331
@J2ktIncompatible
3432
@GwtIncompatible
3533
@ElementTypesAreNonnullByDefault

‎android/guava/src/com/google/common/io/Files.java

-1
Original file line numberDiff line numberDiff line change
@@ -851,7 +851,6 @@ public static String getNameWithoutExtension(String file) {
851851
*
852852
* @since 23.5
853853
*/
854-
@Beta
855854
public static Traverser<File> fileTraverser() {
856855
return Traverser.forTree(FILE_TREE);
857856
}

‎android/guava/src/com/google/common/io/Flushables.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@
2828
* @author Michael Lancaster
2929
* @since 1.0
3030
*/
31-
@Beta
3231
@J2ktIncompatible
3332
@GwtIncompatible
3433
@ElementTypesAreNonnullByDefault
@@ -68,6 +67,7 @@ public static void flush(Flushable flushable, boolean swallowIOException) throws
6867
*
6968
* @param flushable the {@code Flushable} object to be flushed.
7069
*/
70+
@Beta
7171
public static void flushQuietly(Flushable flushable) {
7272
try {
7373
flush(flushable, true);

‎android/guava/src/com/google/common/io/LineProcessor.java

-2
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@
1414

1515
package com.google.common.io;
1616

17-
import com.google.common.annotations.Beta;
1817
import com.google.common.annotations.GwtIncompatible;
1918
import com.google.common.annotations.J2ktIncompatible;
2019
import com.google.errorprone.annotations.CanIgnoreReturnValue;
@@ -30,7 +29,6 @@
3029
* @author Miles Barr
3130
* @since 1.0
3231
*/
33-
@Beta
3432
@J2ktIncompatible
3533
@GwtIncompatible
3634
@ElementTypesAreNonnullByDefault

‎android/guava/src/com/google/common/io/LineReader.java

-2
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@
1717
import static com.google.common.base.Preconditions.checkNotNull;
1818
import static com.google.common.io.CharStreams.createBuffer;
1919

20-
import com.google.common.annotations.Beta;
2120
import com.google.common.annotations.GwtIncompatible;
2221
import com.google.common.annotations.J2ktIncompatible;
2322
import com.google.errorprone.annotations.CanIgnoreReturnValue;
@@ -36,7 +35,6 @@
3635
* @author Chris Nokleberg
3736
* @since 1.0
3837
*/
39-
@Beta
4038
@J2ktIncompatible
4139
@GwtIncompatible
4240
@ElementTypesAreNonnullByDefault

‎android/guava/src/com/google/common/io/LittleEndianDataInputStream.java

-2
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@
1414

1515
package com.google.common.io;
1616

17-
import com.google.common.annotations.Beta;
1817
import com.google.common.annotations.GwtIncompatible;
1918
import com.google.common.annotations.J2ktIncompatible;
2019
import com.google.common.base.Preconditions;
@@ -40,7 +39,6 @@
4039
* @author Keith Bottner
4140
* @since 8.0
4241
*/
43-
@Beta
4442
@J2ktIncompatible
4543
@GwtIncompatible
4644
@ElementTypesAreNonnullByDefault

‎android/guava/src/com/google/common/io/LittleEndianDataOutputStream.java

-2
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@
1414

1515
package com.google.common.io;
1616

17-
import com.google.common.annotations.Beta;
1817
import com.google.common.annotations.GwtIncompatible;
1918
import com.google.common.annotations.J2ktIncompatible;
2019
import com.google.common.base.Preconditions;
@@ -36,7 +35,6 @@
3635
* @author Keith Bottner
3736
* @since 8.0
3837
*/
39-
@Beta
4038
@J2ktIncompatible
4139
@GwtIncompatible
4240
@ElementTypesAreNonnullByDefault

‎android/guava/src/com/google/common/io/PatternFilenameFilter.java

-2
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@
1414

1515
package com.google.common.io;
1616

17-
import com.google.common.annotations.Beta;
1817
import com.google.common.annotations.GwtIncompatible;
1918
import com.google.common.annotations.J2ktIncompatible;
2019
import com.google.common.base.Preconditions;
@@ -30,7 +29,6 @@
3029
* @author Apple Chow
3130
* @since 1.0
3231
*/
33-
@Beta
3432
@J2ktIncompatible
3533
@GwtIncompatible
3634
@ElementTypesAreNonnullByDefault

‎guava/src/com/google/common/io/ByteProcessor.java

-2
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@
1414

1515
package com.google.common.io;
1616

17-
import com.google.common.annotations.Beta;
1817
import com.google.common.annotations.GwtIncompatible;
1918
import com.google.common.annotations.J2ktIncompatible;
2019
import com.google.errorprone.annotations.CanIgnoreReturnValue;
@@ -31,7 +30,6 @@
3130
* @author Chris Nokleberg
3231
* @since 1.0
3332
*/
34-
@Beta
3533
@DoNotMock("Implement it normally")
3634
@J2ktIncompatible
3735
@GwtIncompatible

‎guava/src/com/google/common/io/ByteSource.java

-3
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@
1919
import static com.google.common.io.ByteStreams.createBuffer;
2020
import static com.google.common.io.ByteStreams.skipUpTo;
2121

22-
import com.google.common.annotations.Beta;
2322
import com.google.common.annotations.GwtIncompatible;
2423
import com.google.common.annotations.J2ktIncompatible;
2524
import com.google.common.base.Ascii;
@@ -180,7 +179,6 @@ public boolean isEmpty() throws IOException {
180179
*
181180
* @since 19.0
182181
*/
183-
@Beta
184182
public Optional<Long> sizeIfKnown() {
185183
return Optional.absent();
186184
}
@@ -316,7 +314,6 @@ public byte[] read() throws IOException {
316314
* processor} throws an {@code IOException}
317315
* @since 16.0
318316
*/
319-
@Beta
320317
@CanIgnoreReturnValue // some processors won't return a useful result
321318
@ParametricNullness
322319
public <T extends @Nullable Object> T read(ByteProcessor<T> processor) throws IOException {

‎guava/src/com/google/common/io/CharSink.java

-3
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@
1616

1717
import static com.google.common.base.Preconditions.checkNotNull;
1818

19-
import com.google.common.annotations.Beta;
2019
import com.google.common.annotations.GwtIncompatible;
2120
import com.google.common.annotations.J2ktIncompatible;
2221
import com.google.errorprone.annotations.CanIgnoreReturnValue;
@@ -137,7 +136,6 @@ public void writeLines(Iterable<? extends CharSequence> lines, String lineSepara
137136
* @throws IOException if an I/O error occurs while writing to this sink
138137
* @since 22.0
139138
*/
140-
@Beta
141139
public void writeLines(Stream<? extends CharSequence> lines) throws IOException {
142140
writeLines(lines, System.getProperty("line.separator"));
143141
}
@@ -149,7 +147,6 @@ public void writeLines(Stream<? extends CharSequence> lines) throws IOException
149147
* @throws IOException if an I/O error occurs while writing to this sink
150148
* @since 22.0
151149
*/
152-
@Beta
153150
public void writeLines(Stream<? extends CharSequence> lines, String lineSeparator)
154151
throws IOException {
155152
writeLines(lines.iterator(), lineSeparator);

0 commit comments

Comments
 (0)
Please sign in to comment.