ant-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bode...@apache.org
Subject svn commit: r943143 - in /ant/core/trunk: WHATSNEW src/main/org/apache/tools/ant/taskdefs/XSLTProcess.java
Date Tue, 11 May 2010 15:17:06 GMT
Author: bodewig
Date: Tue May 11 15:16:53 2010
New Revision: 943143

URL: http://svn.apache.org/viewvc?rev=943143&view=rev
Log:
<xslt> ignores classpath when defaulting to TraX.  PR 49271

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

Modified: ant/core/trunk/WHATSNEW
URL: http://svn.apache.org/viewvc/ant/core/trunk/WHATSNEW?rev=943143&r1=943142&r2=943143&view=diff
==============================================================================
--- ant/core/trunk/WHATSNEW (original)
+++ ant/core/trunk/WHATSNEW Tue May 11 15:16:53 2010
@@ -20,6 +20,9 @@ Fixed bugs:
  * The MIME mailer ignored the port parameter when using SSL.
    Bugzilla Report 49267.
 
+ * <xslt> ignored the classpath when using the default TraX processor.
+   Bugzilla Report 49271.
+
 Other changes:
 --------------
 

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=943143&r1=943142&r2=943143&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 Tue May 11 15:16:53
2010
@@ -108,6 +108,10 @@ public class XSLTProcess extends Matchin
     /** for resolving entities such as dtds */
     private XMLCatalog xmlCatalog = new XMLCatalog();
 
+    /** Name of the TRAX Liaison class */
+    private static final String TRAX_LIAISON_CLASS =
+                        "org.apache.tools.ant.taskdefs.optional.TraXLiaison";
+
     /** Utilities used for file operations */
     private static final FileUtils FILE_UTILS = FileUtils.getFileUtils();
 
@@ -670,13 +674,15 @@ public class XSLTProcess extends Matchin
      * @exception Exception if the processor cannot be loaded.
      */
     private void resolveProcessor(String proc) throws Exception {
+        String classname;
         if (proc.equals(PROCESSOR_TRAX)) {
-            liaison = new org.apache.tools.ant.taskdefs.optional.TraXLiaison();
+            classname = TRAX_LIAISON_CLASS;
         } else {
             //anything else is a classname
-            Class clazz = loadClass(proc);
-            liaison = (XSLTLiaison) clazz.newInstance();
+            classname = proc;
         }
+        Class clazz = loadClass(classname);
+        liaison = (XSLTLiaison) clazz.newInstance();
     }
 
     /**
@@ -910,7 +916,8 @@ public class XSLTProcess extends Matchin
             } else {
                 try {
                     resolveProcessor(PROCESSOR_TRAX);
-                } catch (Exception e1) { // should not happen
+                } catch (Throwable e1) {
+                    e1.printStackTrace();
                     handleError(e1);
                 }
             }



Mime
View raw message