Relax nullability of UninitializedPropertyAccessException constructor parameters

To make it consistent with other exception types
This commit is contained in:
Ilya Gorbunov
2017-12-27 17:56:30 +03:00
parent 4e26ca5659
commit a1f67e347f
2 changed files with 4 additions and 6 deletions
@@ -19,9 +19,9 @@ package kotlin
public class UninitializedPropertyAccessException : RuntimeException {
constructor()
constructor(message: String) : super(message)
constructor(message: String?) : super(message)
constructor(message: String, cause: Throwable) : super(message, cause)
constructor(message: String?, cause: Throwable?) : super(message, cause)
constructor(cause: Throwable) : super(cause)
constructor(cause: Throwable?) : super(cause)
}
+1 -3
View File
@@ -35,9 +35,7 @@ class ExceptionTest {
@Test fun noSuchElementException() = testCreateException(::NoSuchElementException, ::NoSuchElementException)
@Test fun noWhenBranchMatchedException() = testCreateException(::NoWhenBranchMatchedException, ::NoWhenBranchMatchedException, ::NoWhenBranchMatchedException, ::NoWhenBranchMatchedException)
// TODO: Sort out with nullability of the parameters
// @Test fun uninitializedPropertyAccessException() = testCreateException(::UninitializedPropertyAccessException, ::UninitializedPropertyAccessException, ::UninitializedPropertyAccessException, ::UninitializedPropertyAccessException)
@Test fun uninitializedPropertyAccessException() = testCreateException(::UninitializedPropertyAccessException, ::UninitializedPropertyAccessException, ::UninitializedPropertyAccessException, ::UninitializedPropertyAccessException)
@Test fun assertionError() = testCreateException(::AssertionError, ::AssertionError, ::AssertionError)