Replace deprecated annotations in whole project

This commit is contained in:
Denis Zharkov
2015-06-09 15:36:42 +03:00
parent c9f79c2d05
commit 200dee2761
55 changed files with 81 additions and 81 deletions
@@ -72,7 +72,7 @@ public open class JsFunctionScope(parent: JsScope, description: String) : JsScop
* Safe call is necessary, because hasOwnName can be called
* in constructor before labelName is initialized (see KT-4394)
*/
[suppress("UNNECESSARY_SAFE_CALL")]
@suppress("UNNECESSARY_SAFE_CALL")
override fun hasOwnName(name: String): Boolean =
name in RESERVED_WORDS
|| name == ident
@@ -20,7 +20,7 @@ abstract class HasMetadata {
private val metadata: MutableMap<String, Any?> = hashMapOf()
fun <T> getData(key: String): T {
[suppress("UNCHECKED_CAST")]
@suppress("UNCHECKED_CAST")
return metadata[key] as T
}
@@ -41,7 +41,7 @@ public class SuppressUninitializedErrorsForNativeDeclarations : DiagnosticsWithS
override fun isSuppressed(diagnostic: Diagnostic): Boolean {
if (diagnostic.getFactory() != Errors.UNINITIALIZED_VARIABLE) return false
[suppress("UNCHECKED_CAST")]
@suppress("UNCHECKED_CAST")
val diagnosticWithParameters = diagnostic as DiagnosticWithParameters1<JetSimpleNameExpression, VariableDescriptor>
val variableDescriptor = diagnosticWithParameters.getA()
@@ -28,7 +28,7 @@ import org.jetbrains.kotlin.diagnostics.DiagnosticWithParameters1
public object JsCodePositioningStrategy : PositioningStrategy<PsiElement>() {
override fun markDiagnostic(diagnostic: ParametrizedDiagnostic<out PsiElement>): List<TextRange> {
[suppress("UNCHECKED_CAST")]
@suppress("UNCHECKED_CAST")
val diagnosticWithParameters = diagnostic as DiagnosticWithParameters1<JetExpression, JsCallData>
val textRange = diagnosticWithParameters.getA().reportRange
return listOf(textRange)
+1 -1
View File
@@ -29,4 +29,4 @@ public annotation class volatile
native
public annotation class synchronized
public inline fun <R> synchronized(lock: Any, [inlineOptions(ONLY_LOCAL_RETURN)] block: () -> R): R = block()
public inline fun <R> synchronized(lock: Any, @inlineOptions(ONLY_LOCAL_RETURN) block: () -> R): R = block()
+1 -1
View File
@@ -16,7 +16,7 @@ public val undefined: Nothing? = noImpl
// Drop this after KT-2093 will be fixed and restore MutableMap.set in Maps.kt from MapsJVM.kt
/** Provides [] access to maps */
[suppress("BASE_WITH_NULLABLE_UPPER_BOUND")]
@suppress("BASE_WITH_NULLABLE_UPPER_BOUND")
native public fun <K, V> MutableMap<K, V>.set(key: K, value: V): V? = noImpl
library
+5 -5
View File
@@ -70,9 +70,9 @@ public open class LinkedList<E>() : AbstractList<E>() {
override fun set(index: Int, element: E): E = noImpl
override fun add(index: Int, element: E): Unit = noImpl
[suppress("BASE_WITH_NULLABLE_UPPER_BOUND")]
@suppress("BASE_WITH_NULLABLE_UPPER_BOUND")
public fun poll(): E? = noImpl
[suppress("BASE_WITH_NULLABLE_UPPER_BOUND")]
@suppress("BASE_WITH_NULLABLE_UPPER_BOUND")
public fun peek(): E? = noImpl
public fun offer(e: E): Boolean = noImpl
}
@@ -104,13 +104,13 @@ library
public open class HashMap<K, V>(initialCapacity: Int = DEFAULT_INITIAL_CAPACITY, loadFactor: Float = DEFAULT_LOAD_FACTOR) : MutableMap<K, V> {
override fun size(): Int = noImpl
override fun isEmpty(): Boolean = noImpl
[suppress("BASE_WITH_NULLABLE_UPPER_BOUND")]
@suppress("BASE_WITH_NULLABLE_UPPER_BOUND")
override fun get(key: Any?): V? = noImpl
override fun containsKey(key: Any?): Boolean = noImpl
[suppress("BASE_WITH_NULLABLE_UPPER_BOUND")]
@suppress("BASE_WITH_NULLABLE_UPPER_BOUND")
override fun put(key: K, value: V): V? = noImpl
override fun putAll(m: Map<out K, V>): Unit = noImpl
[suppress("BASE_WITH_NULLABLE_UPPER_BOUND")]
@suppress("BASE_WITH_NULLABLE_UPPER_BOUND")
override fun remove(key: Any?): V? = noImpl
override fun clear(): Unit = noImpl
override fun containsValue(value: Any?): Boolean = noImpl