CompositeStreamStrategy's insert() shouldn't depend on canDelete()
mikrosk opened this issue · 2 comments
mikrosk commented
As seen in the source:
@OverRide
public Uri insert(Uri uri, ContentValues values) {
StreamStrategy strategy=getStrategy(uri);if (strategy != null) { if (strategy.canDelete(uri)) { return(strategy.insert(uri, values)); } } throw new UnsupportedOperationException("Um, this should not have been called");
}
Since we provide nice and explicit canInsert(), it seems odd to check for canDelete(). I guess this is because canDelete() is actually a check for exists() but StreamProvider shouldn't make assumptions like that -- for instance, my strategy's insert() is creating files, i.e. the file in question (defined by its uri) doesn't have to exist when inserting.
commonsguy commented
Related to #12.
commonsguy commented
Released in v0.4.4. Thanks!