Skip to content

Commit

Permalink
Merge pull request #1244 from benjchristensen/from-just
Browse files Browse the repository at this point in the history
Observable.from(T) using Observable.just(T)
  • Loading branch information
benjchristensen committed May 22, 2014
2 parents a2f4782 + 2f3c0d5 commit 0efda07
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions rxjava-core/src/main/java/rx/Observable.java
Original file line number Diff line number Diff line change
Expand Up @@ -1084,10 +1084,8 @@ public final static <T> Observable<T> from(Iterable<? extends T> iterable, Sched
* @return an Observable that emits the item
* @see <a href="https://github.com/Netflix/RxJava/wiki/Creating-Observables#wiki-from">RxJava Wiki: from()</a>
*/
// suppress unchecked because we are using varargs inside the method
@SuppressWarnings("unchecked")
public final static <T> Observable<T> from(T t1) {
return from(Arrays.asList(t1));
return just(t1);
}

/**
Expand Down

0 comments on commit 0efda07

Please sign in to comment.