ant-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bode...@apache.org
Subject svn commit: r1203162 - /ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/XSLTProcess.java
Date Thu, 17 Nov 2011 12:04:17 GMT
Author: bodewig
Date: Thu Nov 17 12:04:16 2011
New Revision: 1203162

URL: http://svn.apache.org/viewvc?rev=1203162&view=rev
Log:
if specified stylesheet doesn't exist, log the file resolved relative to project rather than
the task's basedir

Modified:
    ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/XSLTProcess.java

Modified: ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/XSLTProcess.java
URL: http://svn.apache.org/viewvc/ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/XSLTProcess.java?rev=1203162&r1=1203161&r2=1203162&view=diff
==============================================================================
--- ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/XSLTProcess.java (original)
+++ ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/XSLTProcess.java Thu Nov 17 12:04:16
2011
@@ -359,15 +359,16 @@ public class XSLTProcess extends Matchin
                 // via style attribute
                 File stylesheet = getProject().resolveFile(xslFile);
                 if (!stylesheet.exists()) {
-                    stylesheet = FILE_UTILS.resolveFile(baseDir, xslFile);
+                    File alternative = FILE_UTILS.resolveFile(baseDir, xslFile);
                     /*
                      * shouldn't throw out deprecation warnings before we know,
                      * the wrong version has been used.
                      */
-                    if (stylesheet.exists()) {
+                    if (alternative.exists()) {
                         log("DEPRECATED - the 'style' attribute should be "
                             + "relative to the project's");
                         log("             basedir, not the tasks's basedir.");
+                        stylesheet = alternative;
                     }
                 }
                 FileResource fr = new FileResource();



Mime
View raw message