metafacture / metafacture-core

Core package of the Metafacture tool suite for metadata processing.
https://metafacture.org
Apache License 2.0
69 stars 34 forks source link

Fix "setreplace" using a FileMap (#381) #418

Closed dr0i closed 2 years ago

dr0i commented 2 years ago

"AbstractReadOnlyMap" didn't allow access to the full contents of Maps. It allowed only access by giving a key. While this makes sense when e.g. querying (big) databases this broke the "setreplace" function where the whole Map is loaded first to be able to replace (parts of) the input string. Allowing access to the entrySet allows the writing of the Set(Entry). To disallow this the map used in FileMap is made into an "unmodifiable Map".

dr0i commented 2 years ago

Hm, as you pinted out, this idea is not a solution. Closing.