You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by "Sebb (Reopened) (JIRA)" <ji...@apache.org> on 2012/04/10 03:35:16 UTC

[jira] [Reopened] (MATH-775) In the ListPopulation constructor, the check for a negative populationLimit should occur first.

     [ https://issues.apache.org/jira/browse/MATH-775?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Sebb reopened MATH-775:
-----------------------


Using a getter is better.
Exposing a field means that it is harder to make changes later, e.g. should there be a need to synch. the field or make it read-only.

As a general rule, mutable fields should never be exposed.
                
> In the ListPopulation constructor, the check for a negative populationLimit should occur first.
> -----------------------------------------------------------------------------------------------
>
>                 Key: MATH-775
>                 URL: https://issues.apache.org/jira/browse/MATH-775
>             Project: Commons Math
>          Issue Type: Bug
>    Affects Versions: 3.0
>            Reporter: Reid Hochstedler
>              Labels: genetics
>             Fix For: 3.1
>
>         Attachments: MATH-775.txt
>
>   Original Estimate: 1h
>  Remaining Estimate: 1h
>
> In the ListPopulation constructor, the check to see whether the populationLimit is positive should occur before the check to see if the number of chromosomes is greater than the populationLimit.

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