Skip to content

Commit 151b85b

Browse files
dhasani23David Hasani
andauthored
fix(amazonq): make sure target JDK version is defined (#6569)
## Problem Due to Java 21 support coming out, the target JDK version was no longer hardcoded as JDK17. So for SQL conversions, the target JDK was `undefined` and the `startJob` API was failing. ## Solution Hardcode JDK17 as a dummy target JDK so that we don't encounter an invalid request exception. --- - Treat all work as PUBLIC. Private `feature/x` branches will not be squash-merged at release time. - Your code changes must meet the guidelines in [CONTRIBUTING.md](https://github.com/aws/aws-toolkit-vscode/blob/master/CONTRIBUTING.md#guidelines). - License: I confirm that my contribution is made under the terms of the Apache 2.0 license. Co-authored-by: David Hasani <[email protected]>
1 parent 7d5a339 commit 151b85b

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

packages/core/src/codewhisperer/commands/startTransformByQ.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -104,8 +104,9 @@ export async function processSQLConversionTransformFormInput(pathToProject: stri
104104
transformByQState.setProjectName(path.basename(pathToProject))
105105
transformByQState.setProjectPath(pathToProject)
106106
transformByQState.setSchema(schema)
107-
transformByQState.setSourceJDKVersion(JDKVersion.JDK8) // use dummy value of JDK8 so that startJob API can be called
108-
// targetJDKVersion defaults to JDK17, the only supported version, which is fine
107+
// use dummy values of JDK8 & JDK17 so that startJob API can be called
108+
transformByQState.setSourceJDKVersion(JDKVersion.JDK8)
109+
transformByQState.setTargetJDKVersion(JDKVersion.JDK17)
109110
}
110111

111112
async function validateJavaHome(): Promise<boolean> {

0 commit comments

Comments
 (0)