harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ge...@apache.org
Subject svn commit: r471500 - /incubator/harmony/enhanced/drlvm/trunk/vm/vmcore/src/class_support/classloader.cpp
Date Sun, 05 Nov 2006 19:25:55 GMT
Author: geirm
Date: Sun Nov  5 11:25:55 2006
New Revision: 471500

URL: http://svn.apache.org/viewvc?view=rev&rev=471500
Log:
HARMONY-1918

Throw verifyError when class extends a final class

Ubuntu 6 - smoke, c-unit, ~kernel


Modified:
    incubator/harmony/enhanced/drlvm/trunk/vm/vmcore/src/class_support/classloader.cpp

Modified: incubator/harmony/enhanced/drlvm/trunk/vm/vmcore/src/class_support/classloader.cpp
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/drlvm/trunk/vm/vmcore/src/class_support/classloader.cpp?view=diff&rev=471500&r1=471499&r2=471500
==============================================================================
--- incubator/harmony/enhanced/drlvm/trunk/vm/vmcore/src/class_support/classloader.cpp (original)
+++ incubator/harmony/enhanced/drlvm/trunk/vm/vmcore/src/class_support/classloader.cpp Sun
Nov  5 11:25:55 2006
@@ -473,8 +473,16 @@
             }
             return false;
         }
-        if(class_is_interface(superClass) || class_is_final(superClass)) {
-            REPORT_FAILED_CLASS_CLASS(this, clss, "java/lang/IncompatibleClassChangeError",
clss->name->bytes);
+        if(class_is_interface(superClass)) {
+            REPORT_FAILED_CLASS_CLASS(this, clss, "java/lang/IncompatibleClassChangeError",
+                "class " << clss->name->bytes << " has interface "
+                << superClass->name->bytes << " as super class");
+            return false;
+        }
+        if(class_is_final(superClass)) {
+            REPORT_FAILED_CLASS_CLASS(this, clss, "java/lang/VerifyError",
+                clss->name->bytes << " : try to inherit final class "
+                << superClass->name->bytes);
             return false;
         }
         if(!class_verify(env, superClass)) return false;



Mime
View raw message