1. 26 Apr, 2001 1 commit
    • re PR libgcj/2237 (serialization doesn't throw exception on failure) · 0cd99be7
      	Fix PR libgcj/2237:
      	* java/io/ObjectStreamClass.java (setClass): Calculate
      	serialVersionUID for local class and compare it against the UID
      	from the Object Stream. Throw InvalidClassException upon mismatch.
      	(setUID): Renamed to...
      	(getClassUID): this. Return the calculated class UID rather than
      	setting uid field directly.
      	(getDefinedSUID): Removed.
      	* java/io/ObjectInputStream.java (resolveClass): Use the
      	three-argument Class.forName().
      	* java/io/InvalidClassException (toString): Don't include classname in
      	result if it is null.
      
      From-SVN: r41567
      Bryce McKinlay committed
  2. 13 Feb, 2001 1 commit
    • BlockDataException.java: Removed. · 7eecbdb3
      	* java/io/BlockDataException.java: Removed.
      	* java/io/ObjectInputStream.java (readObject): Throw
      	StreamCorruptedException, not BlockDataException.
      	* Makefile.am: Remove BlockDataException.
      	* Makefile.in: Rebuild.
      
      From-SVN: r39616
      Bryce McKinlay committed
  3. 27 Jan, 2001 1 commit
    • ObjectInputStream.java (read): AND byte with 0xff to make result unsigned. · 60b7365f
      	* java/io/ObjectInputStream.java (read): AND byte with 0xff to make
      	result unsigned.
      	(read (byte[], int, int)): Only call readNextBlock() if the block
      	buffer would actually be overrun. Increment blockDataPosition.
      	(callReadMethod): Propagate exceptions from invocation target.
      	* java/io/ObjectOutputStream.java (callWriteMethod): Propagate
      	exceptions from invocation target.
      
      From-SVN: r39293
      Bryce McKinlay committed
  4. 26 Nov, 2000 1 commit
    • System.java (setProperties): Only call init_properties() if properties is null. · 213858c0
      2000-11-24  Bryce McKinlay  <bryce@albatross.co.nz>
      
      	* java/lang/System.java (setProperties): Only call init_properties()
      	if properties is null.
      	(getProperties): Ditto.
      	(getProperty): Ditto.
      	(setProperty): Call init_properties if properties are null.
      	(prop_init): Remove field.
      	* java/lang/natSystem.cc (init_properties): Synchronize the entire
      	method. Check for null properties after synchronizing instead of
      	prop_init flag. Set the properties field last for thread safety.
      
      	* java/io/ObjectInputStream.java (ObjectInputStream): If DEBUG is set,
      	test for gcj.dumpobjects property and enable object stream dumping
      	if it is set.
      	(dumpElement): No longer native.
      	(dumpElementln): Ditto.
      	(setDump): Do not define.
      	* java/io/natObjectInputStream.cc (dumpElement): Removed.
      	(dumpElementln): Removed.
      	(setDump): Removed.
      
      2000-11-24  Bryce McKinlay  <bryce@albatross.co.nz>
      
      	* configure: Rebuilt.
      	* Makefile.in: Rebuilt.
      	* Makefile.am (built_java_source_files): Add Configuration.java.
      	* configure.in: Add Configuration.java to CONFIG_FILES. Set
      	LIBGCJDEBUG substitution if --enable-libgcj-debug is specified.
      	Create `gnu' directory in the build tree.
      	* gnu/classpath/Configuration.java.in: New file.
      
      From-SVN: r37749
      Bryce McKinlay committed
  5. 03 Nov, 2000 1 commit
    • ObjectInputStream.java (readObject): Added code to conditionally dump out the serialized data. · a53785f9
      	* java/io/ObjectInputStream.java (readObject): Added code to
      	conditionally dump out the serialized data.
      	Handle ENDBLOCKDATA case a bit more gracefully since the current
      	behavior doesn't seem to work as expected.
      	(readStreamHeader): Added code for serialized data dumper.
      	(readNextBlock): Ditto.
      	(readFields): Ditto.
      	(dump): New private static field for turning on/off dumper.
      	(setDump): New native method.
      	(dumpElement): New native method.
      	(dumpElementln): New native method.
      	* java/io/natObjectInputStream.cc (setDump): New method.
      	(dumpElement): New method.
      	(dumpElementln): New method.
      
      Serialization dumper.  Enable by configuring with --enable-libgcj-debug
      and calling java.io.ObjectInputStream.setDump(true) in your test program.
      The output will be generated as the object is deserialized (i.e. the
      readObject() method is executed).
      
      From-SVN: r37223
      Warren Levy committed
  6. 05 Oct, 2000 1 commit
    • Makefile.am: Removed java/io/Replaceable.java and java/io/Resolvable.java. · bf347805
      	* Makefile.am: Removed java/io/Replaceable.java and
      	java/io/Resolvable.java.
      	* Makefile.in: Rebuilt.
      	* gcj/javaprims.h: Removed Replaceable and Resolvable from java.io
      	namespace.
      	* java/io/ObjectInputStream.java (processResolution): Fixed typo
      	in method name.
      	(processResolution): Handle readResolve method via reflection with
      	removal of Resolvable interface.
      	* java/io/ObjectOutputStream.java (writeObject): Handle writeReplace
      	method via reflection with removal of Replaceable interface.
      	* java/io/Replaceable.java: Removed.
      	* java/io/Resolvable.java: Removed.
      	* java/security/Key.java (serialVersionUID): New field.
      	* java/security/Provider.java (serialVersionUID): New field.
      	* java/security/interfaces/DSAPrivateKey.java (serialVersionUID):
      	New field.
      	* java/security/interfaces/DSAPublicKey.java (serialVersionUID):
              New field.
      	* java/sql/DataTruncation.java (serialVersionUID): New field.
      	* java/sql/SQLException.java (serialVersionUID): New field.
      	* java/sql/SQLWarning.java (serialVersionUID): New field.
      	* java/util/Date.java (serialVersionUID): New field.
      	(millis): Made transient.
      	(readObject): New method.
      	(writeObject): New method.
      
      Serialization mods.
      Note:  The interfaces java.io.Replaceable and java.io.Resolvable were only
      temporary additions to JDK 1.2 beta versions and were not included
      in the JDK 1.2 final.  The Serialization spec instructs how to deal
      with their methods (via reflection).
      
      From-SVN: r36736
      Warren Levy committed
  7. 04 Aug, 2000 1 commit
    • ObjectInputStream.java (readFields): Turn off readDataFromBlock while reading via GetField. · 9b4773cb
      	* java/io/ObjectInputStream.java (readFields): Turn off
      	readDataFromBlock while reading via GetField.
      	(GetField$1.get(String, Object)): Pass Class of default value to
      	getField.
      	(getField): Allow for null default values.
      
      	* java/io/ObjectOutputStream.java: Fixed typo in comment.
      	(PutField$1.put): Fixed calls of checkType in most of the put
      	methods to pass the correct parameter.
      	(PutField$1.put(String, Object)): Allow for null value arg.
      	(PutField$1.write): Turn off writeDataAsBlocks while writing via
      	PutField.
      
      	* java/io/ObjectStreamClass.java (serialPersistentFields): Fixed
      	typo in spec'ed field name.
      	(getSerialPersistentFields): Changed spelling of method to match
      	the correct spelling of the spec'ed field name.
      
      More serialization fixes per Mauve errors.
      
      From-SVN: r35468
      Warren Levy committed
  8. 19 May, 2000 1 commit