This is an automated email from the ASF dual-hosted git repository. ggregory pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/commons-vfs.git
commit cfdb63440eaedd8b5b3aab84835703ef87421da3 Author: Gary Gregory <garydgreg...@gmail.com> AuthorDate: Thu Jul 28 15:17:23 2022 -0400 Format method --- .../org/apache/commons/vfs2/provider/sftp/SftpFileSystem.java | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/commons-vfs2/src/main/java/org/apache/commons/vfs2/provider/sftp/SftpFileSystem.java b/commons-vfs2/src/main/java/org/apache/commons/vfs2/provider/sftp/SftpFileSystem.java index 64b67bb4..04095b67 100644 --- a/commons-vfs2/src/main/java/org/apache/commons/vfs2/provider/sftp/SftpFileSystem.java +++ b/commons-vfs2/src/main/java/org/apache/commons/vfs2/provider/sftp/SftpFileSystem.java @@ -258,10 +258,8 @@ public class SftpFileSystem extends AbstractFileSystem { final StringBuilder output = new StringBuilder(); final int code = executeCommand("id -G", output); if (code != 0) { - throw new JSchException( - "Could not get the groups id of the current user (error code: " + code + ")"); + throw new JSchException("Could not get the groups id of the current user (error code: " + code + ")"); } - this.groupsIds = parseGroupIdOutput(output); } } @@ -344,13 +342,8 @@ public class SftpFileSystem extends AbstractFileSystem { int[] parseGroupIdOutput(final StringBuilder output) { // Retrieve the different groups final String[] groups = output.toString().trim().split("\\s+"); - // Deal with potential empty groups - return Arrays.stream(groups) - .map(String::trim) - .filter(s -> !s.isEmpty()) - .mapToInt(Integer::parseInt) - .toArray(); + return Arrays.stream(groups).map(String::trim).filter(s -> !s.isEmpty()).mapToInt(Integer::parseInt).toArray(); } /**