From 66a018c79ef852b67af76e5e0e45fa3e73be033b Mon Sep 17 00:00:00 2001 From: Benoit Marty Date: Tue, 9 Jul 2019 15:11:20 +0200 Subject: [PATCH] Code quality: trim() --- .../android/internal/crypto/MXMegolmExportEncryption.kt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/matrix-sdk-android/src/main/java/im/vector/matrix/android/internal/crypto/MXMegolmExportEncryption.kt b/matrix-sdk-android/src/main/java/im/vector/matrix/android/internal/crypto/MXMegolmExportEncryption.kt index 82b2c95d89..b9cb59a0f5 100755 --- a/matrix-sdk-android/src/main/java/im/vector/matrix/android/internal/crypto/MXMegolmExportEncryption.kt +++ b/matrix-sdk-android/src/main/java/im/vector/matrix/android/internal/crypto/MXMegolmExportEncryption.kt @@ -229,7 +229,7 @@ object MXMegolmExportEncryption { throw Exception("Header line not found") } - val line = fileStr.substring(lineStart, lineEnd).trim { it <= ' ' } + val line = fileStr.substring(lineStart, lineEnd).trim() // start the next line after the newline lineStart = lineEnd + 1 @@ -247,9 +247,9 @@ object MXMegolmExportEncryption { val line: String if (lineEnd < 0) { - line = fileStr.substring(lineStart).trim { it <= ' ' } + line = fileStr.substring(lineStart).trim() } else { - line = fileStr.substring(lineStart, lineEnd).trim { it <= ' ' } + line = fileStr.substring(lineStart, lineEnd).trim() } if (TextUtils.equals(line, TRAILER_LINE)) {