Bug 550129 - [cleanup] Remove redundant array creation
Summary: [cleanup] Remove redundant array creation
Status: VERIFIED FIXED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 4.13   Edit
Hardware: PC Linux
: P3 normal (vote)
Target Milestone: 4.14 M1   Edit
Assignee: Jeff Johnston CLA
QA Contact: Jeff Johnston CLA
URL:
Whiteboard:
Keywords: noteworthy
Depends on:
Blocks: 558614 567988
  Show dependency tree
 
Reported: 2019-08-15 17:55 EDT by Jeff Johnston CLA
Modified: 2020-10-20 02:24 EDT (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jeff Johnston CLA 2019-08-15 17:55:26 EDT
The following:

public int foo() {
   List<String> x= Arrays.asList(new String[] {"a", "b", "c"});
   ...
}

can be replaced with:

public int foo() {
   List<String> x= Arrays.asList("a", "b", "c");
   ...
}
Comment 1 Eclipse Genie CLA 2019-08-15 22:30:59 EDT
New Gerrit change created: https://git.eclipse.org/r/147810
Comment 3 Roland Grunberg CLA 2019-10-01 09:50:19 EDT
I think this is worth an entry in N&N.
Comment 4 Eclipse Genie CLA 2019-10-01 14:49:08 EDT
New Gerrit change created: https://git.eclipse.org/r/150452
Comment 6 Jeff Johnston CLA 2019-10-01 14:58:16 EDT
(In reply to Roland Grunberg from comment #3)
> I think this is worth an entry in N&N.

Done, thanks.
Comment 7 Jeff Johnston CLA 2019-10-01 14:59:44 EDT
Released for 4.14M1
Comment 8 Jeff Johnston CLA 2019-10-09 17:50:15 EDT
Verified for 4.14M1 using I20191009-0600 build