Skip to content

Commit 93b4d93

Browse files
cpovirkGoogle Java Core Libraries
authored andcommitted
Add @since tags for the first batch of Java-8-related APIs.
(Those are the ones from cl/597243015, cl/598637400, and cl/598664192.) RELNOTES=n/a PiperOrigin-RevId: 599916105
1 parent 78d27dd commit 93b4d93

10 files changed

Lines changed: 26 additions & 1 deletion

core/src/main/java/com/google/common/truth/IntStreamSubject.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@
3939
* stream before asserting on it.
4040
*
4141
* @author Kurt Alfred Kluever
42+
* @since 1.3.0 (previously part of {@code truth-java8-extension})
4243
*/
4344
@SuppressWarnings({
4445
"deprecation", // TODO(b/134064106): design an alternative to no-arg check()

core/src/main/java/com/google/common/truth/LongStreamSubject.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@
3939
* stream before asserting on it.
4040
*
4141
* @author Kurt Alfred Kluever
42+
* @since 1.3.0 (previously part of {@code truth-java8-extension})
4243
*/
4344
@SuppressWarnings({
4445
"deprecation", // TODO(b/134064106): design an alternative to no-arg check()

core/src/main/java/com/google/common/truth/OptionalDoubleSubject.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@
2525
* Propositions for Java 8 {@link OptionalDouble} subjects.
2626
*
2727
* @author Ben Douglass
28+
* @since 1.3.0 (previously part of {@code truth-java8-extension})
2829
*/
2930
@SuppressWarnings("Java7ApiChecker") // used only from APIs with Java 8 in their signatures
3031
@IgnoreJRERequirement

core/src/main/java/com/google/common/truth/OptionalIntSubject.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@
2525
* Propositions for Java 8 {@link OptionalInt} subjects.
2626
*
2727
* @author Ben Douglass
28+
* @since 1.3.0 (previously part of {@code truth-java8-extension})
2829
*/
2930
@SuppressWarnings("Java7ApiChecker") // used only from APIs with Java 8 in their signatures
3031
@IgnoreJRERequirement

core/src/main/java/com/google/common/truth/OptionalLongSubject.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@
2525
* Propositions for Java 8 {@link OptionalLong} subjects.
2626
*
2727
* @author Ben Douglass
28+
* @since 1.3.0 (previously part of {@code truth-java8-extension})
2829
*/
2930
@SuppressWarnings("Java7ApiChecker") // used only from APIs with Java 8 in their signatures
3031
@IgnoreJRERequirement

core/src/main/java/com/google/common/truth/OptionalSubject.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@
2525
* Propositions for Java 8 {@link Optional} subjects.
2626
*
2727
* @author Christian Gruber
28+
* @since 1.3.0 (previously part of {@code truth-java8-extension})
2829
*/
2930
@SuppressWarnings("Java7ApiChecker") // used only from APIs with Java 8 in their signatures
3031
@IgnoreJRERequirement

core/src/main/java/com/google/common/truth/PathSubject.java

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,11 @@
1919
import com.google.j2objc.annotations.J2ObjCIncompatible;
2020
import java.nio.file.Path;
2121

22-
/** Assertions for {@link Path} instances. */
22+
/**
23+
* Assertions for {@link Path} instances.
24+
*
25+
* @since 1.3.0 (previously part of {@code truth-java8-extension})
26+
*/
2327
@GwtIncompatible
2428
@J2ObjCIncompatible
2529
@J2ktIncompatible

core/src/main/java/com/google/common/truth/StandardSubjectBuilder.java

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -170,6 +170,10 @@ public final TableSubject that(@Nullable Table<?, ?, ?> actual) {
170170
return new TableSubject(metadata(), actual);
171171
}
172172

173+
/**
174+
* @since 1.3.0 (with access to {@link OptionalSubject} previously part of {@code
175+
* truth-java8-extension})
176+
*/
173177
@SuppressWarnings({
174178
"Java7ApiChecker", // no more dangerous that wherever the user got the Optional
175179
"NullableOptional", // Truth always accepts nulls, no matter the type
@@ -178,6 +182,10 @@ public final OptionalSubject that(@Nullable Optional<?> actual) {
178182
return new OptionalSubject(metadata(), actual, "optional");
179183
}
180184

185+
/**
186+
* @since 1.3.0 (with access to {@link StreamSubject} previously part of {@code
187+
* truth-java8-extension})
188+
*/
181189
@SuppressWarnings("Java7ApiChecker") // no more dangerous that wherever the user got the Stream
182190
public final StreamSubject that(@Nullable Stream<?> actual) {
183191
return new StreamSubject(metadata(), actual);

core/src/main/java/com/google/common/truth/StreamSubject.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@
4343
* stream before asserting on it.
4444
*
4545
* @author Kurt Alfred Kluever
46+
* @since 1.3.0 (previously part of {@code truth-java8-extension})
4647
*/
4748
@SuppressWarnings("Java7ApiChecker") // used only from APIs with Java 8 in their signatures
4849
@IgnoreJRERequirement

core/src/main/java/com/google/common/truth/Truth.java

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -253,12 +253,18 @@ public static TableSubject assertThat(@Nullable Table<?, ?, ?> actual) {
253253

254254
@SuppressWarnings("Java7ApiChecker") // no more dangerous that wherever the user got the Optional
255255
@GwtIncompatible // creates ambiguities (Eclipse bug 577808 or similar?)
256+
/**
257+
* @since 1.3.0 (present in {@link Truth8} since before 1.0)
258+
*/
256259
public static <T> OptionalSubject assertThat(@Nullable Optional<T> actual) {
257260
return assert_().that(actual);
258261
}
259262

260263
@SuppressWarnings("Java7ApiChecker") // no more dangerous that wherever the user got the Stream
261264
@GwtIncompatible // creates ambiguities (Eclipse bug 577808 or similar?)
265+
/**
266+
* @since 1.3.0 (present in {@link Truth8} since before 1.0)
267+
*/
262268
public static <T extends @Nullable Object> StreamSubject assertThat(@Nullable Stream<T> actual) {
263269
return assert_().that(actual);
264270
}

0 commit comments

Comments
 (0)