mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-05-01 02:38:59 +07:00
BulkMethodInfo: support for Java 1.4 (fixes EA-101278).
This commit is contained in:
@@ -0,0 +1,11 @@
|
||||
// "Replace iteration with bulk 'Collection.addAll' call" "true"
|
||||
import java.util.*;
|
||||
|
||||
public class Collect {
|
||||
class Person {}
|
||||
|
||||
void collectNames(Person[] persons){
|
||||
List names = new ArrayList();
|
||||
names.addAll(Arrays.asList(persons));
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
// "Replace iteration with bulk 'Collection.addAll' call" "true"
|
||||
import java.util.*;
|
||||
|
||||
public class Collect {
|
||||
class Person {}
|
||||
|
||||
void collectNames(Person[] persons){
|
||||
List names = new ArrayList();
|
||||
for(int i = 0; i<persons.length; i = i + 1) {
|
||||
Person p = persons[i];
|
||||
names.<caret>add(p);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user