This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 65126 - 'Abstract method not overriden' error not announced within anonymous class
Summary: 'Abstract method not overriden' error not announced within anonymous class
Status: VERIFIED FIXED
Alias: None
Product: java
Classification: Unclassified
Component: Unsupported (show other bugs)
Version: 5.x
Hardware: All All
: P3 blocker (vote)
Assignee: Tomas Hurka
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-09-26 14:51 UTC by Jiri Prox
Modified: 2007-09-26 09:14 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jiri Prox 2005-09-26 14:51:31 UTC
NB 5.0 dev build 20050926
JDK 1.5.0_05

An error 'X does not override abstract method ..' not announced within anonymous
class. 

Steps to reproduce:
-------------------
1) create new interface:
public interface Itemable {
    void setOwner(Object owner);
    
}

2) create new class:
public class Owner {
    
    LinkedList ll = new LinkedList();
    
    public void add(Itemable it) {
        it.setOwner(this);
        ll.add(it);
    }
    
    public void meth() {
        this.add(new Itemable() {
            
        });
    }
    
}

-> this code can not be compiled because the anonymous class derived from
Itemable does not implement method setOwner(Object), but it is not announced in
the editor.
Comment 1 Tomas Hurka 2005-10-05 14:04:48 UTC
This happens only if anonymous class has empty body.
Comment 2 Tomas Hurka 2005-10-06 12:49:15 UTC
Fixed in trunk.
Checking in gjast.jar;
/cvs/java/external/gjast.jar,v  <--  gjast.jar
new revision: 1.5; previous revision: 1.4
done
Comment 3 Jiri Prox 2005-10-31 13:11:29 UTC
verified
Comment 4 Quality Engineering 2007-09-20 10:47:36 UTC
Reorganization of java component