Pil0tXia commented on code in PR #4257: URL: https://github.com/apache/eventmesh/pull/4257#discussion_r1270764706
########## eventmesh-storage-plugin/eventmesh-storage-mongodb/src/main/java/org/apache/eventmesh/storage/mongodb/utils/MongodbCloudEventUtil.java: ########## @@ -29,10 +29,19 @@ import io.cloudevents.SpecVersion; import io.cloudevents.core.builder.CloudEventBuilder; +import static org.apache.eventmesh.storage.mongodb.constant.MongodbConstants.CLOUD_EVENT_DOC_DATA; +import static org.apache.eventmesh.storage.mongodb.constant.MongodbConstants.CLOUD_EVENT_DOC_DATACONTENTTYPE; +import static org.apache.eventmesh.storage.mongodb.constant.MongodbConstants.CLOUD_EVENT_DOC_ID; +import static org.apache.eventmesh.storage.mongodb.constant.MongodbConstants.CLOUD_EVENT_DOC_SOURCE; +import static org.apache.eventmesh.storage.mongodb.constant.MongodbConstants.CLOUD_EVENT_DOC_SUBJECT; +import static org.apache.eventmesh.storage.mongodb.constant.MongodbConstants.CLOUD_EVENT_DOC_TYPE; +import static org.apache.eventmesh.storage.mongodb.constant.MongodbConstants.CLOUD_EVENT_DOC_VERSION; Review Comment: I suggest importing the `MongodbConstants` class only and using Constants.NAME to refer to the constant, which has the advantage of explicitness. Anyone reading the code can immediately understand that the constant NAME comes from the `MongodbConstants` class. This can reduce cognitive overhead and prevent confusion with constants of the same prefix in other classes. -- 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] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
