[Kaffe] could someone add this patch?

Moses DeJong dejong at cs.umn.edu
Mon Mar 22 18:28:38 PST 1999


Could someone apply this patch for Field.c. It makes the
Kaffe error message the same as the JDK error message.

thanks
Mo DeJong
dejong at cs.umn.edu


Mon Mar 22 20:25:32 CST 1999 Mo DeJong <dejong at cs.umn.edu>

	* /libraries/clib/native/Field.c: changed error message
	from setXXX() on final fields so that it matches the JDK.



Index: Field.c
===================================================================
RCS file: /home/cvspublic/kaffe/libraries/clib/native/Field.c,v
retrieving revision 1.8
diff -u -r1.8 Field.c
--- Field.c	1999/02/16 22:33:50	1.8
+++ Field.c	1999/03/23 03:31:36
@@ -345,7 +345,7 @@
         base = getFieldAddress(this, obj);
 
         if (fld->accflags & ACC_FINAL) {
-                SignalError("java.lang.IllegalAccessException", "");
+                SignalError("java.lang.IllegalAccessException", "field is final");
         }
 
         if ( fld->type == _Jv_booleanClass ) {
@@ -368,7 +368,7 @@
         base = getFieldAddress(this, obj);
 
         if (fld->accflags & ACC_FINAL) {
-                SignalError("java.lang.IllegalAccessException", "");
+                SignalError("java.lang.IllegalAccessException", "field is final");
         }
 
         if ( fld->type == _Jv_byteClass ) {
@@ -406,7 +406,7 @@
         base = getFieldAddress(this, obj);
 
         if (fld->accflags & ACC_FINAL) {
-                SignalError("java.lang.IllegalAccessException", "");
+                SignalError("java.lang.IllegalAccessException", "field is final");
         }
 
         if ( fld->type == _Jv_charClass ) {
@@ -441,7 +441,7 @@
         base = getFieldAddress(this, obj);
 
         if (fld->accflags & ACC_FINAL) {
-                SignalError("java.lang.IllegalAccessException", "");
+                SignalError("java.lang.IllegalAccessException", "field is final");
         }
 
         if ( fld->type == _Jv_shortClass ) {
@@ -476,7 +476,7 @@
         base = getFieldAddress(this, obj);
 
         if (fld->accflags & ACC_FINAL) {
-                SignalError("java.lang.IllegalAccessException", "");
+                SignalError("java.lang.IllegalAccessException", "field is final");
         }
 
         if ( fld->type == _Jv_intClass ) {
@@ -508,7 +508,7 @@
         base = getFieldAddress(this, obj);
 
         if (fld->accflags & ACC_FINAL) {
-                SignalError("java.lang.IllegalAccessException", "");
+                SignalError("java.lang.IllegalAccessException", "field is final");
         }
 
         if ( fld->type == _Jv_longClass ) {
@@ -537,7 +537,7 @@
         base = getFieldAddress(this, obj);
 
         if (fld->accflags & ACC_FINAL) {
-                SignalError("java.lang.IllegalAccessException", "");
+                SignalError("java.lang.IllegalAccessException", "field is final");
         }
 
         if ( fld->type == _Jv_floatClass ) {
@@ -563,7 +563,7 @@
         base = getFieldAddress(this, obj);
 
         if (fld->accflags & ACC_FINAL) {
-                SignalError("java.lang.IllegalAccessException", "");
+                SignalError("java.lang.IllegalAccessException", "field is final");
         }
 
         if ( fld->type == _Jv_doubleClass ) {
@@ -587,7 +587,7 @@
         fld = CLASS_FIELDS(clas) + unhand(this)->slot;
 
         if (fld->accflags & ACC_FINAL) {
-                SignalError("java.lang.IllegalAccessException", "");
+                SignalError("java.lang.IllegalAccessException", "field is final");
         }
 	
 	ftype = resolveFieldType(fld, clas, &info);



More information about the kaffe mailing list