eclipse-paho / eclipse-paho/paho.mqtt.java
Documentation error about Session Expiry Interval property.
- Dominant language
- Java
- Stars
- 2.3k
- Forks
- 919
- PR merge metrics
- No merged PRs in 30d
Description
Please fill out the form below before submitting, thank you!
- [ X] Bug exists Release Version 1.2.5 ( Master Branch)
- [ ] Bug exists in MQTTv3 Client on Snapshot Version 1.2.6-SNAPSHOT (Develop Branch)
- [ X] Bug exists in MQTTv5 Client on Snapshot Version 1.2.6-SNAPSHOT (Develop Branch)
The Javadoc of the methods getSessionExpiryInterval (L498-506) and setSessionExpiryInterval (L508-529) in MqttConnectionOptions class are false and seriously mislead the user. This javadoc states that "By default this value is null and so will not be sent, in this case, the session will not expire.". The first part of the sentence is true, the second is false. Indeed, in the section 3.1.2.11.2 the MQTT v5 specification says: "If the Session Expiry Interval is absent the value 0 is used. If it is set to 0, or is absent, the Session ends when the Network Connection is closed."
The error is also present in comment line 102.
Contributor guide
Research direction
Review the Javadoc for getSessionExpiryInterval and setSessionExpiryInterval in MqttConnectionOptions around lines 498-529, along with the comment at line 102. Compare the wording with MQTT v5 section 3.1.2.11.2, correct the explanation of the absent or zero Session Expiry Interval, and confirm all three locations are consistent.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- documentation
- Issue type
- Documentation
- Difficulty
- 1/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 65/100