Bug 57784

Summary: [1.5] Errors using Arrays.asList(T [])
Product: [Eclipse Project] JDT Reporter: Marco Qualizza <mlq.eclipse>
Component: CoreAssignee: Philipe Mulet <philippe_mulet>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: wukauzun
Version: 3.0   
Target Milestone: 3.1 M1   
Hardware: PC   
OS: Linux   
Whiteboard:
Attachments:
Description Flags
The method asList(T[]) in the type Arrays is not applicable for the arguments (Mat) none

Description Marco Qualizza CLA 2004-04-07 14:02:53 EDT
In case this should work, the following code produces a compile error:
   java.util.Arrays.asList(new Object[] {"1"})

"The method asList(T[]) in the type Arrays is not applicable for the arguments
(Object[])".

I apologize if this is a known issue (I didn't see it listed when I looked for
bugs with "[1.5]" in the summary).

I20040407 w/ the just released kitten... I mean Cheetah :-) (I don't know how to
find version number).
Comment 1 Philipe Mulet CLA 2004-04-07 15:50:05 EDT
This isn't a known problem. Thanks for telling us.

BTW, you can see the cheetah version under:
Help>About Eclipse Platform>Feature details>org.eclipse.jdt.cheetah01 

This means you have the first issue of cheetah.
Comment 2 Marco Qualizza CLA 2004-04-07 16:07:47 EDT
Thanks. :-) Just to have it down, this is with Cheetah 0.0.1.
Comment 3 Philipe Mulet CLA 2004-04-07 16:55:59 EDT
This problem comes from the fact we do not yet support generic methods (i.e. 
methods which do declare type parameters).

public static <T> List<T> asList(T[] a) { ... }

Good test once we support them.
Comment 4 Philipe Mulet CLA 2004-04-14 19:24:48 EDT
Support for generic method got released. This scenario now works.
Fixed.
Comment 5 Peter Kronenberg CLA 2005-03-07 13:34:34 EST
I just started using Eclipse 3.1m5a and ran into what appears to be this same
problem.  If I have 
List l = Arrays.asList(intarray);
Eclipse complains that "The method asList(T...) in the type Arrays is not
applicable for the arguments (int[])"
It works fine if I pass asList a list of items, but it doesn't work if I pass
it an array.	
Comment 6 Philipe Mulet CLA 2005-03-07 15:09:46 EST
Entered separate defect (bug#87318) for remaining issue.
Suspecting this has to do with being an array of primitive type.
Comment 7 wu kauzun CLA 2023-09-03 23:02:34 EDT
Created attachment 289168 [details]
The method asList(T[]) in the type Arrays is not applicable for the arguments (Mat)