Skip to content

Commit

Permalink
Use fast-split for package separation in workspace tree bulding
Browse files Browse the repository at this point in the history
  • Loading branch information
Col-E committed Jul 28, 2024
1 parent 8eda592 commit ad7cca1
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -403,9 +403,9 @@ private void removeClass(@Nonnull WorkspaceResource resource, @Nonnull ClassBund
private String interceptDirectoryName(@Nullable String directory) {
if (directory == null) return null;

String[] split = directory.split("/");
List<String> split = StringUtil.fastSplit(directory, true, '/');
int max = explorerConfig.getMaxTreeDirectoryDepth();
if (split.length > max) {
if (split.size() > max) {
return StringUtil.cutOffAtNth(directory, '/', max) + "...";
}
return directory;
Expand Down

0 comments on commit ad7cca1

Please sign in to comment.