From c05e85e236f6848de79ca82ca5cf6ccbc897c84c Mon Sep 17 00:00:00 2001 From: Michael Koch Date: Tue, 1 Jun 2004 12:47:02 +0000 Subject: [PATCH] [multiple changes] 2004-06-01 Tom Tromey * java/io/ObjectStreamField.java: Cleaned up imports. 2004-06-01 Michael Koch * java/io/ObjectStreamField.java: Style and javadoc cleanup. 2004-06-01 Mark Wielaard * java/io/Writer.java (Writer(Object)): Fixed API doc. From-SVN: r82545 --- libjava/ChangeLog | 12 ++++++++++++ libjava/java/io/ObjectStreamField.java | 26 ++++++++++++++++++++------ libjava/java/io/Writer.java | 2 +- 3 files changed, 33 insertions(+), 7 deletions(-) diff --git a/libjava/ChangeLog b/libjava/ChangeLog index d775572f229..b7f6887b18f 100644 --- a/libjava/ChangeLog +++ b/libjava/ChangeLog @@ -1,3 +1,15 @@ +2004-06-01 Tom Tromey + + * java/io/ObjectStreamField.java: Cleaned up imports. + +2004-06-01 Michael Koch + + * java/io/ObjectStreamField.java: Style and javadoc cleanup. + +2004-06-01 Mark Wielaard + + * java/io/Writer.java (Writer(Object)): Fixed API doc. + 2004-06-01 Michael Koch * java/security/Security.java diff --git a/libjava/java/io/ObjectStreamField.java b/libjava/java/io/ObjectStreamField.java index f4a866ed067..830a349344a 100644 --- a/libjava/java/io/ObjectStreamField.java +++ b/libjava/java/io/ObjectStreamField.java @@ -1,5 +1,5 @@ /* ObjectStreamField.java -- Class used to store name and class of fields - Copyright (C) 1998, 1999, 2003 Free Software Foundation, Inc. + Copyright (C) 1998, 1999, 2003, 2004 Free Software Foundation, Inc. This file is part of GNU Classpath. @@ -38,9 +38,10 @@ exception statement from your version. */ package java.io; +import gnu.java.lang.reflect.TypeSignature; + import java.lang.reflect.Field; import java.lang.reflect.Modifier; -import gnu.java.lang.reflect.TypeSignature; import java.security.AccessController; import java.security.PrivilegedAction; @@ -87,6 +88,7 @@ public class ObjectStreamField implements Comparable * * @param name Name of the field to export. * @param type Type of the field in the concerned class. + * @param unshared true if field will be unshared, false otherwise. */ public ObjectStreamField (String name, Class type, boolean unshared) { @@ -238,9 +240,16 @@ public class ObjectStreamField implements Comparable return typename.length() == 1; } - public int compareTo (Object o) + /** + * Compares this object to the given object. + * + * @param obj the object to compare to. + * + * @return -1, 0 or 1. + */ + public int compareTo (Object obj) { - ObjectStreamField f = (ObjectStreamField)o; + ObjectStreamField f = (ObjectStreamField) obj; boolean this_is_primitive = isPrimitive (); boolean f_is_primitive = f.isPrimitive (); @@ -348,6 +357,11 @@ public class ObjectStreamField implements Comparable " in class " + field.getDeclaringClass()); } + /** + * Returns a string representing this object. + * + * @return the string. + */ public String toString () { return "ObjectStreamField< " + type + " " + name + " >"; @@ -364,7 +378,7 @@ public class ObjectStreamField implements Comparable throw new InternalError(x.getMessage()); } } - + final void setByteField(Object obj, byte val) { try @@ -400,7 +414,7 @@ public class ObjectStreamField implements Comparable throw new InternalError(x.getMessage()); } } - + final void setIntField(Object obj, int val) { try diff --git a/libjava/java/io/Writer.java b/libjava/java/io/Writer.java index 8248c5556d4..49b6315231e 100644 --- a/libjava/java/io/Writer.java +++ b/libjava/java/io/Writer.java @@ -76,7 +76,7 @@ public abstract class Writer * on the specified Object. * * @param lock The Object to use for synchronizing critical - * sections. Must be not be null. + * sections. Must not be null. */ protected Writer(Object lock) { -- 2.30.2