Class MapDuplicateKeyChecker


  • public class MapDuplicateKeyChecker
    extends Object
    This helper class is used by the map validators to detect if a duplicate key is in the set. Many of the map properties in Agent Properties. e.g. com.sun.identity.agents.config.filter.mode are validated with pattern matching, and additionally need to check if there is more than one setting for the exact same key. The values in set of properties should be, for example [somecontextroot]=somevalue and "somecontextroot" should only be set to one value. Precondition :Assumes that values in the Set dont allow the characters "[" or "]" inside the brackets, so it use bracket as a special character in parsing. Duplicates are exact duplicates, since set does not distinguish between letter case of a key, so "Key" is a different key from "key". We dont check for duplicates such as this type of possible case. However, we do check for exact duplicate context root name within whole values, so if user inputs [mycontextroot]=ALL and [mycontextroot]=NONE then both values will be in the set, and this code will detect that "mycontextroot" is a duplicate so set will be considered invalid.
    • Constructor Detail

      • MapDuplicateKeyChecker

        public MapDuplicateKeyChecker()