This is the mail archive of the java-patches@gcc.gnu.org mailing list for the Java project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Patch: java.lang.Class


Hi list,


I wrote a little patch to fix little issues in java.lang.Class. It adds the 
serialVersionUID field and adds "throws SecurityException" to two methods.

Please review and comment.


Michael
Index: ChangeLog
===================================================================
RCS file: /cvs/gcc/gcc/libjava/ChangeLog,v
retrieving revision 1.2330
diff -u -b -B -r1.2330 ChangeLog
--- ChangeLog	11 Nov 2003 12:22:17 -0000	1.2330
+++ ChangeLog	11 Nov 2003 19:27:23 -0000
@@ -1,5 +1,12 @@
 2003-11-11  Michael Koch  <konqueror@gmx.de>
 
+	* java/lang/Class.java
+	(serialVersionUID): New static member variable.
+	(getDeclaredFields): Added "throws SecurityException".
+	(getFields): Likewise.
+
+2003-11-11  Michael Koch  <konqueror@gmx.de>
+
 	* java/awt/Font.java,
 	java/awt/datatransfer/DataFlavor.java,
 	java/math/BigInteger.java,
Index: java/lang/Class.java
===================================================================
RCS file: /cvs/gcc/gcc/libjava/java/lang/Class.java,v
retrieving revision 1.19
diff -u -b -B -r1.19 Class.java
--- java/lang/Class.java	22 Oct 2003 19:29:27 -0000	1.19
+++ java/lang/Class.java	11 Nov 2003 19:27:23 -0000
@@ -31,6 +31,8 @@
 
 public final class Class implements Serializable
 {
+  private static final long serialVersionUID = 3206093459760846163L;
+
   public static native Class forName (String className)
     throws ClassNotFoundException;
   /** @since 1.2 */
@@ -80,6 +82,7 @@
    * @since 1.1
    */
   public Field[] getDeclaredFields()
+    throw SecurityException
   {
     memberAccessCheck(Member.DECLARED);
     return getDeclaredFields(false);
@@ -135,6 +138,7 @@
    * @since 1.1
    */
   public Field[] getFields()
+    throws SecurityException
   {
     memberAccessCheck(Member.PUBLIC);
     return internalGetFields();

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]