Skip to content

Commit

Permalink
Merge pull request #1687 from jbripley/opt-empty
Browse files Browse the repository at this point in the history
Don't allocate an empty ArrayList for each Observable.empty call
  • Loading branch information
benjchristensen committed Oct 1, 2014
2 parents 7dbed13 + 8efad4a commit ec2f991
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/main/java/rx/Observable.java
Original file line number Diff line number Diff line change
Expand Up @@ -1057,7 +1057,7 @@ public final static <T> Observable<T> defer(Func0<Observable<T>> observableFacto
* @see <a href="http://msdn.microsoft.com/en-us/library/hh229670.aspx">MSDN: Observable.Empty</a>
*/
public final static <T> Observable<T> empty() {
return from(new ArrayList<T>());
return from(Collections.<T>emptyList());
}

/**
Expand Down

0 comments on commit ec2f991

Please sign in to comment.