Skip to content

[java] Fix #6531: False negative in InsecureCryptoIv with array initializers - #6545

Merged
adangel merged 1 commit into
pmd:mainfrom
zbynek:hardcoded
Mar 27, 2026
Merged

adangel merged 1 commit into
pmd:mainfrom
zbynek:hardcoded

Conversation

@zbynek

@zbynek zbynek commented Mar 24, 2026 •

Copy link
Copy Markdown
Contributor

Describe the PR

Array initializers were previously only handled as part of new, the rule should also check for the shorter syntax.

Related issues

Ready?

  • Added unit tests for fixed bug/feature
  • Passing all unit tests
  • Complete build ./mvnw clean verify passes (checked automatically by github actions)
  • Added (in-code) documentation (if needed)

@pmd-actions-helper

Copy link
Copy Markdown
Contributor

Documentation Preview

Compared to main:
This changeset changes 0 violations,
introduces 0 new violations, 0 new errors and 0 new configuration errors,
removes 0 violations, 0 errors and 0 configuration errors.

Regression Tester Report

(comment created at 2026-03-24 21:58:34+00:00 for 287971a)

@adangel adangel changed the title [java] Fix false negative in InsecureCryptoIv with array initializers [java] Fix #6531: False negative in InsecureCryptoIv with array initializers Mar 27, 2026
@adangel adangel changed the title [java] Fix #6531: False negative in InsecureCryptoIv with array initializers [java] Fix #653: False negative in InsecureCryptoIv with array initializers Mar 27, 2026
@adangel adangel changed the title [java] Fix #653: False negative in InsecureCryptoIv with array initializers [java] Fix #6531: False negative in InsecureCryptoIv with array initializers Mar 27, 2026

@adangel adangel left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thanks!

adangel added a commit that referenced this pull request Mar 27, 2026
@adangel
adangel merged commit 287971a into pmd:main Mar 27, 2026
13 checks passed
adangel added a commit that referenced this pull request Mar 27, 2026
@adangel adangel added this to the 7.23.0 milestone Mar 27, 2026
@zbynek
zbynek deleted the hardcoded branch March 27, 2026 18:55
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.

[java] InsecureCryptoIv: False negative with fixed IVs from array initializers

2 participants