Run ktlintFormat
This commit is contained in:
parent
23d2a290ab
commit
bfbcef60e9
|
@ -77,4 +77,3 @@ data class MegolmBackupAuthData(
|
||||||
.signalableJSONDictionary()
|
.signalableJSONDictionary()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -88,4 +88,3 @@ internal data class AuthParams(
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -77,8 +77,8 @@ internal class RuntimeJsonAdapterFactory<T>(
|
||||||
override fun fromJson(reader: JsonReader): Any? {
|
override fun fromJson(reader: JsonReader): Any? {
|
||||||
val peekedToken = reader.peek()
|
val peekedToken = reader.peek()
|
||||||
if (peekedToken != JsonReader.Token.BEGIN_OBJECT) {
|
if (peekedToken != JsonReader.Token.BEGIN_OBJECT) {
|
||||||
throw JsonDataException("Expected BEGIN_OBJECT but was " + peekedToken
|
throw JsonDataException("Expected BEGIN_OBJECT but was " + peekedToken +
|
||||||
+ " at path " + reader.path)
|
" at path " + reader.path)
|
||||||
}
|
}
|
||||||
val jsonValue = reader.readJsonValue()
|
val jsonValue = reader.readJsonValue()
|
||||||
val jsonObject = jsonValue as Map<String, Any>?
|
val jsonObject = jsonValue as Map<String, Any>?
|
||||||
|
@ -91,13 +91,13 @@ internal class RuntimeJsonAdapterFactory<T>(
|
||||||
override fun toJson(writer: JsonWriter, value: Any?) {
|
override fun toJson(writer: JsonWriter, value: Any?) {
|
||||||
val type: Class<*> = value!!.javaClass
|
val type: Class<*> = value!!.javaClass
|
||||||
val label = typeToLabel[type]
|
val label = typeToLabel[type]
|
||||||
?: throw IllegalArgumentException("Expected one of "
|
?: throw IllegalArgumentException("Expected one of " +
|
||||||
+ typeToLabel.keys
|
typeToLabel.keys +
|
||||||
+ " but found "
|
" but found " +
|
||||||
+ value
|
value +
|
||||||
+ ", a "
|
", a " +
|
||||||
+ value.javaClass
|
value.javaClass +
|
||||||
+ ". Register this subtype.")
|
". Register this subtype.")
|
||||||
val adapter = labelToAdapter[label]!!
|
val adapter = labelToAdapter[label]!!
|
||||||
val jsonValue = adapter.toJsonValue(value) as Map<String, Any>?
|
val jsonValue = adapter.toJsonValue(value) as Map<String, Any>?
|
||||||
val valueWithLabel: MutableMap<String, Any> = LinkedHashMap(1 + jsonValue!!.size)
|
val valueWithLabel: MutableMap<String, Any> = LinkedHashMap(1 + jsonValue!!.size)
|
||||||
|
|
Loading…
Reference in New Issue