[jboss-jira] [JBoss JIRA] Created: (JBRULES-1746) The drools-ant task cannot compile decision tables (.xls files)

Peter Feltham (JIRA) jira-events at lists.jboss.org
Tue Aug 19 22:30:23 EDT 2008


The drools-ant task cannot compile decision tables (.xls files)
---------------------------------------------------------------

                 Key: JBRULES-1746
                 URL: https://jira.jboss.org/jira/browse/JBRULES-1746
             Project: JBoss Drools
          Issue Type: Bug
      Security Level: Public (Everyone can see)
          Components: drools-ant
    Affects Versions: 5.0.0.M1, 4.0.7
         Environment: Affects all environments
            Reporter: Peter Feltham
            Assignee: Mark Proctor


There is a bug in the drools-ant task which prevents it from compiling .xls files - it checks whether fileName.equals(".xls") instead of filename.endsWith(".xls") - so it defaults to trying to compile .xls files as if they were .drl files.

Patch to trunk follows...

Index: src/main/java/org/drools/contrib/DroolsCompilerAntTask.java
===================================================================
--- src/main/java/org/drools/contrib/DroolsCompilerAntTask.java	(revision 21630)
+++ src/main/java/org/drools/contrib/DroolsCompilerAntTask.java	(working copy)
@@ -231,7 +231,7 @@
 				builder.addRuleFlow(instream);
 			} else if (fileName.endsWith(DroolsCompilerAntTask.XMLFILEEXTENSION)) {
 				builder.addPackageFromXml(instream);
-            } else if (fileName.equals(DroolsCompilerAntTask.XLSFILEEXTENSION)) {
+            } else if (fileName.endsWith(DroolsCompilerAntTask.XLSFILEEXTENSION)) {
 
                 final SpreadsheetCompiler converter = new SpreadsheetCompiler();
                 final String drl = converter.compile( new FileInputStream(file),


-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        



More information about the jboss-jira mailing list