Skip to content

Interpolator interface: allow to interpolate by setting the list of ValueSources and InterpolationPostProcessor #21

@belingueres

Description

@belingueres

Looking at: https://github.com/apache/maven/blob/a2b800de32cdb9adc1e64a43a0fc32e3ba878103/maven-model-builder/src/main/java/org/apache/maven/model/interpolation/AbstractStringBasedModelInterpolator.java#L233

Adding and removing repeatedly in a list of ValueSources and InterpolationPostProcessor is costly, mainly the final removing ValueSource and InterpolationPostProcessor part since remove is an O(n) operation on an ArrayList.

Instead, modify the Interpolator interface to either directly set both lists and interpolate from there, or either add a new interpolate method that takes both lists as parameters.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions