Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@koukoucai
Copy link

Thank you for contributing to RxJava. Before pressing the "Create Pull Request" button, please consider the following points:

  • Please give a description about what and why you are contributing, even if it's trivial.

  • Please include the issue list number(s) or other PR numbers in the description if you are contributing in response to those.

  • Please include a reasonable set of unit tests if you contribute new code or change an existing one. If you contribute an operator, (if applicable) please make sure you have tests for working with an empty, just, range of values as well as an error source, with and/or without backpressure and see if unsubscription/cancellation propagates correctly.

chronvas and others added 30 commits March 15, 2019 19:21
* 2.x: Improving NPE message in CompositeDisposable add(..) when param is null

* 2.x: Improving NPE message in CompositeDisposable addAll(..) when item in vararg param is null

* 2.x: Improved in CompositeDisposable: NPE error messages, parameter naming at methods, added @throws javadoc where applicable

* 2.x: Applied PR suggestions in javadoc and messages for CompositeDisposable
…eX#6442)

* Error handle on Completable.fromAction with RxJavaPlugins

* Error handle on Completable.fromRunnable with RxJavaPlugins

* Added error handling java docs section to Completable.fromRunnable
In the constructor of `ObservableRefCount` that takes `ConnectableObservable<T> source` as the argument, we set `timeout` to `0L`. In that specific use case of `ObservableRefCount`, `scheduler` is never needed. It's only referenced in `cancel()` method but if timeout is 0, it won't be triggered at all because there is early return. This commit removes the need to depend on `Schedulers.trampoline()` and instead passes null to be scheduler when the ref count is not time-based.

The reasons for this change are the following:

1. In projects that don't depend on `Schedulers` class, if there is no reference to `Schedulers`, the whole `Schedulers` can be stripped out of the library after optimizations (e.g., proguard). With constructor that references `Schedulers`, the optimizer can't properly strip it out. In our quick test of our Android app, we were able to reduce the RxJava library size dependency from 51KB to 37KB (after optimization but before compression) by simply avoiding access to `Schedulers` in `ObservableRefCount`.
2. In terms of modularity, `ObservableRefCount` is just an operator so it by itself should probably not have dependency on what available pool of schedulers (`Schedulers`) there are. It should just know that there is some `Scheduler` that could be passed to `ObservableRefCount` when `ObservableRefCount` needs it.
* Update Maybe.java

* Update Single.java
Specify that the `times` function parameter describes "the number of times
to resubscribe if the current *operator* fails".

Also, this commit updates some unit tests to illustrate the Javadoc wording.

Solves: ReactiveX#6402
* Change error message in ObservableFromArray

Changed error message from "The $i th element is null" to "The element at index $i is null".

Solves ReactiveX#6460

* Change error messages in FlowableFromArray

Changed error messages from "array element is null" to "The element at index $i is null".

Solves ReactiveX#6460
* Update Maybe.java

* Update Single.java

* Update ObservableSampleWithObservable.java

* Update FlowableSamplePublisher.java

* Update FlowableSamplePublisher.java
* remove unused else from the Observable

* fixed MR comments
* Update Additional-Reading.md

ReactiveX#6132
- 'What is Reactive Programming?' was wrong link, so deleted.
- First line was edited.

* Update Additional-Reading.md

- add 'What is Reactive Programming?' link.
* Null check for BufferExactBoundedObserver

Other variants contain this Null check already, e.g. BufferExactUnboundedObserver
It is causing 0.1% crashes in our production app.

* ObservableBufferTimed.BufferExactBoundedObserver - failing supplier unit test
FlowableBufferTimed.BufferExactBoundedSubscriber - failing supplier fix + unit test

* Better Unit tests for FlowableBufferTimed and BufferExactBoundedSubscriber NPE issue
Reverted
* 2.x: Fix publish().refCount() hang due to race

* Add more time to GC when detecting leaks.

* Fix subscriber swap mistake in the Alt implementation
akarnokd and others added 28 commits October 29, 2019 09:38
Fixes Backpressure.md on ReactiveX#6132 

Fix Images on Backpressure.md crashed on wrong address. Put full address of images.
…bservableSource implementation that doesn't subclass Observable (ReactiveX#6754)

* 2.x: Zip, CombineLatest, and Amb operators throw when supplied with ObservableSource implementation that doesn't subclass Observable ReactiveX#6753

* 2.x: add tests for allowing arbitrary ObservableSource implementations
* 2.x: Fix Flowable.concatMap backpressure w/ scalars

* Replace Java 8 constructs
@koukoucai koukoucai closed this Dec 8, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.