[kaffe] Bug [CVS version]: Calling non-implemented method in abstract class

Ito Kazumitsu ito.kazumitsu at hitachi-cable.co.jp
Mon Apr 7 00:17:01 PDT 2003


In message "[kaffe] Bug [CVS version]: Calling non-implemented method
in abstract class" Benja Fallenstein <b.fallenstein at gmx.de> writes:

> Actually, AFAIK this was compiled not with jikes, but the javac in Sun's
> 1.4 (invoked through ant). Hope it's still the same bug ;-)

I compiled your Bug.java with Sun's javac and run it with kaffe,
and found that NoSuchMethodError occurred.

Then I compiled Bug.java with Sun's javac using the option
-target 1.1 and run it with kaffe.  This time the program
ended normally.

Following are the class files generated by Sun's javac
(disassebled by at.dms.dis.Main).

--- Bug-javac-1.1/Bug$Abstract.ksm	Mon Apr  7 15:57:26 2003
+++ Bug-javac/Bug$Abstract.ksm	Mon Apr  7 13:41:40 2003
@@ -1,40 +1,33 @@
-// compiler version: 45.3
+// compiler version: 46.0
 
 @source "Bug.java"
 abstract class Bug$Abstract extends java.lang.Object implements Bug$Interface {
 
     /**
      * <init>
      *
      * stack	1
      * locals	1
      */
     @signature "()V"
     void <init>() {
         @line	6
         	@aload		0
         	@invokespecial	void java.lang.Object.<init>()
         	@return		
     }
 
     /**
      * bug
      *
      * stack	1
      * locals	1
      */
     @signature "()V"
     public void bug() {
         @line	7
         	@aload		0
         	@invokevirtual	void Bug$Abstract.foo()
         	@return		
     }
-
-    /**
-     * foo
-     *
-     */
-    @signature "()V"
-    public abstract void foo();
 }
--- Bug-javac-1.1/Bug$Impl.ksm	Mon Apr  7 15:57:26 2003
+++ Bug-javac/Bug$Impl.ksm	Mon Apr  7 13:41:40 2003
@@ -1,31 +1,31 @@
-// compiler version: 45.3
+// compiler version: 46.0
 
 @source "Bug.java"
 class Bug$Impl extends Bug$Abstract {
 
     /**
      * <init>
      *
      * stack	1
      * locals	1
      */
     @signature "()V"
     void <init>() {
         @line	10
         	@aload		0
         	@invokespecial	void Bug$Abstract.<init>()
         	@return		
     }
 
     /**
      * foo
      *
      * stack	0
      * locals	1
      */
     @signature "()V"
     public void foo() {
         @line	11
         	@return		
     }
 }
--- Bug-javac-1.1/Bug$Interface.ksm	Mon Apr  7 15:57:26 2003
+++ Bug-javac/Bug$Interface.ksm	Mon Apr  7 13:41:40 2003
@@ -1,12 +1,12 @@
-// compiler version: 45.3
+// compiler version: 46.0
 
 @source "Bug.java"
 abstract interface Bug$Interface extends java.lang.Object {
 
     /**
      * foo
      *
      */
     @signature "()V"
     public abstract void foo();
 }
--- Bug-javac-1.1/Bug.ksm	Mon Apr  7 15:57:26 2003
+++ Bug-javac/Bug.ksm	Mon Apr  7 13:41:40 2003
@@ -1,37 +1,37 @@
-// compiler version: 45.3
+// compiler version: 46.0
 
 @source "Bug.java"
 public class Bug extends java.lang.Object {
 
     /**
      * <init>
      *
      * stack	1
      * locals	1
      */
     @signature "()V"
     public void <init>() {
         @line	1
         	@aload		0
         	@invokespecial	void java.lang.Object.<init>()
         @line	10
         	@return		
     }
 
     /**
      * main
      *
      * stack	2
      * locals	1
      */
     @signature "([Ljava/lang/String;)V"
     public static void main(java.lang.String[]) {
         @line	15
         	@new		Bug$Impl
         	@dup		
         	@invokespecial	void Bug$Impl.<init>()
-        	@invokevirtual	void Bug$Abstract.bug()
+        	@invokevirtual	void Bug$Impl.bug()
         @line	16
         	@return		
     }
 }




More information about the kaffe mailing list