mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-08-26 03:13:40 +07:00
anonym -> lambda, redundant cast, redundant type args: process top level overloads (IDEA-152766);
rearrange utils
This commit is contained in:
+17
@@ -0,0 +1,17 @@
|
||||
|
||||
import java.util.function.Function;
|
||||
|
||||
abstract class LambdaConvert {
|
||||
|
||||
public abstract <T> T query(Function<Double, T> rse);
|
||||
|
||||
public void with() {
|
||||
addSingle(query((<warning descr="Casting 'resultSet -> \"\"' to 'Function<Double, String>' is redundant">Function<Double, String></warning>)resultSet -> ""));
|
||||
add(query((Function<Double, String>)resultSet -> ""));
|
||||
}
|
||||
|
||||
public void addSingle(String s) {}
|
||||
|
||||
public void add(String s) {}
|
||||
public void add(Integer i) {}
|
||||
}
|
||||
+20
@@ -0,0 +1,20 @@
|
||||
// "Replace with lambda" "false"
|
||||
|
||||
import java.util.function.Function;
|
||||
|
||||
abstract class LambdaConvert {
|
||||
|
||||
public abstract <T> T query(Function<Double, T> rse);
|
||||
|
||||
public void with() {
|
||||
add(query(new Function<Do<caret>uble, String>() {
|
||||
@Override
|
||||
public String apply(Double resultSet) {
|
||||
return "";
|
||||
}
|
||||
}));
|
||||
}
|
||||
|
||||
public void add(String s) {}
|
||||
public void add(Integer i) {}
|
||||
}
|
||||
Reference in New Issue
Block a user