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
⌛
This post has been reserved for your question.
Hey @timo! Please useTIP: Narrow down your issue to simple and precise questions to maximize the chance that others will reply in here./close
or theClose 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.
just have some cursed code from someone i need to fix


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 properlyOh ok forgot to make findByMail thx that is stupid 😅 Just got a random repo wich i have to fix with garbage code lol
💤
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.