Cleanup: NotNull/Nullable

GitOrigin-RevId: b8e892f32ea84c2115973155dba7127b892cc36e
This commit is contained in:
Egor Zhdan
2019-04-04 18:16:43 +03:00
committed by intellij-monorepo-bot
parent 18962d3d42
commit c1813cfb52
11724 changed files with 158073 additions and 314320 deletions

View File

@@ -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();
}
}