Skip to content

NIFI-12305 Optimize Regular Expressions in SampleRecord and EndpointMerger#7967

Closed
exceptionfactory wants to merge 1 commit intoapache:mainfrom
exceptionfactory:NIFI-12305
Closed

NIFI-12305 Optimize Regular Expressions in SampleRecord and EndpointMerger#7967
exceptionfactory wants to merge 1 commit intoapache:mainfrom
exceptionfactory:NIFI-12305

Conversation

@exceptionfactory
Copy link
Contributor

Summary

NIFI-12305 Optimizes regular expression pattern definitions and usage in the SampleRecord Processor and the AccessPolicyEndpointMerger class.

Changes to SampleRecord improve range validation with an initial split on comma prior to validating individual ranges. This approach avoids potential issues with large numbers of ranges. Change to AccessPolicyEndpointMerger restrict the set of characters to alphanumeric values and hyphen.

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 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 mvn clean install -P contrib-check
    • JDK 21

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

- Updated SampleRecord range validation to split on comma and validate individual ranges
- Updated AccessPolicyEndpointMerger to restrict the set of characters matched
@mattyb149
Copy link
Contributor

+1 LGTM, thanks for the improvement! Merging to main and support/nifi-1.x

@mattyb149 mattyb149 closed this in 9b29fff Nov 6, 2023
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.

2 participants