commons-text icon indicating copy to clipboard operation
commons-text copied to clipboard

Interpolation Defaults

Open darkma773r opened this issue 2 years ago • 4 comments

Changes similar to what was recently released in commons-configuration 2.8.0.

  • Make default string lookups configurable via system property.
  • Remove dns, url, and script lookups from defaults.

darkma773r avatar Jul 16 '22 11:07 darkma773r

Codecov Report

Merging #341 (3656292) into master (cf2126e) will increase coverage by 0.08%. The diff coverage is 100.00%.

@@             Coverage Diff              @@
##             master     #341      +/-   ##
============================================
+ Coverage     96.44%   96.52%   +0.08%     
+ Complexity     2338     2336       -2     
============================================
  Files            84       84              
  Lines          5821     5845      +24     
  Branches        957      961       +4     
============================================
+ Hits           5614     5642      +28     
+ Misses          128      124       -4     
  Partials         79       79              
Impacted Files Coverage Δ
.../main/java/org/apache/commons/text/StrBuilder.java 97.42% <ø> (ø)
...ava/org/apache/commons/text/StringSubstitutor.java 95.30% <ø> (ø)
...ava/org/apache/commons/text/TextStringBuilder.java 97.74% <ø> (ø)
...pache/commons/text/lookup/DefaultStringLookup.java 100.00% <ø> (+7.69%) :arrow_up:
.../commons/text/lookup/InterpolatorStringLookup.java 100.00% <100.00%> (ø)
...pache/commons/text/lookup/StringLookupFactory.java 96.20% <100.00%> (+5.81%) :arrow_up:

:mega: We’re building smart automated test selection to slash your CI/CD build times. Learn more

codecov-commenter avatar Jul 16 '22 12:07 codecov-commenter

It's good that the changes are similar to Commons Configuration but we should preserve the examples in Javadocs and perhaps separate them in a separate section in the Javadoc with an introduction sentence saying what you need to do to enable the relevant lookups.

garydgregory avatar Jul 19 '22 00:07 garydgregory

@garydgregory, I've added some additional documentation. Let me know what you think.

darkma773r avatar Jul 24 '22 16:07 darkma773r

@garydgregory, any objections to merging this?

darkma773r avatar Jul 27 '22 11:07 darkma773r