org.kie.config.cli.command.impl.AbstractCliCommand Maven / Gradle / Ivy
package org.kie.config.cli.command.impl;
import java.util.Map;
import org.kie.config.cli.command.CliCommand;
public abstract class AbstractCliCommand implements CliCommand {
protected String printEnvironment(Map env) {
StringBuffer data = new StringBuffer();
data.append("{");
for (Map.Entry entry : env.entrySet()) {
data.append(entry.getKey());
data.append("=");
if (entry.getKey().equalsIgnoreCase("password")) {
data.append("****");
} else {
data.append(entry.getValue());
}
data.append(", ");
}
data.delete(data.length()-2, data.length());
data.append("}");
return data.toString();
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy