Bug 3179 - Compiler - LF cannot run classes that miss implementations of an interface (1FNFVY8)
Summary: Compiler - LF cannot run classes that miss implementations of an interface (1...
Status: RESOLVED FIXED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 2.0   Edit
Hardware: All All
: P2 minor (vote)
Target Milestone: 2.0 M5   Edit
Assignee: Olivier Thomann CLA
QA Contact:
URL:
Whiteboard:
Keywords:
: 12809 (view as bug list)
Depends on:
Blocks:
 
Reported: 2001-10-10 22:50 EDT by Erich Gamma CLA
Modified: 2002-04-16 07:47 EDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Erich Gamma CLA 2001-10-10 22:50:49 EDT
EG (12/20/99 6:52:43 PM)
	In VAJ you can execute a class that doesn't implement all methods of an interface.
	You get an exception once an unimplemented interface method is called.
	In LeapFrog you get an exception when you try to instantiate such a class.

NOTES:
EG (2/23/00 8:42:50 PM)
	moved to LFCOM for consideration in EBAF

PM (9/13/2001 11:59:26 AM)
	This would require a problem type would be generated default (problem) implementations for missing abstract methods...
	Doable.
Comment 1 Philipe Mulet CLA 2001-10-11 12:08:43 EDT
Ask KJ for how to get the set of abstract methods to implement.
Comment 2 Olivier Thomann CLA 2001-10-15 12:02:55 EDT
To solve this problem, we need to create a problem method for each unimplemented 
abstract method instead of creating a problem type. Need to see how to add these 
 methods. 
Comment 3 DJ Houghton CLA 2001-10-23 23:50:47 EDT
PRODUCT VERSION:
EG 324

Comment 4 Olivier Thomann CLA 2001-11-13 16:53:34 EST
Addind the abstract problem method is not a problem. It is more difficult to 
know how to map the error message on the right problem method.
Let's consider you have a class X that implements an interface I. This 
interface defines two methods signatures (foo()V and bar(I)I). None of them are 
actually implemented by X. Then two problems will be raised to report these two 
errors and the class file will try to generate a problem type. The problem is to 
find out which problem should be reported for each problem method instead of 
reporting the two problems on the default constructor. Reporting the problem on 
the default constructor or the constructor without any parameters prevents from 
instanciating on object of class without getting an error.
Comment 5 Olivier Thomann CLA 2001-11-13 17:07:01 EST
I need to add a specific support in the ClassFile in order to be able to report 
this missing implementation error. In this case we don't have any method 
declarations that can match the astract method binding. So we cannot add a 
problem method that contains local variable attributes.
Comment 6 Olivier Thomann CLA 2002-03-19 19:22:33 EST
Not only a support needs to be added for the missing abstract methods, but the flow analysis and the 
code generation needs to be done on the constructors. Otherwise the constructor throws an error 
even if all errors on missing abstract methods have been moved to the new problem methods. I need to 
see how to proceed with other methods and at the end add the problem methods for missing abstract 
methods.
Comment 7 Olivier Thomann CLA 2002-03-20 13:07:05 EST
One solution could be to create fake method declarations for missing abstract methods. This 
would allow the problem to be reported on these method declarations instead of the type 
declaration. Then we would not create a problem type, but simply problem methods for each missing 
abstract methods.
Comment 8 Olivier Thomann CLA 2002-03-25 14:16:37 EST
Fixed and released. Regression tests added (see ConformTests.test159/test160).
Comment 9 Olivier Thomann CLA 2002-04-04 11:52:24 EST
*** Bug 12809 has been marked as a duplicate of this bug. ***