diff options
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | java/lang/Enum.java | 4 |
2 files changed, 7 insertions, 2 deletions
@@ -1,3 +1,8 @@ +2006-11-27 Andrew John Hughes <gnu_andrew@member.fsf.org> + + * java/lang/Enum.java: + Make name and ordinal final. + 2006-11-21 Andrew John Hughes <gnu_andrew@member.fsf.org> * sun/reflect/annotation/AnnotationParser.java, diff --git a/java/lang/Enum.java b/java/lang/Enum.java index 374940333..f141619be 100644 --- a/java/lang/Enum.java +++ b/java/lang/Enum.java @@ -60,13 +60,13 @@ public abstract class Enum<T extends Enum<T>> /** * 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. |