Skip to content

Commit ac3b5b1

Browse files
punitdaakarnokd
authored andcommitted
Change javadoc explanation for Mutable List (#6314)
1 parent 7058126 commit ac3b5b1

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

src/main/java/io/reactivex/Flowable.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8746,7 +8746,7 @@ public final <K> Flowable<T> distinct(Function<? super T, K> keySelector,
87468746
* {@code CharSequence}s or {@code List}s where the objects will actually have the same
87478747
* references when they are modified and {@code distinctUntilChanged} will evaluate subsequent items as same.
87488748
* To avoid such situation, it is recommended that mutable data is converted to an immutable one,
8749-
* for example using `map(CharSequence::toString)` or `map(Collections::unmodifiableList)`.
8749+
* for example using `map(CharSequence::toString)` or `map(list -> Collections.unmodifiableList(new ArrayList<>(list)))`.
87508750
* <dl>
87518751
* <dt><b>Backpressure:</b></dt>
87528752
* <dd>The operator doesn't interfere with backpressure which is determined by the source {@code Publisher}'s
@@ -8789,7 +8789,7 @@ public final Flowable<T> distinctUntilChanged() {
87898789
* {@code CharSequence}s or {@code List}s where the objects will actually have the same
87908790
* references when they are modified and {@code distinctUntilChanged} will evaluate subsequent items as same.
87918791
* To avoid such situation, it is recommended that mutable data is converted to an immutable one,
8792-
* for example using `map(CharSequence::toString)` or `map(Collections::unmodifiableList)`.
8792+
* for example using `map(CharSequence::toString)` or `map(list -> Collections.unmodifiableList(new ArrayList<>(list)))`.
87938793
* <dl>
87948794
* <dt><b>Backpressure:</b></dt>
87958795
* <dd>The operator doesn't interfere with backpressure which is determined by the source {@code Publisher}'s
@@ -8828,7 +8828,7 @@ public final <K> Flowable<T> distinctUntilChanged(Function<? super T, K> keySele
88288828
* {@code CharSequence}s or {@code List}s where the objects will actually have the same
88298829
* references when they are modified and {@code distinctUntilChanged} will evaluate subsequent items as same.
88308830
* To avoid such situation, it is recommended that mutable data is converted to an immutable one,
8831-
* for example using `map(CharSequence::toString)` or `map(Collections::unmodifiableList)`.
8831+
* for example using `map(CharSequence::toString)` or `map(list -> Collections.unmodifiableList(new ArrayList<>(list)))`.
88328832
* <dl>
88338833
* <dt><b>Backpressure:</b></dt>
88348834
* <dd>The operator doesn't interfere with backpressure which is determined by the source {@code Publisher}'s

src/main/java/io/reactivex/Observable.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7830,7 +7830,7 @@ public final <K> Observable<T> distinct(Function<? super T, K> keySelector, Call
78307830
* {@code CharSequence}s or {@code List}s where the objects will actually have the same
78317831
* references when they are modified and {@code distinctUntilChanged} will evaluate subsequent items as same.
78327832
* To avoid such situation, it is recommended that mutable data is converted to an immutable one,
7833-
* for example using `map(CharSequence::toString)` or `map(Collections::unmodifiableList)`.
7833+
* for example using `map(CharSequence::toString)` or `map(list -> Collections.unmodifiableList(new ArrayList<>(list)))`.
78347834
* <dl>
78357835
* <dt><b>Scheduler:</b></dt>
78367836
* <dd>{@code distinctUntilChanged} does not operate by default on a particular {@link Scheduler}.</dd>
@@ -7869,7 +7869,7 @@ public final Observable<T> distinctUntilChanged() {
78697869
* {@code CharSequence}s or {@code List}s where the objects will actually have the same
78707870
* references when they are modified and {@code distinctUntilChanged} will evaluate subsequent items as same.
78717871
* To avoid such situation, it is recommended that mutable data is converted to an immutable one,
7872-
* for example using `map(CharSequence::toString)` or `map(Collections::unmodifiableList)`.
7872+
* for example using `map(CharSequence::toString)` or `map(list -> Collections.unmodifiableList(new ArrayList<>(list)))`.
78737873
* <dl>
78747874
* <dt><b>Scheduler:</b></dt>
78757875
* <dd>{@code distinctUntilChanged} does not operate by default on a particular {@link Scheduler}.</dd>
@@ -7904,7 +7904,7 @@ public final <K> Observable<T> distinctUntilChanged(Function<? super T, K> keySe
79047904
* {@code CharSequence}s or {@code List}s where the objects will actually have the same
79057905
* references when they are modified and {@code distinctUntilChanged} will evaluate subsequent items as same.
79067906
* To avoid such situation, it is recommended that mutable data is converted to an immutable one,
7907-
* for example using `map(CharSequence::toString)` or `map(Collections::unmodifiableList)`.
7907+
* for example using `map(CharSequence::toString)` or `map(list -> Collections.unmodifiableList(new ArrayList<>(list)))`.
79087908
* <dl>
79097909
* <dt><b>Scheduler:</b></dt>
79107910
* <dd>{@code distinctUntilChanged} does not operate by default on a particular {@link Scheduler}.</dd>

0 commit comments

Comments
 (0)