mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-05-02 11:18:16 +07:00
[java-intentions] IDEA-299075 More scenarios for parameter fixes
1. Surround with array initialization 2. Apply .toArray() conversion 3. Limited vararg support 4. Limited qualifier propagation GitOrigin-RevId: f81f593502df317b555e816af20cdec2d04488fc
This commit is contained in:
committed by
intellij-monorepo-bot
parent
7f3050849a
commit
c99da54bb4
@@ -0,0 +1,8 @@
|
||||
// "Convert argument to 'long'" "true-preview"
|
||||
import java.util.stream.Stream;
|
||||
|
||||
public class Demo {
|
||||
void test() {
|
||||
Stream<Long> stream = Stream.of(123L).limit(10);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
// "Apply conversion '.toArray(new java.lang.String[0])'" "true-preview"
|
||||
import java.util.*;
|
||||
|
||||
public class Demo {
|
||||
void test2(Collection<String> collection) {
|
||||
Set<String[]> integers = Collections.singleton(collection.toArray(new String[0]));
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
// "Convert argument to 'long'" "true-preview"
|
||||
import java.util.*;
|
||||
|
||||
public class Demo {
|
||||
void test() {
|
||||
List<Long> integers = Arrays.asList(1L);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
// "Surround with array initialization" "true-preview"
|
||||
import java.util.*;
|
||||
|
||||
public class Demo {
|
||||
void test() {
|
||||
Set<int[]> integers = Collections.singleton(new int[]{1});
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
// "Convert argument to 'long'" "true-preview"
|
||||
import java.util.stream.Stream;
|
||||
|
||||
public class Demo {
|
||||
void test() {
|
||||
Stream<Long> stream = Stream.of(123)<caret>.limit(10);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
// "Apply conversion '.toArray(new java.lang.String[0])'" "true-preview"
|
||||
import java.util.*;
|
||||
|
||||
public class Demo {
|
||||
void test2(Collection<String> collection) {
|
||||
Set<String[]> integers = Collections.<caret>singleton(collection);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
// "Convert argument to 'long'" "true-preview"
|
||||
import java.util.*;
|
||||
|
||||
public class Demo {
|
||||
void test() {
|
||||
List<Long> integers = Arrays.<caret>asList(1);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
// "Surround with array initialization" "true-preview"
|
||||
import java.util.*;
|
||||
|
||||
public class Demo {
|
||||
void test() {
|
||||
Set<int[]> integers = Collections.<caret>singleton(1);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user