This is an automated email from the ASF dual-hosted git repository.
tbonelee 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 12399c7acf [ZEPPELIN-6464] Throw IllegalArgumentException for an
unsupported Scala version in SparkInterpreterLauncher
12399c7acf is described below
commit 12399c7acfbf81b86dbbb122c9ac415fdd380e83
Author: Minho Jang <[email protected]>
AuthorDate: Mon Jul 20 23:28:20 2026 +0900
[ZEPPELIN-6464] Throw IllegalArgumentException for an unsupported Scala
version in SparkInterpreterLauncher
### What is this PR for?
This PR updates `SparkInterpreterLauncher` to throw
`IllegalArgumentException` when the Scala version parsed from `spark-submit
--version` is outside the supported range.
Unsupported Scala versions are invalid input values for this validation
path, so `IllegalArgumentException` better describes the failure than a generic
`Exception`.
The exception message is intentionally unchanged, and the
`detectSparkScalaVersion(...)` method signature still declares `throws
Exception` because the method can still raise checked exceptions from process
execution, stream reading, and fallback Scala version detection.
This is behavior-preserving for callers: the existing caller catches
`Exception` and wraps it in an `IOException`, so the surfaced behavior and
public API remain unchanged.
### What type of PR is it?
Improvement
### What is the Jira issue?
* https://issues.apache.org/jira/browse/ZEPPELIN-6464
### How should this be tested?
* Build and run the module tests:
```
./mvnw test -pl zeppelin-server --am
```
### Questions:
* Does the license files need to update? No
* Is there breaking changes for older versions? No
* Does this needs documentation? No
Closes #5326 from
miinhho/refactor/throw-illegal-exception-in-unsupported-scala.
Signed-off-by: ChanHo Lee <[email protected]>
---
.../apache/zeppelin/interpreter/launcher/SparkInterpreterLauncher.java | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git
a/zeppelin-server/src/main/java/org/apache/zeppelin/interpreter/launcher/SparkInterpreterLauncher.java
b/zeppelin-server/src/main/java/org/apache/zeppelin/interpreter/launcher/SparkInterpreterLauncher.java
index 7b66b821df..98e0e5e0b8 100644
---
a/zeppelin-server/src/main/java/org/apache/zeppelin/interpreter/launcher/SparkInterpreterLauncher.java
+++
b/zeppelin-server/src/main/java/org/apache/zeppelin/interpreter/launcher/SparkInterpreterLauncher.java
@@ -285,7 +285,7 @@ public class SparkInterpreterLauncher extends
StandardInterpreterLauncher {
} else if (scalaVersion.startsWith("2.13")) {
return "2.13";
} else {
- throw new Exception("Unsupported scala version: " + scalaVersion);
+ throw new IllegalArgumentException("Unsupported scala version: " +
scalaVersion);
}
} else {
return detectSparkScalaVersionByReplClass(sparkHome);