[kaffe] CVS kaffe (guilhem): Improved semantic of PUTFIELD/PUTSTATIC
Kaffe CVS
cvs-commits at kaffe.org
Sat Apr 1 12:38:34 PST 2006
PatchSet 7204
Date: 2006/04/01 20:30:51
Author: guilhem
Branch: HEAD
Tag: (none)
Log:
Improved semantic of PUTFIELD/PUTSTATIC
* kaffe/kaffevm/kaffe.def
(PUTFIELD, PUTSTATIC): Updated semantic to follow JDK 1.5 behaviour.
* libraries/javalib/vmspecific/java/lang/reflect/Field.java
(checkFinal): Follow JSR133 recommandation regarding final fields
being modifiable if setAccessible has been invoked.
Members:
ChangeLog:1.4711->1.4712
kaffe/kaffevm/kaffe.def:1.44->1.45
libraries/javalib/vmspecific/java/lang/reflect/Field.java:1.1->1.2
Index: kaffe/ChangeLog
diff -u kaffe/ChangeLog:1.4711 kaffe/ChangeLog:1.4712
--- kaffe/ChangeLog:1.4711 Thu Mar 30 22:17:42 2006
+++ kaffe/ChangeLog Sat Apr 1 20:30:51 2006
@@ -1,3 +1,12 @@
+2006-04-01 Guilhem Lavaux <guilhem at kaffe.org>
+
+ * kaffe/kaffevm/kaffe.def
+ (PUTFIELD, PUTSTATIC): Updated semantic to follow JDK 1.5 behaviour.
+
+ * libraries/javalib/vmspecific/java/lang/reflect/Field.java
+ (checkFinal): Follow JSR133 recommandation regarding final fields
+ being modifiable if setAccessible has been invoked.
+
2006-03-31 Riccardo Mottola <riccardo at kaffe.org>
* libraries/javalib/awt-implementations/kaffe/java/awt/AWTEvent.java,
Index: kaffe/kaffe/kaffevm/kaffe.def
diff -u kaffe/kaffe/kaffevm/kaffe.def:1.44 kaffe/kaffe/kaffevm/kaffe.def:1.45
--- kaffe/kaffe/kaffevm/kaffe.def:1.44 Thu Mar 30 17:39:16 2006
+++ kaffe/kaffe/kaffevm/kaffe.def Sat Apr 1 20:30:54 2006
@@ -2553,8 +2553,7 @@
}
}
else if (((field_field()->accflags & ACC_FINAL) &&
- (field_class() != current_class() ||
- !utf8ConstEqual(METHOD_NAME(current_method()), init_name))) ||
+ (field_class() != current_class() || current_class()->state != CSTATE_DOING_INIT )) ||
!checkFieldAccess(current_class(),
field_class(),
field_field())) {
@@ -2737,7 +2736,6 @@
}
else if (((field_field()->accflags & ACC_FINAL) &&
(field_class() != current_class() )) ||
-// !utf8ConstEqual(METHOD_NAME(current_method()), constructor_name) )) ||
!checkFieldAccess(current_class(),
field_class(),
field_field())) {
Index: kaffe/libraries/javalib/vmspecific/java/lang/reflect/Field.java
diff -u kaffe/libraries/javalib/vmspecific/java/lang/reflect/Field.java:1.1 kaffe/libraries/javalib/vmspecific/java/lang/reflect/Field.java:1.2
--- kaffe/libraries/javalib/vmspecific/java/lang/reflect/Field.java:1.1 Wed Oct 19 20:16:05 2005
+++ kaffe/libraries/javalib/vmspecific/java/lang/reflect/Field.java Sat Apr 1 20:30:54 2006
@@ -26,7 +26,7 @@
}
private void checkFinal() throws IllegalAccessException {
- if (Modifier.isFinal(getModifiers())) {
+ if (Modifier.isFinal(getModifiers()) && !flag) {
throw new IllegalAccessException("trying to set final field " + toString());
}
}
More information about the kaffe
mailing list