Fix most unchecked/deprecation javac warnings in compiler modules

This commit is contained in:
Alexander Udalov
2018-06-22 12:57:04 +02:00
parent 4f0c31eff3
commit f868964e25
64 changed files with 182 additions and 132 deletions
@@ -10,6 +10,7 @@ import kotlin.reflect.KCallable;
import kotlin.reflect.KMutableProperty1;
import kotlin.reflect.KProperty1;
@SuppressWarnings("unchecked")
public abstract class MutablePropertyReference1 extends MutablePropertyReference implements KMutableProperty1 {
public MutablePropertyReference1() {
}
@@ -10,6 +10,7 @@ import kotlin.reflect.KCallable;
import kotlin.reflect.KMutableProperty2;
import kotlin.reflect.KProperty2;
@SuppressWarnings("unchecked")
public abstract class MutablePropertyReference2 extends MutablePropertyReference implements KMutableProperty2 {
@Override
protected KCallable computeReflected() {
@@ -9,6 +9,7 @@ import kotlin.SinceKotlin;
import kotlin.reflect.KCallable;
import kotlin.reflect.KProperty1;
@SuppressWarnings("unchecked")
public abstract class PropertyReference1 extends PropertyReference implements KProperty1 {
public PropertyReference1() {
}
@@ -9,6 +9,7 @@ import kotlin.SinceKotlin;
import kotlin.reflect.KCallable;
import kotlin.reflect.KProperty2;
@SuppressWarnings("unchecked")
public abstract class PropertyReference2 extends PropertyReference implements KProperty2 {
@Override
protected KCallable computeReflected() {
@@ -5,9 +5,9 @@
package kotlin.jvm.internal;
import java.lang.Object;
import java.util.ArrayList;
import java.util.Collection;
import java.util.Collections;
import java.util.Iterator;
public class SpreadBuilder {
@@ -18,6 +18,7 @@ public class SpreadBuilder {
list = new ArrayList<Object>(size);
}
@SuppressWarnings("unchecked")
public void addSpread(Object container) {
if (container == null) return;
@@ -25,9 +26,7 @@ public class SpreadBuilder {
Object[] array = (Object[]) container;
if (array.length > 0) {
list.ensureCapacity(list.size() + array.length);
for (Object element : array) {
list.add(element);
}
Collections.addAll(list, array);
}
}
else if (container instanceof Collection) {