summaryrefslogtreecommitdiff
path: root/java/io/ObjectInputStream.java
Commit message (Collapse)AuthorAgeFilesLines
...
* 2004-01-09 Michael Koch <konqueror@gmx.de>Michael Koch2004-01-091-2/+0
| | | | | | | | | | | | | | | | | | | | | * java/awt/geom/PathIterator.java (WIND_EVEN_ODD): Removed redundant modifiers. (WIND_NON_ZERO): Likewise. (SEG_MOVETO): Likewise. (SEG_LINETO): Likewise. (SEG_QUADTO): Likewise. (SEG_CUBICTO): Likewise. (SEG_CLOSE): Likewise. * java/awt/image/SinglePixelPackedSampleModel.java: Removed redundant semicolon. * java/io/ObjectInputStream.java (inputGetObjectStreamClasses): Removed unused variable "ret_val". * java/util/logging/Filter.java (isLoggable): Removed redundant modifier. * java/util/logging/LogManager.java: Removed redundant semicolon. * java/util/logging/XMLFormatter.java (format): Removed unused variable "key".
* * java/io/ObjectOutputStream.java,Guilhem Lavaux2003-12-281-381/+389
| | | | | | java/io/ObjectInputStream.java, java/io/ObjectStreamClass.java: Reindented. Some exception message has been added.
* * java/io/ObjectOutputStream.javaGuilhem Lavaux2003-12-281-52/+231
| | | | | | | | | | | | | | | | | | | | | (writeClassDescriptor): Externalizable class must also write their hierarchy. (putFields): Added some text message for an exception. * java/io/ObjectInputStream.java (readClassDescriptor): Documented. Better field checking. (defaultReadObject): Readjusted messages in exceptions. (currentLoader): Documented. (inputGetObjectStreamClasses): Changed indentation. (readFields): Documented. Changed logic to improve error reporting and behaviour compared to the JDK. (readFields): Fixed behaviour. (getField): Documented. Fixed behaviour. (callReadMethod): Invalidate read fields. * java/io/ObjectStreamClass.java (setFields): Fix to avoid a NullPointerException. (getSerialPersistentFields): Documented. Improved modifier checking.
* Merged in three of the four patches about serialization.Guilhem Lavaux2003-12-021-32/+243
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2003-12-02 Guilhem Lavaux <guilhem@kaffe.org> * java/io/ObjectInputStream.java: (setBooleanField): Throw an InvalidClassException if the field hasn't the required type. (setByteField): Likewise. (setCharField): Likewise. (setDoubleField): Likewise. (setFloatField): Likewise. (setIntField): Likewise. (setShortField): Likewise. (setLongField): Likewise. (setObjectField): Likewise. 2003-12-02 Guilhem Lavaux <guilhem@kaffe.org> * 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. 2003-12-02 Guilhem Lavaux <guilhem@kaffe.org>, Helmer Kraemer <hkraemer@freenet.de> * gnu/java/lang/reflect/TypeSignature.java (getClassForEncoding): Splitted the method so we can specify an explicit boot loader.
* * java/io/ObjectInputStream.java (processResolution): UseTom Tromey2003-08-011-18/+30
| | | | | | | | | | | | | | getMethod. (getMethod): Make method accessible. (getField): Make field accessible. (setBooleanField): Don't call setAccessible here. (setByteField, setCharField, setDoubleField, setFloatField, setIntField, setLongField, setShortField, setObjectField): Likewise. (callReadMethod): Don't check whether method is null. Catch NoSuchMethodException. * java/io/ObjectOutputStream.java (callWriteMethod): Initialize cause on thrown exceptions.
* 2003-06-25 Michael Koch <konqueror@gmx.de>Michael Koch2003-06-251-38/+46
| | | | | | * java/io/ObjectInputStream.java, java/io/ObjectOutputStream.java: Merged new versions from libgcj.
* 2003-06-05 Jeff Sturm <jsturm@one-point.com>Tom Tromey2003-06-051-1/+1
| | | | | * java/io/ObjectInputStream (enableResolveObject): Fixed spelling of permission name.
* 2003-03-23 Michael Koch <konqueror@gmx.de>Michael Koch2003-03-231-145/+130
| | | | | | | | | | | | | | * java/io/DataOutputStream.java (writeDouble): Fixed @see tag. (writeFloat): Fixed @see tag. * java/io/ObjectInputStream.java: Reformated. * java/io/ObjectOutputStream.java: Reformated. * java/io/ObjectStreamClass.java (toString): Fixed @see tags, documentation reformated. * java/io/Writer.java (write): Fixed documentation.
* 2003-03-14 Jeroen Frijters <jeroen@sumatra.nl>Mark Wielaard2003-03-141-60/+33
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * java/io/ObjectInputStream.java (readObject): Cleaned up the class hierarchy loop. (readFields(Object,ObjectStreamField[],boolean)): Changed argument list to Object,ObjectStreamClass, moved callReadMethod code up into readObject and added Class argument to all setXxxField calls. (callReadMethod): Changed Class argument to ObjectStreamClass to be consistent with ObjectOutputStream and to facilitate caching the Method in the future. (setBooleanField): Added Class argument. (setByteField): Likewise. (setCharField): Likewise. (setDoubleField): Likewise. (setFloatField): Likewise. (setIntField): Likewise. (setLongField): Likewise. (setShortField): Likewise. (setObjectField): Likewise. * java/io/ObjectOutputStream.java (writeObject): Cleaned up the class hierarchy loop. (defaultWriteObject): Call writeFields with new argument list. (writeFields(Object,ObjectStreamField[],boolean): Changed argument list to Object,ObjectStreamClass, moved callWriteMethod up into writeObject and added Class argument to all getXxxField calls. (callWriteMethod): Added ObjectStreamClass argument to be able to get the proper class to call getMethod on (each class can have (or not have) its own writeObject method). (getBooleanField): Added Class argument. (getByteField): Likewise. (getCharField): Likewise. (getDoubleField): Likewise. (getFloatField): Likewise. (getIntField): Likewise. (getLongField): Likewise. (getShortField): Likewise. (getObjectField): Likewise. * java/io/ObjectStreamClass.java (hasReadMethod): Added method to facilitate caching the Method object in the future.
* * java/io/ObjectInputStream.java: Reindent and remove dead and/orMark Wielaard2003-03-021-345/+298
| | | | | commented out code. * java/io/ObjectOutputStream.java: Likewise.
* * java/io/ObjectInputStream.java (ObjectInputStream): Set dump flagMark Wielaard2003-01-191-52/+222
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | according to System property. (resolveObject): Moved to allign with libgcj version. (read): Make sure result is positive. (getField): New method. (getMethod): Likewise. (callReadMethod): No longer native. (setBooleanField): Likewise. (setByteField): Likewise. (setCharField): Likewise. (setDoubleField): Likewise. (setFloatField): Likewise. (setIntField): Likewise. (setLongField): Likewise. (setShortField): Likewise. (setObjectField): Likewise. (setDump): Removed. * native/jni/java-io/java_io_ObjectInputStream.c (callReadMethod): removed. (setBooleanField): removed. (setByteField): removed. (setCharField): Removed. (setDoubleField): Removed. (setFloatField): Removed. (setIntField): Removed. (setLongField): Removed. (setShortField): Removed. (setObjectField): Removed. * include/java_io_ObjectInputStream.h: Regenerated.
* 2002-03-21 C. Brian Jones <cbj@gnu.org>Brian Jones2002-03-251-433/+607
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The following changes are all from patch submissions from Intel's ORP team to get Classpath into a JBOSS compatible state. This is primarily just the non-public API patches. * java/io/BufferedOutputStream.java (flush): after writing out the current buffer contents flush the underlying output stream * java/io/File.java (File(String,String)): make use of gnu.java.io.PlatformHelper; avoid possible double separator char when setting path (getName): make use of gnu.java.io.PlatformHelper (getAbsolutePath): make use of PlatformHelper; avoid possible double separator char if user.dir ends with separator (getCanonicalPath): mostly replaced with call to gnu.java.io.PlatformHelper.toCanonicalForm() (getParent): make use of gnu.java.io.PlatformHelper (isAbsolute): make use of gnu.java.io.PlatformHelper when checking root prefix (mkdir): make use of gnu.java.io.PlatformHelper to consolidate removal of trailing separator character (list): ditto (toURL): add trailing separator for directory * java/io/ObjectInputStream.java (readObject): place code in finally clause to it always executes (defaultReadObject): change block data mode before/after read (resolveProxyClass): formatting (read): modified algorithm, needs testing (readBoolean): change block data mode as needed (readByte): ditto (readUnsignedByte): ditto (readShort): ditto (readUnsignedShort): ditto (readChar): ditto (readInt): ditto (readLong): ditto (readFloat): ditto (readDouble): ditto (readFields): change block data mode preserving old mode (readFields): ditto; catch NoSuchFieldError and dump error message (dump): set field to false by default to avoid debug messages * java/io/ObjectOutputStream.java (writeObject): save old mode before unsetting block data mode. Handle proxy classes writing instances of Class (annotateProxyClass): new method (drain): conditionally write block data header (close): flush stream before closing (writeBoolean): blockDataOutput instead of dataOutput (writeByte): ditto (writeShort): ditto (writeChar): ditto (writeInt): ditto (writeLong): ditto (writeFloat): ditto (writeDouble): ditto (put): throw IllegalArgumentException if field not found (write): save and reset block data mode (writeArraySizeAndElements): optimize byte array case (writeFields): save and reset block data mode; call ObjectStreamField.getTypeString instead of TypeSignature.getEncodingOfClass (setBlockDataMode): added call to drain() and return boolean oldmode * java/io/ObjectStreamClass.java (lookup): call lookupForClassObject (lookupForClassObject): new method (isProxyClass): new method (setClass): set _isProxyClass (ObjectStreamClass): set _isProxyClass; only set UID if serializable (setFields): code to interoperate with JDK if Throwable serialized form is not the same as the Java API, but commented out * java/io/ObjectStreamConstants.java: (TC_LONGSTRING): new constant (TC_PROXYCLASSDESC): new constant * java/io/ObjectStreamField.java (ObjectStreamField): store typename (ObjectStreamField): new package private constructor for cases where access to a Class is not available (getTypeCode): use stored type name (getTypeString): ditto * java/io/PushbackInputStream.java (available): calculate available correctly (read): recalculate numBytes (skip): skip ahead only the amount available that is already read * java/security/DigestOutputStream.java (write): use out.write instead of super.write * java/security/MessageDigest.java (update): use offset * java/security/PermissionCollection.java (static): do not override private linesep (toString): indicate readonly and output PermissionCollection * java/security/Permissions.java (add): add perm to allPermissions (add): do nothing if permission already added * java/security/Policy.java (static): added static initializer to create policy * java/security/ProtectionDomain.java (toString): output ProtectionDomain * java/security/SecureClassLoader.java (SecureClassLoader): FIXME removed, call SecurityManager.checkCreateClassLoader (SecureClassLoader): call SecurityManager.checkCreateClassLoader * java/net/InetAddress.java (serialVersionUID): needed for serialization compatibility (hostname): renamed hostName (hostname_alias): changed to transient (my_ip[]): ditto (lookup_time): ditto (address): new field for serialization (family): ditto (getHostName): use changed variable name hostName (InetAddress): set family and address * java/net/JarURLConnection.java (JarURLConnection): correct getting of embedded URL * java/net/PlainSocketImpl.java (available): implement natively (getOption): do not synchronize (setOption): ditto (connect): ditto (close): ditto * java/net/URL.java (authority): new field (userInfo): new transient field (ph): changed to transient (URL): removed previous hack of treating the spec URL as a file to append to the context (sameFile): missing brackets and incorrect formatting for the given code make this a great catch (writeObject): new method (readObject): new method, throw IOException for unhandled protocol (getPath): new method (1.3 spec) * java/net/URLClassLoader.java (findClass): handled jars better (findResource): treat as directory if it does not end with .zip or .jar (getURLs): pass unnamed array of the appropriate size to toArray * java/net/URLStreamHandler.java: import gnu.java.io.PlatformHelper (parseURL): simplifying method * java/rmi/MarshalledObject.java (MarshalledObject): implemented (equals): implemented (get): implemented (hashCode): implemented * java/rmi/server/RMIClassLoader.java (MyClassLoader): new constructor (static): initialize state (loadClass): reimplemented; I think the new method may inappropriately miss the use of tok in caching loaders which also means not checking for the loader correctly (getClassAnnotation): implemented * include/java_net_PlainSocketImpl.h: need to write native method available
* The following changes are all from patch submissions from Intel'sBrian Jones2002-03-211-0/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ORP team to get Classpath into a JBOSS compatible state. This is primarily just the non-public API patches. * gnu/java/io/PlatformHelper.java: new file * gnu/java/io/Makefile.am: add new file to EXTRA_DIST * gnu/java/lang/ClassLoaderHelper.java (getSystemResourceAsFile): add support for .zip/.jar archive loading * gnu/java/lang/reflect/TypeSignature.java: additional comments * gnu/java/net/protocol/file/FileURLConnection.java (connect): if file does not exist, throw FileNotFoundException * gnu/java/net/protocol/file/Handler.java (parseURL): override method from URLStreamHandler for parsing file URL * gnu/java/net/protocol/jar/JarURLConnection.java: new file * gnu/java/net/protocol/jar/Handler.java: new file * gnu/java/net/protocol/jar/.cvsignore: new file * gnu/java/net/protocol/jar/Makefile.am: new file * gnu/java/net/protocol/Makefile.am: add jar to SUBDIRS * gnu/java/rmi/RMIMarshalledObjectInputStream.java: new file * gnu/java/rmi/RMIMarshalledObjectOutputStream.java: new file * gnu/java/rmi/Makefile.am: add new file to EXTRA_DIST * gnu/java/rmi/dgc/DGCImpl.java (dirty): partially implemented * gnu/java/rmi/server/Makefile.am: add new file to EXTRA_DIST * gnu/java/rmi/server/ConnectionRunnerPool.java: new file * gnu/java/rmi/server/RMIHashes.java (getMethodHash): conformance to object serialization specification 8.3 * gnu/java/rmi/server/RMIObjectInputStream.java (RMIObjectInputStream): new constructor (resolveClass): try additional method of loading class and catch exception from super.resolveClass (getAnnotation): new method (resolveProxyClass): new method (readValue): new method * gnu/java/rmi/server/RMIObjectOutputStream.java (setAnnotation): new method (annotateClass): use new setAnnotation method (annotateProxyClass): new method (replaceObject): new method (writeValue): new method * gnu/java/rmi/server/UnicastConnection.java (acceptConnection): use buffered streams to improve efficiency (makeConnection): ditto (disconnect): close oout stream if needed * gnu/java/rmi/server/UnicastConnectionManager.java (static): use host address instead of host name (getInstance): ditto (stopServer): new method (run): exit thread if server thread is null * gnu/java/rmi/server/UnicastRef.java (invokeCommon): handle primitive types and null return type (writeExternal): remove write of RETURN_ACK because it confuses Sun's implementation when interoperating (readExternal): similarly read of RETURN_ACK or Sun's value ok * gnu/java/rmi/server/UnicastServer.java (unexportObject): new method (incomingMessageCall): check for primitive type and write it out correctly * gnu/java/rmi/server/UnicastServerRef.java: implements ServerRef (exportObject): call new exportObject method with argument (exportObject): new method, not completely implemented (unexportObject): new method (getHelperClass): remove use of Class.forName (buildMethodHash): boolean argument allows build up or tear down of method hash (getMethodReturnType): new method (incomingMessageCall): handle exceptions from meth.invoke differently * gnu/java/security/provider/DefaultPolicy.java (getPermissions): do not maintain static class variable of Permissions * gnu/java/security/provider/SHA.java (engineUpdate): algorithm change (engineDigest): algorithm change * java/io/ObjectInputStream.java (resolveProxyClass): new method * configure.in: add new Makefiles to AC_OUTPUT
* Add License clarificationMark Wielaard2002-01-221-5/+16
|
* * java/io/ObjectInputStream.java (enableResolveObject): UseTom Tromey2001-12-211-2/+5
| | | | | | correct security check. * java/io/ObjectOutputStream.java (enableReplaceObject): Use correct security check.
* * java/io/ObjectInputStream.java (readObject): Fixed typo.Tom Tromey2001-12-091-5/+5
|
* * gnu/Makefile.am: removed tools from SUBDIRSBrian Jones2001-09-211-3/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | * gnu/java/awt/image/GdkPixbufDecoder.java: wrapped loadLibrary call within if (Configuration.INIT_LOAD_LIBRARY) * gnu/java/awt/peer/gtk/GtkToolkit.java: same * java/io/File.java: same * java/io/FileDescriptor.java: same * java/io/FileInputStream.java: same * java/io/FileOutputStream.java: same * java/io/ObjectInputStream.java: same * java/io/ObjectOutputStream.java: same * java/io/ObjectStreamClass.java: same * java/io/RandomAccessFile.java: same * java/lang/Double.java: same * java/lang/Float.java: same * java/lang/Math.java: same * java/lang/Object.java: same * java/lang/System.java: same * java/lang/reflect/Array.java: same * java/math/BigInteger.java: same * java/net/InetAddress.java: same * java/net/PlainDatagramSocketImpl.java: same * java/net/PlainSocketImpl.java: same * java/util/ResourceBundle.java: same * java/util/TimeZone.java: same * vm/reference/java/lang/Throwable.java: remove unused loadLibrary call, VMs typically statically link these native methods instead.
* * java/io/BlockDataException.java: Removed.Bryce McKinlay2001-02-161-1/+1
| | | | | * java/io/ObjectInputStream.java (readObject): Throw StreamCorruptedException, not BlockDataException.
* typo: Systm -> SystemBrian Jones2000-11-161-3/+3
| | | | typo: there -> their
* dumpElement (String): removed extraneous semi-colonBrian Jones2000-11-161-4/+4
| | | | | dumpElementln (String): removed extraneous semi-colon setDump (boolean): removed reference to this in static method
* * java/io/ObjectInputStream.java (readObject): Added code toWarren Levy2000-11-031-22/+92
| | | | | | | | | | | | | | | | | | 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 method. (dumpElement): New method. (dumpElementln): New method. Serialization dumper. Enable by 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).
* * Makefile.am: Removed Replaceable.java and Resolvable.java.Warren Levy2000-10-061-8/+30
| | | | | | | | | | | | | | | | | * ObjectInputStream.java (processResolution): Fixed typo in method name. (processResolution): Handle readResolve method via reflection with removal of Resolvable interface. * ObjectOutputStream.java (writeObject): Handle writeReplace method via reflection with removal of Replaceable interface. * Replaceable.java: Removed. * Resolvable.java: Removed. 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).
* * ObjectInputStream.java (readFields): Turn offWarren Levy2000-08-041-2/+9
| | | | | | | | | | | | | | | | | | | | | readDataFromBlock while reading via GetField. (GetField$1.get(String, Object)): Pass Class of default value to getField. (getField): Allow for null default values. * 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. * 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 results.
* Change license to libgcc-like terms.Paul Fisher2000-03-161-68/+23
| | | | Fix copyright years.
* Made changes suggested by kopi (kjc) compiler team to be in keepingBrian Jones1999-12-281-2/+2
| | | | | with JLS 4.5.4. The changes may be unnecessary but should not affect the outcome of compiling with any other compiler.
* Added GetField class and associated methods.Geoff Berry1999-11-231-617/+615
|
* (readObject): Removed unused variable.Geoff Berry1999-02-221-1/+0
|
* (readObject): Changed while loop to switch statement.Geoff Berry1999-02-221-39/+29
|
* Ensure javaio native library loadedAaron M. Renn1998-12-271-2/+2
|
* Added Persistant Fields API support.Geoff Berry1998-10-291-16/+278
|
* Changed copyright assignment to FSF.Geoff Berry1998-08-301-1/+1
|
* Changed usage of OSCField to ObjectStreamField. Partially implementedGeoff Berry1998-07-291-25/+123
| | | | reading in data for a different version of a class.
* Completed (registerValidation(ObjectInputValidation,int)).Geoff Berry1998-07-281-146/+171
|
* Made string and array constants into static final veriablesGeoff Berry1998-07-241-2/+4
|
* Fixed bug in (readObject()) where ObjectStreamClass's weren't gettingGeoff Berry1998-07-241-30/+91
| | | | handles assigned soon enough.
* First versionGeoff Berry1998-07-211-0/+944