mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-04-30 02:09:59 +07:00
Cleanup: NotNull/Nullable
GitOrigin-RevId: b8e892f32ea84c2115973155dba7127b892cc36e
This commit is contained in:
committed by
intellij-monorepo-bot
parent
ce8e10e6c4
commit
39d2d77155
@@ -1,17 +0,0 @@
|
||||
// "Replace Stream API chain with loop" "true"
|
||||
|
||||
import java.util.StringJoiner;
|
||||
import java.util.stream.*;
|
||||
|
||||
public class Test {
|
||||
private static final String ARRAY_ELEMENT_SEPARATOR = ", ", ARRAY_START = "[", ARRAY_END = "]";
|
||||
|
||||
public static String nullSafeToString(byte[] array) {
|
||||
StringJoiner joiner = new StringJoiner(ARRAY_ELEMENT_SEPARATOR, ARRAY_START, ARRAY_END);
|
||||
for (int i = 0; i < array.length; i++) {
|
||||
String s = String.valueOf(array[i]);
|
||||
joiner.add(s);
|
||||
}
|
||||
return joiner.toString();
|
||||
}
|
||||
}
|
||||
@@ -43,14 +43,4 @@ public class Main {
|
||||
|
||||
interface Visitor { }
|
||||
}
|
||||
|
||||
class X implements Iterable<String> {
|
||||
class Y {
|
||||
void test() {
|
||||
for (String s : X.this) {
|
||||
System.out.println(s);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -31,15 +31,4 @@ public class Main {
|
||||
}
|
||||
}
|
||||
|
||||
class X implements Map<String, String> {
|
||||
class Y {
|
||||
void test() {
|
||||
for (Entry<String, String> entry : X.this.entrySet()) {
|
||||
String k = entry.getKey();
|
||||
String v = entry.getValue();
|
||||
System.out.println(k + "-" + v);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,12 +0,0 @@
|
||||
// "Replace Stream API chain with loop" "true"
|
||||
|
||||
import java.util.stream.*;
|
||||
|
||||
public class Test {
|
||||
private static final String ARRAY_ELEMENT_SEPARATOR = ", ", ARRAY_START = "[", ARRAY_END = "]";
|
||||
|
||||
public static String nullSafeToString(byte[] array) {
|
||||
return IntStream.range(0, array.length).mapToObj(i -> String.valueOf(array[i]))
|
||||
.collec<caret>t(Collectors.joining(ARRAY_ELEMENT_SEPARATOR, ARRAY_START, ARRAY_END));
|
||||
}
|
||||
}
|
||||
@@ -33,12 +33,4 @@ public class Main {
|
||||
|
||||
interface Visitor { }
|
||||
}
|
||||
|
||||
class X implements Iterable<String> {
|
||||
class Y {
|
||||
void test() {
|
||||
forEach(System.out::println);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -21,11 +21,4 @@ public class Main {
|
||||
map.forEach(otherMap::putIfAbsent);
|
||||
}
|
||||
|
||||
class X implements Map<String, String> {
|
||||
class Y {
|
||||
void test() {
|
||||
forEach((k, v) -> System.out.println(k + "-" + v));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user