radon
radon copied to clipboard
Bad usage of Map in ExclusionManager can lead to undesired effects
The current implementation of ExclusionManager takes a Map<String, String> as a constructor as a collection of patterns.
https://github.com/ItzSomebody/radon/blob/7d3e8719afdb832c95ca19e2817e33d2b3f36c32/xyz.itzsomebody.radon/src/main/java/xyz/itzsomebody/radon/exclusions/ExclusionManager.java#L30-L44
This is a flawed implementation because it allows for overwriting exclusion patterns in the map, causing them to vanish. Need to also change this line as well:
https://github.com/ItzSomebody/radon/blob/7d3e8719afdb832c95ca19e2817e33d2b3f36c32/xyz.itzsomebody.radon/src/main/java/xyz/itzsomebody/radon/config/ExclusionsDeserializer.java#L30-L38
Thanks to lokirus for finding the side effects of my dumb code logic errors!