Skip to content

Commit

Permalink
fixed converter bug
Browse files Browse the repository at this point in the history
Signed-off-by: rapterjet2004 <juliuslinus1@gmail.com>
  • Loading branch information
rapterjet2004 committed Jun 19, 2024
1 parent df5a642 commit 8967a16
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import com.bluelinelabs.logansquare.LoganSquare

class HashMapHashMapConverter {
@TypeConverter
fun fromDoubleHashMapToString(map: HashMap<String, HashMap<String, String>>?): String? {
fun fromDoubleHashMapToString(map: HashMap<String?, HashMap<String?, String?>>?): String? {
return if (map == null) {
LoganSquare.serialize(hashMapOf<String, HashMap<String, String>>())
} else {
Expand All @@ -21,11 +21,11 @@ class HashMapHashMapConverter {
}

@TypeConverter
fun fromStringToDoubleHashMap(value: String?): HashMap<String, HashMap<String, String>>? {
fun fromStringToDoubleHashMap(value: String?): HashMap<String?, HashMap<String?, String?>>? {
if (value.isNullOrEmpty()) {
return hashMapOf()
}

return LoganSquare.parseMap(value, HashMap::class.java) as HashMap<String, HashMap<String, String>>?
return LoganSquare.parseMap(value, HashMap::class.java) as HashMap<String?, HashMap<String?, String?>>?
}
}

0 comments on commit 8967a16

Please sign in to comment.