|
|
|
@ -23,9 +23,9 @@ import java.util.Map; |
|
|
|
|
import java.util.concurrent.ExecutionException; |
|
|
|
|
import java.util.concurrent.Future; |
|
|
|
|
import java.util.function.Predicate; |
|
|
|
|
import java.util.zip.ZipEntry; |
|
|
|
|
import java.util.zip.ZipException; |
|
|
|
|
import java.util.zip.ZipFile; |
|
|
|
|
|
|
|
|
|
import org.apache.commons.compress.archivers.zip.ZipArchiveEntry; |
|
|
|
|
import org.apache.commons.compress.archivers.zip.ZipFile; |
|
|
|
|
|
|
|
|
|
@Slf4j |
|
|
|
|
@Component |
|
|
|
@ -105,16 +105,17 @@ public class UpdaterImpl implements UpdateHelper { |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
private void processArchive(File file, Predicate filter) throws CommonException { |
|
|
|
|
//TODO
|
|
|
|
|
|
|
|
|
|
try(final ZipFile zipFile = new ZipFile(file)){ |
|
|
|
|
|
|
|
|
|
log.debug("Process Zip file"); |
|
|
|
|
|
|
|
|
|
final Enumeration<? extends ZipEntry> entries = zipFile.entries(); |
|
|
|
|
final Enumeration<ZipArchiveEntry> entries = zipFile.getEntries(); |
|
|
|
|
|
|
|
|
|
while (entries.hasMoreElements()){ |
|
|
|
|
|
|
|
|
|
final ZipEntry entry = entries.nextElement(); |
|
|
|
|
final ZipArchiveEntry entry = entries.nextElement(); |
|
|
|
|
final String name = entry.getName(); |
|
|
|
|
|
|
|
|
|
log.debug("Find '{}' in zip", name); |
|
|
|
@ -133,9 +134,6 @@ public class UpdaterImpl implements UpdateHelper { |
|
|
|
|
|
|
|
|
|
log.debug("Completed Zip file"); |
|
|
|
|
|
|
|
|
|
} catch (ZipException e) { |
|
|
|
|
log.error("Common Zip exception"); |
|
|
|
|
throw new UnzipException(e); |
|
|
|
|
} catch (IOException e) { |
|
|
|
|
log.error("IO Unzip Exception"); |
|
|
|
|
throw new UnzipException(e); |
|
|
|
|