Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Removed use of deprecated API from tests & operators, fixed year in head... #1161

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
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
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* Copyright 2013 Netflix, Inc.
* Copyright 2014 Netflix, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* Copyright 2013 Netflix, Inc.
* Copyright 2014 Netflix, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* Copyright 2013 Netflix, Inc.
* Copyright 2014 Netflix, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* Copyright 2013 Netflix, Inc.
* Copyright 2014 Netflix, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* Copyright 2013 Netflix, Inc.
* Copyright 2014 Netflix, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* Copyright 2013 Netflix, Inc.
* Copyright 2014 Netflix, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -167,7 +167,7 @@ public String getName() {
}

@Override
public Class getReturnType() {
public Class<?> getReturnType() {
return m.getReturnType();
}

Expand All @@ -177,6 +177,7 @@ public CachedClass getDeclaringClass() {
}

@Override
@SuppressWarnings("unchecked")
public Object invoke(Object object, final Object[] arguments) {
return Observable.create(new GroovyCreateWrapper((Closure) arguments[0]));
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* Copyright 2013 Netflix, Inc.
* Copyright 2014 Netflix, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* Copyright 2013 Netflix, Inc.
* Copyright 2014 Netflix, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* Copyright 2013 Netflix, Inc.
* Copyright 2014 Netflix, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -41,6 +41,11 @@
* @param <T2>
* @param <T3>
* @param <T4>
* @param <T5>
* @param <T6>
* @param <T7>
* @param <T8>
* @param <T9>
* @param <R>
*/
public class JRubyFunctionWrapper<T1, T2, T3, T4, T5, T6, T7, T8, T9, R> implements
Expand All @@ -67,25 +72,29 @@ public JRubyFunctionWrapper(ThreadContext context, RubyProc proc) {
}

@Override
@SuppressWarnings("unchecked")
public R call() {
IRubyObject[] array = new IRubyObject[0];
return (R) proc.call(context, array);
}

@Override
@SuppressWarnings("unchecked")
public R call(T1 t1) {
IRubyObject[] array = {JavaUtil.convertJavaToRuby(runtime, t1)};
return (R) proc.call(context, array);
}

@Override
@SuppressWarnings("unchecked")
public R call(T1 t1, T2 t2) {
IRubyObject[] array = {JavaUtil.convertJavaToRuby(runtime, t1),
JavaUtil.convertJavaToRuby(runtime, t2)};
return (R) proc.call(context, array);
}

@Override
@SuppressWarnings("unchecked")
public R call(T1 t1, T2 t2, T3 t3) {
IRubyObject[] array = {JavaUtil.convertJavaToRuby(runtime, t1),
JavaUtil.convertJavaToRuby(runtime, t2),
Expand All @@ -94,6 +103,7 @@ public R call(T1 t1, T2 t2, T3 t3) {
}

@Override
@SuppressWarnings("unchecked")
public R call(T1 t1, T2 t2, T3 t3, T4 t4) {
IRubyObject[] array = {JavaUtil.convertJavaToRuby(runtime, t1),
JavaUtil.convertJavaToRuby(runtime, t2),
Expand All @@ -103,6 +113,7 @@ public R call(T1 t1, T2 t2, T3 t3, T4 t4) {
}

@Override
@SuppressWarnings("unchecked")
public R call(T1 t1, T2 t2, T3 t3, T4 t4, T5 t5) {
IRubyObject[] array = {JavaUtil.convertJavaToRuby(runtime, t1),
JavaUtil.convertJavaToRuby(runtime, t2),
Expand All @@ -113,6 +124,7 @@ public R call(T1 t1, T2 t2, T3 t3, T4 t4, T5 t5) {
}

@Override
@SuppressWarnings("unchecked")
public R call(T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6) {
IRubyObject[] array = {JavaUtil.convertJavaToRuby(runtime, t1),
JavaUtil.convertJavaToRuby(runtime, t2),
Expand All @@ -124,6 +136,7 @@ public R call(T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6) {
}

@Override
@SuppressWarnings("unchecked")
public R call(T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7) {
IRubyObject[] array = {JavaUtil.convertJavaToRuby(runtime, t1),
JavaUtil.convertJavaToRuby(runtime, t2),
Expand All @@ -136,6 +149,7 @@ public R call(T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7) {
}

@Override
@SuppressWarnings("unchecked")
public R call(T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, T8 t8) {
IRubyObject[] array = {JavaUtil.convertJavaToRuby(runtime, t1),
JavaUtil.convertJavaToRuby(runtime, t2),
Expand All @@ -149,6 +163,7 @@ public R call(T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, T8 t8) {
}

@Override
@SuppressWarnings("unchecked")
public R call(T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, T8 t8, T9 t9) {
IRubyObject[] array = {JavaUtil.convertJavaToRuby(runtime, t1),
JavaUtil.convertJavaToRuby(runtime, t2),
Expand All @@ -163,6 +178,7 @@ public R call(T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, T8 t8, T9 t9) {
}

@Override
@SuppressWarnings("unchecked")
public R call(Object... args) {
IRubyObject[] array = new IRubyObject[args.length];
for (int i = 0; i < args.length; i++) {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* Copyright 2013 Netflix, Inc.
* Copyright 2014 Netflix, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* Copyright 2013 Netflix, Inc.
* Copyright 2014 Netflix, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* Copyright 2013 Netflix, Inc.
* Copyright 2014 Netflix, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* Copyright 2013 Netflix, Inc.
* Copyright 2014 Netflix, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,18 @@
/**
* Copyright 2014 Netflix, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package rx.android.observables;

import android.os.Looper;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
public class ViewObservable {

public static <T extends View> Observable<T> clicks(final T view, final boolean emitInitialValue) {
return Observable.create(new OperatorViewClick(view, emitInitialValue));
return Observable.create(new OperatorViewClick<T>(view, emitInitialValue));
}

public static Observable<String> input(final EditText input, final boolean emitInitialValue) {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* Copyright 2013 Netflix, Inc.
* Copyright 2014 Netflix, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* Copyright 2013 Netflix, Inc.
* Copyright 2014 Netflix, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,18 @@
/**
* Copyright 2014 Netflix, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package rx.operators;

import rx.Observable;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* Copyright 2013 Netflix, Inc.
* Copyright 2014 Netflix, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* Copyright 2013 Netflix, Inc.
* Copyright 2014 Netflix, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* Copyright 2013 Netflix, Inc.
* Copyright 2014 Netflix, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* Copyright 2013 Netflix, Inc.
* Copyright 2014 Netflix, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,18 @@
/**
* Copyright 2014 Netflix, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package rx.operators;

import static org.junit.Assert.assertEquals;
Expand Down
Loading