Skip to content

Commit a43ad2b

Browse files
dhasani23David Hasani
andauthored
fix(amazonq): broaden search strings (#6357)
## Problem We search for 4 strings to indicate/infer Oracle SQL is present, including `oracle.jdbc.OracleDriver`, but legacy software can instead contain `oracle.jdbc.driver.OracleDriver`. ## Solution Broaden/loosen the validation/search. --- - 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 fe0eee8 commit a43ad2b

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -654,14 +654,14 @@ export async function getValidSQLConversionCandidateProjects() {
654654
let resultLog = ''
655655
for (const project of javaProjects) {
656656
// as long as at least one of these strings is found, project contains embedded SQL statements
657-
const searchStrings = ['oracle.jdbc.OracleDriver', 'jdbc:oracle:thin:@', 'jdbc:oracle:oci:@', 'jdbc:odbc:']
657+
const searchStrings = ['oracle.jdbc.', 'jdbc:oracle:', 'jdbc:odbc:']
658658
for (const str of searchStrings) {
659659
const spawnResult = await findStringInDirectory(str, project.path)
660660
// just for telemetry purposes
661661
if (spawnResult.error || spawnResult.stderr) {
662-
resultLog += `search failed: ${JSON.stringify(spawnResult)}`
662+
resultLog += `search error: ${JSON.stringify(spawnResult)}--`
663663
} else {
664-
resultLog += `search succeeded: ${spawnResult.exitCode}`
664+
resultLog += `search complete (exit code: ${spawnResult.exitCode})--`
665665
}
666666
getLogger().info(`CodeTransformation: searching for ${str} in ${project.path}, result = ${resultLog}`)
667667
if (spawnResult.exitCode === 0) {

0 commit comments

Comments
 (0)