Skip to content
This repository was archived by the owner on Nov 30, 2021. It is now read-only.

Homework11#11

Open
AndreiGrek wants to merge 2 commits intomasterfrom
Homework11
Open

Homework11#11
AndreiGrek wants to merge 2 commits intomasterfrom
Homework11

Conversation

@AndreiGrek
Copy link
Owner

No description provided.

Comment on lines +53 to +57
default:
throw new IllegalArgumentException
("Unknown URI: " + uri);

}

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Прокидывать Exception тут не самая лучшая идея, тубу так или иначе нужно вернуть результат. Пусть это будет null, но это так или иначе результат

Comment on lines +64 to +78
switch (uriMatcher.match(uri)) {
case ID_PERSON_DATA:
throw new IllegalArgumentException
("Invalid uri: cannot delete");
case ID_PERSON_DATA_ITEM:
if (getContext() != null) {
int count = contactDao
.delete(ContentUris.parseId(uri));
getContext().getContentResolver()
.notifyChange(uri, null);
return count;
}
default:
throw new IllegalArgumentException
("Unknown URI:" + uri);

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Прокидывать Exception тут не самая лучшая идея, тубу так или иначе нужно вернуть результат. Пусть это будет -1, но это так или иначе результат

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants