Skip to content

Commit

Permalink
rollback serialization helper
Browse files Browse the repository at this point in the history
  • Loading branch information
👾 AMIR ABBAS NAGHDI committed Apr 26, 2022
1 parent 804de8d commit b5c7bbe
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 8 deletions.
4 changes: 2 additions & 2 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ buildscript {
ext {
minV = 15
targetV = 31
vCode = 153
vName = "1.5.3"
vCode = 154
vName = "1.5.4"
}

repositories {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand All @@ -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 }
Expand Down
2 changes: 1 addition & 1 deletion sample/src/main/java/com/aaaamirabbas/sample/MainView.kt
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ class MainView : AppCompatActivity() {
}

private fun initObject() {
reactor = Reactor(applicationContext, false)
reactor = Reactor(applicationContext, true)
reactorUtils = ReactorUtils(reactor)
}

Expand Down

0 comments on commit b5c7bbe

Please sign in to comment.