Not a contradiction — they operate on different material. Negativity bias governs how heavily you weigh bad information you already have. Optimism bias governs how you forecast your own future. The same person can replay one harsh review all night and still believe they're unlikely to get divorced.
Side by side
Aspect
Negativity bias
Optimism bias
Concerns
Information you have
Your future
Direction
Bad weighs more
Good seems likelier
Timeframe
Past and present
Forecast
Coexist?
Yes
Yes
What each one means
Negativity Bias
Negativity bias is the tendency for bad events, emotions and information to carry more psychological weight than equally intense good ones — hitting harder, lasting longer and shaping judgment more.
Optimism bias is the tendency to believe good things are likelier to happen to you than to comparable other people, and bad things less likely — regardless of the actual rates.