-
-
Notifications
You must be signed in to change notification settings - Fork 735
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
Fix NPE in ParseKeyValueCache due to cache dir not exist #141
Fix NPE in ParseKeyValueCache due to cache dir not exist #141
Conversation
The additional checking I add |
@Test | ||
public void testSaveToKeyValueCacheWithoutCacheDir() throws Exception { | ||
// Delete the cache folder(Simulate users clear the app cache) | ||
File keyValueCacheDir = new File(temporaryFolder.getRoot(), "ParseKeyValueCache"); |
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.
nit: It would be better to hold a reference to the File
we use in initialize()
in setUp
and use that here.
LGTM, small nit Also, it looks like |
BTW, @grantland |
6ca721a
to
e8ebbc7
Compare
…n_ParseKeyValueCache Fix NPE in ParseKeyValueCache due to cache dir not exist
@wangmengyan95 updated the pull request. |
ParseKeyValueCache.saveToKeyValueCache
cacheDir.listFiles().length
NPE.ParseKeyValueCache.saveToKeyValueCache