I noticed a difference in the behaviour of the String.replace(CharSequence, CharSequence)
between java 12 and 13.
java 12 and earlier:
System.out.println("String"=="String".replace("g","g")); //false
java 13 and later:
System.out.println("String"=="String".replace("g","g")); //true
Found that this is probably due to:
Optimize String.replace(CharSequence, CharSequence) for common cases
Is this unexpected behaviour?
Yes, I'm aware of the equals method.