Skip to content

simplify additionalItems validation flow#1256

Merged
stevehu merged 1 commit into
networknt:masterfrom
Oz-er:simplify-items-legacy-additional-items
Jun 22, 2026
Merged

simplify additionalItems validation flow#1256
stevehu merged 1 commit into
networknt:masterfrom
Oz-er:simplify-items-legacy-additional-items

Conversation

@Oz-er

@Oz-er Oz-er commented Jun 22, 2026

Copy link
Copy Markdown
Contributor

Summary

Simplifies the additionalItems handling in ItemsLegacyValidator by removing an empty branch that contained
only commented-out code.

Rationale

PMD reported an EmptyControlStatement in this area. The previous if (this.additionalItems) branch had no
active behavior, while the else branch handled the validation error case. This change checks if (! this.additionalItems) directly and preserves the existing behavior.

Related issue: #ISSUE_NUMBER

Validation

  • PMD quickstart: selected EmptyControlStatement finding is removed
  • mvn test
  • mvn verify

@stevehu stevehu requested a review from Copilot June 22, 2026 10:38

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@stevehu

stevehu commented Jun 22, 2026

Copy link
Copy Markdown
Contributor

@Oz-er Thanks a lot for your help.

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.

3 participants