Skip to content

Commit

Permalink
Remove nullability check
Browse files Browse the repository at this point in the history
  • Loading branch information
clementetb committed Jun 7, 2024
1 parent 422d9cb commit 57cd2a3
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 7 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@

### Fixed
* [Sync] Fatal sync exceptions are now thrown as `UnrecoverableSyncException`. (Issue [#1767](https://github.com/realm/realm-kotlin/issues/1767) [RKOTLIN-1096](https://jira.mongodb.org/browse/RKOTLIN-1096)).
* [Sync] Fix `NullPointerException` in `SubscriptionSet.waitForSynchronization`. (Issue [#1777](https://github.com/realm/realm-kotlin/issues/1777) [RKOTLIN-1102](https://jira.mongodb.org/browse/RKOTLIN-1102)).

### Compatibility
* File format: Generates Realms with file format v24 (reads and upgrades file format v10 or later).
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ package io.realm.kotlin.exceptions
*/
public open class RealmException : RuntimeException {
public constructor() : super()
public constructor(message: String) : super(message)
public constructor(message: String, cause: Throwable) : super(message, cause)
public constructor(cause: Throwable) : super(cause)
public constructor(message: String?) : super(message)
public constructor(message: String?, cause: Throwable) : super(message, cause)
public constructor(cause: Throwable?) : super(cause)
}
Original file line number Diff line number Diff line change
Expand Up @@ -94,5 +94,5 @@ import io.realm.kotlin.exceptions.RealmException
* @see SyncException
*/
public open class AppException internal constructor(
message: String,
message: String?,
) : RealmException(message)
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ import io.realm.kotlin.types.RealmAny
*
* @see io.realm.kotlin.mongodb.sync.SyncConfiguration.Builder.errorHandler
*/
public open class SyncException internal constructor(message: String) : AppException(message)
public open class SyncException internal constructor(message: String?) : AppException(message)

/**
* Thrown when something has gone wrong with Device Sync in a way that is not recoverable.
Expand Down Expand Up @@ -60,7 +60,7 @@ public class WrongSyncTypeException internal constructor(message: String) : Sync
* Thrown when the server does not support one or more of the queries defined in the
* [io.realm.kotlin.mongodb.sync.SubscriptionSet].
*/
public class BadFlexibleSyncQueryException internal constructor(message: String) :
public class BadFlexibleSyncQueryException internal constructor(message: String?) :
SyncException(message)

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ internal class SubscriptionSetImpl<T : BaseRealm>(
if (result) {
return true
} else {
throw BadFlexibleSyncQueryException(errorMessage!!)
throw BadFlexibleSyncQueryException(errorMessage)
}
}
else -> throw IllegalStateException("Unexpected value: $result")
Expand Down

0 comments on commit 57cd2a3

Please sign in to comment.