Closed
Bug 282447
Opened 20 years ago
Closed 20 years ago
NPE trying to report error when trying to convert null to primitive type
Categories
(Rhino Graveyard :: Core, defect)
Rhino Graveyard
Core
Tracking
(Not tracked)
RESOLVED
FIXED
People
(Reporter: szegedia, Assigned: igor)
Details
Attachments
(1 file, 1 obsolete file)
1.11 KB,
patch
|
Details | Diff | Splinter Review |
User-Agent: Opera/7.54 (Windows NT 5.0; U) [en] Build Identifier: When null is attempted to be passed as a parameter argument to a Java method taking primitive type, Rhino attempts to report this as error. However, the error reporting itself fails with: java.lang.NullPointerException at org.mozilla.javascript.NativeJavaObject. reportConversionError(NativeJavaObject.java:896) at org.mozilla.javascript.NativeJavaObject. coerceTypeImpl(NativeJavaObject.java:505) ... I won't bother submitting a patch for this, as it's trivial. Just change "value. toString()" to "String.valueOf(value)" in NativeJavaObject. reportConversionError() method. Reproducible: Always Steps to Reproduce:
Assignee | ||
Comment 1•20 years ago
|
||
It is nice to be able to press "Diff" link ;)
Assignee | ||
Comment 2•20 years ago
|
||
Assignee | ||
Updated•20 years ago
|
Attachment #174470 -
Attachment is obsolete: true
Assignee | ||
Comment 3•20 years ago
|
||
I committed the fix, thanks for reporting it!
Status: NEW → RESOLVED
Closed: 20 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•