Skip to content

Restoral of ActivationStateMachine events fails because not all event types have a no-argument constructor #598

@paddybyers

Description

@paddybyers
Fatal Exception: java.lang.RuntimeException
java.lang.InstantiationException: java.lang.Class<u.a.a.d.d$l> has no zero argument constructor
io.ably.lib.push.ActivationStateMachine.getPersistedPendingEvents
Caused by java.lang.InstantiationException
java.lang.Class<u.a.a.d.d$l> has no zero argument constructor
java.lang.Class.newInstance (Class.java)
io.ably.lib.push.ActivationStateMachine.getPersistedPendingEvents (ActivationStateMachine.java:678)
io.ably.lib.push.ActivationStateMachine.loadPersisted (ActivationStateMachine.java:563)
io.ably.lib.push.ActivationStateMachine.<init> (ActivationStateMachine.java:557)
io.ably.lib.push.ActivationContext.getActivationStateMachine (ActivationContext.java:44)
io.ably.lib.push.Push.getStateMachine (Push.java:43)
io.ably.lib.push.Push.tryRequestRegistrationToken (Push.java:49)
io.ably.lib.rest.AblyRest.setAndroidContext (AblyRest.java:45)

ISTM that the following event types will not have a no-argument constructor, by virtue of having a declared constructor:

GettingDeviceRegistrationFailed
GettingPushDeviceDetailsFailed
UpdatingRegistrationFailed
DeregistrationFailed

Metadata

Metadata

Assignees

Labels

bugSomething isn't working. It's clear that this does need to be fixed.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions