Skip to content

Commit 43e5299

Browse files
committed
Workaround for javac, added missing headers.
1 parent 4e19e15 commit 43e5299

File tree

5 files changed

+48
-3
lines changed

5 files changed

+48
-3
lines changed

src/main/java/io/reactivex/Observable.java

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2212,11 +2212,16 @@ public final <K, V> Observable<Map<K, V>> toMap(Function<? super T, ? extends K>
22122212
}
22132213

22142214
public final <K> Observable<Map<K, Collection<T>>> toMultimap(Function<? super T, ? extends K> keySelector) {
2215-
return toMultimap(keySelector, v -> v, HashMap::new, k -> new ArrayList<>());
2215+
Function<? super T, ? extends T> valueSelector = v -> v;
2216+
Supplier<Map<K, Collection<T>>> mapSupplier = HashMap::new;
2217+
Function<K, Collection<T>> collectionFactory = k -> new ArrayList<>();
2218+
return toMultimap(keySelector, valueSelector, mapSupplier, collectionFactory);
22162219
}
22172220

22182221
public final <K, V> Observable<Map<K, Collection<V>>> toMultimap(Function<? super T, ? extends K> keySelector, Function<? super T, ? extends V> valueSelector) {
2219-
return toMultimap(keySelector, valueSelector, HashMap::new, k -> new ArrayList<>());
2222+
Supplier<Map<K, Collection<V>>> mapSupplier = HashMap::new;
2223+
Function<K, Collection<V>> collectionFactory = k -> new ArrayList<>();
2224+
return toMultimap(keySelector, valueSelector, mapSupplier, collectionFactory);
22202225
}
22212226

22222227
public final <K, V> Observable<Map<K, Collection<V>>> toMultimap(

src/test/java/io/reactivex/internal/operators/OperatorSkipTimedTest.java

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,16 @@
1+
/**
2+
* Copyright 2015 Netflix, Inc.
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in
5+
* compliance with the License. You may obtain a copy of the License at
6+
*
7+
* http://www.apache.org/licenses/LICENSE-2.0
8+
*
9+
* Unless required by applicable law or agreed to in writing, software distributed under the License is
10+
* distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See
11+
* the License for the specific language governing permissions and limitations under the License.
12+
*/
13+
114
package io.reactivex.internal.operators;
215

316
import static org.mockito.Matchers.any;

src/test/java/io/reactivex/internal/operators/OperatorSkipUntilTest.java

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,16 @@
1+
/**
2+
* Copyright 2015 Netflix, Inc.
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in
5+
* compliance with the License. You may obtain a copy of the License at
6+
*
7+
* http://www.apache.org/licenses/LICENSE-2.0
8+
*
9+
* Unless required by applicable law or agreed to in writing, software distributed under the License is
10+
* distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See
11+
* the License for the specific language governing permissions and limitations under the License.
12+
*/
13+
114
package io.reactivex.internal.operators;
215

316
import static org.mockito.Matchers.any;

src/test/java/io/reactivex/internal/operators/OperatorSkipWhileTest.java

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,16 @@
1+
/**
2+
* Copyright 2015 Netflix, Inc.
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in
5+
* compliance with the License. You may obtain a copy of the License at
6+
*
7+
* http://www.apache.org/licenses/LICENSE-2.0
8+
*
9+
* Unless required by applicable law or agreed to in writing, software distributed under the License is
10+
* distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See
11+
* the License for the specific language governing permissions and limitations under the License.
12+
*/
13+
114
package io.reactivex.internal.operators;
215

316
import static org.mockito.Matchers.*;

src/test/java/io/reactivex/internal/operators/OperatorToMultimapTest.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -227,9 +227,10 @@ public void testToMultimapWithThrowingCollectionFactory() {
227227
};
228228

229229
Function<String, String> identity = v -> v;
230+
Supplier<Map<Integer, Collection<String>>> mapSupplier = HashMap::new;
230231

231232
Observable<Map<Integer, Collection<String>>> mapped = source.toMultimap(lengthFunc,
232-
identity, HashMap::new, collectionFactory);
233+
identity, mapSupplier, collectionFactory);
233234

234235
Map<Integer, Collection<String>> expected = new HashMap<>();
235236
expected.put(2, Arrays.asList("cc", "dd"));

0 commit comments

Comments
 (0)