You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@harmony.apache.org by ar...@apache.org on 2006/06/04 22:40:48 UTC

svn commit: r411595 - /incubator/harmony/enhanced/jchevm/libjc/cf_parse.c

Author: archie
Date: Sun Jun  4 13:40:48 2006
New Revision: 411595

URL: http://svn.apache.org/viewvc?rev=411595&view=rev
Log:
Allow interfaces that fail to have the ACC_ABSTRACT flag set, as required
in the JVM classfile specification. Some compilers apparently omit it.

Bug#:   HARMONY-483

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

Modified: incubator/harmony/enhanced/jchevm/libjc/cf_parse.c
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/jchevm/libjc/cf_parse.c?rev=411595&r1=411594&r2=411595&view=diff
==============================================================================
--- incubator/harmony/enhanced/jchevm/libjc/cf_parse.c (original)
+++ incubator/harmony/enhanced/jchevm/libjc/cf_parse.c Sun Jun  4 13:40:48 2006
@@ -138,9 +138,11 @@
 		/*
 		 * Note: _JC_ACC_SUPER should not be allowed for interfaces
 		 * (JVMS 4.1) but we allow it here because jikes 1.15 sets it.
+		 * In addition, some compilers fail to add _JC_ACC_ABSTRACT.
 		 */
-		if ((cfile->access_flags & ~(_JC_ACC_PUBLIC|_JC_ACC_SUPER))
-		    != (_JC_ACC_INTERFACE|_JC_ACC_ABSTRACT)) {
+		if ((cfile->access_flags
+		      & ~(_JC_ACC_ABSTRACT|_JC_ACC_PUBLIC|_JC_ACC_SUPER))
+		    != _JC_ACC_INTERFACE) {
 			_JC_EX_STORE(env, ClassFormatError,
 			    "invalid interface access flags 0x%04x",
 			    cfile->access_flags);