Cannot invoke "com.example.todoappdeel3.models.CustomUser.getPassword()" because "customUser" is nul

no clue how i can fix it been stukc for 2 hours now
6 Replies
JavaBot
JavaBot10mo ago
This post has been reserved for your question.
Hey @timo! Please use /close or the Close Post button above when your problem is solved. Please remember to follow the help guidelines. This post will be automatically closed after 300 minutes of inactivity.
TIP: Narrow down your issue to simple and precise questions to maximize the chance that others will reply in here.
Timo
TimoOP10mo ago
just have some cursed code from someone i need to fix
Timo
TimoOP10mo ago
No description
No description
tjoener
tjoener10mo ago
your userrepository.findByEmail function gives you a null as a result because that user can't be found I suggest making findByEmail return Optional<CustomUser>, and handle that failure condition properly
Timo
TimoOP10mo ago
Oh ok forgot to make findByMail thx that is stupid 😅 Just got a random repo wich i have to fix with garbage code lol
JavaBot
JavaBot10mo ago
💤 Post marked as dormant
This post has been inactive for over 300 minutes, thus, it has been archived. If your question was not answered yet, feel free to re-open this post or create a new one. In case your post is not getting any attention, you can try to use /help ping. Warning: abusing this will result in moderative actions taken against you.

Did you find this page helpful?