amazon-ion / ion-element-kotlin

IonElement is an immutable in-memory representation of the Ion data format. IonElement's API is idiomatic to Kotlin.
Apache License 2.0
8 stars 8 forks source link

Adds kotlinx.collections.immutable to ensure immutability of the contents of a ContainerElement #60

Closed popematt closed 3 years ago

popematt commented 3 years ago

Issue #, if available:

Fixes #45

Description of changes:

Makes the backing List of all of the container types immutable, even from Java code.

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

codecov-commenter commented 3 years ago

Codecov Report

Merging #60 (bbf60c4) into master (06fe01d) will increase coverage by 0.01%. The diff coverage is 100.00%.

Impacted file tree graph

@@             Coverage Diff              @@
##             master      #60      +/-   ##
============================================
+ Coverage     86.68%   86.70%   +0.01%     
  Complexity      368      368              
============================================
  Files            30       30              
  Lines           736      737       +1     
  Branches         72       72              
============================================
+ Hits            638      639       +1     
  Misses           65       65              
  Partials         33       33              
Impacted Files Coverage Δ
src/com/amazon/ionelement/api/Ion.kt 98.27% <100.00%> (+<0.01%) :arrow_up:
src/com/amazon/ionelement/api/IonMeta.kt 62.50% <100.00%> (ø)
...com/amazon/ionelement/impl/BigIntIntElementImpl.kt 65.21% <100.00%> (ø)
src/com/amazon/ionelement/impl/BlobElementImpl.kt 100.00% <100.00%> (ø)
src/com/amazon/ionelement/impl/BoolElementImpl.kt 94.11% <100.00%> (ø)
src/com/amazon/ionelement/impl/ClobElementImpl.kt 100.00% <100.00%> (ø)
...c/com/amazon/ionelement/impl/DecimalElementImpl.kt 94.44% <100.00%> (ø)
src/com/amazon/ionelement/impl/FloatElementImpl.kt 94.44% <100.00%> (ø)
src/com/amazon/ionelement/impl/ListElementImpl.kt 93.75% <100.00%> (ø)
...c/com/amazon/ionelement/impl/LongIntElementImpl.kt 89.47% <100.00%> (ø)
... and 7 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 06fe01d...bbf60c4. Read the comment docs.