Skip to content

Commit 67ef6a3

Browse files
Merge pull request #324 from benjchristensen/0.11-cleanup
0.11 Cleanup
2 parents 84696e0 + e9cb145 commit 67ef6a3

32 files changed

+301
-50
lines changed

language-adaptors/rxjava-clojure/build.gradle

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,16 @@ dependencies {
66

77
// clojure
88
compile 'org.clojure:clojure:1.4.+'
9-
//compile 'clj-http:clj-http:0.6.4' // https://clojars.org/clj-http
9+
provided 'clj-http:clj-http:0.6.4' // https://clojars.org/clj-http
1010
}
1111

12+
tasks.compileExamplesClojure.classpath = files(tasks.compileClojure.destinationDir) + tasks.compileClojure.classpath
13+
1214
/*
1315
* Clojure
1416
*/
1517
aotCompile = true
16-
warnOnReflection = true
18+
warnOnReflection = false
1719

1820
buildscript {
1921
repositories { maven { url "http://clojars.org/repo" } }
@@ -37,10 +39,6 @@ tasks.clojureTest {
3739
classpath = classpath + configurations.provided
3840
}
3941

40-
tasks.compileExamplesClojure {
41-
classpath = classpath + configurations.provided
42-
}
43-
4442
jar {
4543
manifest {
4644
name = 'rxjava-clojure'

language-adaptors/rxjava-clojure/src/examples/clojure/rx/lang/clojure/examples/http_examples.txt renamed to language-adaptors/rxjava-clojure/src/examples/clojure/rx/lang/clojure/examples/http_examples.clj

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,18 @@
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+
;
116
(ns rx.lang.clojure.examples.http-examples
217
(:require [rx.lang.clojure.interop :as rx]
318
[clj-http.client :as http])

language-adaptors/rxjava-clojure/src/examples/clojure/rx/lang/clojure/examples/rx_examples.txt renamed to language-adaptors/rxjava-clojure/src/examples/clojure/rx/lang/clojure/examples/rx_examples.clj

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,18 @@
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+
;
116
(ns rx.lang.clojure.examples.rx-examples
217
(:require [rx.lang.clojure.interop :as rx])
318
(:import rx.Observable rx.subscriptions.Subscriptions))

language-adaptors/rxjava-clojure/src/examples/clojure/rx/lang/clojure/examples/video_example.txt renamed to language-adaptors/rxjava-clojure/src/examples/clojure/rx/lang/clojure/examples/video_example.clj

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,18 @@
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+
;
116
(ns rx.lang.clojure.examples.video-example
217
(:require [rx.lang.clojure.interop :as rx])
318
(:import [rx Observable Observer Subscription]
@@ -128,7 +143,7 @@
128143
(.onCompleted observer)
129144
(Subscriptions/empty))))
130145

131-
(comment (.subscribe (video-list->videos (video-list 2)) println))
146+
(comment (.subscribe (video-list->videos (video-list 2)) (rx/action* println)))
132147

133148
(defn ^Observable video->metadata
134149
[video-id]
@@ -163,5 +178,5 @@
163178
:actual-star-rating (rand-int 5) })
164179
(.onCompleted observer))))
165180

166-
(comment (.subscribe (video->rating 234345 8888) println))
181+
(comment (.subscribe (video->rating 234345 8888) (rx/action* println)))
167182

rxjava-core/src/main/java/rx/Observable.java

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@
1919
import java.util.Arrays;
2020
import java.util.Collection;
2121
import java.util.List;
22-
import java.util.Map;
2322
import java.util.concurrent.Future;
2423
import java.util.concurrent.TimeUnit;
2524

@@ -77,7 +76,6 @@
7776
import rx.util.OnErrorNotImplementedException;
7877
import rx.util.Range;
7978
import rx.util.Timestamped;
80-
import rx.util.functions.Action;
8179
import rx.util.functions.Action0;
8280
import rx.util.functions.Action1;
8381
import rx.util.functions.Func0;
@@ -87,7 +85,6 @@
8785
import rx.util.functions.Func4;
8886
import rx.util.functions.FuncN;
8987
import rx.util.functions.Function;
90-
import rx.util.functions.Functions;
9188

9289
/**
9390
* The Observable interface that implements the Reactive Pattern.
@@ -781,13 +778,11 @@ public static <T> Observable<T> switchDo(Observable<Observable<T>> sequenceOfSeq
781778
}
782779

783780
/**
784-
* Given an Observable that emits Observables, creates a single Observable that
781+
* On an Observable that emits Observables, creates a single Observable that
785782
* emits the items emitted by the most recently published of those Observables.
786783
* <p>
787784
* <img width="640" src="https://github.com/Netflix/RxJava/wiki/images/rx-operators/switchDo.png">
788785
*
789-
* @param sequenceOfSequences
790-
* the source Observable that emits Observables
791786
* @return an Observable that emits only the items emitted by the most recently published
792787
* Observable
793788
* @throws ClassCastException
@@ -1133,7 +1128,7 @@ public Observable<List<T>> buffer(int count) {
11331128
* The maximum size of each buffer before it should be emitted.
11341129
* @param skip
11351130
* How many produced values need to be skipped before starting a new buffer. Note that when "skip" and
1136-
* "count" are equals that this is the same operation as {@link Observable#buffer(Observable, int)}.
1131+
* "count" are equals that this is the same operation as {@link Observable#buffer(int)}.
11371132
* @return
11381133
* An {@link Observable} which produces buffers every "skipped" values containing at most
11391134
* "count" produced values.

rxjava-core/src/main/java/rx/Scheduler.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,6 @@
2929
import rx.concurrency.TestScheduler;
3030
import rx.subscriptions.Subscriptions;
3131
import rx.util.functions.Action0;
32-
import rx.util.functions.Func0;
3332
import rx.util.functions.Func1;
3433
import rx.util.functions.Func2;
3534

rxjava-core/src/main/java/rx/Subscription.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
/**
2121
* Subscription returns from {@link Observable#subscribe(Observer)} to allow unsubscribing.
2222
* <p>
23-
* See utilities in {@link Subscriptions} and implementations in the {@link rx.subscriptions} package.
23+
* See utilities in {@link Subscriptions} and implementations in the {@code rx.subscriptions} package.
2424
* <p>
2525
* This interface is the RxJava equivalent of {@code IDisposable} in Microsoft's Rx implementation.
2626
*/

rxjava-core/src/main/java/rx/observables/BlockingObservable.java

Lines changed: 17 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,18 @@
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+
*/
116
package rx.observables;
217

318
import static org.junit.Assert.*;
@@ -15,18 +30,16 @@
1530
import rx.Observable;
1631
import rx.Observer;
1732
import rx.Subscription;
18-
import rx.operators.SafeObservableSubscription;
19-
import rx.operators.SafeObserver;
2033
import rx.operators.OperationMostRecent;
2134
import rx.operators.OperationNext;
2235
import rx.operators.OperationToFuture;
2336
import rx.operators.OperationToIterator;
37+
import rx.operators.SafeObservableSubscription;
38+
import rx.operators.SafeObserver;
2439
import rx.subscriptions.BooleanSubscription;
2540
import rx.subscriptions.Subscriptions;
2641
import rx.util.functions.Action1;
2742
import rx.util.functions.Func1;
28-
import rx.util.functions.FuncN;
29-
import rx.util.functions.Functions;
3043

3144
/**
3245
* An extension of {@link Observable} that provides blocking operators.

rxjava-core/src/main/java/rx/observables/GroupedObservable.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
* An {@link Observable} that has been grouped by a key whose value can be obtained using
2525
* {@link #getKey()} <p>
2626
*
27-
* @see Observable#groupBy(Observable, Func1)
27+
* @see Observable#groupBy(Func1)
2828
*
2929
* @param <K> the type of the key
3030
* @param <T> the type of the elements in the group

rxjava-core/src/main/java/rx/operators/OperationAll.java

Lines changed: 20 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,31 @@
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+
*/
116
package rx.operators;
217

18+
import static org.mockito.Mockito.*;
19+
20+
import java.util.concurrent.atomic.AtomicBoolean;
21+
322
import org.junit.Test;
23+
424
import rx.Observable;
525
import rx.Observer;
626
import rx.Subscription;
727
import rx.util.functions.Func1;
828

9-
import java.util.concurrent.atomic.AtomicBoolean;
10-
11-
import static org.mockito.Mockito.mock;
12-
import static org.mockito.Mockito.verify;
13-
import static org.mockito.Mockito.verifyNoMoreInteractions;
14-
1529
/**
1630
* Returns an Observable that emits a Boolean that indicates whether all items emitted by an
1731
* Observable satisfy a condition.

0 commit comments

Comments
 (0)