[kaffe] CVS kaffe (robilad): kaffe/kaffevm/itypes.c (classFromSig): Don't post

Kaffe CVS cvs-commits at kaffe.org
Mon Oct 22 05:00:23 PDT 2007


PatchSet 7584 
Date: 2007/10/22 11:57:34
Author: robilad
Branch: HEAD
Tag: (none) 
Log:
2007-10-22  Dalibor Topic  <robilad at kaffe.org>

        * kaffe/kaffevm/itypes.c (classFromSig): Don't post
        VerifyError here, throw it in the calling function.
        (getClassFromSignaturePart) Post VerifyError if call
        to classFromSig fails.

Members: 
	ChangeLog:1.5081->1.5082 
	kaffe/kaffevm/itypes.c:1.40->1.41 

Index: kaffe/ChangeLog
diff -u kaffe/ChangeLog:1.5081 kaffe/ChangeLog:1.5082
--- kaffe/ChangeLog:1.5081	Sun Oct 21 17:40:48 2007
+++ kaffe/ChangeLog	Mon Oct 22 11:57:34 2007
@@ -1,3 +1,10 @@
+2007-10-22  Dalibor Topic  <robilad at kaffe.org>
+
+	* kaffe/kaffevm/itypes.c (classFromSig): Don't post
+	VerifyError here, throw it in the calling function.
+	(getClassFromSignaturePart) Post VerifyError if call 
+	to classFromSig fails.
+
 2007-10-21  Dalibor Topic  <robilad at kaffe.org>
 
 	* libraries/clib/native/TimeZone.c: Removed, use the version in GNU Classpath
Index: kaffe/kaffe/kaffevm/itypes.c
diff -u kaffe/kaffe/kaffevm/itypes.c:1.40 kaffe/kaffe/kaffevm/itypes.c:1.41
--- kaffe/kaffe/kaffevm/itypes.c:1.40	Sat Apr 22 01:53:41 2006
+++ kaffe/kaffe/kaffevm/itypes.c	Mon Oct 22 11:57:36 2007
@@ -5,7 +5,7 @@
  * Copyright (c) 1996, 1997
  *	Transvirtual Technologies, Inc.  All rights reserved.
  *
- * Copyright (c) 2004
+ * Copyright (c) 2004, 2007
  *	Kaffe.org contributors. See ChangeLog for details. All rights reserved.
  *   
  * See the file "license.terms" for information on usage and redistribution 
@@ -180,7 +180,6 @@
 		for (end = start; *end != 0 && *end != ';'; end++)
 			;
 		if (*end != ';') {
-			postException(einfo, JAVA_LANG(VerifyError));
 			return (NULL);
 		}
 		*strp = end + 1;
@@ -195,7 +194,6 @@
 
 	default:
 		/* malformed signature */
-		postException(einfo, JAVA_LANG(VerifyError));
 		return (NULL);
 	}
 }
@@ -234,5 +232,14 @@
 Hjava_lang_Class*
 getClassFromSignaturePart(const char* sig, Hjava_lang_ClassLoader* loader, errorInfo *einfo)
 {
-	return (classFromSig(&sig, loader, einfo));
+	Hjava_lang_Class *cls = classFromSig(&sig, loader, einfo);
+
+	/* If class has been found, return it. */
+	if (cls != NULL) {
+		return cls;
+	}
+
+	/* Otherwise, post an exception message. */
+	postException(einfo, JAVA_LANG(VerifyError));
+	return (NULL);
 }




More information about the kaffe mailing list