A0R0P0I7T opened a new pull request, #17331: URL: https://github.com/apache/iotdb/pull/17331
## Description This PR fixes SonarCloud issues in the MQTT example module related to deprecated method handling and missing Javadoc. The deprecated method `format(ByteBuf payload)` previously threw a `NotImplementedException`. It is now updated to delegate to `format(String topic, ByteBuf payload)` to ensure backward compatibility. Additionally, the missing `@deprecated` Javadoc tag has been added to align with SonarCloud rules. ## Changes - Added `@deprecated` Javadoc tag to deprecated method - Replaced `NotImplementedException` with delegation to the newer method - Removed unused import of `NotImplementedException` ## Motivation Fix SonarCloud issues: - java:S1123 (missing @deprecated Javadoc) - java:S1133 (improper deprecated code handling) SonarCloud links: - https://sonarcloud.io/project/issues?issueStatuses=OPEN%2CCONFIRMED&id=apache_iotdb&open=AZbrkEVJD04wMQcEJkUI - https://sonarcloud.io/project/issues?issueStatuses=OPEN%2CCONFIRMED&id=apache_iotdb&open=AZbrkEVJD04wMQcEJkUH ## Verification - Ran `mvn spotless:apply` - Ran `mvn clean install -DskipTests` - Build passes locally <hr> ## Checklist - [x] been self-reviewed - [x] added Javadocs for modified methods - [x] follows project coding style (spotless applied) <hr> ## Files Modified - `example/mqtt-customize/src/main/java/org/apache/iotdb/mqtt/server/CustomizedJsonPayloadFormatter.java` -- 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]
