public final class jdk.internal.org.jline.utils.ExecHelper
  minor version: 0
  major version: 59
  flags: flags: (0x0031) ACC_PUBLIC, ACC_FINAL, ACC_SUPER
  this_class: jdk.internal.org.jline.utils.ExecHelper
  super_class: java.lang.Object
{
  private void <init>();
    descriptor: ()V
    flags: (0x0002) ACC_PRIVATE
    Code:
      stack=1, locals=1, args_size=1
        start local 0 // jdk.internal.org.jline.utils.ExecHelper this
         0: .line 25
            aload 0 /* this */
            invokespecial java.lang.Object.<init>:()V
         1: .line 26
            return
        end local 0 // jdk.internal.org.jline.utils.ExecHelper this
      LocalVariableTable:
        Start  End  Slot  Name  Signature
            0    2     0  this  Ljdk/internal/org/jline/utils/ExecHelper;

  public static java.lang.String exec(boolean, java.lang.String[]);
    descriptor: (Z[Ljava/lang/String;)Ljava/lang/String;
    flags: (0x0089) ACC_PUBLIC, ACC_STATIC, ACC_VARARGS
    Code:
      stack=5, locals=5, args_size=2
        start local 0 // boolean redirectInput
        start local 1 // java.lang.String[] cmd
         0: .line 29
            aload 1 /* cmd */
            invokestatic java.util.Objects.requireNonNull:(Ljava/lang/Object;)Ljava/lang/Object;
            pop
         1: .line 30
            iconst_2
            anewarray java.lang.Object
            dup
            iconst_0
         2: .line 31
            ldc "Running: "
            aastore
            dup
            iconst_1
            aload 1 /* cmd */
            aastore
            invokestatic jdk.internal.org.jline.utils.Log.trace:([Ljava/lang/Object;)V
         3: .line 32
            new java.lang.ProcessBuilder
            dup
            aload 1 /* cmd */
            invokespecial java.lang.ProcessBuilder.<init>:([Ljava/lang/String;)V
            astore 2 /* pb */
        start local 2 // java.lang.ProcessBuilder pb
         4: .line 33
            getstatic jdk.internal.org.jline.utils.OSUtils.IS_AIX:Z
            ifeq 9
         5: .line 34
            aload 2 /* pb */
            invokevirtual java.lang.ProcessBuilder.environment:()Ljava/util/Map;
            astore 3 /* env */
        start local 3 // java.util.Map env
         6: .line 35
            aload 3 /* env */
            ldc "PATH"
            new java.lang.StringBuilder
            dup
            ldc "/opt/freeware/bin:"
            invokespecial java.lang.StringBuilder.<init>:(Ljava/lang/String;)V
            aload 3 /* env */
            ldc "PATH"
            invokeinterface java.util.Map.get:(Ljava/lang/Object;)Ljava/lang/Object;
            checkcast java.lang.String
            invokevirtual java.lang.StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
            invokevirtual java.lang.StringBuilder.toString:()Ljava/lang/String;
            invokeinterface java.util.Map.put:(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
            pop
         7: .line 36
            aload 3 /* env */
            ldc "LANG"
            ldc "C"
            invokeinterface java.util.Map.put:(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
            pop
         8: .line 37
            aload 3 /* env */
            ldc "LC_ALL"
            ldc "C"
            invokeinterface java.util.Map.put:(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
            pop
        end local 3 // java.util.Map env
         9: .line 39
      StackMap locals: java.lang.ProcessBuilder
      StackMap stack:
            iload 0 /* redirectInput */
            ifeq 11
        10: .line 40
            aload 2 /* pb */
            getstatic java.lang.ProcessBuilder$Redirect.INHERIT:Ljava/lang/ProcessBuilder$Redirect;
            invokevirtual java.lang.ProcessBuilder.redirectInput:(Ljava/lang/ProcessBuilder$Redirect;)Ljava/lang/ProcessBuilder;
            pop
        11: .line 42
      StackMap locals:
      StackMap stack:
            aload 2 /* pb */
            invokevirtual java.lang.ProcessBuilder.start:()Ljava/lang/Process;
            astore 3 /* p */
        start local 3 // java.lang.Process p
        12: .line 43
            aload 3 /* p */
            invokestatic jdk.internal.org.jline.utils.ExecHelper.waitAndCapture:(Ljava/lang/Process;)Ljava/lang/String;
            astore 4 /* result */
        start local 4 // java.lang.String result
        13: iconst_2
            anewarray java.lang.Object
            dup
            iconst_0
        14: .line 44
            ldc "Result: "
            aastore
            dup
            iconst_1
            aload 4 /* result */
            aastore
            invokestatic jdk.internal.org.jline.utils.Log.trace:([Ljava/lang/Object;)V
        15: .line 45
            aload 3 /* p */
            invokevirtual java.lang.Process.exitValue:()I
            ifeq 19
        16: .line 46
            aload 4 /* result */
            ldc "\n"
            invokevirtual java.lang.String.endsWith:(Ljava/lang/String;)Z
            ifeq 18
        17: .line 47
            aload 4 /* result */
            iconst_0
            aload 4 /* result */
            invokevirtual java.lang.String.length:()I
            iconst_1
            isub
            invokevirtual java.lang.String.substring:(II)Ljava/lang/String;
            astore 4 /* result */
        18: .line 49
      StackMap locals: java.lang.Process java.lang.String
      StackMap stack:
            new java.io.IOException
            dup
            new java.lang.StringBuilder
            dup
            ldc "Error executing '"
            invokespecial java.lang.StringBuilder.<init>:(Ljava/lang/String;)V
            ldc " "
            aload 1 /* cmd */
            invokestatic java.lang.String.join:(Ljava/lang/CharSequence;[Ljava/lang/CharSequence;)Ljava/lang/String;
            invokevirtual java.lang.StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
            ldc "': "
            invokevirtual java.lang.StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
            aload 4 /* result */
            invokevirtual java.lang.StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
            invokevirtual java.lang.StringBuilder.toString:()Ljava/lang/String;
            invokespecial java.io.IOException.<init>:(Ljava/lang/String;)V
            athrow
        19: .line 51
      StackMap locals:
      StackMap stack:
            aload 4 /* result */
        20: areturn
        end local 4 // java.lang.String result
        end local 3 // java.lang.Process p
        end local 2 // java.lang.ProcessBuilder pb
        21: .line 52
      StackMap locals: int java.lang.String[]
      StackMap stack: java.lang.InterruptedException
            astore 2 /* e */
        start local 2 // java.lang.InterruptedException e
        22: .line 53
            new java.io.InterruptedIOException
            dup
            ldc "Command interrupted"
            invokespecial java.io.InterruptedIOException.<init>:(Ljava/lang/String;)V
            aload 2 /* e */
            invokevirtual java.io.InterruptedIOException.initCause:(Ljava/lang/Throwable;)Ljava/lang/Throwable;
            checkcast java.io.IOException
            athrow
        end local 2 // java.lang.InterruptedException e
        end local 1 // java.lang.String[] cmd
        end local 0 // boolean redirectInput
      LocalVariableTable:
        Start  End  Slot           Name  Signature
            0   23     0  redirectInput  Z
            0   23     1            cmd  [Ljava/lang/String;
            4   21     2             pb  Ljava/lang/ProcessBuilder;
            6    9     3            env  Ljava/util/Map<Ljava/lang/String;Ljava/lang/String;>;
           12   21     3              p  Ljava/lang/Process;
           13   21     4         result  Ljava/lang/String;
           22   23     2              e  Ljava/lang/InterruptedException;
      Exception table:
        from    to  target  type
           1    20      21  Class java.lang.InterruptedException
    Exceptions:
      throws java.io.IOException
    MethodParameters:
               Name  Flags
      redirectInput  
      cmd            final

  public static java.lang.String waitAndCapture(java.lang.Process);
    descriptor: (Ljava/lang/Process;)Ljava/lang/String;
    flags: (0x0009) ACC_PUBLIC, ACC_STATIC
    Code:
      stack=4, locals=7, args_size=1
        start local 0 // java.lang.Process p
         0: .line 58
            new java.io.ByteArrayOutputStream
            dup
            invokespecial java.io.ByteArrayOutputStream.<init>:()V
            astore 1 /* bout */
        start local 1 // java.io.ByteArrayOutputStream bout
         1: .line 59
            aconst_null
            astore 2 /* in */
        start local 2 // java.io.InputStream in
         2: .line 60
            aconst_null
            astore 3 /* err */
        start local 3 // java.io.InputStream err
         3: .line 61
            aconst_null
            astore 4 /* out */
        start local 4 // java.io.OutputStream out
         4: .line 64
            aload 0 /* p */
            invokevirtual java.lang.Process.getInputStream:()Ljava/io/InputStream;
            astore 2 /* in */
         5: .line 65
            goto 7
        start local 5 // int c
         6: .line 66
      StackMap locals: java.lang.Process java.io.ByteArrayOutputStream java.io.InputStream java.io.InputStream java.io.OutputStream int
      StackMap stack:
            aload 1 /* bout */
            iload 5 /* c */
            invokevirtual java.io.ByteArrayOutputStream.write:(I)V
        end local 5 // int c
         7: .line 65
      StackMap locals:
      StackMap stack:
            aload 2 /* in */
            invokevirtual java.io.InputStream.read:()I
            dup
            istore 5 /* c */
        start local 5 // int c
         8: iconst_m1
            if_icmpne 6
         9: .line 68
            aload 0 /* p */
            invokevirtual java.lang.Process.getErrorStream:()Ljava/io/InputStream;
            astore 3 /* err */
        10: .line 69
            goto 12
        11: .line 70
      StackMap locals: int
      StackMap stack:
            aload 1 /* bout */
            iload 5 /* c */
            invokevirtual java.io.ByteArrayOutputStream.write:(I)V
        12: .line 69
      StackMap locals:
      StackMap stack:
            aload 3 /* err */
            invokevirtual java.io.InputStream.read:()I
            dup
            istore 5 /* c */
            iconst_m1
            if_icmpne 11
        13: .line 72
            aload 0 /* p */
            invokevirtual java.lang.Process.getOutputStream:()Ljava/io/OutputStream;
            astore 4 /* out */
        14: .line 73
            aload 0 /* p */
            invokevirtual java.lang.Process.waitFor:()I
            pop
        end local 5 // int c
        15: .line 74
            goto 19
      StackMap locals: java.lang.Process java.io.ByteArrayOutputStream java.io.InputStream java.io.InputStream java.io.OutputStream
      StackMap stack: java.lang.Throwable
        16: astore 6
            iconst_3
            anewarray java.io.Closeable
            dup
            iconst_0
        17: .line 75
            aload 2 /* in */
            aastore
            dup
            iconst_1
            aload 4 /* out */
            aastore
            dup
            iconst_2
            aload 3 /* err */
            aastore
            invokestatic jdk.internal.org.jline.utils.ExecHelper.close:([Ljava/io/Closeable;)V
        18: .line 76
            aload 6
            athrow
        19: .line 74
      StackMap locals:
      StackMap stack:
            iconst_3
            anewarray java.io.Closeable
            dup
            iconst_0
        20: .line 75
            aload 2 /* in */
            aastore
            dup
            iconst_1
            aload 4 /* out */
            aastore
            dup
            iconst_2
            aload 3 /* err */
            aastore
            invokestatic jdk.internal.org.jline.utils.ExecHelper.close:([Ljava/io/Closeable;)V
        21: .line 78
            aload 1 /* bout */
            invokevirtual java.io.ByteArrayOutputStream.toString:()Ljava/lang/String;
            areturn
        end local 4 // java.io.OutputStream out
        end local 3 // java.io.InputStream err
        end local 2 // java.io.InputStream in
        end local 1 // java.io.ByteArrayOutputStream bout
        end local 0 // java.lang.Process p
      LocalVariableTable:
        Start  End  Slot  Name  Signature
            0   22     0     p  Ljava/lang/Process;
            1   22     1  bout  Ljava/io/ByteArrayOutputStream;
            2   22     2    in  Ljava/io/InputStream;
            3   22     3   err  Ljava/io/InputStream;
            4   22     4   out  Ljava/io/OutputStream;
            6    7     5     c  I
            8   15     5     c  I
      Exception table:
        from    to  target  type
           4    16      16  any
    Exceptions:
      throws java.io.IOException, java.lang.InterruptedException
    MethodParameters:
      Name  Flags
      p     

  private static void close(java.io.Closeable[]);
    descriptor: ([Ljava/io/Closeable;)V
    flags: (0x008a) ACC_PRIVATE, ACC_STATIC, ACC_VARARGS
    Code:
      stack=2, locals=5, args_size=1
        start local 0 // java.io.Closeable[] closeables
         0: .line 82
            aload 0 /* closeables */
            dup
            astore 4
            arraylength
            istore 3
            iconst_0
            istore 2
            goto 7
      StackMap locals: java.io.Closeable[] top int int java.io.Closeable[]
      StackMap stack:
         1: aload 4
            iload 2
            aaload
            astore 1 /* c */
        start local 1 // java.io.Closeable c
         2: .line 83
            aload 1 /* c */
            ifnull 6
         3: .line 85
            aload 1 /* c */
            invokeinterface java.io.Closeable.close:()V
         4: .line 86
            goto 6
      StackMap locals: java.io.Closeable[] java.io.Closeable int int java.io.Closeable[]
      StackMap stack: java.lang.Exception
         5: pop
        end local 1 // java.io.Closeable c
         6: .line 82
      StackMap locals: java.io.Closeable[] top int int java.io.Closeable[]
      StackMap stack:
            iinc 2 1
      StackMap locals:
      StackMap stack:
         7: iload 2
            iload 3
            if_icmplt 1
         8: .line 91
            return
        end local 0 // java.io.Closeable[] closeables
      LocalVariableTable:
        Start  End  Slot        Name  Signature
            0    9     0  closeables  [Ljava/io/Closeable;
            2    6     1           c  Ljava/io/Closeable;
      Exception table:
        from    to  target  type
           3     4       5  Class java.lang.Exception
    MethodParameters:
            Name  Flags
      closeables  final
}
SourceFile: "ExecHelper.java"
InnerClasses:
  public abstract Redirect = java.lang.ProcessBuilder$Redirect of java.lang.ProcessBuilder