LuciferYang commented on code in PR #49606: URL: https://github.com/apache/spark/pull/49606#discussion_r1925746802
########## core/src/test/scala/org/apache/spark/util/UtilsSuite.scala: ########## @@ -525,10 +525,14 @@ class UtilsSuite extends SparkFunSuite with ResetSystemProperties { // The following 3 scenarios are only for the method: createDirectory(File) // 6. Symbolic link + lazy val javaVersion = System.getProperty("java.version").split("[+.\\-]+", 3).map(_.toInt) Review Comment: ``` [info] - SPARK-35907: createDirectory *** FAILED *** (24 milliseconds) [info] java.lang.NumberFormatException: For input string: "0_392" [info] at java.lang.NumberFormatException.forInputString(NumberFormatException.java:65) [info] at java.lang.Integer.parseInt(Integer.java:580) [info] at java.lang.Integer.parseInt(Integer.java:615) [info] at scala.collection.immutable.StringLike.toInt(StringLike.scala:310) [info] at scala.collection.immutable.StringLike.toInt$(StringLike.scala:310) [info] at scala.collection.immutable.StringOps.toInt(StringOps.scala:33) [info] at org.apache.spark.util.UtilsSuite.$anonfun$new$39(UtilsSuite.scala:528) [info] at org.apache.spark.util.UtilsSuite.$anonfun$new$39$adapted(UtilsSuite.scala:528) [info] at scala.collection.TraversableLike.$anonfun$map$1(TraversableLike.scala:286) [info] at scala.collection.IndexedSeqOptimized.foreach(IndexedSeqOptimized.scala:36) [info] at scala.collection.IndexedSeqOptimized.foreach$(IndexedSeqOptimized.scala:33) [info] at scala.collection.mutable.ArrayOps$ofRef.foreach(ArrayOps.scala:198) [info] at scala.collection.TraversableLike.map(TraversableLike.scala:286) [info] at scala.collection.TraversableLike.map$(TraversableLike.scala:279) [info] at scala.collection.mutable.ArrayOps$ofRef.map(ArrayOps.scala:198) [info] at org.apache.spark.util.UtilsSuite.javaVersion$lzycompute$1(UtilsSuite.scala:528) ``` The Java 8 version number may fail to parse. Perhaps we could add a try-catch block to return an array (0, 0, 0)? -- 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