renechoi commented on code in PR #4999: URL: https://github.com/apache/zeppelin/pull/4999#discussion_r2250054536
########## zeppelin-zengine/src/main/java/org/apache/zeppelin/interpreter/launcher/SparkInterpreterLauncher.java: ########## @@ -293,7 +293,25 @@ private String detectSparkScalaVersion(String sparkHome, Map<String, String> env private String detectSparkScalaVersionByReplClass(String sparkHome) throws Exception { File sparkJarsFolder = new File(sparkHome + "/jars"); Review Comment: @Reamer Thank you for the review! I've updated the implementation to use the modern `Files` and `Paths` API as suggested. Changes made: - Replaced `File` with `Path` using `Paths.get()` - Used `Files.exists()` and `Files.isDirectory()` for validation - Implemented `DirectoryStream` with glob pattern for better file filtering - Enhanced error handling with proper IOException propagation I've also added additional test cases to improve coverage: - Multiple spark-repl jars scenario - Scala 2.13 version detection - Unsupported Scala version handling All tests are passing. Please let me know if you have any other suggestions! -- 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...@zeppelin.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org