Closed Bug 128468 Opened 23 years ago Closed 22 years ago

java.io.NotSerializableException: org.mozilla.javascript.NativeError

Categories

(Rhino Graveyard :: Core, defect)

x86
Windows 2000
defect
Not set
normal

Tracking

(Not tracked)

VERIFIED INVALID

People

(Reporter: andrew, Assigned: norrisboyd)

Details

While org.mozilla.javascript.EcmaError is a subclass of 
java.lang.RuntimeException and thus Serializable, it contains a 
org.mozilla.javascript.NativeError that is not serializable. As a result, 
receive a NotSerializableException when serializing an EcmaError
I agree this is annoying especially when rhino is executed remotly (RMI/J2EE). I
don't see any problems with making NativeError serializeable, but maybe there is?

[mmoeller@mmoeller rhino]$ cvs diff -u  src/org/mozilla/javascript/NativeError.java
Index: src/org/mozilla/javascript/NativeError.java
===================================================================
RCS file: /cvsroot/mozilla/js/rhino/src/org/mozilla/javascript/NativeError.java,v
retrieving revision 1.23
diff -u -r1.23 NativeError.java
--- src/org/mozilla/javascript/NativeError.java 25 Nov 2002 16:44:30 -0000      1.23
+++ src/org/mozilla/javascript/NativeError.java 25 Nov 2002 18:40:09 -0000
@@ -43,7 +43,7 @@
  *
  *  ECMA 15.11
  */
-final class NativeError extends IdScriptable {
+final class NativeError extends IdScriptable implements java.io.Serializable {

     static void init(Context cx, Scriptable scope, boolean sealed) {
         NativeError obj = new NativeError();
cc'ing Igor -
NativeError inherits from IdScriptable which is a subclass of ScriptableObject
whih implements Serializable interface since 1.5R3 release. 

I suggest to mark this as invalid unless detailed test/Rhino version case is
provided.
Marking INVALID since the 1.5R3 release should be OK on this.
Note: this is obtainable at ftp://ftp.mozilla.org/pub/js, along
with an even more recent version of Rhino.

Andrew: please reopen if this is still a problem with the
new releases; thanks -
Status: NEW → RESOLVED
Closed: 22 years ago
Resolution: --- → INVALID
Marking Verified -
Status: RESOLVED → VERIFIED
Targeting as resolved against 1.5R4
Target Milestone: --- → 1.5R4
You need to log in before you can comment on or make changes to this bug.