Skip to content

NIFI-15584 Fix NPE in DBCPConnectionPool for Dynamic Properties with Null Values#10888

Merged
exceptionfactory merged 1 commit intoapache:mainfrom
apanczyk:apanczyk/NIFI-15584/fix_npe
Feb 13, 2026
Merged

NIFI-15584 Fix NPE in DBCPConnectionPool for Dynamic Properties with Null Values#10888
exceptionfactory merged 1 commit intoapache:mainfrom
apanczyk:apanczyk/NIFI-15584/fix_npe

Conversation

@apanczyk
Copy link
Contributor

@apanczyk apanczyk commented Feb 12, 2026

Summary

NIFI-15584
DBCPConnectionPool.getConnectionProperties() throws a NullPointerException when a dynamic property value resolves to null.

The method uses Collectors.toMap to collect dynamic properties into a Map<String, String>. The underlying HashMap.merge() does not accept null values, so when either propertyValue.getValue() (sensitive properties) or propertyValue.evaluateAttributeExpressions().getValue() (non-sensitive properties) returns null, the collector throws an NPE.

Tracking

Please complete the following tracking steps prior to pull request creation.

Issue Tracking

Pull Request Tracking

  • Pull Request title starts with Apache NiFi Jira issue number, such as NIFI-00000
  • Pull Request commit message starts with Apache NiFi Jira issue number, as such NIFI-00000
  • Pull request contains commits signed with a registered key indicating Verified status

Pull Request Formatting

  • Pull Request based on current revision of the main branch
  • Pull Request refers to a feature branch with one commit containing changes

Verification

Please indicate the verification steps performed prior to pull request creation.

Build

  • Build completed using ./mvnw clean install -P contrib-check
    • JDK 21
    • JDK 25

Licensing

  • New dependencies are compatible with the Apache License 2.0 according to the License Policy
  • New dependencies are documented in applicable LICENSE and NOTICE files

Documentation

  • Documentation formatting appears as expected in rendered files

@apanczyk apanczyk marked this pull request as ready for review February 12, 2026 13:03
@pvillard31 pvillard31 added the bug label Feb 12, 2026
@apanczyk apanczyk force-pushed the apanczyk/NIFI-15584/fix_npe branch 3 times, most recently from d97bdb9 to ecc2eaa Compare February 12, 2026 14:01
@apanczyk apanczyk marked this pull request as draft February 12, 2026 14:04
@apanczyk apanczyk force-pushed the apanczyk/NIFI-15584/fix_npe branch from ecc2eaa to 1cf7f35 Compare February 12, 2026 14:12
@apanczyk apanczyk marked this pull request as ready for review February 12, 2026 14:16
Copy link
Contributor

@exceptionfactory exceptionfactory left a comment

Choose a reason for hiding this comment

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

Thanks for finding and correcting this issue @apanczyk! +1 merging

@exceptionfactory exceptionfactory merged commit a1c2855 into apache:main Feb 13, 2026
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants