Update of /cvsroot/xdoclet/xdoclet/core/src/xdoclet/loader
In directory sc8-pr-cvs1:/tmp/cvs-serv16169/xdoclet/core/src/xdoclet/loader
Modified Files:
LoaderMessages.java ModuleFinder.java
Log Message:
Warns about corrupted zip/jar files in the Module Finder,
instead of throwing an exeception. This way, corrupted
files are just skipped and the module finder becomes
more robust. This fixes XDT-375 and helps XDT-373.
Index: LoaderMessages.java
===================================================================
RCS file: /cvsroot/xdoclet/xdoclet/core/src/xdoclet/loader/LoaderMessages.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -r1.3 -r1.4
*** LoaderMessages.java 31 Jul 2002 19:40:53 -0000 1.3
--- LoaderMessages.java 12 Mar 2003 14:35:24 -0000 1.4
***************
*** 52,54 ****
--- 52,58 ----
public final static String PARSING_XDOCLET_XML = "PARSING_XDOCLET_XML";
+ /**
+ * @msg.bundle msg="Invalid zip/jar file: {0}"
+ */
+ public final static String INVALID_ZIP_FILE = "INVALID_ZIP_FILE";
}
Index: ModuleFinder.java
===================================================================
RCS file: /cvsroot/xdoclet/xdoclet/core/src/xdoclet/loader/ModuleFinder.java,v
retrieving revision 1.12
retrieving revision 1.13
diff -C2 -r1.12 -r1.13
*** ModuleFinder.java 12 Oct 2002 09:18:43 -0000 1.12
--- ModuleFinder.java 12 Mar 2003 14:35:25 -0000 1.13
***************
*** 15,18 ****
--- 15,19 ----
import java.util.jar.JarEntry;
import java.util.jar.JarFile;
+ import java.util.zip.ZipException;
import org.apache.commons.logging.Log;
***************
*** 160,163 ****
--- 161,169 ----
}
}
+ }
+ catch (ZipException ze) {
+ // Zip Exceptions gets only a warning, so invalid zip files
+ // are just skipped by the module finder.
+ log.warn(Translator.getString(LoaderMessages.class,
LoaderMessages.INVALID_ZIP_FILE, new String[]{file.getName()}));
}
catch (IOException e) {
-------------------------------------------------------
This SF.net email is sponsored by:Crypto Challenge is now open!
Get cracking and register here for some mind boggling fun and
the chance of winning an Apple iPod:
http://ads.sourceforge.net/cgi-bin/redirect.pl?thaw0031en
_______________________________________________
xdoclet-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/xdoclet-devel