Browse Source

whitespace

master
Stefan Bodewig 11 years ago
parent
commit
97030dbec8
1 changed files with 22 additions and 22 deletions
  1. +22
    -22
      src/main/org/apache/tools/ant/taskdefs/Tar.java

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

@@ -72,35 +72,35 @@ public class Tar extends MatchingTask {
* Tar.TarLongFileMode.WARN * Tar.TarLongFileMode.WARN
*/ */
@Deprecated @Deprecated
public static final String WARN = "warn";
public static final String WARN = "warn";
/** /**
* @deprecated since 1.5.x. * @deprecated since 1.5.x.
* Tar.FAIL is deprecated and is replaced with * Tar.FAIL is deprecated and is replaced with
* Tar.TarLongFileMode.FAIL * Tar.TarLongFileMode.FAIL
*/ */
@Deprecated @Deprecated
public static final String FAIL = "fail";
public static final String FAIL = "fail";
/** /**
* @deprecated since 1.5.x. * @deprecated since 1.5.x.
* Tar.TRUNCATE is deprecated and is replaced with * Tar.TRUNCATE is deprecated and is replaced with
* Tar.TarLongFileMode.TRUNCATE * Tar.TarLongFileMode.TRUNCATE
*/ */
@Deprecated @Deprecated
public static final String TRUNCATE = "truncate";
public static final String TRUNCATE = "truncate";
/** /**
* @deprecated since 1.5.x. * @deprecated since 1.5.x.
* Tar.GNU is deprecated and is replaced with * Tar.GNU is deprecated and is replaced with
* Tar.TarLongFileMode.GNU * Tar.TarLongFileMode.GNU
*/ */
@Deprecated @Deprecated
public static final String GNU = "gnu";
public static final String GNU = "gnu";
/** /**
* @deprecated since 1.5.x. * @deprecated since 1.5.x.
* Tar.OMIT is deprecated and is replaced with * Tar.OMIT is deprecated and is replaced with
* Tar.TarLongFileMode.OMIT * Tar.TarLongFileMode.OMIT
*/ */
@Deprecated @Deprecated
public static final String OMIT = "omit";
public static final String OMIT = "omit";


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


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


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


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


longWarningGiven = false; 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) { } catch (final IOException ioe) {
final String msg = "Problem creating TAR: " + ioe.getMessage(); final String msg = "Problem creating TAR: " + ioe.getMessage();
@@ -512,7 +512,7 @@ public class Tar extends MatchingTask {
* use the two-arg version instead. * use the two-arg version instead.
*/ */
@Deprecated @Deprecated
protected boolean archiveIsUpToDate(final String[] files) {
protected boolean archiveIsUpToDate(final String[] files) {
return archiveIsUpToDate(files, baseDir); return archiveIsUpToDate(files, baseDir);
} }


@@ -600,10 +600,10 @@ public class Tar extends MatchingTask {
files.add(r.getName()); 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); final List<String> files = basedirToFilesMap.get(base);
check(tmpBase, files);
check(tmpBase, files);
} }
} else { // non-file resources } else { // non-file resources
final Iterator<Resource> iter = rc.iterator(); final Iterator<Resource> iter = rc.iterator();
@@ -650,7 +650,7 @@ public class Tar extends MatchingTask {
* @since Ant 1.9.5 * @since Ant 1.9.5
*/ */
protected boolean check(final File basedir, final Collection<String> files) { 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. * @return the possible values for this enumerated type.
*/ */
@Override @Override
public String[] getValues() {
public String[] getValues() {
return validModes; return validModes;
} }


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




Loading…
Cancel
Save