Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
Next Next commit
a few warnings, javadoc, and one missing scheduler parameter
  • Loading branch information
Joachim Hofer committed Sep 12, 2013
commit 2afbe5c470fb9936a9cccf3cf8b08772762720d7
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 @@ -1863,7 +1863,7 @@ public Observable<T> debounce(long timeout, TimeUnit unit) {
* @see {@link #throttleWithTimeout};
*/
public Observable<T> debounce(long timeout, TimeUnit unit, Scheduler scheduler) {
return create(OperationDebounce.debounce(this, timeout, unit));
return create(OperationDebounce.debounce(this, timeout, unit, scheduler));
}

/**
Expand Down Expand Up @@ -1924,8 +1924,6 @@ public Observable<T> throttleWithTimeout(long timeout, TimeUnit unit, Scheduler
* Time to wait before sending another value after emitting last value.
* @param unit
* The unit of time for the specified timeout.
* @param scheduler
* The {@link Scheduler} to use internally to manage the timers which handle timeout for each event.
* @return Observable which performs the throttle operation.
*/
public Observable<T> throttleFirst(long windowDuration, TimeUnit unit) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -287,7 +287,6 @@ public void testEmpty() {
public void testError() {
Observable<String> sourceStrings = Observable.from("one", "two", "three", "four", "five", "six");
Observable<String> errorSource = Observable.error(new RuntimeException("forced failure"));
@SuppressWarnings("unchecked")
Observable<String> source = Observable.concat(sourceStrings, errorSource);

Observable<GroupedObservable<Integer, String>> grouped = Observable.create(groupBy(source, length));
Expand Down
5 changes: 0 additions & 5 deletions rxjava-core/src/main/java/rx/operators/OperationMap.java
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,6 @@ public void before() {
public void testMap() {
Map<String, String> m1 = getMap("One");
Map<String, String> m2 = getMap("Two");
@SuppressWarnings("unchecked")
Observable<Map<String, String>> observable = Observable.from(m1, m2);

Observable<String> m = Observable.create(map(observable, new Func1<Map<String, String>, String>() {
Expand Down Expand Up @@ -176,7 +175,6 @@ public void testMapMany() {
/* now simulate the behavior to take those IDs and perform nested async calls based on them */
Observable<String> m = Observable.create(mapMany(ids, new Func1<Integer, Observable<String>>() {

@SuppressWarnings("unchecked")
@Override
public Observable<String> call(Integer id) {
/* simulate making a nested async call which creates another Observable */
Expand Down Expand Up @@ -215,15 +213,12 @@ public String call(Map<String, String> map) {
public void testMapMany2() {
Map<String, String> m1 = getMap("One");
Map<String, String> m2 = getMap("Two");
@SuppressWarnings("unchecked")
Observable<Map<String, String>> observable1 = Observable.from(m1, m2);

Map<String, String> m3 = getMap("Three");
Map<String, String> m4 = getMap("Four");
@SuppressWarnings("unchecked")
Observable<Map<String, String>> observable2 = Observable.from(m3, m4);

@SuppressWarnings("unchecked")
Observable<Observable<Map<String, String>>> observable = Observable.from(observable1, observable2);

Observable<String> m = Observable.create(mapMany(observable, new Func1<Observable<Map<String, String>>, Observable<String>>() {
Expand Down
2 changes: 1 addition & 1 deletion rxjava-core/src/main/java/rx/operators/OperationRetry.java
Original file line number Diff line number Diff line change
Expand Up @@ -198,6 +198,6 @@ public Subscription onSubscribe(Observer<? super String> o) {
}
return Subscriptions.empty();
}
};
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -50,12 +50,6 @@ public static <T, E> Observable<T> takeUntil(final Observable<? extends T> sourc
Observable<Notification<T>> s = Observable.create(new SourceObservable<T>(source));
Observable<Notification<T>> o = Observable.create(new OtherObservable<T, E>(other));

@SuppressWarnings("unchecked")
/**
* In JDK 7 we could use 'varargs' instead of 'unchecked'.
* See http://stackoverflow.com/questions/1445233/is-it-possible-to-solve-the-a-generic-array-of-t-is-created-for-a-varargs-param
* and http://hg.openjdk.java.net/jdk7/tl/langtools/rev/46cf751559ae
*/
Observable<Notification<T>> result = Observable.merge(s, o);

return result.takeWhile(new Func1<Notification<T>, Boolean>() {
Expand Down
6 changes: 0 additions & 6 deletions rxjava-core/src/test/java/rx/concurrency/TestSchedulers.java
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@ public void testComputationThreadPool1() {

Observable<Integer> o1 = Observable.<Integer> from(1, 2, 3, 4, 5);
Observable<Integer> o2 = Observable.<Integer> from(6, 7, 8, 9, 10);
@SuppressWarnings("unchecked")
Observable<String> o = Observable.<Integer> merge(o1, o2).map(new Func1<Integer, String>() {

@Override
Expand All @@ -68,7 +67,6 @@ public void testIOThreadPool1() {

Observable<Integer> o1 = Observable.<Integer> from(1, 2, 3, 4, 5);
Observable<Integer> o2 = Observable.<Integer> from(6, 7, 8, 9, 10);
@SuppressWarnings("unchecked")
Observable<String> o = Observable.<Integer> merge(o1, o2).map(new Func1<Integer, String>() {

@Override
Expand All @@ -94,7 +92,6 @@ public void testMergeWithoutScheduler1() {

Observable<Integer> o1 = Observable.<Integer> from(1, 2, 3, 4, 5);
Observable<Integer> o2 = Observable.<Integer> from(6, 7, 8, 9, 10);
@SuppressWarnings("unchecked")
Observable<String> o = Observable.<Integer> merge(o1, o2).map(new Func1<Integer, String>() {

@Override
Expand All @@ -120,7 +117,6 @@ public void testMergeWithImmediateScheduler1() {

Observable<Integer> o1 = Observable.<Integer> from(1, 2, 3, 4, 5);
Observable<Integer> o2 = Observable.<Integer> from(6, 7, 8, 9, 10);
@SuppressWarnings("unchecked")
Observable<String> o = Observable.<Integer> merge(o1, o2).subscribeOn(Schedulers.immediate()).map(new Func1<Integer, String>() {

@Override
Expand All @@ -146,7 +142,6 @@ public void testMergeWithCurrentThreadScheduler1() {

Observable<Integer> o1 = Observable.<Integer> from(1, 2, 3, 4, 5);
Observable<Integer> o2 = Observable.<Integer> from(6, 7, 8, 9, 10);
@SuppressWarnings("unchecked")
Observable<String> o = Observable.<Integer> merge(o1, o2).subscribeOn(Schedulers.currentThread()).map(new Func1<Integer, String>() {

@Override
Expand All @@ -172,7 +167,6 @@ public void testMergeWithScheduler1() {

Observable<Integer> o1 = Observable.<Integer> from(1, 2, 3, 4, 5);
Observable<Integer> o2 = Observable.<Integer> from(6, 7, 8, 9, 10);
@SuppressWarnings("unchecked")
Observable<String> o = Observable.<Integer> merge(o1, o2).subscribeOn(Schedulers.threadPoolForComputation()).map(new Func1<Integer, String>() {

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,6 @@ public static void main(String[] args) {
System.out.println("nonCompositionalTestWithArrayOfFunctionsTotalTime: " + nonCompositionalTestWithArrayOfFunctionsTotalTime.get());
}

@SuppressWarnings("unchecked")
public void runCompositionTestWithMultipleOperations(AtomicLong aggregateTime, Integer[] values) {
System.out.println("runCompositionTestWithMultipleOperations");

Expand Down