Closed
Bug 45928
Opened 24 years ago
Closed 24 years ago
NativeDate uses getDeclaredConstructor instead of getConstructor
Categories
(Rhino Graveyard :: Core, defect, P3)
Tracking
(Not tracked)
VERIFIED
FIXED
People
(Reporter: bdc, Assigned: norrisboyd)
Details
We had to make the following change to NativeDate.java to get it to work in the browser in the applet sandbox. Note that there is no reason to call the version that even can access the private constructors, since it's a public constructor it's looking for. I believe that this affects both Netscape and IE. use getConstructor() instead of getDeclaredConstructor(). This is because reflective access to the native data formatter is restricted in the browser.
Assignee | ||
Comment 1•24 years ago
|
||
Mike, do you see any problems with making this change?
Comment 2•24 years ago
|
||
Why does getDeclaredConstructor fail and getConstructor succeed, when the constructor in question is public? Looks like the methods are equivalent in this case. This change looks fine to me.
Assignee | ||
Comment 3•24 years ago
|
||
Checking in org/mozilla/javascript/NativeDate.java; /cvsroot/mozilla/js/rhino/org/mozilla/javascript/NativeDate.java,v <-- NativeD ate.java new revision: 1.9; previous revision: 1.8 done
Status: NEW → RESOLVED
Closed: 24 years ago
Resolution: --- → FIXED
Reporter | ||
Comment 5•24 years ago
|
||
Thanks a lot for fixing this. I agree that it is lame for getDeclaredConstuctor to fail if it is in fact asking for a public method, but all the getDeclared* work this way.
You need to log in
before you can comment on or make changes to this bug.
Description
•