-
Notifications
You must be signed in to change notification settings - Fork 272
Exception handling and return values for put/remove #51
Exception handling and return values for put/remove #51
Conversation
…ion was successful - added some exception handling within the constructor of a Preference
Current coverage is 100%
|
e495f49
to
7ccca30
Compare
- adjusted some tests - fixed persist missing return
in
In
|
assertFalse(providerHelper.persist(uri, STRING_A, null)); | ||
assertFalse(providerHelper.persist(MODULE_A, STRING_A, null)); | ||
assertFalse(providerHelper.persist(MODULE_A, STRING_A, null, null)); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nice one! I struggled with this test
I thought about this and I'm not sure if this is the correct approach. Tray is currently very heavy when it comes to performance.
This performance problem should be addressed soon with a memory cache #22. The memory cache would make Solving the version check in the constructor I don't want to merge it right now because of the API change which has to be reverted with the in-memory cache implementation. |
@jannisveerkamp I'm now 100% sure the listener work (see #53), even in a multi process environment. I'm focusing now on a memory cache (#22) |
release 1.0.0-rc3
The equality check before the deletion of migrated preferences only worked for strings as Tray stores everything as a string. The `toString()` ensures it works for boxed types as well.
This reverts commit 62817ca.
…g-prefs Fix deletion of non string migrated shared preferences.
I'm not worried about the API change anymore. |
…lean indicating success getVersion() throws TrayException when not successful simplifyed isVersionChangeChecked() moved all direct contentprovider access from ContentProviderStorage into TrayProviderHelper automatically catching all possible exceptions from the database
merged with #69 |
@passsy
We should add more tests for failed put/remove actions. But I couldn't find a way to let them fail at all.