Cleanup: fix some compiler warnings (mostly deprecations, javaClass)
This commit is contained in:
+1
-1
@@ -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
|
||||
}
|
||||
|
||||
+1
-1
@@ -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
|
||||
}
|
||||
|
||||
+1
-1
@@ -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
|
||||
}
|
||||
|
||||
+1
-1
@@ -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
|
||||
}
|
||||
|
||||
+1
-1
@@ -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
|
||||
}
|
||||
|
||||
+1
-1
@@ -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
|
||||
}
|
||||
|
||||
+1
-1
@@ -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) {
|
||||
|
||||
+1
-1
@@ -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
|
||||
|
||||
+1
-1
@@ -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
|
||||
}
|
||||
|
||||
+1
-1
@@ -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
|
||||
|
||||
+1
-1
@@ -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
|
||||
|
||||
+1
-1
@@ -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
|
||||
}
|
||||
|
||||
|
||||
+1
-1
@@ -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
|
||||
}
|
||||
|
||||
|
||||
+1
-1
@@ -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
|
||||
}
|
||||
|
||||
|
||||
+2
-2
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user