1
+ /**
2
+ * Copyright 2013 Netflix, Inc.
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */
1
16
package rx .operators ;
2
17
3
18
import java .util .ArrayList ;
@@ -925,8 +940,8 @@ public Subscription call(Observer<String> observer) {
925
940
Observable <BufferOpening > openings = Observable .create (new Func1 <Observer <BufferOpening >, Subscription >() {
926
941
@ Override
927
942
public Subscription call (Observer <BufferOpening > observer ) {
928
- push (observer , new BufferOpenings (), 50 );
929
- push (observer , new BufferOpenings (), 200 );
943
+ push (observer , BufferOpenings . create (), 50 );
944
+ push (observer , BufferOpenings . create (), 200 );
930
945
complete (observer , 250 );
931
946
return Subscriptions .empty ();
932
947
}
@@ -938,7 +953,7 @@ public Observable<BufferClosing> call(BufferOpening opening) {
938
953
return Observable .create (new Func1 <Observer <BufferClosing >, Subscription >() {
939
954
@ Override
940
955
public Subscription call (Observer <BufferClosing > observer ) {
941
- push (observer , new BufferClosings (), 100 );
956
+ push (observer , BufferClosings . create (), 100 );
942
957
complete (observer , 101 );
943
958
return Subscriptions .empty ();
944
959
}
@@ -978,7 +993,7 @@ public Observable<BufferClosing> call() {
978
993
return Observable .create (new Func1 <Observer <BufferClosing >, Subscription >() {
979
994
@ Override
980
995
public Subscription call (Observer <BufferClosing > observer ) {
981
- push (observer , new BufferClosings (), 100 );
996
+ push (observer , BufferClosings . create (), 100 );
982
997
complete (observer , 101 );
983
998
return Subscriptions .empty ();
984
999
}
0 commit comments