File tree Expand file tree Collapse file tree 3 files changed +7
-7
lines changed
src/androidMain/kotlin/com/algolia/search Expand file tree Collapse file tree 3 files changed +7
-7
lines changed Original file line number Diff line number Diff line change @@ -34,11 +34,11 @@ version = Library.version
3434group = Library .group
3535
3636extensions.getByType(LibraryExtension ::class .java).apply {
37- compileSdkVersion(28 )
37+ compileSdkVersion(29 )
3838
3939 defaultConfig {
4040 minSdkVersion(17 )
41- targetSdkVersion(28 )
41+ targetSdkVersion(29 )
4242 testInstrumentationRunner = " androidx.test.runner.AndroidJUnitRunner"
4343 }
4444
Original file line number Diff line number Diff line change @@ -18,9 +18,9 @@ internal actual fun String.sha256(key: String): String {
1818}
1919
2020internal actual fun String.encodeBase64 (): String {
21- return String ( Base64 .encode (toByteArray(), Base64 .NO_WRAP ) )
21+ return Base64 .encodeToString (toByteArray(), Base64 .DEFAULT )
2222}
2323
2424internal actual fun String.decodeBase64 (): String {
25- return String (Base64 .decode(this , Base64 .NO_WRAP ))
25+ return String (Base64 .decode(this , Base64 .DEFAULT ))
2626}
Original file line number Diff line number Diff line change @@ -15,11 +15,11 @@ public actual data class ClientDate internal actual constructor(override val raw
1515 internal actual constructor (timestamp: Long ) : this (DateISO8601 .format(timestamp))
1616
1717 /* *
18- * In the eventuality of the Date format being wrong, we create an empty [Date] object instead of throwing an exception .
18+ * In the eventuality of the Date format being wrong, we return null .
1919 */
20- val date: Date = when {
20+ val date: Date ? = when {
2121 raw.length == 20 -> DateISO8601 .dateISO8601.parse(raw)
2222 raw.length == 24 -> DateISO8601 .dateISO8601Millis.parse(raw)
23- else -> Date ()
23+ else -> null
2424 }
2525}
You can’t perform that action at this time.
0 commit comments