I will add the documentation on time. But you may understand that it's a nightmare to separate all portions of code as they've been written in one pass. BTW, I will also build some additionnal Mauve tests to import kaffe's tests.
Cheers, Guilhem.
ChangeLog:
2003-26-11 Guilhem Lavaux <[EMAIL PROTECTED]>
* java/io/ObjectStreamField.java: A few methods were added in prevision of the
upcoming upgrade of the serialization code. (ObjectStreamField): We should throw a NullPointerException when 'name' is null.
Index: ObjectStreamField.java =================================================================== RCS file: /cvsroot/classpath/classpath/java/io/ObjectStreamField.java,v retrieving revision 1.10 diff -u -r1.10 ObjectStreamField.java --- ObjectStreamField.java 21 Jun 2003 11:43:41 -0000 1.10 +++ ObjectStreamField.java 26 Nov 2003 20:49:34 -0000 @@ -48,7 +48,9 @@ private String typename; private int offset = -1; // XXX make sure this is correct private boolean unshared; - + private boolean persistent = false; + private boolean toset = true; + public ObjectStreamField (String name, Class type) { this (name, type, false); @@ -56,6 +58,9 @@ public ObjectStreamField (String name, Class type, boolean unshared) { + if (name == null) + throw new NullPointerException(); + this.name = name; this.type = type; this.typename = TypeSignature.getEncodingOfClass(type); @@ -79,6 +84,19 @@ type = Object.class; //FIXME: ??? } } + + ObjectStreamField (String name, String typename, ClassLoader loader){ + this.name = name; + this.typename = typename; + try + { + type = TypeSignature.getClassForEncoding(typename, true, loader); + } + catch(ClassNotFoundException e) + { + type = Object.class; // ALSO FIXME + } + } public String getName () { @@ -98,6 +116,8 @@ public String getTypeString () { // use intern() + if (this.type.isPrimitive()) + return null; return typename.intern(); } @@ -134,6 +154,26 @@ return 1; return getName ().compareTo (f.getName ()); + } + + protected void setPersistent(boolean persistent) + { + this.persistent = persistent; + } + + protected boolean isPersistent() + { + return persistent; + } + + protected void setToSet(boolean toset) + { + this.toset = toset; + } + + protected boolean isToSet() + { + return toset; } public String toString ()
_______________________________________________ Classpath mailing list [EMAIL PROTECTED] http://mail.gnu.org/mailman/listinfo/classpath