import org.sonar.api.config.Settings;
import javax.annotation.Nullable;
-
import java.util.List;
import java.util.Map;
private Map<String, String> savedProperties;
public BatchSettings(BootstrapSettings bootstrapSettings, PropertyDefinitions propertyDefinitions,
- ServerClient client, Configuration deprecatedConfiguration) {
+ ServerClient client, Configuration deprecatedConfiguration) {
super(propertyDefinitions);
this.bootstrapSettings = bootstrapSettings;
this.client = client;
}
- private static void _zip(String entryName, InputStream in, ZipOutputStream out) throws IOException {
+ private static void doZip(String entryName, InputStream in, ZipOutputStream out) throws IOException {
ZipEntry zentry = new ZipEntry(entryName);
out.putNextEntry(zentry);
IOUtils.copy(in, out);
out.closeEntry();
}
- private static void _zip(String entryName, File file, ZipOutputStream out) throws IOException {
+ private static void doZip(String entryName, File file, ZipOutputStream out) throws IOException {
if (file.isDirectory()) {
entryName += '/';
ZipEntry zentry = new ZipEntry(entryName);
out.closeEntry();
File[] files = file.listFiles();
for (int i = 0, len = files.length; i < len; i++) {
- _zip(entryName + files[i].getName(), files[i], out);
+ doZip(entryName + files[i].getName(), files[i], out);
}
} else {
InputStream in = null;
try {
in = new BufferedInputStream(new FileInputStream(file));
- _zip(entryName, in, out);
+ doZip(entryName, in, out);
} finally {
IOUtils.closeQuietly(in);
}
private static void zip(File file, ZipOutputStream out) throws IOException {
for (File child : file.listFiles()) {
String name = child.getName();
- _zip(name, child, out);
+ doZip(name, child, out);
}
}