Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Java > Strange runtime error: AbstractMethodError

Reply
Thread Tools

Strange runtime error: AbstractMethodError

 
 
Mike Schilling
Guest
Posts: n/a
 
      02-08-2007

"Mike Schilling" <(E-Mail Removed)> wrote in message
news:2Qsyh.74355$(E-Mail Removed). net...

>
> Which is true, I suppose. Commenting out the annotation, it all compiles
> correctly and runs successfully as well (still using jdk1.5.0_05) . Since
> javap shows that the overload being called is Root.someMethod)LRoot;,
> there must be some logic in the JVM to realize that someMethod)LLeaf; is
> "close enough".


Actually, I'm wrong here. javap on Leaf shows that it contains both
someMethod)LRoot and someMethod)LLeaf, where someMethod)LRoot is
automatically generated as if you'd coded

public Root someMethod()
{
return someMethod(); // someMethod)LLeaf
}

This is javac's usual trick for implementing covariant return types.

So, more likely than a JVM bug is that Eclipse's compiler isn't generating
this extra method.


 
Reply With Quote
 
 
 
 
Lew
Guest
Posts: n/a
 
      02-09-2007
Oliver Wong wrote:
> So it sounds like this is a bug in Eclipse's compiler. I did a
> disassembly of both the javac classes and the eclipsec classes, and all the
> files are identical except for Leaf.class.

....
> The main difference being the lack of "public Root someMethod();" within
> Eclipse's version.
>
> I filed this as a bug with Eclipse:
> https://bugs.eclipse.org/bugs/show_bug.cgi?id=173477


That explains why I only saw behavior in keeping with the JLS. I used Netbeans
and command-line javac. (JDK 6)

- Lew
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
java.lang.AbstractMethodError: at the org.apache.xerces.dom.DOMImplementationImpl.createLSOutput() poorichard@gmail.com Java 2 09-18-2006 02:08 AM
Runtime.exec(String[]) Doesn't Always Work, bBut Runtime.exec(String) Does Hal Vaughan Java 11 05-22-2006 04:49 PM
JDBC issues with setBinaryStream an AbstractMethodError and a cast gimme_this_gimme_that@yahoo.com Java 1 05-19-2005 08:40 PM
JNI -- getting AbstractMethodError Jeff Gaynor Java 1 05-25-2004 02:47 PM
debugging java AbstractMethodError Bin Xin Java 3 08-18-2003 03:23 PM



Advertisments