Open wischweh opened 12 years ago
Clients call edit() to create or update the values of an entry. An entry may have only one editor at one time; if a value is not available to be edited then edit() will return null.
It should definitely not throw a ConcurrentModificationException as that's a RuntimeException. I think it would be valid to throw IOException (as we can't open the file) and then state that it never returns null.
It should NOT throw ANYTHING, it should successfully return another Editor and allow concurrent modification of cache.
If called while another editor is in use edit will return null. I had a hard time debugging this. Throwing a ConcurrentModificationException or something similar would be better.
see DiskLruCache Line 512,