[jboss-jira] [JBoss JIRA] (JBRULES-3505) Planner: DroolsScoreDirector's score corruption analysis returns the wrong lacking size

Geoffrey De Smet (JIRA) jira-events at lists.jboss.org
Tue May 15 05:56:19 EDT 2012


     [ https://issues.jboss.org/browse/JBRULES-3505?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Geoffrey De Smet resolved JBRULES-3505.
---------------------------------------

    Fix Version/s: 5.5.0.Beta1
                       (was: 5.4.0.Final)
       Resolution: Done


Fixed for 5.5.0.Beta1 (5.4.0.Final is already out).

Thanks for the pull requested, applied :)
                
> Planner: DroolsScoreDirector's score corruption analysis returns the wrong lacking size
> ---------------------------------------------------------------------------------------
>
>                 Key: JBRULES-3505
>                 URL: https://issues.jboss.org/browse/JBRULES-3505
>             Project: Drools
>          Issue Type: Bug
>      Security Level: Public(Everyone can see) 
>          Components: drools-planner
>    Affects Versions: 5.4.0.CR1
>            Reporter: Cedric Hurst
>            Assignee: Geoffrey De Smet
>             Fix For: 5.5.0.Beta1
>
>
> The scoreCorruptionAnalysis report returns the size of the excessSet when it should be returning the size of the lackingSet:
> {code}
> if (!lackingSet.isEmpty()) {
>     analysis.append("  The workingMemory has ").append(excessSet.size()) // this should be lackingSet.size()
>             .append(" ConstraintOccurrence(s) lacking:\n");
>     int count = 0;
>     for (Object o : lackingSet) {
>         if (count >= CONSTRAINT_OCCURRENCE_DISPLAY_LIMIT) {
>             analysis.append("    ... ").append(lackingSet.size() - CONSTRAINT_OCCURRENCE_DISPLAY_LIMIT)
>                     .append(" more\n");
>             break;
>         }
>         analysis.append("    ").append(o.toString()).append("\n");
>         count++;
>     }
> }
> {code}
> Patch forthcoming.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.jboss.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        


More information about the jboss-jira mailing list