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 24
            aload 0 /* this */
            invokespecial java.lang.Object.<init>:()V
         1: .line 25
            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 28
            aload 1 /* cmd */
            invokestatic java.util.Objects.requireNonNull:(Ljava/lang/Object;)Ljava/lang/Object;
            pop
         1: .line 29
            iconst_2
            anewarray java.lang.Object
            dup
            iconst_0
         2: .line 30
            ldc "Running: "
            aastore
            dup
            iconst_1
            aload 1 /* cmd */
            aastore
            invokestatic jdk.internal.org.jline.utils.Log.trace:([Ljava/lang/Object;)V
         3: .line 31
            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 32
            iload 0 /* redirectInput */
            ifeq 6
         5: .line 33
            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
         6: .line 35
      StackMap locals: java.lang.ProcessBuilder
      StackMap stack:
            aload 2 /* pb */
            invokevirtual java.lang.ProcessBuilder.start:()Ljava/lang/Process;
            astore 3 /* p */
        start local 3 // java.lang.Process p
         7: .line 36
            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
         8: iconst_2
            anewarray java.lang.Object
            dup
            iconst_0
         9: .line 37
            ldc "Result: "
            aastore
            dup
            iconst_1
            aload 4 /* result */
            aastore
            invokestatic jdk.internal.org.jline.utils.Log.trace:([Ljava/lang/Object;)V
        10: .line 38
            aload 3 /* p */
            invokevirtual java.lang.Process.exitValue:()I
            ifeq 14
        11: .line 39
            aload 4 /* result */
            ldc "\n"
            invokevirtual java.lang.String.endsWith:(Ljava/lang/String;)Z
            ifeq 13
        12: .line 40
            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 */
        13: .line 42
      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
        14: .line 44
      StackMap locals:
      StackMap stack:
            aload 4 /* result */
        15: areturn
        end local 4 // java.lang.String result
        end local 3 // java.lang.Process p
        end local 2 // java.lang.ProcessBuilder pb
        16: .line 45
      StackMap locals: int java.lang.String[]
      StackMap stack: java.lang.InterruptedException
            astore 2 /* e */
        start local 2 // java.lang.InterruptedException e
        17: .line 46
            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   18     0  redirectInput  Z
            0   18     1            cmd  [Ljava/lang/String;
            4   16     2             pb  Ljava/lang/ProcessBuilder;
            7   16     3              p  Ljava/lang/Process;
            8   16     4         result  Ljava/lang/String;
           17   18     2              e  Ljava/lang/InterruptedException;
      Exception table:
        from    to  target  type
           1    15      16  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 51
            new java.io.ByteArrayOutputStream
            dup
            invokespecial java.io.ByteArrayOutputStream.<init>:()V
            astore 1 /* bout */
        start local 1 // java.io.ByteArrayOutputStream bout
         1: .line 52
            aconst_null
            astore 2 /* in */
        start local 2 // java.io.InputStream in
         2: .line 53
            aconst_null
            astore 3 /* err */
        start local 3 // java.io.InputStream err
         3: .line 54
            aconst_null
            astore 4 /* out */
        start local 4 // java.io.OutputStream out
         4: .line 57
            aload 0 /* p */
            invokevirtual java.lang.Process.getInputStream:()Ljava/io/InputStream;
            astore 2 /* in */
         5: .line 58
            goto 7
        start local 5 // int c
         6: .line 59
      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 58
      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 61
            aload 0 /* p */
            invokevirtual java.lang.Process.getErrorStream:()Ljava/io/InputStream;
            astore 3 /* err */
        10: .line 62
            goto 12
        11: .line 63
      StackMap locals: int
      StackMap stack:
            aload 1 /* bout */
            iload 5 /* c */
            invokevirtual java.io.ByteArrayOutputStream.write:(I)V
        12: .line 62
      StackMap locals:
      StackMap stack:
            aload 3 /* err */
            invokevirtual java.io.InputStream.read:()I
            dup
            istore 5 /* c */
            iconst_m1
            if_icmpne 11
        13: .line 65
            aload 0 /* p */
            invokevirtual java.lang.Process.getOutputStream:()Ljava/io/OutputStream;
            astore 4 /* out */
        14: .line 66
            aload 0 /* p */
            invokevirtual java.lang.Process.waitFor:()I
            pop
        end local 5 // int c
        15: .line 67
            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 68
            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 69
            aload 6
            athrow
        19: .line 67
      StackMap locals:
      StackMap stack:
            iconst_3
            anewarray java.io.Closeable
            dup
            iconst_0
        20: .line 68
            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 71
            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 75
            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 76
            aload 1 /* c */
            ifnull 6
         3: .line 78
            aload 1 /* c */
            invokeinterface java.io.Closeable.close:()V
         4: .line 79
            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 75
      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 84
            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