Skip to content

fix(QTDI-3124): [Refactoring] Merge sonar fixes#1248

Open
undx wants to merge 57 commits into
masterfrom
ouf/QTDI-3124-sonar-fixes
Open

fix(QTDI-3124): [Refactoring] Merge sonar fixes#1248
undx wants to merge 57 commits into
masterfrom
ouf/QTDI-3124-sonar-fixes

Conversation

@undx

@undx undx commented Jun 26, 2026

Copy link
Copy Markdown
Member

Requirements

  • Any code change adding any logic MUST be tested through a unit test executed with the default build
  • Any API addition MUST be done with a documentation update if relevant

Why this PR is needed?

What does this PR adds (design/code thoughts)?

AI generated code

https://internal.qlik.dev/general/ways-of-working/code-reviews/#guidelines-for-ai-generated-code

  • [] this PR has been written with the help of GitHub Copilot or another generative AI tool

undx and others added 30 commits May 21, 2026 17:56
Replace `instanceof` + manual cast patterns with Java 17 pattern
matching for instanceof to reduce Sonar warnings (java:S6201).

Both `(X) value` and `X.class.cast(value)` cast forms are handled.

Excluded cases:
- Conditions combined with `||` (pattern matching incompatible with
  alternation): AvroSchemaCache, SchemaConverter (Double||Float).
- ParameterSetter#set: target variable declared outside the `if`
  block (would require restructuring).
- Casts to a type different from the `instanceof` check (not S6201).
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
- used intellij inspection as it is...
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
undx and others added 25 commits May 29, 2026 11:08
# Conflicts:
#	component-runtime-beam/src/main/java/org/talend/sdk/component/runtime/beam/spi/record/AvroRecord.java
#	component-studio/component-runtime-di/src/main/java/org/talend/sdk/component/runtime/di/OutputsHandler.java
#	component-studio/component-runtime-di/src/main/java/org/talend/sdk/component/runtime/di/schema/TaCoKitGuessSchema.java
#	component-studio/component-runtime-di/src/main/java/org/talend/sdk/component/runtime/di/studio/ParameterSetter.java
…' into ouf/QTDI-3124-sonar-fixes

# Conflicts:
#	component-runtime-manager/src/main/java/org/talend/sdk/component/runtime/manager/xbean/converter/SchemaConverter.java
…o ouf/QTDI-3124-sonar-fixes

# Conflicts:
#	component-runtime-beam/src/main/java/org/talend/sdk/component/runtime/beam/spi/record/AvroRecord.java
#	component-runtime-impl/src/main/java/org/talend/sdk/component/runtime/record/json/RecordJsonGenerator.java
#	component-runtime-impl/src/test/java/org/talend/sdk/component/runtime/record/RecordConvertersTest.java
#	component-runtime-manager/src/test/java/org/talend/sdk/component/runtime/manager/service/RecordServiceImplTest.java
#	component-runtime-testing/component-runtime-beam-junit/src/main/java/org/talend/sdk/component/junit/beam/Data.java
…g' into ouf/QTDI-3124-sonar-fixes

# Conflicts:
#	component-form/component-form-core/src/main/java/org/talend/sdk/component/form/internal/validation/spi/ext/BaseValidation.java
#	component-runtime-manager/src/main/java/org/talend/sdk/component/runtime/manager/util/DefaultValueInspector.java
#	singer-parent/component-kitap/src/main/java/org/talend/sdk/component/singer/kitap/Kitap.java
…' into ouf/QTDI-3124-sonar-fixes

# Conflicts:
#	component-runtime-impl/src/test/java/org/talend/sdk/component/runtime/record/RecordBuilderImplTest.java
#	component-studio/component-runtime-di/src/test/java/org/talend/sdk/component/runtime/di/beam/components/DIBatchSimulationTest.java
#	component-studio/component-runtime-di/src/test/java/org/talend/sdk/component/runtime/di/beam/components/DIBulkAutoChunkTest.java
#	component-studio/component-runtime-di/src/test/java/org/talend/sdk/component/runtime/di/studio/DynamicColumnsTest.java
#	component-tools/src/test/java/org/talend/sdk/component/tools/SvgValidatorTest.java
…to ouf/QTDI-3124-sonar-fixes

# Conflicts:
#	component-studio/component-runtime-di/src/test/java/org/talend/sdk/component/runtime/di/schema/TaCoKitGuessSchemaTest.java
…to ouf/QTDI-3124-sonar-fixes

# Conflicts:
#	component-tools/src/main/java/org/talend/sdk/component/tools/AsciidoctorExecutor.java
@undx undx requested a review from Copilot June 26, 2026 09:29

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot wasn't able to review this pull request because it exceeds the maximum number of files (300). Try reducing the number of changed files and requesting a review from Copilot again.

@undx undx changed the title Ouf/qtdi 3124 sonar fixes fix(QTDI-3124): [Refactoring] Merge sonar fixes Jun 26, 2026
@sonar-rnd

sonar-rnd Bot commented Jun 26, 2026

Copy link
Copy Markdown

Failed Quality Gate failed

  • 0.00% Coverage on New Code (is less than 80.00%)
  • 137 New Issues (is greater than 0)

Project ID: org.talend.sdk.component:component-runtime

View in SonarQube

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants