forked from GitHub-Mirror/riotX-android
Fix bugs detected by Sonar
This commit is contained in:
@ -175,16 +175,12 @@ public class MXUsersDevicesMap<E> implements Serializable {
|
||||
}
|
||||
}
|
||||
|
||||
public boolean isEmpty(){
|
||||
public boolean isEmpty() {
|
||||
return mMap.isEmpty();
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
if (null != mMap) {
|
||||
return "MXUsersDevicesMap " + mMap.toString();
|
||||
} else {
|
||||
return "MXDeviceInfo : null map";
|
||||
}
|
||||
return "MXUsersDevicesMap " + mMap.toString();
|
||||
}
|
||||
}
|
@ -16,9 +16,9 @@
|
||||
|
||||
package im.vector.matrix.android.internal.crypto.store.db.model
|
||||
|
||||
import io.realm.RealmObject
|
||||
import im.vector.matrix.android.internal.crypto.IncomingRoomKeyRequest
|
||||
import im.vector.matrix.android.internal.crypto.model.rest.RoomKeyRequestBody
|
||||
import io.realm.RealmObject
|
||||
|
||||
internal open class IncomingRoomKeyRequestEntity(
|
||||
var requestId: String? = null,
|
||||
@ -32,11 +32,11 @@ internal open class IncomingRoomKeyRequestEntity(
|
||||
) : RealmObject() {
|
||||
|
||||
fun toIncomingRoomKeyRequest(): IncomingRoomKeyRequest {
|
||||
return IncomingRoomKeyRequest().apply {
|
||||
requestId = requestId
|
||||
userId = userId
|
||||
deviceId = deviceId
|
||||
requestBody = RoomKeyRequestBody().apply {
|
||||
return IncomingRoomKeyRequest().also {
|
||||
it.requestId = requestId
|
||||
it.userId = userId
|
||||
it.deviceId = deviceId
|
||||
it.requestBody = RoomKeyRequestBody().apply {
|
||||
algorithm = requestBodyAlgorithm
|
||||
roomId = requestBodyRoomId
|
||||
senderKey = requestBodySenderKey
|
||||
|
Reference in New Issue
Block a user