diff --git a/src/main/org/apache/tools/ant/types/AbstractFileSet.java b/src/main/org/apache/tools/ant/types/AbstractFileSet.java
index 472770230..1ed228cad 100644
--- a/src/main/org/apache/tools/ant/types/AbstractFileSet.java
+++ b/src/main/org/apache/tools/ant/types/AbstractFileSet.java
@@ -392,27 +392,6 @@ public abstract class AbstractFileSet extends DataType
? getRef(getProject()).isFollowSymlinks() : followSymlinks;
}
- /**
- * Gets as descriptive as possible a name used for this datatype instance.
- * @return String
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 DirectoryScanner
instance.
@@ -504,17 +483,7 @@ public abstract class AbstractFileSet extends DataType
* @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