Closed
Bug 778759
Opened 13 years ago
Closed 13 years ago
ConsString == java.lang.String issue
Categories
(Rhino Graveyard :: Core, defect)
Rhino Graveyard
Core
Tracking
(Not tracked)
RESOLVED
INVALID
People
(Reporter: lkrejci, Unassigned)
Details
User Agent: Mozilla/5.0 (X11; Linux i686; rv:14.0) Gecko/20100101 Firefox/14.0.1
Build ID: 20120717144020
Steps to reproduce:
This happens with Rhino 1.7R4.
It seems like string comparisons using the "==" operator are incorrect if the ConsString internal object is used to represent the string.
See the example script below:
var a = "str"
var b = "str"
var test1 = a + b
var test2 = "strstr"
var test3 = new java.lang.String("strstr")
Actual results:
test1 == test2 //= true
test1 == test3 //= false
test2 == test3 //= true
Expected results:
test1 == test2 //= true
test1 == test3 //= true
test2 == test3 //= true
I was too quick to jump to conclusions... The above seems to work in Rhino shell, but doesn't in my scenarios...
Status: UNCONFIRMED → RESOLVED
Closed: 13 years ago
Resolution: --- → INVALID
You need to log in
before you can comment on or make changes to this bug.
Description
•