This is an automated email from the ASF dual-hosted git repository. zjffdu pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/zeppelin.git
The following commit(s) were added to refs/heads/master by this push: new 9a5518e [ZEPPELIN-4041] SparkVersion.java refactoring 9a5518e is described below commit 9a5518e67038a8bc22145c9130f66474e614d1c8 Author: freenice12 <freenic...@gmail.com> AuthorDate: Fri Mar 8 09:43:49 2019 +0900 [ZEPPELIN-4041] SparkVersion.java refactoring ### What is this PR for? SparkVersion.java refactoring. Method: newerThanEqualsPatchVersion Method could use semantic majorVersion, minorVersion and patchVersion. I think It could be more readable. ### What type of PR is it? [Refactoring] ### What is the Jira issue? https://issues.apache.org/jira/browse/ZEPPELIN-4041 ### How should this be tested? Unit test pass ### Questions: * Does the licenses files need update? no * Is there breaking changes for older versions? no * Does this needs documentation? no Author: freenice12 <freenic...@gmail.com> Closes #3323 from freenice12/ZEPPELIN-4041 and squashes the following commits: 8dbf0ba4e [freenice12] Merge branch 'ZEPPELIN-4041' of https://github.com/freenice12/zeppelin into ZEPPELIN-4041 845cd23a6 [freenice12] SparkVersion.java refactoring. 35a2eca08 [freenice12] SparkVersion.java refactoring --- .../src/main/java/org/apache/zeppelin/spark/SparkVersion.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/spark/interpreter/src/main/java/org/apache/zeppelin/spark/SparkVersion.java b/spark/interpreter/src/main/java/org/apache/zeppelin/spark/SparkVersion.java index 42b279c..de65105 100644 --- a/spark/interpreter/src/main/java/org/apache/zeppelin/spark/SparkVersion.java +++ b/spark/interpreter/src/main/java/org/apache/zeppelin/spark/SparkVersion.java @@ -108,8 +108,9 @@ public class SparkVersion { } public boolean newerThanEqualsPatchVersion(SparkVersion versionToCompare) { - return version / 100 == versionToCompare.version / 100 && - version % 100 >= versionToCompare.version % 100; + return majorVersion == versionToCompare.majorVersion && + minorVersion == versionToCompare.minorVersion && + patchVersion >= versionToCompare.patchVersion; } public boolean olderThan(SparkVersion versionToCompare) {