(tomcat) branch 9.0.x updated: Review c71512e2 - Align Javadoc. Make other setters consistent.
[email protected] Mon, 03 Aug 2026 08:04:17 +0000
| Newsgroups | gmane.comp.jakarta.tomcat.devel |
|---|---|
| Message-ID | <[email protected]> |
This is an automated email from the ASF dual-hosted git repository.
markt-asf pushed a commit to branch 9.0.x
in repository https://gitbox.apache.org/repos/asf/tomcat.git
The following commit(s) were added to refs/heads/9.0.x by this push:
new de0361de47 Review c71512e2 - Align Javadoc. Make other setters consistent.
de0361de47 is described below
commit de0361de47ec482898a3c7c1a5422cee053161bc
Author: Mark Thomas <[email protected]>
AuthorDate: Mon Aug 3 09:03:39 2026 +0100
Review c71512e2 - Align Javadoc. Make other setters consistent.
---
.../apache/coyote/http11/upgrade/UpgradeGroupInfo.java | 17 ++++++++++-------
1 file changed, 10 insertions(+), 7 deletions(-)
diff --git a/java/org/apache/coyote/http11/upgrade/UpgradeGroupInfo.java b/java/org/apache/coyote/http11/upgrade/UpgradeGroupInfo.java
index 03999b9eda..1cec52aa64 100644
--- a/java/org/apache/coyote/http11/upgrade/UpgradeGroupInfo.java
+++ b/java/org/apache/coyote/http11/upgrade/UpgradeGroupInfo.java
@@ -103,7 +103,7 @@ public class UpgradeGroupInfo extends BaseModelMBean {
* Resets the bytes received counter.
*
* @param bytesReceived the value to restore (0 to reset completely,
- * non-zero values are added to the dead counter)
+ * positive values are added to the bytes received counter)
*/
public void setBytesReceived(long bytesReceived) {
deadBytesReceived.reset();
@@ -132,11 +132,12 @@ public class UpgradeGroupInfo extends BaseModelMBean {
/**
* Resets the bytes sent counter.
*
- * @param bytesSent the new value (ignored, used for MBean reset)
+ * @param bytesSent the value to restore (0 to reset completely,
+ * positive values are added to the bytes sent counter)
*/
public void setBytesSent(long bytesSent) {
deadBytesSent.reset();
- if (bytesSent != 0) {
+ if (bytesSent > 0) {
deadBytesSent.add(bytesSent);
}
for (UpgradeInfo ui : upgradeInfos) {
@@ -161,11 +162,12 @@ public class UpgradeGroupInfo extends BaseModelMBean {
/**
* Resets the messages received counter.
*
- * @param msgsReceived the new value (ignored, used for MBean reset)
+ * @param msgsReceived the value to restore (0 to reset completely,
+ * positive values are added to the messages received counter)
*/
public void setMsgsReceived(long msgsReceived) {
deadMsgsReceived.reset();
- if (msgsReceived != 0) {
+ if (msgsReceived > 0) {
deadMsgsReceived.add(msgsReceived);
}
for (UpgradeInfo ui : upgradeInfos) {
@@ -190,11 +192,12 @@ public class UpgradeGroupInfo extends BaseModelMBean {
/**
* Resets the messages sent counter.
*
- * @param msgsSent the new value (ignored, used for MBean reset)
+ * @param msgsSent the value to restore (0 to reset completely,
+ * positive values are added to the message sent counter)
*/
public void setMsgsSent(long msgsSent) {
deadMsgsSent.reset();
- if (msgsSent != 0) {
+ if (msgsSent > 0) {
deadMsgsSent.add(msgsSent);
}
for (UpgradeInfo ui : upgradeInfos) {