Skip to content

Commit dd38912

Browse files
Merge pull request #1752 from akarnokd/Cleanup_Headers_n_Casts
Added missing headers, removed unnecessary casts
2 parents df781e1 + e8f9250 commit dd38912

18 files changed

+219
-145
lines changed

src/main/java/rx/internal/operators/OnSubscribeMulticastSelector.java

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,18 @@
1-
/**
2-
* Copyright 2014 Netflix, Inc.
3-
*
4-
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
5-
* use this file except in compliance with the License. You may obtain a copy of
6-
* 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, WITHOUT
12-
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
13-
* License for the specific language governing permissions and limitations under
14-
* the License.
15-
*/
1+
/**
2+
* Copyright 2014 Netflix, Inc.
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
5+
* use this file except in compliance with the License. You may obtain a copy of
6+
* 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, WITHOUT
12+
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
13+
* License for the specific language governing permissions and limitations under
14+
* the License.
15+
*/
1616
package rx.internal.operators;
1717

1818
import rx.Observable;

src/main/java/rx/internal/operators/OperatorConcat.java

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,18 @@
1-
/**
2-
* Copyright 2014 Netflix, Inc.
3-
*
4-
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
5-
* use this file except in compliance with the License. You may obtain a copy of
6-
* 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, WITHOUT
12-
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
13-
* License for the specific language governing permissions and limitations under
14-
* the License.
15-
*/
1+
/**
2+
* Copyright 2014 Netflix, Inc.
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
5+
* use this file except in compliance with the License. You may obtain a copy of
6+
* 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, WITHOUT
12+
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
13+
* License for the specific language governing permissions and limitations under
14+
* the License.
15+
*/
1616
package rx.internal.operators;
1717

1818
import java.util.concurrent.ConcurrentLinkedQueue;

src/main/java/rx/internal/operators/OperatorMergeMaxConcurrent.java

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,18 @@
1-
/**
2-
* Copyright 2014 Netflix, Inc.
3-
*
4-
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
5-
* use this file except in compliance with the License. You may obtain a copy of
6-
* 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, WITHOUT
12-
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
13-
* License for the specific language governing permissions and limitations under
14-
* the License.
15-
*/
1+
/**
2+
* Copyright 2014 Netflix, Inc.
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
5+
* use this file except in compliance with the License. You may obtain a copy of
6+
* 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, WITHOUT
12+
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
13+
* License for the specific language governing permissions and limitations under
14+
* the License.
15+
*/
1616
package rx.internal.operators;
1717

1818
import java.util.LinkedList;

src/main/java/rx/internal/operators/OperatorWindowWithTime.java

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,18 @@
1-
/**
2-
* Copyright 2014 Netflix, Inc.
3-
*
4-
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
5-
* use this file except in compliance with the License. You may obtain a copy of
6-
* 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, WITHOUT
12-
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
13-
* License for the specific language governing permissions and limitations under
14-
* the License.
15-
*/
1+
/**
2+
* Copyright 2014 Netflix, Inc.
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
5+
* use this file except in compliance with the License. You may obtain a copy of
6+
* 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, WITHOUT
12+
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
13+
* License for the specific language governing permissions and limitations under
14+
* the License.
15+
*/
1616
package rx.internal.operators;
1717

1818
import java.util.ArrayList;

src/main/java/rx/internal/operators/TakeLastQueueProducer.java

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,18 @@
1+
/**
2+
* Copyright 2014 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.internal.operators;
217

318

src/main/java/rx/subjects/SubjectSubscriptionManager.java

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,18 @@
1-
/**
2-
* Copyright 2014 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+
/**
2+
* Copyright 2014 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+
*/
1616
package rx.subjects;
1717

1818
import java.util.ArrayList;

src/perf/java/rx/PerfBaseline.java

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,18 @@
1+
/**
2+
* Copyright 2014 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;
217

318
import java.util.Iterator;

src/perf/java/rx/internal/IndexedRingBufferPerf.java

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,18 @@
1+
/**
2+
* Copyright 2014 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.internal;
217

318
import org.openjdk.jmh.annotations.Benchmark;

src/perf/java/rx/operators/OperatorRangePerf.java

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,18 @@
1+
/**
2+
* Copyright 2014 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

318
import java.util.concurrent.TimeUnit;

src/test/java/rx/BackpressureTests.java

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ public class BackpressureTests {
3838

3939
@Test
4040
public void testObserveOn() {
41-
int NUM = (int) ((int) RxRingBuffer.SIZE * 2.1);
41+
int NUM = (int) (RxRingBuffer.SIZE * 2.1);
4242
AtomicInteger c = new AtomicInteger();
4343
TestSubscriber<Integer> ts = new TestSubscriber<Integer>();
4444
incrementingIntegers(c).observeOn(Schedulers.computation()).take(NUM).subscribe(ts);
@@ -51,7 +51,7 @@ public void testObserveOn() {
5151

5252
@Test
5353
public void testObserveOnWithSlowConsumer() {
54-
int NUM = (int) ((int) RxRingBuffer.SIZE * 0.2);
54+
int NUM = (int) (RxRingBuffer.SIZE * 0.2);
5555
AtomicInteger c = new AtomicInteger();
5656
TestSubscriber<Integer> ts = new TestSubscriber<Integer>();
5757
incrementingIntegers(c).observeOn(Schedulers.computation()).map(new Func1<Integer, Integer>() {
@@ -76,7 +76,7 @@ public Integer call(Integer i) {
7676

7777
@Test
7878
public void testMergeSync() {
79-
int NUM = (int) ((int) RxRingBuffer.SIZE * 4.1);
79+
int NUM = (int) (RxRingBuffer.SIZE * 4.1);
8080
AtomicInteger c1 = new AtomicInteger();
8181
AtomicInteger c2 = new AtomicInteger();
8282
TestSubscriber<Integer> ts = new TestSubscriber<Integer>();
@@ -97,7 +97,7 @@ public void testMergeSync() {
9797

9898
@Test
9999
public void testMergeAsync() {
100-
int NUM = (int) ((int) RxRingBuffer.SIZE * 4.1);
100+
int NUM = (int) (RxRingBuffer.SIZE * 4.1);
101101
AtomicInteger c1 = new AtomicInteger();
102102
AtomicInteger c2 = new AtomicInteger();
103103
TestSubscriber<Integer> ts = new TestSubscriber<Integer>();
@@ -119,7 +119,7 @@ public void testMergeAsync() {
119119

120120
@Test
121121
public void testMergeAsyncThenObserveOn() {
122-
int NUM = (int) ((int) RxRingBuffer.SIZE * 4.1);
122+
int NUM = (int) (RxRingBuffer.SIZE * 4.1);
123123
AtomicInteger c1 = new AtomicInteger();
124124
AtomicInteger c2 = new AtomicInteger();
125125
TestSubscriber<Integer> ts = new TestSubscriber<Integer>();
@@ -141,7 +141,7 @@ public void testMergeAsyncThenObserveOn() {
141141

142142
@Test
143143
public void testFlatMapSync() {
144-
int NUM = (int) ((int) RxRingBuffer.SIZE * 2.1);
144+
int NUM = (int) (RxRingBuffer.SIZE * 2.1);
145145
AtomicInteger c = new AtomicInteger();
146146
TestSubscriber<Integer> ts = new TestSubscriber<Integer>();
147147
incrementingIntegers(c).flatMap(new Func1<Integer, Observable<Integer>>() {
@@ -162,7 +162,7 @@ public Observable<Integer> call(Integer i) {
162162

163163
@Test
164164
public void testFlatMapAsync() {
165-
int NUM = (int) ((int) RxRingBuffer.SIZE * 2.1);
165+
int NUM = (int) (RxRingBuffer.SIZE * 2.1);
166166
AtomicInteger c = new AtomicInteger();
167167
TestSubscriber<Integer> ts = new TestSubscriber<Integer>();
168168
incrementingIntegers(c).subscribeOn(Schedulers.computation()).flatMap(new Func1<Integer, Observable<Integer>>() {
@@ -185,7 +185,7 @@ public Observable<Integer> call(Integer i) {
185185

186186
@Test
187187
public void testZipSync() {
188-
int NUM = (int) ((int) RxRingBuffer.SIZE * 4.1);
188+
int NUM = (int) (RxRingBuffer.SIZE * 4.1);
189189
AtomicInteger c1 = new AtomicInteger();
190190
AtomicInteger c2 = new AtomicInteger();
191191
TestSubscriber<Integer> ts = new TestSubscriber<Integer>();
@@ -212,7 +212,7 @@ public Integer call(Integer t1, Integer t2) {
212212

213213
@Test
214214
public void testZipAsync() {
215-
int NUM = (int) ((int) RxRingBuffer.SIZE * 2.1);
215+
int NUM = (int) (RxRingBuffer.SIZE * 2.1);
216216
AtomicInteger c1 = new AtomicInteger();
217217
AtomicInteger c2 = new AtomicInteger();
218218
TestSubscriber<Integer> ts = new TestSubscriber<Integer>();
@@ -241,7 +241,7 @@ public Integer call(Integer t1, Integer t2) {
241241
public void testSubscribeOnScheduling() {
242242
// in a loop for repeating the concurrency in this to increase chance of failure
243243
for (int i = 0; i < 100; i++) {
244-
int NUM = (int) ((int) RxRingBuffer.SIZE * 2.1);
244+
int NUM = (int) (RxRingBuffer.SIZE * 2.1);
245245
AtomicInteger c = new AtomicInteger();
246246
ConcurrentLinkedQueue<Thread> threads = new ConcurrentLinkedQueue<Thread>();
247247
TestSubscriber<Integer> ts = new TestSubscriber<Integer>();
@@ -271,7 +271,7 @@ public void testSubscribeOnScheduling() {
271271

272272
@Test
273273
public void testTakeFilterSkipChainAsync() {
274-
int NUM = (int) ((int) RxRingBuffer.SIZE * 2.1);
274+
int NUM = (int) (RxRingBuffer.SIZE * 2.1);
275275
AtomicInteger c = new AtomicInteger();
276276
TestSubscriber<Integer> ts = new TestSubscriber<Integer>();
277277
incrementingIntegers(c).observeOn(Schedulers.computation())
@@ -411,7 +411,7 @@ public void testFirehoseFailsAsExpected() {
411411

412412
@Test(timeout = 2000)
413413
public void testOnBackpressureDrop() {
414-
int NUM = (int) ((int) RxRingBuffer.SIZE * 1.1); // > 1 so that take doesn't prevent buffer overflow
414+
int NUM = (int) (RxRingBuffer.SIZE * 1.1); // > 1 so that take doesn't prevent buffer overflow
415415
AtomicInteger c = new AtomicInteger();
416416
TestSubscriber<Integer> ts = new TestSubscriber<Integer>();
417417
firehose(c).onBackpressureDrop().observeOn(Schedulers.computation()).map(SLOW_PASS_THRU).take(NUM).subscribe(ts);
@@ -425,7 +425,7 @@ public void testOnBackpressureDrop() {
425425

426426
@Test(timeout = 2000)
427427
public void testOnBackpressureBuffer() {
428-
int NUM = (int) ((int) RxRingBuffer.SIZE * 1.1); // > 1 so that take doesn't prevent buffer overflow
428+
int NUM = (int) (RxRingBuffer.SIZE * 1.1); // > 1 so that take doesn't prevent buffer overflow
429429
AtomicInteger c = new AtomicInteger();
430430
TestSubscriber<Integer> ts = new TestSubscriber<Integer>();
431431
firehose(c).takeWhile(new Func1<Integer, Boolean>() {

0 commit comments

Comments
 (0)