Bug 85160 - [compiler] java.lang.Object.finalize() method cannot be invoked on an array type
Summary: [compiler] java.lang.Object.finalize() method cannot be invoked on an array type
Status: VERIFIED FIXED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 3.1   Edit
Hardware: PC Windows XP
: P3 critical (vote)
Target Milestone: 3.1 M5   Edit
Assignee: Philipe Mulet CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-02-14 12:38 EST by Olivier Thomann CLA
Modified: 2005-02-15 13:10 EST (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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