Skip to content
Snippets Groups Projects
Commit 48c342eb authored by Trym Hamer Gudvangen's avatar Trym Hamer Gudvangen
Browse files

feat: add setter for story title

parent c4983021
No related branches found
No related tags found
2 merge requests!34Feat/create story gui,!7Feat/part three
......@@ -106,7 +106,7 @@ public class Story {
* @param title The new title of the story, given as a {@code String}.
*/
public void setTitle(String title) {
if (title.isBlank()) throw new IllegalArgumentException(
if (title == null || title.isBlank()) throw new IllegalArgumentException(
"Title cannot be blank, empty, or contain special characters."
);
this.title = title;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment