Skip to content

Commit

Permalink
Fix jackson/r8/proguard issue with "TypeReference constructed without…
Browse files Browse the repository at this point in the history
… actual type information"
  • Loading branch information
robbi5 committed Jul 2, 2024
1 parent a06ca59 commit 5089a07
Showing 1 changed file with 1 addition and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ import android.content.Context
import android.content.SharedPreferences
import android.os.Build
import androidx.preference.PreferenceManager
import com.fasterxml.jackson.core.type.TypeReference
import com.fasterxml.jackson.databind.DeserializationFeature
import com.fasterxml.jackson.databind.ObjectMapper
import com.fasterxml.jackson.databind.SerializationFeature
Expand Down Expand Up @@ -109,7 +108,7 @@ class AppConfig(ctx: Context) : ConfigStore {
return emptyList()
}
}
return om.readValue(s, object : TypeReference<List<EventSelection>>() {})
return om.readValue(s, Array<EventSelection>::class.java).toList()
}
set (value) {
prefs.edit().putString(PREFS_KEY_EVENT_SELECTION, om.writeValueAsString(value)).apply()
Expand Down

0 comments on commit 5089a07

Please sign in to comment.