ctubbsii commented on issue #3529: URL: https://github.com/apache/accumulo/issues/3529#issuecomment-1604981438
> It really seems that isPropertySet is checking if the key exists, not necessarily that the property was set. So far, it looks like any property that we have defined will return true - the check will climb the hierarchy and if not found, it will check the default - which will exist and return true. This is even if the value is null or an empty string as the default value. No, the DefaultConfiguration returns false, not true. It only looks like it's checking of the key exists in the other implementations, because the presence of any key in those implementations means a user has configured it... the content of all those other implementations are empty by default, so any presence of a key there means the user was involved. But, the DefaultConfiguration always returns false at the bottom (or top? depending on your preferred orientation) of the hierarchy. > > The only time that isPropertySet would seem to work as excepted would be for custom properties - if a custom property is set, it will return true. If not, there will not be a default, so it will be false. That still leaves the determination if the set value is valid or not up to the caller. No, it works fine for default values, too, because DefaultConfiguration.isPropertySet returns false, not true. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
