1919 */
2020package com .sonar .scanner .api .it .tools ;
2121
22- import org .apache .commons .exec .CommandLine ;
23- import org .apache .commons .exec .DefaultExecutor ;
24- import org .apache .commons .exec .ExecuteStreamHandler ;
25- import org .apache .commons .exec .ExecuteWatchdog ;
26- import org .apache .commons .exec .PumpStreamHandler ;
27- import org .apache .commons .io .output .TeeOutputStream ;
28- import org .slf4j .Logger ;
29- import org .slf4j .LoggerFactory ;
30-
31- import javax .annotation .Nullable ;
32-
3322import java .io .ByteArrayOutputStream ;
3423import java .io .IOException ;
3524import java .io .InputStream ;
4433import java .util .HashSet ;
4534import java .util .Map ;
4635import java .util .Set ;
36+ import javax .annotation .Nullable ;
37+ import org .apache .commons .exec .CommandLine ;
38+ import org .apache .commons .exec .DefaultExecutor ;
39+ import org .apache .commons .exec .ExecuteStreamHandler ;
40+ import org .apache .commons .exec .ExecuteWatchdog ;
41+ import org .apache .commons .exec .PumpStreamHandler ;
42+ import org .apache .commons .io .output .TeeOutputStream ;
43+ import org .slf4j .Logger ;
44+ import org .slf4j .LoggerFactory ;
4745
4846public class CommandExecutor {
4947 private static final Logger LOG = LoggerFactory .getLogger (CommandExecutor .class );
@@ -68,7 +66,7 @@ public int execute(String[] args, Map<String, String> env) throws IOException {
6866
6967 public int execute (String [] args , Map <String , String > env , @ Nullable Path workingDir ) throws IOException {
7068 if (!Files .isExecutable (file )) {
71- Set <PosixFilePermission > perms = new HashSet <PosixFilePermission >();
69+ Set <PosixFilePermission > perms = new HashSet <>();
7270 perms .add (PosixFilePermission .OWNER_READ );
7371 perms .add (PosixFilePermission .OWNER_EXECUTE );
7472 Files .setPosixFilePermissions (file , perms );
0 commit comments