mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
vcs: avoid "CharSequence -> char[] -> CharSequence" conversion
This commit is contained in:
@@ -36,7 +36,7 @@ public class LineTokenizer {
|
||||
}
|
||||
|
||||
@NotNull
|
||||
private static String[] tokenize(CharSequence chars, final boolean includeSeparators, final boolean skipLastEmptyLine) {
|
||||
public static String[] tokenize(CharSequence chars, final boolean includeSeparators, final boolean skipLastEmptyLine) {
|
||||
final List<String> strings = tokenizeIntoList(chars, includeSeparators, skipLastEmptyLine);
|
||||
return strings.isEmpty() ? ArrayUtil.EMPTY_STRING_ARRAY : ArrayUtil.toStringArray(strings);
|
||||
}
|
||||
|
||||
@@ -35,7 +35,7 @@ public class Block {
|
||||
private final int myEnd;
|
||||
|
||||
public Block(@NotNull String source, int start, int end) {
|
||||
this(LineTokenizer.tokenize(source.toCharArray(), false, false), start, end);
|
||||
this(LineTokenizer.tokenize(source, false, false), start, end);
|
||||
}
|
||||
|
||||
public Block(@NotNull String[] source, int start, int end) {
|
||||
@@ -50,7 +50,7 @@ public class Block {
|
||||
|
||||
@NotNull
|
||||
public Block createPreviousBlock(@NotNull String prevContent) {
|
||||
return createPreviousBlock(LineTokenizer.tokenize(prevContent.toCharArray(), false, false));
|
||||
return createPreviousBlock(LineTokenizer.tokenize(prevContent, false, false));
|
||||
}
|
||||
|
||||
@NotNull
|
||||
|
||||
Reference in New Issue
Block a user