fix tests for foreach formatting

This commit is contained in:
Roman.Ivanov
2018-06-05 11:31:17 +07:00
parent 8e9ab59fc8
commit 5858ba478c
85 changed files with 280 additions and 280 deletions

View File

@@ -7,7 +7,7 @@ import static java.util.Arrays.asList;
public class Main {
public static Optional<String> testSimple(List<String> list) {
for (String s : list) {
for (String s: list) {
return Optional.of(s);
}
return Optional.empty();
@@ -15,7 +15,7 @@ public class Main {
public void testAssign(List<String> list) {
String res = "";
for (String s : list) {
for (String s: list) {
String trim = s.trim();
if (!trim.isEmpty()) {
res = trim;
@@ -27,7 +27,7 @@ public class Main {
public void testAssignFinal(List<String> list) {
String res = "";
for (String s : list) {
for (String s: list) {
String trim = s.trim();
if (!trim.isEmpty()) {
res = trim;
@@ -38,9 +38,9 @@ public class Main {
}
public static Optional<String> testFlatMap(List<List<String>> list) {
for (List<String> x : list) {
for (List<String> x: list) {
if (x != null) {
for (String s : x) {
for (String s: x) {
return Optional.of(s);
}
}
@@ -54,9 +54,9 @@ public class Main {
for(int i=0; i<10; i++) {
String found = "";
OUTER1:
for (List<String> x : list) {
for (List<String> x: list) {
if (x != null) {
for (String s : x) {
for (String s: x) {
found = s;
break OUTER1;
}