Skip to content

Commit effaf3d

Browse files
committed
Fix bug: cast error
1 parent 28f7b86 commit effaf3d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

utils/src/main/java/com/haoge/easyandroid/easy/EasySharedPreferences.kt

+1-1
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,7 @@ class EasySharedPreferences(val clazz: Class<*>):SharedPreferences.OnSharedPrefe
145145
|| type == Short::class.java
146146
|| type == StringBuilder::class.java
147147
|| type == StringBuffer::class.java
148-
-> editor.putString(name, (value as Byte).toString())
148+
-> editor.putString(name, value.toString())
149149
GSON -> value?.let { editor.putString(name, Gson().toJson(it)) }
150150
FASTJSON -> value?.let { editor.putString(name, JSON.toJSONString(value)) }
151151
}

0 commit comments

Comments
 (0)