The question boils down to this code:
// setup
String str1 = "some string";
String str2 = new String(str1);
assert str1.equals(str2);
assert str1 != str2;
String str3 = str2.intern();
// question cases
boolean case1 = str1 == "some string";
boolean case2 = str1 == str3;
Does Java standard give any guarantees about values of case1 and case2?
Link to relevant part of Java spec would be nice, of course.
Yes, I looked at all the “Similar Questions” found by SO, and found no duplicates, as none I found answered the question this way. And no, this is not about the misguided idea of “optimizing” string comparisons by replacing equals with ==.
Here is your JLS quote, Section 3.10.5:
Combined with the JavaDoc for intern, and you have enough information to deduce that both of your cases will return true.