Skip to content

[Feat-1085] Заменён небезопасный вызов .get() на .orElseThrow() в методе isAuthor()#1087

Open
Textile86 wants to merge 2 commits intohexlet-volunteers:mainfrom
Textile86:issue-1085-clean
Open

[Feat-1085] Заменён небезопасный вызов .get() на .orElseThrow() в методе isAuthor()#1087
Textile86 wants to merge 2 commits intohexlet-volunteers:mainfrom
Textile86:issue-1085-clean

Conversation

@Textile86
Copy link
Copy Markdown

@Textile86 Textile86 commented Apr 10, 2026

Closes #1085

  • Заменён небезопасный вызов .get() в getCurrentUser() на .orElseThrow()
  • Заменён небезопасный вызов .get() на .orElseThrow() в методе isAuthor().

@@ -23,7 +22,9 @@ public User getCurrentUser() {
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Здесь тоже нужно заменить в соответствии с постановкой задачи

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Заменил.

@ann-p-1320
Copy link
Copy Markdown

аппрув

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Backend: заменить unsafe .get() на Optional в UserUtils

2 participants