Skip to content

Commit 6c514dc

Browse files
authored
Fix the problem that Java 1.7 does not support Type.getTypeName (#17)
1 parent 8f22ae4 commit 6c514dc

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

gradle.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
kotlin.code.style=official
22

3-
VERSION_NAME=1.8.20-1.1.0
3+
VERSION_NAME=1.8.20-1.1.1
44

55
GROUP=com.kanyun.kudos
66

kudos-android-json-reader/src/main/java/com/kanyun/kudos/json/reader/adapter/KudosJsonAdapter.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ private fun parseKudosObjectSpecial(
113113
type: Type,
114114
typeArguments: Array<Type>,
115115
): Any {
116-
return if (type.typeName.endsWith("[]")) {
116+
return if (type.toString().startsWith("class [")) {
117117
parseKudosArray(jsonReader, typeArguments)
118118
} else if (type is Class<*>) {
119119
val adapter = type.getDeclaredConstructor().newInstance()

0 commit comments

Comments
 (0)