Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix string concatenation code-scan issues #5546

Open
1 of 2 tasks
MalloD12 opened this issue Feb 1, 2024 · 0 comments · May be fixed by #5812
Open
1 of 2 tasks

Fix string concatenation code-scan issues #5546

MalloD12 opened this issue Feb 1, 2024 · 0 comments · May be fixed by #5812

Comments

@MalloD12
Copy link
Contributor

MalloD12 commented Feb 1, 2024

Search first

  • I searched and no similar issues were found

Description

There several code-scan High issues reported here. All of them are string concatenation issues like the one below:

 String.format("  SELECT\n" +
                      "    CONS.owner,\n" +
                      "    CONS.constrname AS constraint_name,\n" +
                      "    COL.colname AS column_name,\n" +
                      "    CONS.constrtype,\n" +
                      "    %d               AS column_index\n" +
                      "  FROM informix.sysconstraints CONS\n" +
                      "    JOIN informix.sysindexes IDX ON CONS.idxname = IDX.idxname\n" +
                      "    JOIN informix.syscolumns COL ON COL.tabid = CONS.tabid AND COL.colno = IDX.part%d\n",
                            i, i) 

We need to fix them all, probably by using StringBuilder class and appending different parts of these string lines.

Steps To Reproduce

N/A

Expected/Desired Behavior

All code-scan High issues should be fixed

Liquibase Version

No response

Database Vendor & Version

No response

Liquibase Integration

No response

Liquibase Extensions

No response

OS and/or Infrastructure Type/Provider

No response

Additional Context

No response

Are you willing to submit a PR?

  • I'm willing to submit a PR (Thank you!)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: In Development PR Issues
2 participants