mirror of https://github.com/apache/archiva.git
don't fail on bad zip file to get debug infos
git-svn-id: https://svn.apache.org/repos/asf/archiva/trunk@1177659 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
0aedd14607
commit
bf865287f3
|
@ -62,6 +62,7 @@ import java.io.InputStream;
|
||||||
import java.net.HttpURLConnection;
|
import java.net.HttpURLConnection;
|
||||||
import java.net.URL;
|
import java.net.URL;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
|
import java.util.Collections;
|
||||||
import java.util.Enumeration;
|
import java.util.Enumeration;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.zip.ZipEntry;
|
import java.util.zip.ZipEntry;
|
||||||
|
@ -243,6 +244,8 @@ public class DownloadArtifactsTest
|
||||||
}
|
}
|
||||||
|
|
||||||
private List<String> getZipEntriesNames( ZipFile zipFile )
|
private List<String> getZipEntriesNames( ZipFile zipFile )
|
||||||
|
{
|
||||||
|
try
|
||||||
{
|
{
|
||||||
List<String> entriesNames = new ArrayList<String>();
|
List<String> entriesNames = new ArrayList<String>();
|
||||||
Enumeration<? extends ZipEntry> entries = zipFile.entries();
|
Enumeration<? extends ZipEntry> entries = zipFile.entries();
|
||||||
|
@ -252,6 +255,12 @@ public class DownloadArtifactsTest
|
||||||
}
|
}
|
||||||
return entriesNames;
|
return entriesNames;
|
||||||
}
|
}
|
||||||
|
catch ( Throwable e )
|
||||||
|
{
|
||||||
|
log.info( "fail to get zipEntries " + e.getMessage(), e );
|
||||||
|
}
|
||||||
|
return Collections.emptyList();
|
||||||
|
}
|
||||||
|
|
||||||
public static class RedirectServlet
|
public static class RedirectServlet
|
||||||
extends HttpServlet
|
extends HttpServlet
|
||||||
|
|
Loading…
Reference in New Issue