MaxGekk commented on code in PR #49599:
URL: https://github.com/apache/spark/pull/49599#discussion_r1925067453


##########
core/src/test/scala/org/apache/spark/util/UtilsSuite.scala:
##########
@@ -526,10 +526,18 @@ class UtilsSuite extends SparkFunSuite with 
ResetSystemProperties {
 
     // The following 3 scenarios are only for the method: createDirectory(File)
     // 6. Symbolic link
+    lazy val (majorVersion: Int, patchVersion: Int) = {
+      // JAVA_RUNTIME_VERSION is like "17.0.14+7-LTS"
+      val splits = SystemUtils.JAVA_RUNTIME_VERSION.split("\\.")

Review Comment:
   Can't you use some standard methods for parsing, for instance:
   ```scala
   scala> Runtime.Version.parse("17.0.14+7-LTS").feature
   val res3: Int = 17
   
   scala> Runtime.Version.parse("17.0.14+7-LTS").update
   val res5: Int = 14
   ```



-- 
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: reviews-unsubscr...@spark.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org
For additional commands, e-mail: reviews-h...@spark.apache.org

Reply via email to