Details
-
Bug
-
Status: Closed
-
Minor
-
Resolution: Resolved
-
1.7.1
-
None
Description
The stated behavior is not the observed.
This is a complement to: apache/shiro-site#82
The relevant section of the commons-configuration class is:
After an instance has been created it does not contain any Lookup objects. The current set of lookup objects can be modified using the registerLookup() and deregisterLookup() methods. Default lookup objects (that are invoked for variables without a prefix) can be added or removed with the addDefaultLookup() and removeDefaultLookup() methods respectively. (When a ConfigurationInterpolator instance is created by a configuration object, a default lookup object is added pointing to the configuration itself, so that variables are resolved using the configuration's properties.)
So, the correct behavior is that you can use ${const:java.awt.event.KeyEvent.VK_ENTER} but not ${env:EDITOR}. The current code accepts ${EDITOR}. If a system property with this name is found not null, it is used, if not, an environment variable is search and if not, the whole substitution ${EDITOR} is returned.
As I suppose no one wants to break existing code with the correct behavior, I think it's better to just update the javadoc. I'll open a pull request with that.
Attachments
Issue Links
- links to