gemini-code-assist[bot] commented on code in PR #39302:
URL: https://github.com/apache/beam/pull/39302#discussion_r3569564361
##########
sdks/java/testing/load-tests/build.gradle:
##########
@@ -96,6 +96,19 @@ if (isSparkRunner) {
}
}
+def sparkJvmArgs() {
+ def testJavaVer = project.findProperty('testJavaVersion') ?
(project.property('testJavaVersion') as int) :
JavaVersion.current().majorVersion.toInteger()
+ if (testJavaVer >= 17) {
Review Comment:

Instead of manually parsing the Java version string/integer, you can use
Gradle's built-in `JavaVersion.toVersion()` helper. This is more robust and
handles various Java version formats (e.g., "17", "1.8", etc.) gracefully.
```
def testJavaVer =
JavaVersion.toVersion(project.findProperty('testJavaVersion') ?:
JavaVersion.current())
if (testJavaVer >= JavaVersion.VERSION_17) {
```
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]