Browse Source

removed deprecated method calls, changed date

git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@367002 13f79535-47bb-0310-9956-ffa450edef68
master
Kevin Jackson 19 years ago
parent
commit
ac060429f9
1 changed files with 7 additions and 14 deletions
  1. +7
    -14
      src/main/org/apache/tools/ant/taskdefs/Tar.java

+ 7
- 14
src/main/org/apache/tools/ant/taskdefs/Tar.java View File

@@ -1,5 +1,5 @@
/* /*
* Copyright 2000-2005 The Apache Software Foundation
* Copyright 2000-2006 The Apache Software Foundation
* *
* Licensed under the Apache License, Version 2.0 (the "License"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.
@@ -297,14 +297,7 @@ public class Tar extends MatchingTask {
String msg = "Problem creating TAR: " + ioe.getMessage(); String msg = "Problem creating TAR: " + ioe.getMessage();
throw new BuildException(msg, ioe, getLocation()); throw new BuildException(msg, ioe, getLocation());
} finally { } finally {
if (tOut != null) {
try {
// close up
tOut.close();
} catch (IOException e) {
// ignore
}
}
FileUtils.close(tOut);
} }
} finally { } finally {
filesets = savedFileSets; filesets = savedFileSets;
@@ -355,7 +348,7 @@ public class Tar extends MatchingTask {
} }


if (tarFileSet != null) { if (tarFileSet != null) {
String fullpath = tarFileSet.getFullpath();
String fullpath = tarFileSet.getFullpath(this.getProject());
if (fullpath.length() > 0) { if (fullpath.length() > 0) {
vPath = fullpath; vPath = fullpath;
} else { } else {
@@ -364,7 +357,7 @@ public class Tar extends MatchingTask {
return; return;
} }


String prefix = tarFileSet.getPrefix();
String prefix = tarFileSet.getPrefix(this.getProject());
// '/' is appended for compatibility with the zip task. // '/' is appended for compatibility with the zip task.
if (prefix.length() > 0 && !prefix.endsWith("/")) { if (prefix.length() > 0 && !prefix.endsWith("/")) {
prefix = prefix + "/"; prefix = prefix + "/";
@@ -435,7 +428,7 @@ public class Tar extends MatchingTask {
} }
} else if (tarFileSet != null && tarFileSet.hasDirModeBeenSet()) { } else if (tarFileSet != null && tarFileSet.hasDirModeBeenSet()) {
// override permissions if set explicitly // override permissions if set explicitly
te.setMode(tarFileSet.getDirMode());
te.setMode(tarFileSet.getDirMode(this.getProject()));
} }


if (tarFileSet != null) { if (tarFileSet != null) {
@@ -626,7 +619,7 @@ public class Tar extends MatchingTask {
afs = (ArchiveFileSet) rc; afs = (ArchiveFileSet) rc;
} }
if (afs != null && afs.size() > 1 if (afs != null && afs.size() > 1
&& afs.getFullpath().length() > 0) {
&& afs.getFullpath(this.getProject()).length() > 0) {
throw new BuildException("fullpath attribute may only " throw new BuildException("fullpath attribute may only "
+ "be specified for " + "be specified for "
+ "filesets that specify a " + "filesets that specify a "
@@ -792,7 +785,7 @@ public class Tar extends MatchingTask {
* @return the current mode. * @return the current mode.
*/ */
public int getMode() { public int getMode() {
return getFileMode();
return getFileMode(this.getProject());
} }


/** /**


Loading…
Cancel
Save