Commit 5381fdb
SWEEP: Replace BCL Dictionary<TKey,TValue> with JCG.Dictionary<TKey,TValue> (apache#1273) (apache#1287)
* SWEEP: Replace BCL Dictionary<TKey,TValue> with JCG.Dictionary<TKey,TValue> (apache#1273)
Replaces System.Collections.Generic.Dictionary<TKey, TValue> with
J2N.Collections.Generic.Dictionary<TKey, TValue> across all Java-derived
sources, using the alias JCG.Dictionary<TKey, TValue>.
J2N's Dictionary supports JDK HashMap semantics (null keys, removal during
enumeration, ReadOnlySpan<char> alternate lookup, structural equality and
formatting), which the BCL type lacks. Using BCL Dictionary in Java-derived
code was potentially masking bugs in extensions with low test coverage.
Exclusions per the issue:
- Lucene.Net.CodeAnalysis.* projects
- Lucene.Net.Replicator.AspNetCore
- lucene-cli + Lucene.Net.Tests.Cli
- Lucene.Net.Tests.TestFramework.{DependencyInjection,NUnitExtensions}
- Support folders and Lucene.Net.Support namespace
(except TagSoup and Sax under Lucene.Net.Benchmark/Support, which
are explicitly in scope per the issue)
Public API surface continues to expose IDictionary<TKey, TValue>; this is
not a binary-breaking change.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
* Commenting out using statements that were added to cover code that is currently commented out
---------
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>1 parent d4e2707 commit 5381fdb
272 files changed
Lines changed: 694 additions & 561 deletions
File tree
- src
- Lucene.Net.Analysis.Common/Analysis
- CharFilter
- Compound/Hyphenation
- Core
- Hunspell
- Pt
- Query
- Synonym
- Lucene.Net.Analysis.ICU/Analysis/Icu/Segmentation
- Lucene.Net.Analysis.Kuromoji
- Util
- Lucene.Net.Analysis.Phonetic
- Language
- Bm
- Lucene.Net.Analysis.SmartCn/Hhmm
- Lucene.Net.Benchmark
- ByTask
- Feeds
- Programmatic
- Tasks
- Utils
- Quality/Trec
- Support
- Sax/Helpers
- TagSoup
- Utils
- Lucene.Net.Classification
- Lucene.Net.Codecs
- BlockTerms
- Bloom
- Memory
- SimpleText
- Lucene.Net.Expressions
- JS
- Lucene.Net.Facet
- Range
- SortedSet
- Taxonomy
- Directory
- Lucene.Net.Grouping/Function
- Lucene.Net.Highlighter
- Highlight
- PostingsHighlight
- VectorHighlight
- Lucene.Net.Join
- Lucene.Net.Memory
- Lucene.Net.Misc/Document
- Lucene.Net.Queries/Mlt
- Lucene.Net.QueryParser
- Classic
- Ext
- Flexible
- Core
- Builders
- Config
- Nodes
- Messages
- Xml
- Builders
- Lucene.Net.Replicator
- Lucene.Net.Sandbox/Queries
- Lucene.Net.Spatial/Query
- Lucene.Net.Suggest/Suggest
- Lucene.Net.TestFramework
- Analysis
- Codecs
- Lucene40
- Lucene42
- RAMOnly
- Index
- Search
- Store
- Util
- Automaton
- Fst
- Lucene.Net.Tests.Analysis.Common
- Analysis
- CharFilters
- Core
- Miscellaneous
- Synonym
- Util
- Collation
- Lucene.Net.Tests.Analysis.ICU
- Analysis/Icu
- Segmentation
- Collation
- Lucene.Net.Tests.Analysis.Kuromoji
- Util
- Lucene.Net.Tests.Analysis.Morfologik/Morfologik
- Lucene.Net.Tests.Analysis.OpenNLP
- Lucene.Net.Tests.Analysis.Phonetic
- Lucene.Net.Tests.Analysis.SmartCn
- Hhmm
- Lucene.Net.Tests.Analysis.Stempel/Stempel
- Lucene.Net.Tests.Benchmark/ByTask
- Feeds
- Tasks
- Utils
- Lucene.Net.Tests.Expressions
- JS
- Lucene.Net.Tests.Facet
- Range
- SortedSet
- Taxonomy
- Directory
- WriterCache
- Lucene.Net.Tests.Grouping
- Lucene.Net.Tests.Join
- Lucene.Net.Tests.Queries
- Mlt
- Lucene.Net.Tests.QueryParser
- Analyzing
- Classic
- Flexible/Standard
- Xml
- Lucene.Net.Tests.Replicator
- Http
- Lucene.Net.Tests.Spatial/Prefix
- Lucene.Net.Tests.TestFramework/Configuration/Custom
- Lucene.Net.Tests
- Analysis
- TokenAttributes
- Codecs/Lucene3x
- Index
- Search
- Spans
- Store
- Util
- Lucene.Net
- Codecs
- Lucene3x
- Lucene40
- Lucene42
- Lucene45
- PerField
- Index
- Search
- Payloads
- Spans
- Store
- Util
- Automaton
- Fst
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Lines changed: 2 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
| 14 | + | |
14 | 15 | | |
15 | 16 | | |
16 | 17 | | |
| |||
30679 | 30680 | | |
30680 | 30681 | | |
30681 | 30682 | | |
30682 | | - | |
| 30683 | + | |
30683 | 30684 | | |
30684 | 30685 | | |
30685 | 30686 | | |
| |||
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
36 | 36 | | |
37 | 37 | | |
38 | 38 | | |
39 | | - | |
| 39 | + | |
40 | 40 | | |
41 | 41 | | |
42 | 42 | | |
| |||
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
195 | 195 | | |
196 | 196 | | |
197 | 197 | | |
198 | | - | |
| 198 | + | |
199 | 199 | | |
200 | 200 | | |
201 | 201 | | |
| |||
Lines changed: 2 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
| 7 | + | |
7 | 8 | | |
8 | 9 | | |
9 | 10 | | |
| |||
55 | 56 | | |
56 | 57 | | |
57 | 58 | | |
58 | | - | |
| 59 | + | |
59 | 60 | | |
60 | 61 | | |
61 | 62 | | |
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
725 | 725 | | |
726 | 726 | | |
727 | 727 | | |
728 | | - | |
| 728 | + | |
729 | 729 | | |
730 | 730 | | |
731 | 731 | | |
| |||
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
284 | 284 | | |
285 | 285 | | |
286 | 286 | | |
287 | | - | |
| 287 | + | |
288 | 288 | | |
289 | 289 | | |
290 | 290 | | |
| |||
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
41 | 41 | | |
42 | 42 | | |
43 | 43 | | |
44 | | - | |
| 44 | + | |
45 | 45 | | |
46 | 46 | | |
47 | 47 | | |
| |||
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
35 | 35 | | |
36 | 36 | | |
37 | 37 | | |
38 | | - | |
| 38 | + | |
39 | 39 | | |
40 | 40 | | |
41 | 41 | | |
| |||
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
46 | 46 | | |
47 | 47 | | |
48 | 48 | | |
49 | | - | |
| 49 | + | |
50 | 50 | | |
51 | 51 | | |
52 | 52 | | |
| |||
Lines changed: 3 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
| 6 | + | |
6 | 7 | | |
7 | 8 | | |
8 | 9 | | |
| |||
67 | 68 | | |
68 | 69 | | |
69 | 70 | | |
70 | | - | |
| 71 | + | |
71 | 72 | | |
72 | 73 | | |
73 | 74 | | |
| |||
79 | 80 | | |
80 | 81 | | |
81 | 82 | | |
82 | | - | |
| 83 | + | |
83 | 84 | | |
84 | 85 | | |
85 | 86 | | |
| |||
0 commit comments