Commit d9199663 by Mark Wielaard

ObjectInputStream.java: Reindent.

       * java/io/ObjectInputStream.java: Reindent.
       * java/io/ObjectOutputStream.java: Likewise.

From-SVN: r63614
parent 5793b276
2003-03-01 Mark Wielaard <mark@klomp.org>
* java/io/ObjectInputStream.java: Reindent.
* java/io/ObjectOutputStream.java: Likewise.
2003-02-28 Hans Boehm <Hans.Boehm@hp.com>
* java/lang/reflect/natMethod.cc (_Jv_CallAnyMethodA): Allocate a full
......
......@@ -229,7 +229,6 @@ public class ObjectInputStream extends InputStream
short field_count = this.realInputStream.readShort ();
dumpElementln (Short.toString(field_count));
ObjectStreamField[] fields = new ObjectStreamField[field_count];
ObjectStreamClass osc = new ObjectStreamClass (name, uid,
flags, fields);
assignNewHandle (osc);
......@@ -357,9 +356,6 @@ public class ObjectInputStream extends InputStream
|| Modifier.isAbstract (first_nonserial.getModifiers ()))
first_nonserial = first_nonserial.getSuperclass ();
// DEBUGln ("Using " + first_nonserial
// + " as starting point for constructing " + clazz);
Object obj = null;
obj = newObject (clazz, first_nonserial);
......@@ -372,8 +368,6 @@ public class ObjectInputStream extends InputStream
ObjectStreamClass[] hierarchy =
ObjectStreamClass.getObjectStreamClasses (clazz);
// DEBUGln ("Got class hierarchy of depth " + hierarchy.length);
boolean has_read;
for (int i=0; i < hierarchy.length; i++)
{
......@@ -446,7 +440,6 @@ public class ObjectInputStream extends InputStream
default:
throw new IOException ("Unknown marker on stream: " + marker);
}
}
finally
......@@ -465,7 +458,6 @@ public class ObjectInputStream extends InputStream
return ret_val;
}
/**
Reads the current objects non-transient, non-static fields from
the current class from the underlying output stream.
......@@ -693,7 +685,7 @@ public class ObjectInputStream extends InputStream
System.arraycopy (this.blockData, this.blockDataPosition,
data, offset, length);
blockDataPosition += length;
this.blockDataPosition += length;
return length;
}
......@@ -988,8 +980,8 @@ public class ObjectInputStream extends InputStream
int off = field.getOffset ();
return Double.longBitsToDouble (
(long)(((prim_field_data[off++] & 0xFF) << 56)
return Double.longBitsToDouble
( (long) (((prim_field_data[off++] & 0xFF) << 56)
| ((prim_field_data[off++] & 0xFF) << 48)
| ((prim_field_data[off++] & 0xFF) << 40)
| ((prim_field_data[off++] & 0xFF) << 32)
......@@ -1078,14 +1070,6 @@ public class ObjectInputStream extends InputStream
{
this.objectLookupTable.put (new Integer (this.nextOID),
new ObjectIdentityWrapper (obj));
// try
// {
// DEBUG ("Assigning handle " + this.nextOID);
// DEBUGln (" to " + obj);
// }
// catch (Throwable t) {}
return this.nextOID++;
}
......@@ -1134,7 +1118,6 @@ public class ObjectInputStream extends InputStream
private void readNextBlock () throws IOException
{
// DEBUGln ("In readNextBlock ");
readNextBlock (this.realInputStream.readByte ());
}
......@@ -1242,10 +1225,8 @@ public class ObjectInputStream extends InputStream
ObjectStreamClass stream_osc)
throws ClassNotFoundException, IOException
{
// DEBUGln ("In readFields");
if (call_read_method)
{
// DEBUGln (" call_read_method is true");
fieldsAlreadyRead = false;
boolean oldmode = setBlockDataMode (true);
callReadMethod (obj, stream_osc.forClass ());
......@@ -1399,11 +1380,9 @@ public class ObjectInputStream extends InputStream
}
}
// Toggles writing primitive data to block-data buffer.
private boolean setBlockDataMode (boolean on)
{
// DEBUGln ("Setting block data mode to " + on);
boolean oldmode = this.readDataFromBlock;
this.readDataFromBlock = on;
......
......@@ -200,12 +200,12 @@ public class ObjectOutputStream extends OutputStream
if (obj instanceof Class)
{
Class cl = (Class)obj;
ObjectStreamClass osc = ObjectStreamClass.lookupForClassObject(cl);
ObjectStreamClass osc = ObjectStreamClass.lookupForClassObject (cl);
assignNewHandle (obj);
realOutput.writeByte (TC_CLASS);
if (!osc.isProxyClass)
{
writeObject(osc);
writeObject (osc);
}
else
{
......@@ -364,7 +364,6 @@ public class ObjectOutputStream extends OutputStream
writeFields (obj, currentObjectStreamClass.fields,
has_write);
}
currentObject = null;
......@@ -401,12 +400,10 @@ public class ObjectOutputStream extends OutputStream
finally
{
isSerializing = was_serializing;
setBlockDataMode (old_mode);
}
}
/**
Writes the current objects non-transient, non-static fields from
the current class to the underlying output stream.
......@@ -1192,7 +1189,7 @@ public class ObjectOutputStream extends OutputStream
writeObject (getObjectField (obj, field_name,
fields[i].getTypeString ()));
}
setBlockDataMode(oldmode);
setBlockDataMode (oldmode);
}
......@@ -1246,7 +1243,8 @@ public class ObjectOutputStream extends OutputStream
}
}
private boolean getBooleanField (Object obj, String field_name) throws IOException
private boolean getBooleanField (Object obj, String field_name)
throws IOException
{
try
{
......@@ -1291,7 +1289,8 @@ public class ObjectOutputStream extends OutputStream
}
}
private double getDoubleField (Object obj, String field_name) throws IOException
private double getDoubleField (Object obj, String field_name)
throws IOException
{
try
{
......@@ -1306,7 +1305,8 @@ public class ObjectOutputStream extends OutputStream
}
}
private float getFloatField (Object obj, String field_name) throws IOException
private float getFloatField (Object obj, String field_name)
throws IOException
{
try
{
......@@ -1351,7 +1351,8 @@ public class ObjectOutputStream extends OutputStream
}
}
private short getShortField (Object obj, String field_name) throws IOException
private short getShortField (Object obj, String field_name)
throws IOException
{
try
{
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment