From 83f7a542581671b3bcb7643ad9a9992855aec85f Mon Sep 17 00:00:00 2001 From: Matthew Jason Benson Date: Mon, 30 Jun 2008 20:37:37 +0000 Subject: [PATCH] trivial git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@672902 13f79535-47bb-0310-9956-ffa450edef68 --- .../taskdefs/optional/junit/AggregateTransformer.java | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/src/main/org/apache/tools/ant/taskdefs/optional/junit/AggregateTransformer.java b/src/main/org/apache/tools/ant/taskdefs/optional/junit/AggregateTransformer.java index 4869f9797..240e0489a 100644 --- a/src/main/org/apache/tools/ant/taskdefs/optional/junit/AggregateTransformer.java +++ b/src/main/org/apache/tools/ant/taskdefs/optional/junit/AggregateTransformer.java @@ -287,21 +287,15 @@ public class AggregateTransformer { if (styleDir == null) { // If style dir is not specified we have to retrieve // the stylesheet from the classloader - URLResource stylesheet = new URLResource(); URL stylesheetURL = getClass().getClassLoader().getResource( "org/apache/tools/ant/taskdefs/optional/junit/xsl/" + xslname); - stylesheet.setURL(stylesheetURL); - return stylesheet; + return new URLResource(stylesheetURL); } // If we are here, then the style dir is here and we // should read the stylesheet from the filesystem - FileResource stylesheet = new FileResource(); - File stylesheetFile = new File(styleDir, xslname); - stylesheet.setFile(stylesheetFile); - return stylesheet; + return new FileResource(new File(styleDir, xslname)); } - /** check for invalid options * @throws BuildException if something goes wrong. */