Remove deprecation from ConcurrentModificationException constructors #KT-53927
The constructors were introduced in jdk7, thus their usage was prohibited in Common code. Now that jvmTarget is 1.8 and jdk8+ is used to compile stdlib, these constructors are available on all platforms.
This commit is contained in:
committed by
Space
parent
7102be7720
commit
faedd76b32
@@ -49,9 +49,7 @@ public expect open class IndexOutOfBoundsException : RuntimeException {
|
||||
public expect open class ConcurrentModificationException : RuntimeException {
|
||||
constructor()
|
||||
constructor(message: String?)
|
||||
@Deprecated("The constructor is not supported on all platforms and will be removed from kotlin-stdlib-common soon.", level = DeprecationLevel.ERROR)
|
||||
constructor(message: String?, cause: Throwable?)
|
||||
@Deprecated("The constructor is not supported on all platforms and will be removed from kotlin-stdlib-common soon.", level = DeprecationLevel.ERROR)
|
||||
constructor(cause: Throwable?)
|
||||
}
|
||||
|
||||
|
||||
@@ -23,7 +23,7 @@ class ExceptionTest {
|
||||
@Test fun nullPointerException() = testCreateException(::NullPointerException, ::NullPointerException)
|
||||
@Test fun classCastException() = testCreateException(::ClassCastException, ::ClassCastException)
|
||||
@Test fun noSuchElementException() = testCreateException(::NoSuchElementException, ::NoSuchElementException)
|
||||
@Test fun concurrentModificationException() = testCreateException(::ConcurrentModificationException, ::ConcurrentModificationException)
|
||||
@Test fun concurrentModificationException() = testCreateException(::ConcurrentModificationException, ::ConcurrentModificationException, ::ConcurrentModificationException, ::ConcurrentModificationException)
|
||||
@Test fun arithmeticException() = testCreateException(::ArithmeticException, ::ArithmeticException)
|
||||
|
||||
@Test fun noWhenBranchMatchedException() = @Suppress("DEPRECATION_ERROR") testCreateException(::NoWhenBranchMatchedException, ::NoWhenBranchMatchedException, ::NoWhenBranchMatchedException, ::NoWhenBranchMatchedException)
|
||||
|
||||
Reference in New Issue
Block a user