From 8f4aa8719c4dfd626c0cc8b93fe9c40a8d263bf7 Mon Sep 17 00:00:00 2001 From: Conor MacNeill Date: Mon, 8 Apr 2002 15:28:58 +0000 Subject: [PATCH] Refactor to use a single DTDLocation instance Still need to integrate XMLCatalog with these tasks git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@272296 13f79535-47bb-0310-9956-ffa450edef68 --- .../taskdefs/optional/XMLValidateTask.java | 21 +-------- .../ant/taskdefs/optional/ejb/EjbJar.java | 45 +------------------ 2 files changed, 4 insertions(+), 62 deletions(-) diff --git a/src/main/org/apache/tools/ant/taskdefs/optional/XMLValidateTask.java b/src/main/org/apache/tools/ant/taskdefs/optional/XMLValidateTask.java index d68c8ec2d..789c76359 100644 --- a/src/main/org/apache/tools/ant/taskdefs/optional/XMLValidateTask.java +++ b/src/main/org/apache/tools/ant/taskdefs/optional/XMLValidateTask.java @@ -471,25 +471,8 @@ public class XMLValidateTask extends Task { } } - public static class DTDLocation { - private String publicId = null; - private String location = null; - - public void setPublicId(String publicId) { - this.publicId = publicId; - } - - public void setLocation(String location) { - this.location = location; - } - - public String getPublicId() { - return publicId; - } - - public String getLocation() { - return location; - } + public static class DTDLocation + extends org.apache.tools.ant.types.DTDLocation { } private class LocalResolver diff --git a/src/main/org/apache/tools/ant/taskdefs/optional/ejb/EjbJar.java b/src/main/org/apache/tools/ant/taskdefs/optional/ejb/EjbJar.java index fe7b5b663..121872c11 100644 --- a/src/main/org/apache/tools/ant/taskdefs/optional/ejb/EjbJar.java +++ b/src/main/org/apache/tools/ant/taskdefs/optional/ejb/EjbJar.java @@ -100,49 +100,8 @@ public class EjbJar extends MatchingTask { /** * Inner class used to record information about the location of a local DTD */ - public static class DTDLocation { - /** The public ID of the DTD */ - private String publicId = null; - /** The DTD's local location */ - private String location = null; - - - /** - * Sets the publicId of the DTDLocation - * - * @param publicId the new publicId value - */ - public void setPublicId(String publicId) { - this.publicId = publicId; - } - - /** - * Sets the location of the DTDLocation. This value may be file path or - * a local resource on the classpath - * - * @param location the new location value - */ - public void setLocation(String location) { - this.location = location; - } - - /** - * Gets the publicId of the DTDLocation - * - * @return the publicId value - */ - public String getPublicId() { - return publicId; - } - - /** - * Gets the location of the DTDLocation - * - * @return the location value - */ - public String getLocation() { - return location; - } + public static class DTDLocation + extends org.apache.tools.ant.types.DTDLocation { } /**