Browse Source

Tedious workaround for JDK 1.1 compilation issues

git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@272229 13f79535-47bb-0310-9956-ffa450edef68
master
Conor MacNeill 23 years ago
parent
commit
ae694da658
1 changed files with 19 additions and 2 deletions
  1. +19
    -2
      src/main/org/apache/tools/ant/taskdefs/optional/junit/AggregateTransformer.java

+ 19
- 2
src/main/org/apache/tools/ant/taskdefs/optional/junit/AggregateTransformer.java View File

@@ -117,12 +117,29 @@ public class AggregateTransformer {
protected String format;

/** XML Parser factory */
protected final static DocumentBuilderFactory dbfactory = DocumentBuilderFactory.newInstance();
private static DocumentBuilderFactory privateDBFactory;
/** XML Parser factory accessible to subclasses */
protected static DocumentBuilderFactory dbfactory;
static {
privateDBFactory = DocumentBuilderFactory.newInstance();
dbfactory = privateDBFactory;
}

public AggregateTransformer(Task task){
this.task = task;
}

/**
* Get the Document Builder Factory
*
* @return the DocumentBuilderFactory instance in use
*/
protected static DocumentBuilderFactory getDocumentBuilderFactory() {
return privateDBFactory;
}
public void setFormat(Format format){
this.format = format.getValue();
}
@@ -138,7 +155,7 @@ public class AggregateTransformer {
*/
protected void setXmlfile(File xmlfile) throws BuildException {
try {
DocumentBuilder builder = dbfactory.newDocumentBuilder();
DocumentBuilder builder = privateDBFactory.newDocumentBuilder();
InputStream in = new FileInputStream(xmlfile);
try {
Document doc = builder.parse(in);


Loading…
Cancel
Save