redundant type arguments for non-generic methods & method references

IDEA-187548
This commit is contained in:
Anna Kozlova
2018-03-07 08:02:42 +01:00
parent 227d80b202
commit b69f886265
9 changed files with 108 additions and 17 deletions
@@ -0,0 +1,14 @@
// "Remove explicit type arguments" "true"
import java.util.function.Function;
public class TestClassRenamed {
{
Function<String, Integer> r = this::foo;
}
private <T> T foo(String s) {
return null;
}
}
@@ -0,0 +1,7 @@
// "Remove explicit type arguments" "true"
class Collectors {
{
Integer.getInteger("");
}
}
@@ -0,0 +1,10 @@
// "Remove explicit type arguments" "true"
import java.util.function.Function;
class MyTest {
{
Function<String, Integer> r = Integer::getInteger;
}
}
@@ -0,0 +1,14 @@
// "Remove explicit type arguments" "true"
import java.util.function.Function;
public class TestClassRenamed {
{
Function<String, Integer> r = this::<In<caret>teger>foo;
}
private <T> T foo(String s) {
return null;
}
}
@@ -0,0 +1,7 @@
// "Remove explicit type arguments" "true"
class Collectors {
{
Integer.<Str<caret>ing>getInteger("");
}
}
@@ -0,0 +1,10 @@
// "Remove explicit type arguments" "true"
import java.util.function.Function;
class MyTest {
{
Function<String, Integer> r = Integer::<Int<caret>eger>getInteger;
}
}