eunhwa99 commented on PR #4978: URL: https://github.com/apache/zeppelin/pull/4978#issuecomment-3087135862
> If you really want to clean things up here, then the class should implement the [Comparable](https://docs.oracle.com/javase/8/docs/api/java/lang/Comparable.html) interface. This makes it possible for all classes that use `SemanticVersion` to perform a reasonable and standardized comparison. > Furthermore, the class variables should be final. Thanks for the helpful review! I implemented the `Comparable` interface and updated helper methods like `equalsOrNewerThan` to use `compareTo`. While I considered exposing `compareTo` directly, but after reviewing established libraries and best practices, I decided this approach improves code readability and intent clarity. ([8d153c2](https://github.com/apache/zeppelin/pull/4978/commits/8d153c2a7a6802bca7286909fc335a4ffdf71502)) I also made class variables `final` for immutability and moved constructor-only variables to local scope to simplify the class state.(b0e20ca) I'd appreciate your review on this approach. -- 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]
