eclipse-equinox / p2

Eclipse Public License 2.0
15 stars 41 forks source link

Use copy in provided cap #459

Closed laeubi closed 8 months ago

laeubi commented 8 months ago

in the context of Tycho it could easily happen that there are hundred of thousands of ProvidedCapability's. Each of them currently carry a HashMap that is then wrapped in an unmodifiable collection.

This replaces it with Map.copyOf(...) now to ensure it is unmodifiable and only ever contains the exact number of entries saving a few bytes for object references and possible null table entries.

github-actions[bot] commented 8 months ago

Test Results

    9 files  ±0      9 suites  ±0   31m 18s :stopwatch: -45s 2 183 tests ±0  2 179 :white_check_mark: ±0   4 :zzz: ±0  0 :x: ±0  6 639 runs  ±0  6 628 :white_check_mark: ±0  11 :zzz: ±0  0 :x: ±0 

Results for commit de69d111. ± Comparison against base commit 4fc3821b.