mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-08-26 03:13:40 +07:00
StreamToLoop: add variable name suggestions from method reference output variable
This commit is contained in:
+3
-3
@@ -9,10 +9,10 @@ public class Main {
|
||||
boolean seen = false;
|
||||
double best = 0;
|
||||
for (String string : strings) {
|
||||
double v = string.length();
|
||||
if (!seen || Double.compare(v, best) > 0) {
|
||||
double length = string.length();
|
||||
if (!seen || Double.compare(length, best) > 0) {
|
||||
seen = true;
|
||||
best = v;
|
||||
best = length;
|
||||
}
|
||||
}
|
||||
return (seen ? OptionalDouble.of(best) : OptionalDouble.empty()).orElse(-1);
|
||||
|
||||
+3
-3
@@ -9,10 +9,10 @@ public class Main {
|
||||
boolean seen = false;
|
||||
int best = 0;
|
||||
for (String string : strings) {
|
||||
int i = string.length();
|
||||
if (!seen || i < best) {
|
||||
int length = string.length();
|
||||
if (!seen || length < best) {
|
||||
seen = true;
|
||||
best = i;
|
||||
best = length;
|
||||
}
|
||||
}
|
||||
return (seen ? OptionalInt.of(best) : OptionalInt.empty()).orElse(-1);
|
||||
|
||||
Reference in New Issue
Block a user