mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-05-02 03:07:47 +07:00
Java: ignore "as" and "to" prefixes to generate better variable names (IJP-1469)
GitOrigin-RevId: 12cde9892bece40321b4655e7d32b75bd43748e8
This commit is contained in:
committed by
intellij-monorepo-bot
parent
d522e0a3d9
commit
3c556d8fe0
@@ -15,10 +15,10 @@ public class Main {
|
||||
boolean seen = false;
|
||||
int best = 0;
|
||||
for (Index index : set.asList()) {
|
||||
int asInteger = index.asInteger();
|
||||
if (!seen || asInteger < best) {
|
||||
int integer = index.asInteger();
|
||||
if (!seen || integer < best) {
|
||||
seen = true;
|
||||
best = asInteger;
|
||||
best = integer;
|
||||
}
|
||||
}
|
||||
return seen ? OptionalInt.of(best) : OptionalInt.empty();
|
||||
|
||||
@@ -29,12 +29,12 @@ public class Main {
|
||||
}
|
||||
|
||||
private void collect2() {
|
||||
List<List<? extends CharSequence>> list = new ArrayList<>();
|
||||
List<List<? extends CharSequence>> result = new ArrayList<>();
|
||||
for (CharSequence charSequence : getListExtends()) {
|
||||
List<? extends CharSequence> charSequences = asList(charSequence);
|
||||
list.add(charSequences);
|
||||
List<? extends CharSequence> list = asList(charSequence);
|
||||
result.add(list);
|
||||
}
|
||||
List<? extends List<? extends CharSequence>> res2 = list;
|
||||
List<? extends List<? extends CharSequence>> res2 = result;
|
||||
System.out.println(res2);
|
||||
}
|
||||
|
||||
@@ -45,8 +45,8 @@ public class Main {
|
||||
MyList<? extends List<? extends CharSequence>> res2 =
|
||||
new MyList<>();
|
||||
for (CharSequence charSequence : getListExtends()) {
|
||||
List<? extends CharSequence> charSequences = asList(charSequence);
|
||||
res2.add(charSequences);
|
||||
List<? extends CharSequence> list = asList(charSequence);
|
||||
res2.add(list);
|
||||
}
|
||||
System.out.println(res2);
|
||||
}
|
||||
|
||||
@@ -9,8 +9,8 @@ public class Main {
|
||||
static {
|
||||
List<String> list = new ArrayList<>();
|
||||
for (String s : Arrays.asList("foo", "bar", "baz")) {
|
||||
String toUpperCase = s.toUpperCase();
|
||||
list.add(toUpperCase);
|
||||
String upperCase = s.toUpperCase();
|
||||
list.add(upperCase);
|
||||
}
|
||||
STR = list;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user