diff options
Diffstat (limited to 'app/src/main/java/SubredditDatabase')
-rw-r--r-- | app/src/main/java/SubredditDatabase/SubredditViewModel.java | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/app/src/main/java/SubredditDatabase/SubredditViewModel.java b/app/src/main/java/SubredditDatabase/SubredditViewModel.java index a0dfa7c9..8899abdd 100644 --- a/app/src/main/java/SubredditDatabase/SubredditViewModel.java +++ b/app/src/main/java/SubredditDatabase/SubredditViewModel.java @@ -37,8 +37,9 @@ public class SubredditViewModel extends AndroidViewModel { this.subredditName = subredditName; } + @NonNull @Override - public <T extends ViewModel> T create(Class<T> modelClass) { + public <T extends ViewModel> T create(@NonNull Class<T> modelClass) { //noinspection unchecked return (T) new SubredditViewModel(mApplication, subredditName); } |