Community
Participate
Working Groups
This is a new one. I'm using the latest integration build, eclipse-SDK-I20061102-1715-win32.zip java.lang.VerifyError: class gumbo2.graphic.math.Matrix4$Impl overrides final method . at java.lang.ClassLoader.defineClass1(Native Method) at java.lang.ClassLoader.defineClass(Unknown Source) at java.security.SecureClassLoader.defineClass(Unknown Source) at java.net.URLClassLoader.defineClass(Unknown Source) at java.net.URLClassLoader.access$100(Unknown Source) at java.net.URLClassLoader$1.run(Unknown Source) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(Unknown Source) at java.lang.ClassLoader.loadClass(Unknown Source) at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source) at java.lang.ClassLoader.loadClass(Unknown Source) at java.lang.ClassLoader.loadClassInternal(Unknown Source) at gumbo2.test.graphic.math.Matrix4Test.setUp(Matrix4Test.java:554) at junit.framework.TestCase.runBare(TestCase.java:125) at junit.framework.TestResult$1.protect(TestResult.java:106) at junit.framework.TestResult.runProtected(TestResult.java:124) at junit.framework.TestResult.run(TestResult.java:109) at junit.framework.TestCase.run(TestCase.java:118) at junit.framework.TestSuite.runTest(TestSuite.java:208) at junit.framework.TestSuite.run(TestSuite.java:203) at org.eclipse.jdt.internal.junit.runner.junit3.JUnit3TestReference.run(JUnit3TestReference.java:128) at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:460) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:673) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:386) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:196)
Of course, right after i submitted the bug I noticed that a dependent class had a compiler error because it was trying to override a final method. I removed the offending code and all is now right with the world. However, shouldn't I have gotten a "compiler error" instead of a "verify error" when I tried to run the bad code? (I changed the severity level of the bug to "normal", and will let you decide whether this is really a bug or not.)
Could you please provide a test case to reproduce this issue? This looks like a bug in the problem method support.
*** Bug 163378 has been marked as a duplicate of this bug. ***
(In reply to comment #1) > Of course, right after i submitted the bug I noticed that a dependent class had > a compiler error because it was trying to override a final method. I removed > the offending code and all is now right with the world. This would be related to the problem method support. > However, shouldn't I have gotten a "compiler error" instead of a "verify error" > when I tried to run the bad code? Definitely! You should never get a VerifyError. You should get an unresolved compilation error. > (I changed the severity level of the bug to "normal", and will let you decide > whether this is really a bug or not.) This is definitely a bug and a test case to reproduce it would be welcome. Thanks.
Reproduced with: class Y { final public void foo() { } } public class X extends Y { public void foo() {} public static void main(String[] args) { new X().foo(); } } Not sure what is the best way to fix this. I'll investigate. Let me know if this looks like the code you had.
I already posted my code demonstrating the problem with instructions on what to run and where to look in the original bug.... https://bugs.eclipse.org/bugs/show_bug.cgi?id=163378 I see that you tried to boil it down. I'll take a look at this in the next day or so (its election day here and must go fight for democracy).
In this case the only way this can be fixed would be to report the compilation error on the type (not inside a method) and remove the method from the problem type.
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet. If you have further information on the current state of the bug, please add it. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant. -- The automated Eclipse Genie.
Still relevant (In reply to Olivier Thomann from comment #7) > In this case the only way this can be fixed would be to report the > compilation error on the type (not inside a method) and remove the method > from the problem type. I think the tricky part here is: *report* against the method, but *generate* <init> or <clinit> as a ProblemMethod rather than the illegal override, right?