umagesh 02/03/05 06:27:09
Modified: src/main/org/apache/tools/ant/taskdefs Jar.java
Log:
Check for Null.
PR: 6871
Submitted by: Brian Deitte <[EMAIL PROTECTED]>
Revision Changes Path
1.40 +4 -4
jakarta-ant/src/main/org/apache/tools/ant/taskdefs/Jar.java
Index: Jar.java
===================================================================
RCS file:
/home/cvs/jakarta-ant/src/main/org/apache/tools/ant/taskdefs/Jar.java,v
retrieving revision 1.39
retrieving revision 1.40
diff -u -r1.39 -r1.40
--- Jar.java 4 Mar 2002 08:38:09 -0000 1.39
+++ Jar.java 5 Mar 2002 14:27:09 -0000 1.40
@@ -287,7 +287,7 @@
* This is a JDK 1.3+ specific feature and is enabled by default. See
* <a
href="http://java.sun.com/j2se/1.3/docs/guide/jar/jar.html#JAR+Index">the
* JAR index specification</a> for more details.
- *
+ *
* @param zOut the zip stream representing the jar being built.
* @throws IOException thrown if there is an error while creating the
* index and adding it to the zip stream.
@@ -340,7 +340,7 @@
protected void zipFile(File file, ZipOutputStream zOut, String vPath)
throws IOException
{
- if (vPath.equalsIgnoreCase("META-INF/MANIFEST.MF")) {
+ if ("META-INF/MANIFEST.MF".equalsIgnoreCase(vPath)) {
filesetManifest(file, null);
} else {
super.zipFile(file, zOut, vPath);
@@ -353,7 +353,7 @@
protected void zipFile(InputStream is, ZipOutputStream zOut, String
vPath, long lastModified, File file)
throws IOException
{
- if (vPath.equalsIgnoreCase("META-INF/MANIFEST.MF")) {
+ if ("META-INF/MANIFEST.MF".equalsIgnoreCase(vPath)) {
filesetManifest(file, is);
} else {
super.zipFile(is, zOut, vPath, lastModified, null);
@@ -361,7 +361,7 @@
}
private void filesetManifest(File file, InputStream is) {
- if (manifestFile.equals(file)) {
+ if (manifestFile != null && manifestFile.equals(file)) {
// If this is the same name specified in 'manifest', this is the
manifest to use
log("Found manifest " + file, Project.MSG_VERBOSE);
if (is != null) {
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>