mirror of
https://github.com/oxen-io/session-android.git
synced 2025-08-26 12:47:35 +00:00
Ensure feature flag is string before cast.
This commit is contained in:

committed by
Cody Henthorne

parent
250402e9b9
commit
d625740ca4
@@ -442,10 +442,10 @@ public final class FeatureFlags {
|
|||||||
return forced;
|
return forced;
|
||||||
}
|
}
|
||||||
|
|
||||||
String remote = (String) REMOTE_VALUES.get(key);
|
Object remote = REMOTE_VALUES.get(key);
|
||||||
if (remote != null) {
|
if (remote instanceof String) {
|
||||||
try {
|
try {
|
||||||
return Integer.parseInt(remote);
|
return Integer.parseInt((String) remote);
|
||||||
} catch (NumberFormatException e) {
|
} catch (NumberFormatException e) {
|
||||||
Log.w(TAG, "Expected an int for key '" + key + "', but got something else! Falling back to the default.");
|
Log.w(TAG, "Expected an int for key '" + key + "', but got something else! Falling back to the default.");
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user