ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mben...@apache.org
Subject cvs commit: ant/src/main/org/apache/tools/ant/types AbstractFileSet.java
Date Mon, 23 May 2005 19:46:14 GMT
mbenson     2005/05/23 12:46:14

  Modified:    src/main/org/apache/tools/ant/types AbstractFileSet.java
  Log:
  use DataType's convenience method
  
  Revision  Changes    Path
  1.51      +1 -32     ant/src/main/org/apache/tools/ant/types/AbstractFileSet.java
  
  Index: AbstractFileSet.java
  ===================================================================
  RCS file: /home/cvs/ant/src/main/org/apache/tools/ant/types/AbstractFileSet.java,v
  retrieving revision 1.50
  retrieving revision 1.51
  diff -u -r1.50 -r1.51
  --- AbstractFileSet.java	21 Apr 2005 13:33:13 -0000	1.50
  +++ AbstractFileSet.java	23 May 2005 19:46:14 -0000	1.51
  @@ -393,27 +393,6 @@
       }
   
       /**
  -     * Gets as descriptive as possible a name used for this datatype instance.
  -     * @return <code>String</code> name.
  -     */
  -    protected String getDataTypeName() {
  -        // look up the types in project and see if they match this class
  -        Project p = getProject();
  -        if (p != null) {
  -            Hashtable typedefs = p.getDataTypeDefinitions();
  -            for (Enumeration e = typedefs.keys(); e.hasMoreElements();) {
  -                String typeName = (String) e.nextElement();
  -                Class typeClass = (Class) typedefs.get(typeName);
  -                if (typeClass == getClass()) {
  -                    return typeName;
  -                }
  -            }
  -        }
  -        String classname = getClass().getName();
  -        return classname.substring(classname.lastIndexOf('.') + 1);
  -    }
  -
  -    /**
        * Returns the directory scanner needed to access the files to process.
        * @return a <code>DirectoryScanner</code> instance.
        */
  @@ -504,17 +483,7 @@
        * @return the referenced FileSet
        */
       protected AbstractFileSet getRef(Project p) {
  -        if (!isChecked()) {
  -            Stack stk = new Stack();
  -            stk.push(this);
  -            dieOnCircularReference(stk, p);
  -        }
  -        Object o = getRefid().getReferencedObject(p);
  -        if (!getClass().isAssignableFrom(o.getClass())) {
  -            throw new BuildException(getRefid().getRefId()
  -                + " doesn\'t denote a " + getDataTypeName());
  -        }
  -        return (AbstractFileSet) o;
  +        return (AbstractFileSet) getCheckedRef(p);
       }
   
       // SelectorContainer methods
  
  
  

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


Mime
View raw message