Skip to content

Can not delete tag with number value #13

@gcrescent

Description

@gcrescent

I have a tag that has number as it's value, and whenever I tried to delete the tag I got:

java.lang.ClassCastException: java.lang.String cannot be cast to java.lang.Number
at com.onesignal.OneSignalStateSynchronizer.generateJsonDiff(OneSignalStateSynchronizer.java:94)
at com.onesignal.OneSignalStateSynchronizer.generateJsonDiff(OneSignalStateSynchronizer.java:82)
at com.onesignal.OneSignalStateSynchronizer.sendTags(OneSignalStateSynchronizer.java:472)
at com.onesignal.OneSignal.sendTags(OneSignal.java:644)
at com.onesignal.OneSignal.deleteTags(OneSignal.java:716)

This only happen in newest version because at tags deletion you change the value to empty String (OneSignal.java:716) but also try to cast it into Number (OneSignalStateSynchronizer.java:94).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions