You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ant.apache.org by pe...@apache.org on 2005/01/25 17:09:48 UTC

cvs commit: ant/src/main/org/apache/tools/ant/taskdefs BUnzip2.java Chmod.java

peterreilly    2005/01/25 08:09:47

  Modified:    src/main/org/apache/tools/ant/taskdefs BUnzip2.java
                        Chmod.java
  Log:
  javadoc
  
  Revision  Changes    Path
  1.17      +8 -1      ant/src/main/org/apache/tools/ant/taskdefs/BUnzip2.java
  
  Index: BUnzip2.java
  ===================================================================
  RCS file: /home/cvs/ant/src/main/org/apache/tools/ant/taskdefs/BUnzip2.java,v
  retrieving revision 1.16
  retrieving revision 1.17
  diff -u -r1.16 -r1.17
  --- BUnzip2.java	9 Mar 2004 16:48:04 -0000	1.16
  +++ BUnzip2.java	25 Jan 2005 16:09:47 -0000	1.17
  @@ -1,5 +1,5 @@
   /*
  - * Copyright  2001-2002,2004 The Apache Software Foundation
  + * Copyright  2001-2002,2004-2005 The Apache Software Foundation
    *
    *  Licensed under the Apache License, Version 2.0 (the "License");
    *  you may not use this file except in compliance with the License.
  @@ -39,10 +39,17 @@
   
       private static final String DEFAULT_EXTENSION = ".bz2";
   
  +    /**
  +     * Get the default extension.
  +     * @return the string ".bz2"
  +     */
       protected String getDefaultExtension() {
           return DEFAULT_EXTENSION;
       }
   
  +    /**
  +     * Do the unbzipping.
  +     */
       protected void extract() {
           if (source.lastModified() > dest.lastModified()) {
               log("Expanding " + source.getAbsolutePath() + " to "
  
  
  
  1.44      +36 -7     ant/src/main/org/apache/tools/ant/taskdefs/Chmod.java
  
  Index: Chmod.java
  ===================================================================
  RCS file: /home/cvs/ant/src/main/org/apache/tools/ant/taskdefs/Chmod.java,v
  retrieving revision 1.43
  retrieving revision 1.44
  diff -u -r1.43 -r1.44
  --- Chmod.java	9 Mar 2004 16:48:04 -0000	1.43
  +++ Chmod.java	25 Jan 2005 16:09:47 -0000	1.44
  @@ -1,5 +1,5 @@
   /*
  - * Copyright  2000-2004 The Apache Software Foundation
  + * Copyright  2000-2005 The Apache Software Foundation
    *
    *  Licensed under the Apache License, Version 2.0 (the "License");
    *  you may not use this file except in compliance with the License.
  @@ -60,7 +60,7 @@
   
       /**
        * The file or single directory of which the permissions must be changed.
  -     * @param src
  +     * @param src the source file or directory.
        */
       public void setFile(File src) {
           FileSet fs = new FileSet();
  @@ -70,15 +70,15 @@
   
       /**
        * The directory which holds the files whose permissions must be changed.
  -     * @param src
  +     * @param src the directory.
        */
       public void setDir(File src) {
           defaultSet.setDir(src);
       }
   
       /**
  -     * The new permissions.
  -     * @param perm
  +     * Set the new permissions.
  +     * @param perm the new permissions.
        */
       public void setPerm(String perm) {
           createArg().setValue(perm);
  @@ -87,6 +87,7 @@
   
       /**
        * Add a name entry on the include list.
  +     * @return a NameEntry to be configured.
        */
       public PatternSet.NameEntry createInclude() {
           defaultSetDefined = true;
  @@ -95,6 +96,7 @@
   
       /**
        * Add a name entry on the exclude list.
  +     * @return a nameentry to be configured.
        */
       public PatternSet.NameEntry createExclude() {
           defaultSetDefined = true;
  @@ -103,6 +105,7 @@
   
       /**
        * Add a set of patterns.
  +     * @return a patternset to be configured.
        */
       public PatternSet createPatternSet() {
           defaultSetDefined = true;
  @@ -113,7 +116,7 @@
        * Sets the set of include patterns. Patterns may be separated by a comma
        * or a space.
        *
  -     * @param includes the string containing the include patterns
  +     * @param includes the string containing the include patterns.
        */
       public void setIncludes(String includes) {
           defaultSetDefined = true;
  @@ -124,7 +127,7 @@
        * Sets the set of exclude patterns. Patterns may be separated by a comma
        * or a space.
        *
  -     * @param excludes the string containing the exclude patterns
  +     * @param excludes the string containing the exclude patterns.
        */
       public void setExcludes(String excludes) {
           defaultSetDefined = true;
  @@ -143,6 +146,9 @@
           defaultSet.setDefaultexcludes(useDefaultExcludes);
       }
   
  +    /**
  +     * Check the attributes and nested elements.
  +     */
       protected void checkConfiguration() {
           if (!havePerm) {
               throw new BuildException("Required attribute perm not set in chmod",
  @@ -155,6 +161,10 @@
           super.checkConfiguration();
       }
   
  +    /**
  +     * Carry out the chmoding.
  +     * @throws BuildException on error.
  +     */
       public void execute() throws BuildException {
           /*
            * In Ant 1.1, <chmod dir="foo" /> means, change the permissions
  @@ -189,6 +199,10 @@
       }
   
       /**
  +     * Set the executable.
  +     * This is not allowed for Chmod.
  +     * @param e ignored.
  +     * @throws BuildException always.
        * @ant.attribute ignore="true"
        */
       public void setExecutable(String e) {
  @@ -197,6 +211,10 @@
       }
   
       /**
  +     * Set the command.
  +     * This is not allowed for Chmod.
  +     * @param cmdl ignored.
  +     * @throws BuildException always.
        * @ant.attribute ignore="true"
        */
       public void setCommand(Commandline cmdl) {
  @@ -205,6 +223,9 @@
       }
   
       /**
  +     * This is not allowed for Chmod.
  +     * @param skip ignored.
  +     * @throws BuildException always.
        * @ant.attribute ignore="true"
        */
       public void setSkipEmptyFilesets(boolean skip) {
  @@ -213,6 +234,9 @@
       }
   
       /**
  +     * This is not allowed for Chmod.
  +     * @param b ignored.
  +     * @throws BuildException always.
        * @ant.attribute ignore="true"
        */
       public void setAddsourcefile(boolean b) {
  @@ -220,6 +244,11 @@
               + " doesn\'t support the addsourcefile attribute", getLocation());
       }
   
  +    /**
  +     * Check if the os is valid.
  +     * Always include unix.
  +     * @return true if the os is valid.
  +     */
       protected boolean isValidOs() {
           return Os.isFamily("unix") && super.isValidOs();
       }
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
For additional commands, e-mail: dev-help@ant.apache.org