C# - False positive - Change this condition so that it does not always evaluate to 'false'

For:
Sonarqube Version 9.1.0.47736
Azure DevOps plugin 5.0.0 (Latest)
C#

        protected void Test(decimal? value1, decimal? value2)
        {
            if (value1 == null || value2 == null || value1 != value2)
            {
                Console.WriteLine("test");
            }
        }

false positive is being reported “Change this condition so that it does not always evaluate to ‘false’.”
for value1 != value2
csharpsquid:S2589

pass fine when changed to:

        protected void Test(decimal? value1, decimal? value2)
        {
            if (value1 == null || value2 == null || value1.Value != value2.Value)
            {
                Console.WriteLine("test");
            }
        }

Hello @Autofixa and welcome to our community.

Thanks for reporting this issue. I opened the following issue where you can track the progress.

All the best,
Čaba

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.