android / android/architecture-samples

[dev-todo-mvvm-live-kotlin] App crashes when adding task with empty title or description

Open
#512 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
Kotlin
Stars
45.8k
Forks
11.9k
PR merge metrics
No merged PRs in 30d

Description

`saveTask()` function of `AddEditTaskViewModel.kt` is calling `Task(title.get(), description.get())` which causes crash when adding new task with title or description being empty.

Contributor guide

Open the contributing guide

Research direction

Start by reading saveTask() in AddEditTaskViewModel.kt and reproduce adding a task with an empty title, an empty description, and both empty. Done means these cases no longer crash; the expected handling of the empty values is not specified in the issue.

Written by the indexing model from the issue text.

Assessment

Tech stack
kotlin
Domain
mobile
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.