This makes the name and ordinal fields in Enum
final so they can be better optimized.

Changelog:

2006-11-27  Andrew John Hughes  <[EMAIL PROTECTED]>

        * java/lang/Enum.java:
        Make name and ordinal final.

-- 
Andrew :-)

Escape the Java Trap with GNU Classpath!
http://www.gnu.org/philosophy/java-trap.html
public class gcj extends Freedom implements Java { ... }
Index: java/lang/Enum.java
===================================================================
RCS file: /cvsroot/classpath/classpath/java/lang/Enum.java,v
retrieving revision 1.1.2.9
diff -u -3 -p -u -r1.1.2.9 Enum.java
--- java/lang/Enum.java 17 Apr 2006 18:52:09 -0000      1.1.2.9
+++ java/lang/Enum.java 27 Nov 2006 23:22:47 -0000
@@ -60,13 +60,13 @@ public abstract class Enum<T extends Enu
   /**
    * The name of this enum constant.
    */
-  String name;
+  final String name;
 
   /**
    * The number of this enum constant.  Each constant is given a number
    * which matches the order in which it was declared, starting with zero.
    */
-  int ordinal;
+  final int ordinal;
 
   /**
    * This constructor is used by the compiler to create enumeration constants.

Attachment: signature.asc
Description: Digital signature

Reply via email to