@@ -18,13 +18,14 @@ import java.io.ObjectOutputStream
1818import java.nio.charset.StandardCharsets
1919
2020class AidlNetworkRequestDeserializationTest {
21-
2221 /* *
2322 * Exception class only used to be renamed in the serialized stream, simulating an exception
2423 * type that exists in the Files app but not in the client app (e.g.
2524 * `com.owncloud.android.lib.common.network.CertificateCombinedException`).
2625 */
27- class OnlyInFilesAppException (message : String ) : Exception(message)
26+ class OnlyInFilesAppException (
27+ message : String
28+ ) : Exception(message)
2829
2930 @Test
3031 fun deserializeObjectV2ExceptionClassMissingInClientAppReturnsReadableException () {
@@ -69,7 +70,10 @@ class AidlNetworkRequestDeserializationTest {
6970 }
7071
7172 /* * Mirrors `InputStreamBinder#serializeObjectToInputStreamV2` in the Files app. */
72- private fun serialize (exception : Exception ? , headers : String ): ByteArray {
73+ private fun serialize (
74+ exception : Exception ? ,
75+ headers : String
76+ ): ByteArray {
7377 val baos = ByteArrayOutputStream ()
7478 ObjectOutputStream (baos).use { oos ->
7579 oos.writeObject(exception)
@@ -78,7 +82,11 @@ class AidlNetworkRequestDeserializationTest {
7882 return baos.toByteArray()
7983 }
8084
81- private fun replaceBytes (data : ByteArray , search : String , replace : String ): ByteArray {
85+ private fun replaceBytes (
86+ data : ByteArray ,
87+ search : String ,
88+ replace : String
89+ ): ByteArray {
8290 val searchBytes = search.toByteArray(StandardCharsets .US_ASCII )
8391 val replaceBytes = replace.toByteArray(StandardCharsets .US_ASCII )
8492 assertEquals(searchBytes.size, replaceBytes.size)
0 commit comments