mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-04-19 21:11:28 +07:00
fix foreach formatting in tests
This commit is contained in:
@@ -5,7 +5,7 @@ import java.util.function.BiConsumer;
|
||||
|
||||
public class Main {
|
||||
void test(Map<String, Integer> map) {
|
||||
for (Map.Entry<String, Integer> entry : map.entrySet()) {
|
||||
for (Map.Entry<String, Integer> entry: map.entrySet()) {
|
||||
String k = entry.getKey();
|
||||
Integer v = entry.getValue();
|
||||
if (k.isEmpty()) continue;
|
||||
@@ -15,7 +15,7 @@ public class Main {
|
||||
|
||||
void test(Map<String, Integer> map, BiConsumer<String, Integer> consumer) {
|
||||
int entry = 1;
|
||||
for (Map.Entry<String, Integer> e : map.entrySet()) {
|
||||
for (Map.Entry<String, Integer> e: map.entrySet()) {
|
||||
String key = e.getKey();
|
||||
Integer value = e.getValue();
|
||||
consumer.accept(key, value);
|
||||
@@ -24,7 +24,7 @@ public class Main {
|
||||
|
||||
void test(Map<String, Integer> map, Map<String, Integer> otherMap) {
|
||||
int entry = 1, e = 2, key = 3, value = 4;
|
||||
for (Map.Entry<String, Integer> mapEntry : map.entrySet()) {
|
||||
for (Map.Entry<String, Integer> mapEntry: map.entrySet()) {
|
||||
String k = mapEntry.getKey();
|
||||
Integer v = mapEntry.getValue();
|
||||
otherMap.putIfAbsent(k, v);
|
||||
|
||||
@@ -72,7 +72,7 @@ import java.util.*;
|
||||
public class Main {
|
||||
List<String> getStringList(int i){
|
||||
List<String> ints = null;
|
||||
for (String item : getStringList(<caret>)) {
|
||||
for (String item: getStringList(<caret>)) {
|
||||
;
|
||||
}
|
||||
return new ArrayList<>(i);
|
||||
@@ -108,7 +108,7 @@ import java.util.*;
|
||||
public class Main {
|
||||
List<String> getStringList(int i){
|
||||
List<String> ints = null;
|
||||
for (String <selection>item</selection> : ints) {
|
||||
for (String <selection>item</selection>: ints) {
|
||||
;
|
||||
}
|
||||
return new ArrayList<>(i);
|
||||
@@ -478,7 +478,7 @@ java.util.List<? extends Integer> list;
|
||||
myFixture.type('\tgetCreatedTags()\n')
|
||||
myFixture.checkResult '''class A { Iterable<String> getCreatedTags() { }
|
||||
{
|
||||
for (String createdTag : getCreatedTags()) {
|
||||
for (String createdTag: getCreatedTags()) {
|
||||
|
||||
}
|
||||
}}'''
|
||||
|
||||
Reference in New Issue
Block a user