diff options
author | Simon Brandhof <simon.brandhof@gmail.com> | 2013-06-13 15:38:16 +0200 |
---|---|---|
committer | Simon Brandhof <simon.brandhof@gmail.com> | 2013-06-13 15:38:26 +0200 |
commit | 92b4d736ed08613824523d2acd033cc39b56b412 (patch) | |
tree | 4a920d3b56ed8ca1e08a7d89fe2e14656594b94b /sonar-plugin-api/src/main/java/org/sonar/api/utils/ZipUtils.java | |
parent | 1f3fb02b11112f0e90e1733e2a04561bc35b795a (diff) | |
download | sonarqube-92b4d736ed08613824523d2acd033cc39b56b412.tar.gz sonarqube-92b4d736ed08613824523d2acd033cc39b56b412.zip |
Fix some quality flaws
Diffstat (limited to 'sonar-plugin-api/src/main/java/org/sonar/api/utils/ZipUtils.java')
-rw-r--r-- | sonar-plugin-api/src/main/java/org/sonar/api/utils/ZipUtils.java | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/utils/ZipUtils.java b/sonar-plugin-api/src/main/java/org/sonar/api/utils/ZipUtils.java index 2d21928b0a4..0b6dfae9842 100644 --- a/sonar-plugin-api/src/main/java/org/sonar/api/utils/ZipUtils.java +++ b/sonar-plugin-api/src/main/java/org/sonar/api/utils/ZipUtils.java @@ -128,14 +128,14 @@ public final class ZipUtils { } - 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); @@ -143,14 +143,14 @@ public final class ZipUtils { 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); } @@ -160,7 +160,7 @@ public final class ZipUtils { 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); } } |