harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From arc...@apache.org
Subject svn commit: r370814 - /incubator/harmony/enhanced/jchevm/libjc/resolve2.c
Date Fri, 20 Jan 2006 14:25:27 GMT
Author: archie
Date: Fri Jan 20 06:25:25 2006
New Revision: 370814

URL: http://svn.apache.org/viewcvs?rev=370814&view=rev
Log:
Fix INVOKESPECIAL check for illegal constructor access (the method must resolve
in the same class as the symbolic reference). Previously the check was never
actually doing anything.

Modified:
    incubator/harmony/enhanced/jchevm/libjc/resolve2.c

Modified: incubator/harmony/enhanced/jchevm/libjc/resolve2.c
URL: http://svn.apache.org/viewcvs/incubator/harmony/enhanced/jchevm/libjc/resolve2.c?rev=370814&r1=370813&r2=370814&view=diff
==============================================================================
--- incubator/harmony/enhanced/jchevm/libjc/resolve2.c (original)
+++ incubator/harmony/enhanced/jchevm/libjc/resolve2.c Fri Jan 20 06:25:25 2006
@@ -845,6 +845,15 @@
 					goto post_fail;
 				}
 
+				/* Check for illegal constructor access */
+				if (*imethod->name == '<'
+				    && imethod->class != type) {
+					_JC_EX_STORE(env, NoSuchMethodError,
+					    "%s.%s%s", ref->class, ref->name,
+					    ref->descriptor);
+					goto post_fail;
+				}
+
 				/* Perform invokespecial test */
 				if (*imethod->name == '<')
 					break;
@@ -870,15 +879,6 @@
 				/* Not found? */
 				if (vmethod == NULL) {
 					_JC_EX_STORE(env, AbstractMethodError,
-					    "%s.%s%s", ref->class, ref->name,
-					    ref->descriptor);
-					goto post_fail;
-				}
-
-				/* Check for illegal constructor access */
-				if (*imethod->name == '<'
-				    && vmethod->class != imethod->class) {
-					_JC_EX_STORE(env, NoSuchMethodError,
 					    "%s.%s%s", ref->class, ref->name,
 					    ref->descriptor);
 					goto post_fail;



Mime
View raw message