mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-04-30 10:20:15 +07:00
set SPACE_BEFORE_COLON_IN_FOREACH true by default, fix tests
This commit is contained in:
@@ -6,9 +6,9 @@ import static java.util.Arrays.asList;
|
||||
|
||||
public class Main {
|
||||
public static boolean test(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) {
|
||||
if (!s.startsWith("a")) {
|
||||
return false;
|
||||
}
|
||||
@@ -19,7 +19,7 @@ public class Main {
|
||||
}
|
||||
|
||||
private static boolean testEqEq(List<String> list) {
|
||||
for (String s: list) {
|
||||
for (String s : list) {
|
||||
if (s.trim() != s.toLowerCase()) {
|
||||
return false;
|
||||
}
|
||||
@@ -30,9 +30,9 @@ public class Main {
|
||||
public static void testIf(List<List<String>> list) {
|
||||
boolean b = true;
|
||||
OUTER:
|
||||
for (List<String> x: list) {
|
||||
for (List<String> x : list) {
|
||||
if (x != null) {
|
||||
for (String s: x) {
|
||||
for (String s : x) {
|
||||
if (!s.startsWith("a")) {
|
||||
b = false;
|
||||
break OUTER;
|
||||
@@ -46,7 +46,7 @@ public class Main {
|
||||
}
|
||||
|
||||
boolean testNot(String... strings) {
|
||||
for (String s: strings) {
|
||||
for (String s : strings) {
|
||||
if (s != null) {
|
||||
if (!s.startsWith("xyz")) {
|
||||
return true;
|
||||
@@ -58,7 +58,7 @@ public class Main {
|
||||
|
||||
public void testVar(List<Integer> list) {
|
||||
boolean x = false;
|
||||
for (Integer i: list) {
|
||||
for (Integer i : list) {
|
||||
if (i <= 2) {
|
||||
x = true;
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user