I2P Address: [http://git.idk.i2p]

Skip to content
Snippets Groups Projects
Commit 0c348ec1 authored by zzz's avatar zzz
Browse files

* FileUtil: Better logging of weird unpack200 errors

parent df8bab6b
No related branches found
No related tags found
No related merge requests found
...@@ -147,9 +147,12 @@ public class FileUtil { ...@@ -147,9 +147,12 @@ public class FileUtil {
System.getProperty("java.version")); System.getProperty("java.version"));
ioe.printStackTrace(); ioe.printStackTrace();
return false; return false;
} catch (Exception e) { // ClassNotFoundException but compiler not happy with that } catch (Exception e) {
System.err.println("ERROR: Error unpacking the zip entry (" + entry.getName() + // Oracle unpack() should throw an IOE but other problems can happen, e.g:
"), your JVM does not support unpack200"); // java.lang.reflect.InvocationTargetException
// Caused by: java.util.zip.ZipException: duplicate entry: xxxxx
System.err.println("ERROR: Error extracting the zip entry (" + entry.getName() + ')');
e.printStackTrace();
return false; return false;
} finally { } finally {
try { if (in != null) in.close(); } catch (IOException ioe) {} try { if (in != null) in.close(); } catch (IOException ioe) {}
...@@ -261,6 +264,7 @@ public class FileUtil { ...@@ -261,6 +264,7 @@ public class FileUtil {
* @throws IOException on unpack error or if neither library is available. * @throws IOException on unpack error or if neither library is available.
* Will not throw ClassNotFoundException. * Will not throw ClassNotFoundException.
* @throws org.apache.harmony.pack200.Pack200Exception which is not an IOException * @throws org.apache.harmony.pack200.Pack200Exception which is not an IOException
* @throws java.lang.reflect.InvocationTargetException on duplicate zip entries in the packed jar
* @since 0.8.1 * @since 0.8.1
*/ */
private static void unpack(InputStream in, JarOutputStream out) throws Exception { private static void unpack(InputStream in, JarOutputStream out) throws Exception {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment