Skip to content

2.x: Correct factory method name for converting an RS Publisher. #4381

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Aug 20, 2016
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 4 additions & 5 deletions src/main/java/io/reactivex/Observable.java
Original file line number Diff line number Diff line change
Expand Up @@ -1748,18 +1748,17 @@ public static <T> Observable<T> fromIterable(Iterable<? extends T> source) {
}

/**
* Converts an arbitrary Reactive-Streams ObservableSource into a Observable if not already a
* Observable.
* Converts an arbitrary Reactive-Streams Publisher into an Observable.
* <dl>
* <dt><b>Scheduler:</b></dt>
* <dd>{@code fromObservableSource} does not operate by default on a particular {@link Scheduler}.</dd>
* <dd>{@code fromPublisher} does not operate by default on a particular {@link Scheduler}.</dd>
* </dl>
* @param <T> the value type of the flow
* @param publisher the ObservableSource to convert
* @param publisher the Publisher to convert
* @return the new Observable instance
* @throws NullPointerException if publisher is null
*/
public static <T> Observable<T> fromObservableSource(final Publisher<? extends T> publisher) {
public static <T> Observable<T> fromPublisher(Publisher<? extends T> publisher) {
Objects.requireNonNull(publisher, "publisher is null");
return new ObservableFromPublisher<T>(publisher);
}
Expand Down