[
https://issues.apache.org/jira/browse/MATH-1023?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13757101#comment-13757101
]
Phil Steitz commented on MATH-1023:
-----------------------------------
Thomas is right. The reason that the exception is advertised (and thrown) is
that if you invoke an implementation setter after data has been added, the
statistic that you have overridden will not have the same data as the others. I
like the flexibility to plug in different implementations that this class
provides, so would prefer not to deprecate the setters. I guess an alternative
would be to add a slew of constructors that set them; but I see the current
design as simpler and easier to use.
> Javadoc in "SummaryStatistics" ("o.a.c.m.stat.descriptive")
> -----------------------------------------------------------
>
> Key: MATH-1023
> URL: https://issues.apache.org/jira/browse/MATH-1023
> Project: Commons Math
> Issue Type: Improvement
> Affects Versions: 3.2
> Reporter: Gilles
> Priority: Trivial
> Labels: documentation
>
> The documentation for methods "set...Impl(...)" indicates:
> ---
> This method must be activated before any data has been added - i.e., before
> addValue has been used to add data; otherwise an IllegalStateException will
> be thrown.
> ---
> However, every instance is created with default implementations; the warning
> is thus obsolete.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira