aherbert commented on code in PR #333:
URL: https://github.com/apache/commons-math/pull/333#discussion_r4316071488
##########
commons-math-legacy/src/main/java/org/apache/commons/math4/legacy/stat/descriptive/SynchronizedDescriptiveStatistics.java:
##########
@@ -69,6 +70,30 @@ public synchronized void addValue(double v) {
super.addValue(v);
}
+ /**
+ * {@inheritDoc}
+ *
+ * <p>This method is a mutator like {@link #addValue(double)}, so it has
to take the instance lock as well:
Review Comment:
This comment is not required. Using `{@inheritDoc}` is fine.
##########
commons-math-legacy/src/main/java/org/apache/commons/math4/legacy/stat/descriptive/SynchronizedDescriptiveStatistics.java:
##########
@@ -69,6 +70,30 @@ public synchronized void addValue(double v) {
super.addValue(v);
}
+ /**
+ * {@inheritDoc}
+ *
+ * <p>This method is a mutator like {@link #addValue(double)}, so it has
to take the instance lock as well:
+ * {@code DescriptiveStatistics} changes the underlying storeless
statistics in place, and without the lock a
+ * concurrent {@code getValues()} could copy the store while it is being
updated.</p>
+ */
+ @Override
+ public synchronized void removeMostRecentValue() throws
MathIllegalStateException {
+ super.removeMostRecentValue();
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * <p>This method is a mutator like {@link #addValue(double)}, so it has
to take the instance lock as well:
Review Comment:
This comment is not required. Using `{@inheritDoc}` is fine.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]