Cleanup: fix some compiler warnings (mostly deprecations, javaClass)

This commit is contained in:
Mikhail Glukhikh
2017-02-21 17:38:43 +03:00
parent d0cc1635db
commit b121bf8802
445 changed files with 773 additions and 949 deletions
@@ -59,7 +59,7 @@ class JeClassInitializerExecutableElement(
override fun equals(other: Any?): Boolean {
if (this === other) return true
if (other?.javaClass != javaClass) return false
if (other == null || other::class.java != this::class.java) return false
return psi == (other as JeClassInitializerExecutableElement).psi
}
@@ -67,7 +67,7 @@ class JeMethodExecutableElement(psi: PsiMethod) : JeAbstractElement<PsiMethod>(p
override fun equals(other: Any?): Boolean {
if (this === other) return true
if (other?.javaClass != javaClass) return false
if (other == null || other::class.java != this::class.java) return false
return psi == (other as JeMethodExecutableElement).psi
}
@@ -42,7 +42,7 @@ class JePackageElement(psi: PsiPackage) : JeAbstractElement<PsiPackage>(psi), Pa
override fun equals(other: Any?): Boolean {
if (this === other) return true
if (other?.javaClass != javaClass) return false
if (other == null || other::class.java != this::class.java) return false
return psi == (other as JePackageElement).psi
}
@@ -131,7 +131,7 @@ class JeTypeElement(psi: PsiClass) : JeAbstractElement<PsiClass>(psi), TypeEleme
override fun equals(other: Any?): Boolean {
if (this === other) return true
if (other?.javaClass != javaClass) return false
if (other == null || other::class.java != this::class.java) return false
return psi == (other as JeTypeElement).psi
}
@@ -47,7 +47,7 @@ class JeTypeParameterElement(
override fun equals(other: Any?): Boolean {
if (this === other) return true
if (other?.javaClass != javaClass) return false
if (other == null || other::class.java != this::class.java) return false
return psi == (other as JeTypeParameterElement).psi
}
@@ -56,7 +56,7 @@ class JeVariableElement(psi: PsiVariable) : JeAbstractElement<PsiVariable>(psi),
override fun equals(other: Any?): Boolean {
if (this === other) return true
if (other?.javaClass != javaClass) return false
if (other == null || other::class.java != this::class.java) return false
return psi == (other as JeVariableElement).psi
}
@@ -140,7 +140,7 @@ private fun getObjectType(value: PsiAnnotationMemberValue): PsiType {
}
}
throw IllegalArgumentException("Illegal value type: ${value.javaClass}")
throw IllegalArgumentException("Illegal value type: ${value::class.java}")
}
private fun castPrimitiveValue(type: PsiType, value: Any?): Any = when (type) {
@@ -35,7 +35,7 @@ class JeArrayType(
override fun equals(other: Any?): Boolean {
if (this === other) return true
if (other?.javaClass != javaClass) return false
if (other == null || other::class.java != this::class.java) return false
other as? JeArrayType ?: return false
return componentType == other.componentType
@@ -43,7 +43,7 @@ class JeClassInitializerExecutableTypeMirror(
override fun equals(other: Any?): Boolean {
if (this === other) return true
if (other?.javaClass != javaClass) return false
if (other == null || other::class.java != this::class.java) return false
other as? JeClassInitializerExecutableTypeMirror ?: return false
return psi == other.psi
}
@@ -100,7 +100,7 @@ class JeDeclaredType(
override fun equals(other: Any?): Boolean {
if (this === other) return true
if (other?.javaClass != javaClass) return false
if (other == null || other::class.java != this::class.java) return false
other as? JeDeclaredType ?: return false
return enclosingType == other.enclosingType
@@ -34,7 +34,7 @@ class JeIntersectionType(
override fun equals(other: Any?): Boolean {
if (this === other) return true
if (other?.javaClass != javaClass) return false
if (other == null || other::class.java != this::class.java) return false
other as? JeIntersectionType ?: return false
return bounds == other.bounds
@@ -87,7 +87,7 @@ class JeMethodExecutableTypeMirror(
override fun equals(other: Any?): Boolean {
if (this === other) return true
if (other?.javaClass != javaClass) return false
if (other == null || other::class.java != this::class.java) return false
return psi == (other as? JeMethodExecutableTypeMirror)?.psi
}
@@ -42,7 +42,7 @@ class JePrimitiveType(override val psiType: PsiPrimitiveType) : JePsiType, Primi
override fun equals(other: Any?): Boolean{
if (this === other) return true
if (other?.javaClass != javaClass) return false
if (other == null || other::class.java != this::class.java) return false
return psiType == (other as? JePrimitiveType)?.psiType
}
@@ -65,7 +65,7 @@ class JeTypeVariableType(
override fun equals(other: Any?): Boolean{
if (this === other) return true
if (other?.javaClass != javaClass) return false
if (other == null || other::class.java != this::class.java) return false
return psiType == (other as? JeTypeVariableType)?.psiType
}
@@ -35,7 +35,7 @@ class JeWildcardType(
override fun equals(other: Any?): Boolean {
if (this === other) return true
if (other?.javaClass != javaClass) return false
if (other == null || other::class.java != this::class.java) return false
other as? JeWildcardType ?: return false
return superBound == other.superBound
@@ -70,7 +70,7 @@ class JeCapturedWildcardType(
override fun equals(other: Any?): Boolean {
if (this === other) return true
if (other?.javaClass != javaClass) return false
if (other == null || other::class.java != this::class.java) return false
other as? JeCapturedWildcardType ?: return false
return superBound == other.superBound