FAQ
Repository: ant
Updated Branches:
   refs/heads/master f98f49551 -> a2cf61633


whitespace


Project: http://git-wip-us.apache.org/repos/asf/ant/repo
Commit: http://git-wip-us.apache.org/repos/asf/ant/commit/97030dbe
Tree: http://git-wip-us.apache.org/repos/asf/ant/tree/97030dbe
Diff: http://git-wip-us.apache.org/repos/asf/ant/diff/97030dbe

Branch: refs/heads/master
Commit: 97030dbec8bcfa908b56cce033362cc954caaa5f
Parents: f98f495
Author: Stefan Bodewig <bodewig@apache.org>
Authored: Sun Jul 6 12:54:11 2014 +0200
Committer: Stefan Bodewig <bodewig@apache.org>
Committed: Sun Jul 6 13:00:22 2014 +0200

----------------------------------------------------------------------
  src/main/org/apache/tools/ant/taskdefs/Tar.java | 44 ++++++++++----------
  1 file changed, 22 insertions(+), 22 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ant/blob/97030dbe/src/main/org/apache/tools/ant/taskdefs/Tar.java
----------------------------------------------------------------------
diff --git a/src/main/org/apache/tools/ant/taskdefs/Tar.java b/src/main/org/apache/tools/ant/taskdefs/Tar.java
index 268e660..7359703 100644
--- a/src/main/org/apache/tools/ant/taskdefs/Tar.java
+++ b/src/main/org/apache/tools/ant/taskdefs/Tar.java
@@ -72,35 +72,35 @@ public class Tar extends MatchingTask {
       * Tar.TarLongFileMode.WARN
       */
      @Deprecated
- public static final String WARN = "warn";
+ public static final String WARN = "warn";
      /**
       * @deprecated since 1.5.x.
       * Tar.FAIL is deprecated and is replaced with
       * Tar.TarLongFileMode.FAIL
       */
      @Deprecated
- public static final String FAIL = "fail";
+ public static final String FAIL = "fail";
      /**
       * @deprecated since 1.5.x.
       * Tar.TRUNCATE is deprecated and is replaced with
       * Tar.TarLongFileMode.TRUNCATE
       */
      @Deprecated
- public static final String TRUNCATE = "truncate";
+ public static final String TRUNCATE = "truncate";
      /**
       * @deprecated since 1.5.x.
       * Tar.GNU is deprecated and is replaced with
       * Tar.TarLongFileMode.GNU
       */
      @Deprecated
- public static final String GNU = "gnu";
+ public static final String GNU = "gnu";
      /**
       * @deprecated since 1.5.x.
       * Tar.OMIT is deprecated and is replaced with
       * Tar.TarLongFileMode.OMIT
       */
      @Deprecated
- public static final String OMIT = "omit";
+ public static final String OMIT = "omit";

      // CheckStyle:VisibilityModifier OFF - bc
      File tarFile;
@@ -150,7 +150,7 @@ public class Tar extends MatchingTask {
       * For consistency with other tasks, please use setDestFile().
       */
      @Deprecated
- public void setTarfile(final File tarFile) {
+ public void setTarfile(final File tarFile) {
          this.tarFile = tarFile;
      }

@@ -191,7 +191,7 @@ public class Tar extends MatchingTask {
       * the mode in its own class.
       */
      @Deprecated
- public void setLongfile(final String mode) {
+ public void setLongfile(final String mode) {
          log("DEPRECATED - The setLongfile(String) method has been deprecated."
              + " Use setLongfile(Tar.TarLongFileMode) instead.");
          this.longFileMode = new TarLongFileMode();
@@ -236,7 +236,7 @@ public class Tar extends MatchingTask {
       * @throws BuildException on error
       */
      @Override
- public void execute() throws BuildException {
+ public void execute() throws BuildException {
          if (tarFile == null) {
              throw new BuildException("tarfile attribute must be set!",
                                       getLocation());
@@ -253,7 +253,7 @@ public class Tar extends MatchingTask {
          }

          @SuppressWarnings("unchecked")
- final Vector<TarFileSet> savedFileSets = (Vector<TarFileSet>) filesets.clone();
+ final Vector<TarFileSet> savedFileSets = (Vector<TarFileSet>) filesets.clone();
          try {
              if (baseDir != null) {
                  if (!baseDir.exists()) {
@@ -278,10 +278,10 @@ public class Tar extends MatchingTask {
              // fileset
              boolean upToDate = true;
              for(final TarFileSet tfs : filesets) {
- upToDate &= check(tfs);
+ upToDate &= check(tfs);
              }
              for(final ResourceCollection rcol : resourceCollections) {
- upToDate &= check(rcol);
+ upToDate &= check(rcol);
              }

              if (upToDate) {
@@ -319,11 +319,11 @@ public class Tar extends MatchingTask {
                  }

                  longWarningGiven = false;
- for(final TarFileSet tfs : filesets) {
- tar(tfs, tOut);
+ for (final TarFileSet tfs : filesets) {
+ tar(tfs, tOut);
                  }
- for(final ResourceCollection rcol : resourceCollections) {
- tar(rcol, tOut);
+ for (final ResourceCollection rcol : resourceCollections) {
+ tar(rcol, tOut);
                  }
              } catch (final IOException ioe) {
                  final String msg = "Problem creating TAR: " + ioe.getMessage();
@@ -512,7 +512,7 @@ public class Tar extends MatchingTask {
       * use the two-arg version instead.
       */
      @Deprecated
- protected boolean archiveIsUpToDate(final String[] files) {
+ protected boolean archiveIsUpToDate(final String[] files) {
          return archiveIsUpToDate(files, baseDir);
      }

@@ -600,10 +600,10 @@ public class Tar extends MatchingTask {
                      files.add(r.getName());
                  }
              }
- for(final File base : basedirs) {
- final File tmpBase = base == Copy.NULL_FILE_PLACEHOLDER ? null : base;
+ for (final File base : basedirs) {
+ final File tmpBase = base == Copy.NULL_FILE_PLACEHOLDER ? null : base;
                  final List<String> files = basedirToFilesMap.get(base);
- check(tmpBase, files);
+ check(tmpBase, files);
              }
          } else { // non-file resources
              final Iterator<Resource> iter = rc.iterator();
@@ -650,7 +650,7 @@ public class Tar extends MatchingTask {
       * @since Ant 1.9.5
       */
      protected boolean check(final File basedir, final Collection<String> files) {
- return check(basedir, files.toArray(new String[files.size()]));
+ return check(basedir, files.toArray(new String[files.size()]));
      }

      /**
@@ -884,7 +884,7 @@ public class Tar extends MatchingTask {
           * @return the possible values for this enumerated type.
           */
          @Override
- public String[] getValues() {
+ public String[] getValues() {
              return validModes;
          }

@@ -965,7 +965,7 @@ public class Tar extends MatchingTask {
           * @return valid enumeration values
           */
          @Override
- public String[] getValues() {
+ public String[] getValues() {
              return new String[] {NONE, GZIP, BZIP2 };
          }

Search Discussions

  • Bodewig at Jul 6, 2014 at 11:06 am
    fix up-to-date check for filesets in tar

    - tar-test.xml testSingleFile was failing


    Project: http://git-wip-us.apache.org/repos/asf/ant/repo
    Commit: http://git-wip-us.apache.org/repos/asf/ant/commit/a2cf6163
    Tree: http://git-wip-us.apache.org/repos/asf/ant/tree/a2cf6163
    Diff: http://git-wip-us.apache.org/repos/asf/ant/diff/a2cf6163

    Branch: refs/heads/master
    Commit: a2cf616336895e5c9006c8b1cb35577b8c9a34ea
    Parents: 97030db
    Author: Stefan Bodewig <bodewig@apache.org>
    Authored: Sun Jul 6 13:06:34 2014 +0200
    Committer: Stefan Bodewig <bodewig@apache.org>
    Committed: Sun Jul 6 13:06:34 2014 +0200

    ----------------------------------------------------------------------
      src/main/org/apache/tools/ant/taskdefs/Tar.java | 2 +-
      1 file changed, 1 insertion(+), 1 deletion(-)
    ----------------------------------------------------------------------


    http://git-wip-us.apache.org/repos/asf/ant/blob/a2cf6163/src/main/org/apache/tools/ant/taskdefs/Tar.java
    ----------------------------------------------------------------------
    diff --git a/src/main/org/apache/tools/ant/taskdefs/Tar.java b/src/main/org/apache/tools/ant/taskdefs/Tar.java
    index 7359703..7f50ddc 100644
    --- a/src/main/org/apache/tools/ant/taskdefs/Tar.java
    +++ b/src/main/org/apache/tools/ant/taskdefs/Tar.java
    @@ -603,7 +603,7 @@ public class Tar extends MatchingTask {
                  for (final File base : basedirs) {
                      final File tmpBase = base == Copy.NULL_FILE_PLACEHOLDER ? null : base;
                      final List<String> files = basedirToFilesMap.get(base);
    - check(tmpBase, files);
    + upToDate &= check(tmpBase, files);
                  }
              } else { // non-file resources
                  final Iterator<Resource> iter = rc.iterator();

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupnotifications @
categoriesant
postedJul 6, '14 at 11:06a
activeJul 6, '14 at 11:06a
posts2
users1
websiteant.apache.org

1 user in discussion

Bodewig: 2 posts

People

Translate

site design / logo © 2018 Grokbase