From b5c7bbe2218fc992cc8ea603e5545e830278348e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=F0=9F=91=BE=20AMIR=20ABBAS=20NAGHDI?= Date: Tue, 26 Apr 2022 12:48:26 +0430 Subject: [PATCH] rollback serialization helper --- build.gradle | 4 ++-- .../com/aaaamirabbas/reactor/helper/SerializationHelper.kt | 7 ++----- sample/src/main/java/com/aaaamirabbas/sample/MainView.kt | 2 +- 3 files changed, 5 insertions(+), 8 deletions(-) diff --git a/build.gradle b/build.gradle index 1e207ff..02ea988 100644 --- a/build.gradle +++ b/build.gradle @@ -2,8 +2,8 @@ buildscript { ext { minV = 15 targetV = 31 - vCode = 153 - vName = "1.5.3" + vCode = 154 + vName = "1.5.4" } repositories { diff --git a/library/src/main/java/com/aaaamirabbas/reactor/helper/SerializationHelper.kt b/library/src/main/java/com/aaaamirabbas/reactor/helper/SerializationHelper.kt index 103e431..9a8c308 100644 --- a/library/src/main/java/com/aaaamirabbas/reactor/helper/SerializationHelper.kt +++ b/library/src/main/java/com/aaaamirabbas/reactor/helper/SerializationHelper.kt @@ -13,10 +13,7 @@ class SerializationHelper { kotlin.runCatching { val outputStream = ByteArrayOutputStream() val objectOutput = ObjectOutputStream( - Base64OutputStream( - outputStream, - Base64.URL_SAFE or Base64.NO_PADDING or Base64.NO_WRAP - ) + Base64OutputStream(outputStream, Base64.NO_PADDING or Base64.NO_WRAP) ) objectOutput.use { @@ -41,7 +38,7 @@ class SerializationHelper { kotlin.runCatching { val inputStream = ByteArrayInputStream(data.toByteArray(charset("UTF-8"))) val objectInput = ObjectInputStream( - Base64InputStream(inputStream, Base64.DEFAULT) + Base64InputStream(inputStream, Base64.NO_PADDING or Base64.NO_WRAP) ) objectInput.use { it.readObject() as T } diff --git a/sample/src/main/java/com/aaaamirabbas/sample/MainView.kt b/sample/src/main/java/com/aaaamirabbas/sample/MainView.kt index ca3cabf..8f4ec61 100644 --- a/sample/src/main/java/com/aaaamirabbas/sample/MainView.kt +++ b/sample/src/main/java/com/aaaamirabbas/sample/MainView.kt @@ -19,7 +19,7 @@ class MainView : AppCompatActivity() { } private fun initObject() { - reactor = Reactor(applicationContext, false) + reactor = Reactor(applicationContext, true) reactorUtils = ReactorUtils(reactor) }