/** * Prints out the command line to the listener with some portions masked to prevent sensitive information from being * recorded on the listener. * * @param cmd The commands * @param mask An array of booleans which control whether a cmd element should be masked (<code>true</code>) or * remain unmasked (<code>false</code>). * @param workDir The work dir. */ protected final void maskedPrintCommandLine(@Nonnull List<String> cmd, @CheckForNull boolean[] mask, @CheckForNull FilePath workDir) { if(mask==null) { printCommandLine(cmd.toArray(new String[cmd.size()]),workDir); return; } assert mask.length == cmd.size(); final String[] masked = new String[cmd.size()]; for (int i = 0; i < cmd.size(); i++) { if (mask[i]) { masked[i] = "********"; } else { masked[i] = cmd.get(i); } } printCommandLine(masked, workDir); }
/** * Prints out the command line to the listener with some portions masked to * prevent sensitive information from being recorded on the listener. * * @param cmd The commands * @param mask An array of booleans which control whether a cmd element * should be masked (<code>true</code>) or remain unmasked * (<code>false</code>). * @param workDir The work dir. */ protected final void maskedPrintCommandLine(List<String> cmd, boolean[] mask, FilePath workDir) { if (mask == null) { printCommandLine(cmd.toArray(new String[cmd.size()]), workDir); return; } assert mask.length == cmd.size(); final String[] masked = new String[cmd.size()]; for (int i = 0; i < cmd.size(); i++) { if (mask[i]) { masked[i] = "********"; } else { masked[i] = cmd.get(i); } } printCommandLine(masked, workDir); }
/** * Prints out the command line to the listener with some portions masked to prevent sensitive information from being * recorded on the listener. * * @param cmd The commands * @param mask An array of booleans which control whether a cmd element should be masked (<code>true</code>) or * remain unmasked (<code>false</code>). * @param workDir The work dir. */ protected final void maskedPrintCommandLine(List<String> cmd, boolean[] mask, FilePath workDir) { if(mask==null) { printCommandLine(cmd.toArray(new String[cmd.size()]),workDir); return; } assert mask.length == cmd.size(); final String[] masked = new String[cmd.size()]; for (int i = 0; i < cmd.size(); i++) { if (mask[i]) { masked[i] = "********"; } else { masked[i] = cmd.get(i); } } printCommandLine(masked, workDir); } protected final void maskedPrintCommandLine(String[] cmd, boolean[] mask, FilePath workDir) {
/** * Prints out the command line to the listener with some portions masked to prevent sensitive information from being * recorded on the listener. * * @param cmd The commands * @param mask An array of booleans which control whether a cmd element should be masked (<code>true</code>) or * remain unmasked (<code>false</code>). * @param workDir The work dir. */ protected final void maskedPrintCommandLine(@Nonnull List<String> cmd, @CheckForNull boolean[] mask, @CheckForNull FilePath workDir) { if(mask==null) { printCommandLine(cmd.toArray(new String[cmd.size()]),workDir); return; } assert mask.length == cmd.size(); final String[] masked = new String[cmd.size()]; for (int i = 0; i < cmd.size(); i++) { if (mask[i]) { masked[i] = "********"; } else { masked[i] = cmd.get(i); } } printCommandLine(masked, workDir); }
/** * Prints out the command line to the listener with some portions masked to prevent sensitive information from being * recorded on the listener. * * @param cmd The commands * @param mask An array of booleans which control whether a cmd element should be masked (<code>true</code>) or * remain unmasked (<code>false</code>). * @param workDir The work dir. */ protected final void maskedPrintCommandLine(List<String> cmd, boolean[] mask, FilePath workDir) { if(mask==null) { printCommandLine(cmd.toArray(new String[cmd.size()]),workDir); return; } assert mask.length == cmd.size(); final String[] masked = new String[cmd.size()]; for (int i = 0; i < cmd.size(); i++) { if (mask[i]) { masked[i] = "********"; } else { masked[i] = cmd.get(i); } } printCommandLine(masked, workDir); } protected final void maskedPrintCommandLine(String[] cmd, boolean[] mask, FilePath workDir) {
/** * Prints out the command line to the listener with some portions masked to prevent sensitive information from being * recorded on the listener. * * @param cmd The commands * @param mask An array of booleans which control whether a cmd element should be masked (<code>true</code>) or * remain unmasked (<code>false</code>). * @param workDir The work dir. */ protected final void maskedPrintCommandLine(List<String> cmd, boolean[] mask, FilePath workDir) { if(mask==null) { printCommandLine(cmd.toArray(new String[cmd.size()]),workDir); return; } assert mask.length == cmd.size(); final String[] masked = new String[cmd.size()]; for (int i = 0; i < cmd.size(); i++) { if (mask[i]) { masked[i] = "********"; } else { masked[i] = cmd.get(i); } } printCommandLine(masked, workDir); } protected final void maskedPrintCommandLine(String[] cmd, boolean[] mask, FilePath workDir) {