Closed
Bug 104493
Opened 24 years ago
Closed 24 years ago
questionable dead code in NativeRegExp.java
Categories
(Rhino Graveyard :: Core, defect)
Rhino Graveyard
Core
Tracking
(Not tracked)
VERIFIED
FIXED
1.5R3
People
(Reporter: bdc, Assigned: norrisboyd)
Details
We have a tool that looks for a scary noop case of assigning an instance field
to itself. this usually comes from a constructor that assigns a argument to a
instance field with the same name and then later the argument changes name. we
ran our tool on all of our classes we have in our classpath here and found this
problem in your code.
rhino1_5R2/src/org/mozilla/javascript/regexp/NativeRegExp.java line 159 it has:
this.flags = flags;
This seems to be a bad cut and paste from the CompilerState constructor on line
2155. or has some initialization that used to work been lost?
Comment 1•24 years ago
|
||
cc'ing Roger -
Updated•24 years ago
|
OS: Windows 2000 → All
Summary: questionable dead code → questionable dead code in NativeRegExp.java
Assignee | ||
Comment 2•24 years ago
|
||
Fixed-- The value of flags is computed earlier in the method, so I believe
it is safe just to remove the assignment.
Thanks for finding this.
Status: NEW → RESOLVED
Closed: 24 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•