unitsofmeasurement / indriya

JSR 385 - Reference Implementation
Other
115 stars 40 forks source link

allow new instances of SimpleUnitFormat to be created #345

Closed andi-huber closed 3 years ago

andi-huber commented 3 years ago

Issue #344.

Is expected to resolve https://github.com/geotools/geotools/pull/3232.


This change is Reviewable

codecov[bot] commented 3 years ago

Codecov Report

Merging #345 (78ed567) into master (8b70fd3) will increase coverage by 12.37%. The diff coverage is 71.32%.

Impacted file tree graph

@@              Coverage Diff              @@
##             master     #345       +/-   ##
=============================================
+ Coverage     48.14%   60.51%   +12.37%     
- Complexity     1046     1156      +110     
=============================================
  Files            79       79               
  Lines          5083     5088        +5     
  Branches        921      922        +1     
=============================================
+ Hits           2447     3079      +632     
+ Misses         2362     1668      -694     
- Partials        274      341       +67     
Impacted Files Coverage Δ Complexity Δ
...va/tech/units/indriya/format/SimpleUnitFormat.java 71.31% <71.32%> (+69.88%) 13.00 <1.00> (+11.00)
...main/java/tech/units/indriya/unit/ProductUnit.java 88.88% <0.00%> (+0.55%) 51.00% <0.00%> (ø%)
...ch/units/indriya/function/PowerOfIntConverter.java 61.53% <0.00%> (+1.53%) 27.00% <0.00%> (+2.00%)
...tech/units/indriya/function/AbstractConverter.java 52.13% <0.00%> (+1.70%) 17.00% <0.00%> (ø%)
...java/tech/units/indriya/format/EBNFUnitFormat.java 52.50% <0.00%> (+2.50%) 9.00% <0.00%> (+1.00%)
.../java/tech/units/indriya/unit/TransformedUnit.java 90.90% <0.00%> (+3.03%) 17.00% <0.00%> (+1.00%)
...java/tech/units/indriya/function/ExpConverter.java 66.66% <0.00%> (+3.03%) 15.00% <0.00%> (+1.00%)
...n/java/tech/units/indriya/quantity/Quantities.java 37.03% <0.00%> (+3.70%) 5.00% <0.00%> (+1.00%)
...in/java/tech/units/indriya/unit/AlternateUnit.java 100.00% <0.00%> (+4.00%) 18.00% <0.00%> (ø%)
...nits/indriya/internal/format/UnitFormatParser.java 34.54% <0.00%> (+4.54%) 43.00% <0.00%> (+5.00%)
... and 19 more

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 8b70fd3...78ed567. Read the comment docs.

keilw commented 3 years ago

Great, @andi-huber is it safe to delete that branch as recommended here?

andi-huber commented 3 years ago

I got rid of these static initializers by moving around some code blocks and fields. Not changing any behavior (hopefully).