Bug 85160

Summary: [compiler] java.lang.Object.finalize() method cannot be invoked on an array type
Product: [Eclipse Project] JDT Reporter: Olivier Thomann <Olivier_Thomann>
Component: CoreAssignee: Philipe Mulet <philippe_mulet>
Status: VERIFIED FIXED QA Contact:
Severity: critical    
Priority: P3    
Version: 3.1   
Target Milestone: 3.1 M5   
Hardware: PC   
OS: Windows XP   
Whiteboard:

Description Olivier Thomann CLA 2005-02-14 12:38:24 EST
The following code should report an error like this:

The method finalize() from the type Object is not visible

but it crashes with a ClassCastException for an array type. It works fine if I
replace args with args[0].

public class X {

    public static void main(String[] args) {
        args.finalize();
    }
}
Comment 1 Philipe Mulet CLA 2005-02-15 05:04:57 EST
Fixed. Cast need to occur later on.
Added LookupTest#test051.
Fixed
Comment 2 Jerome Lanneluc CLA 2005-02-15 13:10:25 EST
Verified in I20050215-0800