-
Notifications
You must be signed in to change notification settings - Fork 35
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
exception appears during reinitializing Preferences #13
Comments
Hi. Regards. |
@balamyt I see that you has no have default constructor for |
Also your |
This usually happens if you provide empty byte array into |
Also try to use no-op encryption to replay the situation: https://github.com/iamironz/binaryprefs/blob/master/library/src/main/java/com/ironz/binaryprefs/encryption/ByteEncryption.java#L27-L37 |
I see that you has no have default constructor for MyEntity class. You actually don't? my
|
@balamyt try create an unit test which encrypts and decrypts non-empty |
Also please note that you should have default constructor because during initialization it will be called. |
Thank!! |
Also i've added two stages byte array length checking: iamironz@bf0ef9d This checks will be in 1.0.0-ALPHA1 release. Regards. |
in build.gradle:
implementation 'com.github.iamironz:binaryprefs:0.9.9'
сreate the settings as follows
entity class
When first created Preference it's all right. But if called
mPreferences.edit().putPersistable(key, myEntityInstance).commit();
and then app is killed and removed from recents screen then during the next initialization appears exception:
The text was updated successfully, but these errors were encountered: