Browse Source

Check for Null.

PR: 6871
Submitted by: Brian Deitte <bdeitte@macromedia.com>


git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@271748 13f79535-47bb-0310-9956-ffa450edef68
master
Magesh Umasankar 23 years ago
parent
commit
34c7de003d
1 changed files with 4 additions and 4 deletions
  1. +4
    -4
      src/main/org/apache/tools/ant/taskdefs/Jar.java

+ 4
- 4
src/main/org/apache/tools/ant/taskdefs/Jar.java View File

@@ -287,7 +287,7 @@ public class Jar extends Zip {
* 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 @@ public class Jar extends Zip {
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 @@ public class Jar extends Zip {
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 @@ public class Jar extends Zip {
}

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) {


Loading…
Cancel
Save