Home / Vulnerability Database / Java : Incorrect string comparison
Java

Java : Incorrect string comparison

Overview

This code compares java.lang.String for reference equality using the == or != operators, which compares two Strings object for equality, not their values. If both strings are not constant in source file and haven’t been interned using the String.itern() method, the same string value may be represented by two different objects from String class.

LOW

DerScanner Severity Score

Do you want to fix Java : Incorrect string comparison in your application?

See also

Java

Java : Race condition

Java

Java : Text4Shell Vulnerability

Java

Java : JNI usage