WrapWithAdapterMethodCallFix replaces individual cases

WrapArrayToArraysAsListFix, WrapLongWithMathToIntExactFix, WrapStringWithFileFix are united into WrapWithAdapterMethodCallFix. Also Paths.get(), Collections.singleton(), Collections.singletonList(), Arrays.stream() wrappers added

Fixes IDEA-175129 Suggest to wrap a value with `Collections.singleton*()`
This commit is contained in:
Tagir Valeev
2017-08-25 14:29:33 +07:00
parent 0024a3aeb3
commit 661388f0c2
33 changed files with 330 additions and 402 deletions

View File

@@ -0,0 +1,14 @@
// "Wrap 1st parameter using 'Collections.singleton()'" "true"
import java.util.*;
class Test {
void method(Set<Long> set, double val) {
}
void m(long l) {
method(Collections.singleton(l), l);
}
}